Skip to main content

RotationOne

Trait RotationOne 

Source
pub trait RotationOne<T: Config> {
    // Required method
    fn rotate_1(&mut self, axis: Pauli, addr0: usize, theta: T::Coeff);

    // Provided methods
    fn rx(&mut self, addr0: usize, theta: impl Into<T::Coeff>) { ... }
    fn ry(&mut self, addr0: usize, theta: impl Into<T::Coeff>) { ... }
    fn rz(&mut self, addr0: usize, theta: impl Into<T::Coeff>) { ... }
    fn rx_many(&mut self, targets: &[usize], theta: impl Into<T::Coeff>) { ... }
    fn ry_many(&mut self, targets: &[usize], theta: impl Into<T::Coeff>) { ... }
    fn rz_many(&mut self, targets: &[usize], theta: impl Into<T::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::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::Coeff>)

RX(θ) on one qubit.

Source

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

RY(θ) on one qubit.

Source

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

RZ(θ) on one qubit.

Source

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

Explicit batched RX(θ).

Source

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

Explicit batched RY(θ).

Source

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

Explicit batched RZ(θ).

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§