CU1Gate¶
- class CU1Gate(theta, label=None, ctrl_state=None)[source]¶
Controlled-U1 gate.
This is a diagonal and symmetric gate that induces a phase on the state of the target qubit, depending on the control state.
Circuit symbol:
q_0: ─■── │λ q_1: ─■──
Matrix representation:
\[\begin{split}CU1 = |0\rangle\langle 0| \otimes I + |1\rangle\langle 1| \otimes U1 = \begin{pmatrix} 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & e^{i\lambda} \end{pmatrix}\end{split}\]See also
CRZGate
: Due to the global phase difference in the matrix definitions of U1 and RZ, CU1 and CRZ are different gates with a relative phase difference.Create new CU1 gate.
Attributes
Return the control state of the gate as a decimal integer.
Get the decompositions of the instruction from the SessionEquivalenceLibrary.
Return definition in terms of other basic gates.
Return gate label
return instruction params.
Methods
CU1Gate.add_decomposition
(decomposition)Add a decomposition of the instruction to the SessionEquivalenceLibrary.
Assemble a QasmQobjInstruction
CU1Gate.broadcast_arguments
(qargs, cargs)Validation and handling of the arguments and its relationship.
CU1Gate.c_if
(classical, val)Add classical condition on register classical and value val.
CU1Gate.control
([num_ctrl_qubits, label, …])Controlled version of this gate.
CU1Gate.copy
([name])Copy of the instruction.
Return inverted CU1 gate (\(CU1(\lambda){\dagger} = CU1(-\lambda)\))
Return True .IFF.
For a composite instruction, reverse the order of sub-gates.
CU1Gate.power
(exponent)Creates a unitary gate as gate^exponent.
Return a default OpenQASM string for the instruction.
Creates an instruction with gate repeated n amount of times.
Return a Numpy.array for the gate unitary matrix.