mimiqcircuits.operations.gates.standard.id¶
Identity (ID) gate.
Classes
|
Single qubit Identity gate. |
- class mimiqcircuits.operations.gates.standard.id.GateID[source]¶
Bases:
GateSingle qubit Identity gate.
Matrix representation:
\[\begin{split}\operatorname{ID} = \begin{pmatrix} 1 & 0 \\ 0 & 1 \end{pmatrix}\end{split}\]Examples
>>> from mimiqcircuits import * >>> GateID() ID >>> GateID().matrix() [1.0, 0] [0, 1.0] >>> c = Circuit().push(GateID(), 0) >>> c 1-qubit circuit with 1 instruction: └── ID @ q[0] >>> GateID().power(2), GateID().inverse() (ID, ID) >>> GateID().decompose() 1-qubit circuit with 1 instruction: └── U(0, 0, 0, 0.0) @ q[0]
- inverse()[source]¶
Raise an error, as non-unitary operators cannot be inverted.
This method is not implemented for non-unitary operators and will raise a NotImplementedError if called.
- Raises:
NotImplementedError – If the method is called.