#[non_exhaustive]pub enum OpBox {
Show 25 variants
CircBox {
id: BoxID,
circuit: SerialCircuit,
},
Unitary1qBox {
id: BoxID,
matrix: [[(f64, f64); 2]; 2],
},
Unitary2qBox {
id: BoxID,
matrix: [[(f64, f64); 4]; 4],
},
Unitary3qBox {
id: BoxID,
matrix: Box<[[(f64, f64); 8]; 8]>,
},
ExpBox {
id: BoxID,
matrix: [[(f64, f64); 4]; 4],
phase: f64,
},
PauliExpBox {
id: BoxID,
paulis: Vec<String>,
phase: String,
cx_config: String,
},
PauliExpPairBox {
id: BoxID,
paulis_pair: Vec<Vec<String>>,
phase_pair: Vec<String>,
cx_config: String,
},
PauliExpCommutingSetBox {
id: BoxID,
pauli_gadgets: Vec<(Vec<String>, String)>,
cx_config: String,
},
TermSequenceBox {
id: BoxID,
pauli_gadgets: Vec<(Vec<String>, String)>,
synth_strategy: PauliSynthStrat,
partition_strategy: PauliPartitionStrat,
graph_colouring: GraphColourMethod,
cx_config: CXConfigType,
},
PhasePolyBox {
id: BoxID,
n_qubits: u32,
qubit_indices: Vec<(Qubit, u32)>,
phase_polynomial: Vec<Vec<(Bitstring, String)>>,
linear_transformation: Matrix,
},
StabiliserAssertionBox {
id: BoxID,
stabilisers: Vec<PauliStabiliser>,
},
ProjectorAssertionBox {
id: BoxID,
matrix: Matrix,
},
CustomGate {
id: BoxID,
gate: CustomGate,
params: Vec<String>,
},
QControlBox {
id: BoxID,
n_controls: u32,
op: Box<Operation>,
control_state: u32,
},
ClassicalExpBox {
id: BoxID,
n_i: u32,
n_io: u32,
n_o: u32,
exp: ClassicalExp,
},
UnitaryTableauBox {
id: BoxID,
tab: UnitaryTableau,
},
MultiplexorBox {
id: BoxID,
op_map: Vec<(Bitstring, Operation)>,
},
MultiplexedRotationBox {
id: BoxID,
op_map: Vec<(Bitstring, Operation)>,
},
MultiplexedU2Box {
id: BoxID,
op_map: Vec<(Bitstring, Operation)>,
impl_diag: bool,
},
MultiplexedTensoredU2Box {
id: BoxID,
op_map: Vec<(Bitstring, Operation)>,
},
ToffoliBox {
id: BoxID,
permutation: Permutation,
strat: ToffoliBoxSynthStrat,
rotation_axis: Option<OpType>,
},
ConjugationBox {
id: BoxID,
compute: Box<Operation>,
action: Box<Operation>,
uncompute: Option<Box<Operation>>,
},
DummyBox {
id: BoxID,
n_qubits: u32,
n_bits: u32,
resource_data: ResourceData,
},
StatePreparationBox {
id: BoxID,
statevector: Matrix,
is_inverse: bool,
with_initial_reset: bool,
},
DiagonalBox {
id: BoxID,
diagonal: Matrix,
upper_triangle: bool,
},
}
Expand description
Box for an operation, the enum variant names come from the names of the C++ operations and are renamed if the string corresponding to the operation is differently named when serializing.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
CircBox
Operation defined as a circuit.
Unitary1qBox
One-qubit operation defined as a unitary matrix.
Unitary2qBox
Two-qubit operation defined as a unitary matrix.
Unitary3qBox
Three-qubit operation defined as a unitary matrix.
ExpBox
Two-qubit operation defined in terms of a hermitian matrix and a phase.
Fields
PauliExpBox
Operation defined as the exponential of a tensor of Pauli operators.
Fields
PauliExpPairBox
A pair of (not necessarily commuting) Pauli exponentials performed in sequence.
Fields
PauliExpCommutingSetBox
Operation defined as a set of commuting exponentials of a tensor of Pauli operators.
Fields
TermSequenceBox
An unordered collection of Pauli exponentials that can be synthesised in any order, causing a change in the unitary operation. Synthesis order depends on the synthesis strategy chosen only.
Fields
synth_strategy: PauliSynthStrat
Synthesis strategy. See PauliSynthStrat
.
partition_strategy: PauliPartitionStrat
Partition strategy. See PauliPartitionStrat
.
graph_colouring: GraphColourMethod
Graph colouring method. See GraphColourMethod
.
cx_config: CXConfigType
Configurations for CXs upon decompose phase gadgets.
PhasePolyBox
An operation capable of representing arbitrary Circuits made up of CNOT and RZ, as a PhasePolynomial plus a boolean matrix representing an additional linear transformation.
Fields
StabiliserAssertionBox
A user-defined assertion specified by a list of Pauli stabilisers.
ProjectorAssertionBox
A user-defined assertion specified by a 2x2, 4x4, or 8x8 projector matrix.
CustomGate
A user-defined gate defined by a parametrised Circuit.
QControlBox
Wraps another quantum op, adding control qubits.
Fields
ClassicalExpBox
Holding box for abstract expressions on Bits.
Deprecated in favour of OpType::ClExpr
.
UnitaryTableauBox
Binary matrix form of a stabilizer tableau for unitary Clifford circuits.
MultiplexorBox
A user-defined multiplexor specified by a map from bitstrings to Operations.
MultiplexedRotationBox
A user-defined multiplexed rotation gate specified by a map from bitstrings to Operations.
MultiplexedU2Box
A user-defined multiplexed rotation gate specified by a map from bitstrings to Operations.
MultiplexedTensoredU2Box
A user-defined multiplexed tensor product of U2 gates specified by a map from bitstrings to lists of Op or a list of bitstring-list(Op s) pairs.
ToffoliBox
An operation that constructs a circuit to implement the specified permutation of classical basis states.
ConjugationBox
An operation composed of ‘action’, ‘compute’ and ‘uncompute’ circuits
Fields
DummyBox
A placeholder operation that holds resource data. This box type cannot be decomposed into a circuit. It only serves to record resource data for a region of a circuit: for example, upper and lower bounds on gate counts and depth. A circuit containing such a box cannot be executed.
Fields
resource_data: ResourceData
Dummy resource data.
StatePreparationBox
A box for preparing quantum states using multiplexed-Ry and multiplexed-Rz gates.
Fields
DiagonalBox
A box for synthesising a diagonal unitary matrix into a sequence of multiplexed-Rz gates.