Skip to main content

RotationOne

Trait RotationOne 

Source
pub trait RotationOne<T>
where T: Config,
{ // Required method fn rotate_1( &mut self, axis: Pauli, addr0: usize, theta: <T as Config>::Coeff, ); // Provided methods fn rx(&mut self, addr0: usize, theta: impl Into<<T as Config>::Coeff>) { ... } fn ry(&mut self, addr0: usize, theta: impl Into<<T as Config>::Coeff>) { ... } fn rz(&mut self, addr0: usize, theta: impl Into<<T as Config>::Coeff>) { ... } fn rx_many( &mut self, targets: &[usize], theta: impl Into<<T as Config>::Coeff>, ) { ... } fn ry_many( &mut self, targets: &[usize], theta: impl Into<<T as Config>::Coeff>, ) { ... } fn rz_many( &mut self, targets: &[usize], theta: impl Into<<T as Config>::Coeff>, ) { ... } }
Expand description

Single-qubit Pauli rotations exp(-i θ/2 · P).

Required Methods§

Source

fn rotate_1(&mut self, axis: Pauli, addr0: usize, theta: <T as Config>::Coeff)

Rotate about axis (one of X, Y, Z) by angle theta.

Provided Methods§

Source

fn rx(&mut self, addr0: usize, theta: impl Into<<T as Config>::Coeff>)

RX(θ) on one qubit.

Source

fn ry(&mut self, addr0: usize, theta: impl Into<<T as Config>::Coeff>)

RY(θ) on one qubit.

Source

fn rz(&mut self, addr0: usize, theta: impl Into<<T as Config>::Coeff>)

RZ(θ) on one qubit.

Source

fn rx_many(&mut self, targets: &[usize], theta: impl Into<<T as Config>::Coeff>)

Explicit batched RX(θ).

Source

fn ry_many(&mut self, targets: &[usize], theta: impl Into<<T as Config>::Coeff>)

Explicit batched RY(θ).

Source

fn rz_many(&mut self, targets: &[usize], theta: impl Into<<T as Config>::Coeff>)

Explicit batched RZ(θ).

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<T: Config, I, C: SparseVector<Complex<T::Coeff>, I>> RotationOne<T> for GeneralizedTableau<T, I, C>

Source§

impl<T> RotationOne<T> for PauliSum<T>
where T: Config, <T as Config>::Coeff: MulAssign, <T as Config>::Map: ACMapInsert<<T as Config>::Storage, <T as Config>::Coeff, <T as Config>::BuildHasher, <T as Config>::PauliWordType> + ACMapConsume,