- class SingleQubitUnitary(unitary_matrix, mode='ZYZ', up_to_diagonal=False)¶
u = 2*2 unitary (given as a (complex) numpy.ndarray)
mode - determines the used decomposition by providing the rotation axes
- up_to_diagonal - the single-qubit 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
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
Return controlled version of gate.
Copy of the instruction.
Return the inverse.
Return True .IFF.
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 sub-instructions.
Soft comparison between gates.
Return a Numpy.array for the gate unitary matrix.
Single-qubit unitary gate parameter has to be an ndarray.
Get the decompositions of the instruction from the SessionEquivalenceLibrary.
Return definition in terms of other basic gates.
Returns the diagonal gate D up to which the single-qubit unitary u is implemented.
I.e. u=D.u‘, where u‘ is the unitary implemented by the found circuit.
Get the duration.
Return instruction label
Return the name.
Return the number of clbits.
Return the number of qubits.
return instruction params.
Get the time unit of duration.