pub trait RotationsBuilder<P: Precision>: CliffordTBuilder<P> {
    // Required method
    fn rz(&mut self, r: Self::Register, theta: P) -> Self::Register;

    // Provided methods
    fn rx(&mut self, r: Self::Register, theta: P) -> Self::Register { ... }
    fn ry(&mut self, r: Self::Register, theta: P) -> Self::Register { ... }
    fn rz_ratio(
        &mut self,
        r: Self::Register,
        theta: Rational64
    ) -> CircuitResult<Self::Register> { ... }
    fn rx_ratio(
        &mut self,
        r: Self::Register,
        theta: Rational64
    ) -> CircuitResult<Self::Register> { ... }
    fn ry_ratio(
        &mut self,
        r: Self::Register,
        theta: Rational64
    ) -> CircuitResult<Self::Register> { ... }
    fn rz_pi_by(
        &mut self,
        r: Self::Register,
        m: i64
    ) -> CircuitResult<Self::Register> { ... }
    fn rx_pi_by(
        &mut self,
        r: Self::Register,
        m: i64
    ) -> CircuitResult<Self::Register> { ... }
    fn ry_pi_by(
        &mut self,
        r: Self::Register,
        m: i64
    ) -> CircuitResult<Self::Register> { ... }
}
Expand description

A Builder which can construct arbitrary rotations around axes.

Required Methods§

source

fn rz(&mut self, r: Self::Register, theta: P) -> Self::Register

Rotate around z.

Provided Methods§

source

fn rx(&mut self, r: Self::Register, theta: P) -> Self::Register

Rotate around x.

source

fn ry(&mut self, r: Self::Register, theta: P) -> Self::Register

Rotate around y.

source

fn rz_ratio( &mut self, r: Self::Register, theta: Rational64 ) -> CircuitResult<Self::Register>

Rotate around z.

source

fn rx_ratio( &mut self, r: Self::Register, theta: Rational64 ) -> CircuitResult<Self::Register>

Rotate around z.

source

fn ry_ratio( &mut self, r: Self::Register, theta: Rational64 ) -> CircuitResult<Self::Register>

Rotate around z.

source

fn rz_pi_by( &mut self, r: Self::Register, m: i64 ) -> CircuitResult<Self::Register>

Rotate around z by pi/m

source

fn rx_pi_by( &mut self, r: Self::Register, m: i64 ) -> CircuitResult<Self::Register>

Rotate around x by pi/m

source

fn ry_pi_by( &mut self, r: Self::Register, m: i64 ) -> CircuitResult<Self::Register>

Rotate around y by pi/m

Implementors§