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§

source

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]

source

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]

source

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]

source

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)

source

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]

source

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} ]

source

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.

source

fn not(&mut self, r: Self::Register) -> Self::Register

Create and apply an NOT (or X) gate circuit object.

source

fn x(&mut self, r: Self::Register) -> Self::Register

Create and apply an X (or NOT) gate circuit object.

source

fn y(&mut self, r: Self::Register) -> Self::Register

Create and apply a Y gate circuit object.

source

fn z(&mut self, r: Self::Register) -> Self::Register

Create and apply a Z gate circuit object.

source

fn h(&mut self, r: Self::Register) -> Self::Register

Create and apply an H gate circuit object.

source

fn t(&mut self, r: Self::Register) -> Self::Register

Create and apply a T gate circuit object.

source

fn t_dagger(&mut self, r: Self::Register) -> Self::Register

Create and apply a T^\dagger gate circuit object.

source

fn s(&mut self, r: Self::Register) -> Self::Register

Create and apply an S gate circuit object.

source

fn s_dagger(&mut self, r: Self::Register) -> Self::Register

Create and apply an S^\dagger gate circuit object.

source

fn cnot( &mut self, cr: Self::Register, r: Self::Register ) -> Result<(Self::Register, Self::Register), CircuitError>

Create and apply a CNOT gate circuit object.

source

fn swap( &mut self, ra: Self::Register, rb: Self::Register ) -> Result<(Self::Register, Self::Register), CircuitError>

Apply the SWAP gate to a pair of registers of equal sizes.

Implementors§