Skip to content

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
julia
I() <: Operation

The I operation is a single-qubit gate that represents the identity operation, leaving the qubit unchanged.

source
MonitoredQuantumCircuits.X Type
julia
X() <: Operation

The X operation is a single-qubit gate that flips the state of a qubit.

source
MonitoredQuantumCircuits.Y Type
julia
Y() <: Operation

The Y operation is a single-qubit gate that applies a phase of π to the |1⟩ state.

source
MonitoredQuantumCircuits.Z Type
julia
Z() <: Operation

The Z operation is a single-qubit gate that applies a phase of π to the |1⟩ state.

source
MonitoredQuantumCircuits.H Type
julia
H() <: Operation

The H operation is a single-qubit gate that creates superposition by applying a Hadamard transformation.

source
MonitoredQuantumCircuits.CNOT Type
julia
CNOT() <: Operation

The CNOT operation is a two-qubit gate that flips the target qubit if the control qubit is in the |1⟩ state.

source

Missing 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
julia
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.

source
MonitoredQuantumCircuits.YY Type
julia
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.

source
MonitoredQuantumCircuits.ZZ Type
julia
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.

source
MonitoredQuantumCircuits.Weak_XX Type
julia
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.

source
MonitoredQuantumCircuits.Weak_YY Type
julia
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.

source
MonitoredQuantumCircuits.Weak_ZZ Type
julia
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.

source
MonitoredQuantumCircuits.NPauli Type
julia
NPauli{N} <: MeasurementOperation

The NPauli operation is a N-qubit measurement operation that measures the state of multiple qubits in the Pauli basis.

source
MonitoredQuantumCircuits.RandomOperation Type
julia
RandomOperation <: Operation

An operation that applies a random operation from a list of operations with specified probabilities and random positions.

source
MonitoredQuantumCircuits.DistributedOperation Type
julia
DistributedOperation <: Operation

An operation that applies a specified operation at multiple positions with given probabilities.

source