mimiqcircuits.operations.gates.delay¶
Delay gate operation.
Classes
|
Single qubit delay gate. |
- class Delay(t=1)[source]¶
Bases:
GateSingle qubit delay gate.
Acts as the identity. The duration
tdoes not change the action of the gate: it marks idle time, so a noise model can attach idle noise to it and usetto set its strength. A delay is never rewritten into other gates by canonical rewriting, so the duration is kept. It cannot be inverted or raised to a power.Matrix Representation
\[\begin{split}\operatorname{Delay}(t) = \begin{pmatrix} 1 & 0 \\ 0 & 1 \end{pmatrix}\end{split}\]- Parameters:
t (float) – Duration of the delay. Defaults to
1.
Examples
>>> from mimiqcircuits import * >>> Delay(0.3) Delay(0.3) >>> Delay(0.1).matrix() [1.0, 0] [0, 1.0] >>> c = Circuit() >>> c.push(Delay(0.1), 0) 1-qubit circuit with 1 instruction: └── Delay(0.1) @ q[0] >>> Delay(0.2).decompose() 1-qubit circuit with 1 instruction: └── ID @ q[0]
- inverse()[source]¶
Raise, as a delay cannot be inverted.
- Raises:
ValueError – Always.
- power(_)[source]¶
Raise, as a delay cannot be raised to a power.
- Raises:
ValueError – Always.