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 and measurements. 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

MX

Represents a measurement in the X basis, collapsing the qubit state to |+⟩ or |-⟩.

MY

Represents a measurement in the Y basis, collapsing the qubit state to |+i⟩ or |-i⟩.

MZ

Represents a measurement in the Z basis, collapsing the qubit state to |0⟩ or |1⟩.

MXX

Represents a parity measurement in the X basis.

MYY

Represents a parity measurement in the Y basis.

MZZ

Represents a parity measurement in the Z basis.

WeakMXX

Represents a weak parity measurement in the X basis.

WeakMYY

Represents a weak parity measurement in the Y basis.

WeakMZZ

Represents a weak parity measurement in the Z basis.

MnPauli

Represents a parity measurement, which can be applied to multiple qubits.


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
MonitoredQuantumCircuits.MX Type
julia
MX() <: Operation

The MX operation is a single-qubit measurement operation that measures the state of a qubit in the X basis.

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

The MY operation is a single-qubit measurement operation that measures the state of a qubit in the Y basis.

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

The MZ operation is a single-qubit measurement operation that measures the state of a qubit in the Z basis.

source
MonitoredQuantumCircuits.MXX Type
julia
MXX() <: MeasurementOperation

The MXX 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.MYY Type
julia
MYY() <: MeasurementOperation

The MYY 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.MZZ Type
julia
MZZ() <: MeasurementOperation

The MZZ 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.WeakMXX Type
julia
WeakMXX <: MeasurementOperation

The WeakMXX 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.WeakMYY Type
julia
WeakMYY <: MeasurementOperation

The WeakMYY 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.WeakMZZ Type
julia
WeakMZZ <: MeasurementOperation

The WeakMZZ 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.MnPauli Type
julia
MnPauli{N} <: MeasurementOperation

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

source