qiskit.circuit.QuantumCircuit.cp¶
- QuantumCircuit.cp(theta, control_qubit, target_qubit, label=None, ctrl_state=None)[Quellcode]¶
Apply
CPhaseGate
.For the full matrix form of this gate, see the underlying gate documentation.
- Parameter
theta (ParameterValueType) – The angle of the rotation.
control_qubit (QubitSpecifier) – The qubit(s) used as the control.
target_qubit (QubitSpecifier) – The qubit(s) targeted by the gate.
label (str | None) – The string label of the gate in the circuit.
ctrl_state (str | int | None) – The control state in decimal, or as a bitstring (e.g. ‚1‘). Defaults to controlling on the ‚1‘ state.
- Rückgabe
A handle to the instructions created.
- Rückgabetyp