mimiqcircuits.operations.reset

Reset operations.

Classes

Reset()

Reset operation.

ResetX()

ResetX operation.

ResetY()

ResetY operation.

ResetZ()

ResetZ operation.

class mimiqcircuits.operations.reset.Reset[source]

Bases: krauschannel

Reset operation.

Quantum operation that resets the status of one qubit to the \(\ket{0}\) state.

Warning

This operation is non-reversible.

Examples

Adding Reset operation to the Circuit (The args can be: range, list, tuple, set or int)

>>> from mimiqcircuits import *
>>> c= Circuit()
>>> c.push(Reset(), 0)
1-qubit circuit with 1 instruction:
└── Reset @ q[0]

>>> from mimiqcircuits import *
>>> c= Circuit()
>>> c.push(Reset(),(0,1,2))
3-qubit circuit with 3 instructions:
├── Reset @ q[0]
├── Reset @ q[1]
└── Reset @ q[2]

See also

ResetX, ResetY, ResetZ - Variants of the Reset operation along different axes.

inverse()[source]
power(pwr)[source]
control(num_qubits)[source]
iswrapper()[source]
asciiwidth(qubits, bits, zvars)[source]
krausoperators(normaliz=None)[source]

Returns the Kraus operators associated with the given Kraus channel.

This should be implemented for each specific channel.

Returns:

A list of matrices representing the Kraus operators.

Return type:

list

class mimiqcircuits.operations.reset.ResetX[source]

Bases: krauschannel

ResetX operation.

This operation is performed by applying a Hadamard gate (H) to the qubit, which transforms the qubit from the computational basis (\(\ket{0}\) or \(\ket{1}\)) to the superposition basis (\(\ket{+}\) or \(\ket{-}\)). After applying the Hadamard gate, a standard Reset operation is performed, resetting the qubit to the \(\ket{0}\) state. Finally, another Hadamard gate is applied to convert the \(\ket{0}\) state back into the \(\ket{+}\) state.

Warning

This operation is non-reversible.

Examples

>>> from mimiqcircuits import *
>>> c= Circuit()
>>> c.push(ResetX(), 0)
1-qubit circuit with 1 instruction:
└── ResetX @ q[0]

>>> c.decompose()
1-qubit circuit with 1 instruction:
└── ResetX @ q[0]

See also

Reset, ResetY, ResetZ - Variants of the Reset operation along different axes.

inverse()[source]
power(pwr)[source]
control(num_qubits)[source]
iswrapper()[source]
class mimiqcircuits.operations.reset.ResetY[source]

Bases: krauschannel

ResetY operation.

The ResetY operation works by first rotating the qubit’s state so that the Y-axis aligns with the Z-axis, applying a standard reset (which resets the qubit to the \(\ket{0}\) state), and then rotating the qubit back to its original basis.

Warning

This operation is non-reversible.

Examples

>>> from mimiqcircuits import *
>>> c = Circuit()
>>> c.push(ResetY(), 0)
1-qubit circuit with 1 instruction:
└── ResetY @ q[0]

>>> c.decompose()
1-qubit circuit with 1 instruction:
└── ResetY @ q[0]

See also

Reset, ResetX, ResetZ - Variants of the Reset operation along different axes.

inverse()[source]
power(pwr)[source]
control(num_qubits)[source]
iswrapper()[source]
class mimiqcircuits.operations.reset.ResetZ[source]

Bases: krauschannel

ResetZ operation.

Quantum operation that resets the status of one qubit to the \(\ket{0}\) state along the Z-axis. This operation is an alias of the Reset operation.

Warning

This operation is non-reversible.

Examples

>>> from mimiqcircuits import *
>>> c= Circuit()
>>> c.push(ResetZ(), 0)
1-qubit circuit with 1 instruction:
└── Reset @ q[0]

>>> c.decompose()
1-qubit circuit with 1 instruction:
└── Reset @ q[0]

See also

Reset, ResetX, ResetY - Variants of the Reset operation along different axes.