Public API
MonitoredQuantumCircuits
MonitoredQuantumCircuits.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.
sourceMonitoredQuantumCircuits.ChainGeometry Type
A data structure representing a one-dimensional chain geometry of qubits.
Constructors
ChainGeometry(Periodic, size::Integer)
Constructs a chain geometry with periodic boundary conditions (i.e., a closed loop).
ChainGeometry(Open, size::Integer)
Constructs a chain geometry with open boundary conditions (i.e., a linear chain).
Arguments
size::Integer
: The number of qubits in the chain.
Examples
# Create a chain of 8 qubits with periodic boundaries
geometry = ChainGeometry(Periodic, 8)
# Create a chain of 10 qubits with open boundaries
geometry = ChainGeometry(Open, 10)
MonitoredQuantumCircuits.Circuit Type
Circuit{G<:Geometry}
A circuit optimized for interactive construction. The operations are stored in a vector to allow for efficient construction.
sourceMonitoredQuantumCircuits.CompiledCircuit Type
CompiledCircuit{Ops<:Tuple}
A circuit optimized for iteration. The operations are stored in a tuple. The operations are stored in a tuple to allow for efficient iteration.
sourceMonitoredQuantumCircuits.DistributedOperation Type
DistributedOperation <: Operation
An operation that applies a specified operation at multiple positions with given probabilities.
sourceMonitoredQuantumCircuits.Geometry Type
Geometry
Abstract type for the geometry of the qubits.
sourceMonitoredQuantumCircuits.H Type
H() <: Operation
The H operation is a single-qubit gate that creates superposition by applying a Hadamard transformation.
sourceMonitoredQuantumCircuits.HoneycombGeometry Type
A data structure representing a honeycomb lattice geometry.
Constructors
HoneycombGeometry(Periodic, sizeX::Integer, sizeY::Integer)
Create a honeycomb geometry with periodic boundary conditions.
HoneycombGeometry(Open, sizeX::Integer, sizeY::Integer)
Create a honeycomb geometry with open boundary conditions.
Arguments
sizeX::Integer
: Width of the latticesizeY::Integer
: Height of the lattice (must be even)
Examples
# Create a 4×4 honeycomb lattice with periodic boundaries
geometry = HoneycombGeometry(Periodic, 4, 4)
# Create a 6×6 honeycomb lattice with open boundaries
geometry = HoneycombGeometry(Open, 6, 6)
MonitoredQuantumCircuits.I Type
I() <: Operation
The I operation is a single-qubit gate that represents the identity operation, leaving the qubit unchanged.
sourceMonitoredQuantumCircuits.Measure_X Type
Measure_X() <: Operation
The Measure_X operation is a single-qubit measurement operation that measures the state of a qubit in the X basis.
sourceMonitoredQuantumCircuits.Measure_Y Type
Measure_Y() <: Operation
The Measure_Y operation is a single-qubit measurement operation that measures the state of a qubit in the Y basis.
sourceMonitoredQuantumCircuits.Measure_Z Type
Measure_Z() <: Operation
The Measure_Z operation is a single-qubit measurement operation that measures the state of a qubit in the Z basis.
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.ShastrySutherlandGeometry Type
A data structure representing a Shastry-Sutherland lattice geometry.
Constructors
ShastrySutherlandGeometry(Periodic, sizeX::Integer, sizeY::Integer)
Construct a Shastry-Sutherland geometry with periodic boundary conditions.
Arguments
sizeX::Integer
: The number of sites in the x directionsizeY::Integer
: The number of sites in the y direction
Examples
# Create a 4×4 Shastry-Sutherland lattice with periodic boundaries
geometry = ShastrySutherlandGeometry(Periodic, 4, 4)
MonitoredQuantumCircuits.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.X Type
X() <: Operation
The X operation is a single-qubit gate that flips the state of a qubit.
sourceMonitoredQuantumCircuits.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.Y Type
Y() <: Operation
The Y operation is a single-qubit gate that applies a phase of π to the |1⟩ state.
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.Z Type
Z() <: Operation
The Z operation is a single-qubit gate that applies a phase of π to the |1⟩ state.
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.
sourceBase.push! Method
push!(random::RandomOperation,
op::Operation,
positions::Matrix;
probability,
positionProbabilities)
Push a new operation to the list of operations in the RandomOperation
object. The operation is applied with a specified probability and the positions are given as a matrix. The positionProbabilities
argument specifies the probabilities for each position (column) in the matrix.
MonitoredQuantumCircuits.apply! Method
apply!(circuit::Circuit, operation::DistributedOperation)
Apply a [DistributedOperation
] to the circuit.
MonitoredQuantumCircuits.apply! Method
apply!(circuit::Circuit, i::Integer)
Apply the i-th operation in the circuit again.
sourceMonitoredQuantumCircuits.apply! Method
apply!(circuit::Circuit, operation::Operation, position::Integer)
Apply an operation to a position in the circuit.
sourceMonitoredQuantumCircuits.apply! Method
apply!(circuit::Circuit, operation::RandomOperation)
Apply a [RandomOperation
] to the circuit.
MonitoredQuantumCircuits.compile Method
compile(circuit::Circuit)
Compile the circuit. The function will return a CompiledCircuit object. The CompiledCircuit object is optimized for iteration and is not meant to be modified. The execute function only accepts CompiledCircuit objects.
sourceMonitoredQuantumCircuits.depth Method
depth(circuit::QuantumCircuit)
Return the depth of the circuit. The depth is the number of instructions in the circuit.
sourceMonitoredQuantumCircuits.execute Method
execute(circuit::CompiledCircuit, backend::Backend)
Execute the circuit on the given backend. The backend must be a subclass of Backend. The function will return the result of the execution.
sourceMonitoredQuantumCircuits.isClifford Method
isClifford(operation::Operation)
Return whether the operation is a Clifford operation.
sourceMonitoredQuantumCircuits.isSimulator Method
isSimulator(backend::Backend)
Return whether the backend is a simulator.
sourceMonitoredQuantumCircuits.nAncilla Method
nAncilla(circuit::CompiledCircuit)
Return the number of ancilla qubits in the compiled circuit. An ancilla qubits gets added for every unique combination of position and operation.
sourceMonitoredQuantumCircuits.nQubits Method
nQubits(circuit::CompiledCircuit)
Return the number of qubits in the compiled circuit. This can differ from the number of qubits in the original circuit, since unused qubits get deleated during compilation. Ancilla qubits are not included, use nAncilla
to get the number of ancilla qubits.
MonitoredQuantumCircuits.nQubits Method
nQubits(geometry::Geometry)
Return the number of qubits in the geometry.
sourceMonitoredQuantumCircuits.nQubits Method
nQubits(operation::Operation)
Return the number of qubits the operation acts on.
sourceQiskit
MonitoredQuantumCircuits.Qiskit.IBMBackend Type
IBMBackend <: MonitoredQuantumCircuits.QuantumComputer
A Qiskit backend that runs on IBM's quantum computers.
sourceMonitoredQuantumCircuits.Qiskit.CliffordSimulator Method
CliffordSimulator()
A Qiskit Aer stabilizer simulator.
sourceMonitoredQuantumCircuits.Qiskit.GPUStateVectorSimulator Method
GPUStateVectorSimulator()
A Qiskit Aer statevector simulator that runs on the GPU.
sourceMonitoredQuantumCircuits.Qiskit.GPUTensorNetworkSimulator Method
GPUTensorNetworkSimulator()
A Qiskit Aer tensor network simulator that runs on the GPU.
sourceMonitoredQuantumCircuits.Qiskit.StateVectorSimulator Method
StateVectorSimulator()
A Qiskit Aer statevector simulator.
sourceQuantumClifford
MonitoredQuantumCircuits.QuantumClifford.GPUPauliFrameSimulator Type
GPUPauliFrameSimulator()
A QuantumClifford stabilizer Pauli frame simulator that runs on the GPU.
sourceMonitoredQuantumCircuits.QuantumClifford.PauliFrameSimulator Type
PauliFrameSimulator()
A QuantumClifford stabilizer Pauli frame simulator.
sourceMonitoredQuantumCircuits.QuantumClifford.TableauSimulator Type
TableauSimulator(qubits::Integer; mixed=true, basis=:Z)
TableauSimulator(initial_state::QuantumClifford.MixedDestabilizer)
A QuantumClifford stabilizer simulator.
sourceMonitoredQuantumCircuits.QuantumClifford.native_codeV1 Method
fast_execute(circuit::MonitoredQuantumCircuits.CompiledCircuit, simulator::TableauSimulator)
This function executes the circuit using the TableauSimulator. It generates native QuantumClifford code which then gets executed. This makes executing the same circuit many times much faster and more efficient.
sourceMonitoredQuantumCircuits.QuantumClifford.state_entropy Method
state_entropy(state::AbstractStabilizer)
Calculate entropy, i.e. the mixedness, of a stabilizer state from QuantumClifford.
sourceMonitoredQuantumCircuits.QuantumClifford.tmi Method
tmi(state::AbstractStabilizer, A, B, C)
Calculate the tripartite mutual information of a stabilizer state from QuantumClifford.
source