mimiqcircuits.operations.gates.delay

Delay gate operation.

Classes

Delay(t)

1-qubit delay gate

class mimiqcircuits.operations.gates.delay.Delay(t)[source]

Bases: Gate

1-qubit delay gate

This gate is equivalent to a GateID gate, except that it is parametrized by a time parameter t. The parameter does not affect the action of the gate. The only purpose of this gate is to act as a placeholder to indicate idle noise, in which case the parameter t can later be used to further specify the noise properties.

The gate can be created by calling Delay(t) where t is a number.

Matrix representation:

\[\begin{split}\operatorname{Delay}(t) = \begin{pmatrix} 1 & 0 \\ 0 & 1 \end{pmatrix}\end{split}\]

Examples

>>> Delay(0.3)
Delay(0.3)
>>> delay_gate = Delay(0.1)
>>> delay_gate.matrix()
[1.0, 0]
[0, 1.0]
>>> c = Circuit()
>>> c.push(delay_gate, 0)
1-qubit circuit with 1 instruction:
└── Delay(0.1) @ q[0]

Decomposition

>>> delay_gate = Delay(0.2)
>>> delay_gate.decompose()
1-qubit circuit with 1 instruction:
└── ID @ q[0]
__init__(t=1)[source]
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.

power(_)[source]

Raise an error, as powers of non-unitary operators are not supported.

This method is not implemented for non-unitary operators and will raise a NotImplementedError if called.

Parameters:

n (int) – The exponent to which the operator would be raised.

Raises:

NotImplementedError – If the method is called.