Trait qip::builder_traits::CliffordTBuilder
source · pub trait CliffordTBuilder<P: Precision>: UnitaryBuilder<P> {
Show 18 methods
// Provided methods
fn make_x(&self) -> Self::CircuitObject { ... }
fn make_y(&self) -> Self::CircuitObject { ... }
fn make_z(&self) -> Self::CircuitObject { ... }
fn make_h(&self) -> Self::CircuitObject { ... }
fn make_s(&self) -> Self::CircuitObject { ... }
fn make_t(&self) -> Self::CircuitObject { ... }
fn make_cnot(&self) -> Self::CircuitObject { ... }
fn not(&mut self, r: Self::Register) -> Self::Register { ... }
fn x(&mut self, r: Self::Register) -> Self::Register { ... }
fn y(&mut self, r: Self::Register) -> Self::Register { ... }
fn z(&mut self, r: Self::Register) -> Self::Register { ... }
fn h(&mut self, r: Self::Register) -> Self::Register { ... }
fn t(&mut self, r: Self::Register) -> Self::Register { ... }
fn t_dagger(&mut self, r: Self::Register) -> Self::Register { ... }
fn s(&mut self, r: Self::Register) -> Self::Register { ... }
fn s_dagger(&mut self, r: Self::Register) -> Self::Register { ... }
fn cnot(
&mut self,
cr: Self::Register,
r: Self::Register
) -> Result<(Self::Register, Self::Register), CircuitError> { ... }
fn swap(
&mut self,
ra: Self::Register,
rb: Self::Register
) -> Result<(Self::Register, Self::Register), CircuitError> { ... }
}
Expand description
A Builder which can construct Clifford Circuit Elements.
Provided Methods§
sourcefn make_x(&self) -> Self::CircuitObject
fn make_x(&self) -> Self::CircuitObject
Make a circuit object representing the X gate on a single qubit.
Equivalent to calling matrix_to_circuitobject
with [0, 1, 1, 0]
sourcefn make_y(&self) -> Self::CircuitObject
fn make_y(&self) -> Self::CircuitObject
Make a circuit object representing the Y gate on a single qubit.
Equivalent to calling matrix_to_circuitobject
with [0, -i, i, 0]
sourcefn make_z(&self) -> Self::CircuitObject
fn make_z(&self) -> Self::CircuitObject
Make a circuit object representing the Z gate on a single qubit.
Equivalent to calling matrix_to_circuitobject
with [1, 0, 0, -1]
sourcefn make_h(&self) -> Self::CircuitObject
fn make_h(&self) -> Self::CircuitObject
Make a circuit object representing the H gate on a single qubit.
Equivalent to calling matrix_to_circuitobject
with [1, 1, 1, -1]/sqrt(2)
sourcefn make_s(&self) -> Self::CircuitObject
fn make_s(&self) -> Self::CircuitObject
Make a circuit object representing the S (phase) gate on a single qubit.
Equivalent to calling matrix_to_circuitobject
with [1, 0, 0, -i]
sourcefn make_t(&self) -> Self::CircuitObject
fn make_t(&self) -> Self::CircuitObject
Make a circuit object representing the T gate on a single qubit.
Equivalent to calling matrix_to_circuitobject
with [1, 0, 0, e^{i pi / 4} ]
sourcefn make_cnot(&self) -> Self::CircuitObject
fn make_cnot(&self) -> Self::CircuitObject
Make a circuit object representing the CNOT gate on a pair of qubits
Equivalent to calling matrix_to_circuitobject
with [ I, 0, 0, X ]
where I is the identity matrix and X is the x-gate.
sourcefn not(&mut self, r: Self::Register) -> Self::Register
fn not(&mut self, r: Self::Register) -> Self::Register
Create and apply an NOT (or X) gate circuit object.
sourcefn x(&mut self, r: Self::Register) -> Self::Register
fn x(&mut self, r: Self::Register) -> Self::Register
Create and apply an X (or NOT) gate circuit object.
sourcefn h(&mut self, r: Self::Register) -> Self::Register
fn h(&mut self, r: Self::Register) -> Self::Register
Create and apply an H gate circuit object.
sourcefn t_dagger(&mut self, r: Self::Register) -> Self::Register
fn t_dagger(&mut self, r: Self::Register) -> Self::Register
Create and apply a T^\dagger gate circuit object.
sourcefn s(&mut self, r: Self::Register) -> Self::Register
fn s(&mut self, r: Self::Register) -> Self::Register
Create and apply an S gate circuit object.
sourcefn s_dagger(&mut self, r: Self::Register) -> Self::Register
fn s_dagger(&mut self, r: Self::Register) -> Self::Register
Create and apply an S^\dagger gate circuit object.