mimiqcircuits.operations.gates.delay

Delay gate operation.

Classes

Delay([t])

Single qubit delay gate.

class Delay(t=1)[source]

Bases: Gate

Single qubit delay gate.

Acts as the identity. The duration t does not change the action of the gate: it marks idle time, so a noise model can attach idle noise to it and use t to 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.

supports_canonical_rewrite()[source]

Return False: rewriting a delay into identity gates would lose its duration.