SingleQubitUnitary¶

class
SingleQubitUnitary
(unitary_matrix, mode='ZYZ', up_to_diagonal=False)[source]¶ Bases:
qiskit.circuit.gate.Gate
u = 2*2 unitary (given as a (complex) numpy.ndarray)
mode  determines the used decomposition by providing the rotation axes
 up_to_diagonal  the singlequbit unitary is decomposed up to a diagonal matrix,
i.e. a unitary u’ is implemented such that there exists a 2*2 diagonal gate d with u = d.dot(u’).
Create a new single qubit gate based on the unitary
u
.Methods
Add a decomposition of the instruction to the SessionEquivalenceLibrary.
Assemble a QasmQobjInstruction
Validation and handling of the arguments and its relationship.
Set a classical equality condition on this instruction between the register or cbit
classical
and valueval
.Return controlled version of gate.
Copy of the instruction.
Return the inverse.
Return True .IFF.
DEPRECATED: use instruction.reverse_ops().
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.
For a composite instruction, reverse the order of subinstructions.
Soft comparison between gates.
Return a Numpy.array for the gate unitary matrix.
Singlequbit unitary gate parameter has to be an ndarray.
Attributes

condition_bits
¶ Get Clbits in condition.
 Return type
List
[Clbit
]

decompositions
¶ Get the decompositions of the instruction from the SessionEquivalenceLibrary.

definition
¶ Return definition in terms of other basic gates.

diag
¶ Returns the diagonal gate D up to which the singlequbit unitary u is implemented.
I.e. u=D.u’, where u’ is the unitary implemented by the found circuit.

duration
¶ Get the duration.

label
¶ Return instruction label
 Return type
str

params
¶ return instruction params.

unit
¶ Get the time unit of duration.