qiskit.circuit.QuantumCircuit.cu¶
- QuantumCircuit.cu(theta, phi, lam, gamma, control_qubit, target_qubit, label=None, ctrl_state=None)[source]¶
Apply
CUGate
.For the full matrix form of this gate, see the underlying gate documentation.
- Parameters
theta (
Union
[ParameterExpression
,float
]) – The \(\theta\) rotation angle of the gate.phi (
Union
[ParameterExpression
,float
]) – The \(\phi\) rotation angle of the gate.lam (
Union
[ParameterExpression
,float
]) – The \(\lambda\) rotation angle of the gate.gamma (
Union
[ParameterExpression
,float
]) – The global phase applied of the U gate, if applied.control_qubit (
Union
[Qubit
,QuantumRegister
,int
,slice
,Sequence
[Union
[Qubit
,int
]]]) – The qubit(s) used as the control.target_qubit (
Union
[Qubit
,QuantumRegister
,int
,slice
,Sequence
[Union
[Qubit
,int
]]]) – The qubit(s) targeted by the gate.label (
Optional
[str
]) – The string label of the gate in the circuit.ctrl_state (
Union
[str
,int
,None
]) – The control state in decimal, or as a bitstring (e.g. ‘1’). Defaults to controlling on the ‘1’ state.
- Return type
- Returns
A handle to the instructions created.