Operations
Operations are the fundamental building blocks of quantum circuits. They represent the various quantum gates and measurements that can be applied to qubits. In MonitoredQuantumCircuits.jl, operations are defined as structs, allowing for flexible extension and customization. This section provides an overview of the available operations, and how to apply them to circuits. If you are interested in implementing your own operations, please refer to the Operations Interface documentation.
Available Operations
MonitoredQuantumCircuits.jl provides a variety of operations that can be applied to qubits within a circuit. These operations include unitary transformations, measurements, and other quantum operations. The following is a list of the available operations:
Unitary Operations
- I
Represents the identity operation, which leaves the qubit unchanged.
- X
Represents the Pauli-X operation, which flips the state of the qubit.
- Y
Represents the Pauli-Y operation, which applies a bit-flip and phase-flip to the qubit.
- Z
Represents the Pauli-Z operation, which applies a phase-flip to the qubit.
- H
Represents the Hadamard operation, which creates superposition by transforming the basis states.
- CNOT
Represents the controlled-NOT operation, which flips the target qubit if the control qubit is in the |1⟩ state.
Measurement Operations
- MeasureX
Represents a measurement in the X basis, collapsing the qubit state to |+⟩ or |-⟩.
- MeasureY
Represents a measurement in the Y basis, collapsing the qubit state to |+i⟩ or |-i⟩.
- MeasureZ
Represents a measurement in the Z basis, collapsing the qubit state to |0⟩ or |1⟩.
- XX
Represents a parity measurement in the X basis.
- YY
Represents a parity measurement in the Y basis.
- ZZ
Represents a parity measurement in the Z basis.
- Weak_XX
Represents a weak parity measurement in the X basis.
- Weak_YY
Represents a weak parity measurement in the Y basis.
- Weak_ZZ
Represents a weak parity measurement in the Z basis.
- NPauli
Represents a parity measurement, which can be applied to multiple qubits.
Other Operations
- RandomOperation
Represents an operation constructed from mulitple unitary operations, each applied with a specified probability. The qubits on which the operation is applied can also be randomized.
- DistributedOperation
Represents an operation that is distributed across multiple qubits with specified probabilities.
API Reference
MonitoredQuantumCircuits.I Type
I() <: Operation
The I operation is a single-qubit gate that represents the identity operation, leaving the qubit unchanged.
sourceMonitoredQuantumCircuits.X Type
X() <: Operation
The X operation is a single-qubit gate that flips the state of a qubit.
sourceMonitoredQuantumCircuits.Y Type
Y() <: Operation
The Y operation is a single-qubit gate that applies a phase of π to the |1⟩ state.
sourceMonitoredQuantumCircuits.Z Type
Z() <: Operation
The Z operation is a single-qubit gate that applies a phase of π to the |1⟩ state.
sourceMonitoredQuantumCircuits.H Type
H() <: Operation
The H operation is a single-qubit gate that creates superposition by applying a Hadamard transformation.
sourceMonitoredQuantumCircuits.CNOT Type
CNOT() <: Operation
The CNOT operation is a two-qubit gate that flips the target qubit if the control qubit is in the |1⟩ state.
sourceMissing docstring.
Missing docstring for MeasureX
. Check Documenter's build log for details.
Missing docstring.
Missing docstring for MeasureY
. Check Documenter's build log for details.
Missing docstring.
Missing docstring for MeasureZ
. Check Documenter's build log for details.
MonitoredQuantumCircuits.XX Type
XX() <: MeasurementOperation
The XX operation is a two-qubit gate that applies an XX interaction between the two qubits. It is a type of measurement operation that can be used in quantum circuits.
sourceMonitoredQuantumCircuits.YY Type
YY() <: MeasurementOperation
The YY operation is a two-qubit gate that applies a YY interaction between the two qubits. The operation is used to measure the state of the qubits in the YY basis.
sourceMonitoredQuantumCircuits.ZZ Type
ZZ() <: MeasurementOperation
The ZZ operation is a two-qubit measurement operation that measures the state of two qubits in the ZZ basis. The first qubit is the target qubit, and the second qubit is an ancilla qubit that is used to store the result of the operation.
sourceMonitoredQuantumCircuits.Weak_XX Type
Weak_XX <: MeasurementOperation
The Weak_XX operation is a three-qubit gate that applies a weak XX interaction between the first two qubits, with a strength determined by the parameter t. The third qubit is an ancilla qubit that is used to store the result of the operation.
sourceMonitoredQuantumCircuits.Weak_YY Type
Weak_YY <: MeasurementOperation
The Weak_YY operation is a three-qubit gate that applies a weak YY interaction between the first two qubits, with a strength determined by the parameter t. The third qubit is an ancilla qubit that is used to store the result of the operation.
sourceMonitoredQuantumCircuits.Weak_ZZ Type
Weak_ZZ <: MeasurementOperation
The Weak_ZZ operation is a three-qubit gate that applies a weak ZZ interaction between the first two qubits, with a strength determined by the parameter t. The third qubit is an ancilla qubit that is used to store the result of the operation.
sourceMonitoredQuantumCircuits.NPauli Type
NPauli{N} <: MeasurementOperation
The NPauli operation is a N-qubit measurement operation that measures the state of multiple qubits in the Pauli basis.
sourceMonitoredQuantumCircuits.RandomOperation Type
RandomOperation <: Operation
An operation that applies a random operation from a list of operations with specified probabilities and random positions.
sourceMonitoredQuantumCircuits.DistributedOperation Type
DistributedOperation <: Operation
An operation that applies a specified operation at multiple positions with given probabilities.
source