Trait qip::builder_traits::RotationsBuilder
source · 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§
Provided Methods§
sourcefn rz_ratio(
&mut self,
r: Self::Register,
theta: Rational64
) -> CircuitResult<Self::Register>
fn rz_ratio( &mut self, r: Self::Register, theta: Rational64 ) -> CircuitResult<Self::Register>
Rotate around z.
sourcefn rx_ratio(
&mut self,
r: Self::Register,
theta: Rational64
) -> CircuitResult<Self::Register>
fn rx_ratio( &mut self, r: Self::Register, theta: Rational64 ) -> CircuitResult<Self::Register>
Rotate around z.
sourcefn ry_ratio(
&mut self,
r: Self::Register,
theta: Rational64
) -> CircuitResult<Self::Register>
fn ry_ratio( &mut self, r: Self::Register, theta: Rational64 ) -> CircuitResult<Self::Register>
Rotate around z.
sourcefn rz_pi_by(
&mut self,
r: Self::Register,
m: i64
) -> CircuitResult<Self::Register>
fn rz_pi_by( &mut self, r: Self::Register, m: i64 ) -> CircuitResult<Self::Register>
Rotate around z by pi/m