mimiqcircuits.operations.reset¶
Reset operations.
Classes
|
Reset operation. |
|
ResetX operation. |
|
ResetY operation. |
|
ResetZ operation. |
- class mimiqcircuits.operations.reset.Reset[source]¶
Bases:
krauschannelReset 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]
- class mimiqcircuits.operations.reset.ResetX[source]¶
Bases:
krauschannelResetX 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]
- class mimiqcircuits.operations.reset.ResetY[source]¶
Bases:
krauschannelResetY 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]
- class mimiqcircuits.operations.reset.ResetZ[source]¶
Bases:
krauschannelResetZ 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
Resetoperation.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]