pub struct PauliRotation<const W: usize> { /* private fields */ }Expand description
A rotation U = exp(-i · θ · P / 2) about a Pauli generator P of any weight.
The support is derived from the generator: a qubit belongs to it iff P is non-identity there.
Implementations§
Source§impl<const W: usize> PauliRotation<W>
impl<const W: usize> PauliRotation<W>
Sourcepub fn new(generator: PauliString<W>, theta: f64) -> Self
pub fn new(generator: PauliString<W>, theta: f64) -> Self
A rotation by theta radians about generator.
Sourcepub fn generator(&self) -> PauliString<W>
pub fn generator(&self) -> PauliString<W>
The generator P.
Trait Implementations§
Source§impl<const W: usize> Channel<W> for PauliRotation<W>
impl<const W: usize> Channel<W> for PauliRotation<W>
Source§fn support(&self) -> [u64; W]
fn support(&self) -> [u64; W]
Qubits this channel acts on, as a bitmask built with
support_mask. Read moreSource§fn apply(
&self,
input_x: &[u64; W],
input_z: &[u64; W],
coeff: Complex64,
out: &mut OutputBuffer<W>,
)
fn apply( &self, input_x: &[u64; W], input_z: &[u64; W], coeff: Complex64, out: &mut OutputBuffer<W>, )
Apply the channel to one input term, pushing its outputs to
out.Source§fn apply_adjoint(
&self,
input_x: &[u64; W],
input_z: &[u64; W],
coeff: Complex64,
out: &mut OutputBuffer<W>,
)
fn apply_adjoint( &self, input_x: &[u64; W], input_z: &[u64; W], coeff: Complex64, out: &mut OutputBuffer<W>, )
Apply the channel’s adjoint to one input term; run by
Direction::Heisenberg. Read moreSource§fn debug_name(&self) -> &'static str
fn debug_name(&self) -> &'static str
Short name for the per-layer progress log. Read more
Source§impl<const W: usize> Clone for PauliRotation<W>
impl<const W: usize> Clone for PauliRotation<W>
Source§fn clone(&self) -> PauliRotation<W>
fn clone(&self) -> PauliRotation<W>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl<const W: usize> Freeze for PauliRotation<W>
impl<const W: usize> RefUnwindSafe for PauliRotation<W>
impl<const W: usize> Send for PauliRotation<W>
impl<const W: usize> Sync for PauliRotation<W>
impl<const W: usize> Unpin for PauliRotation<W>
impl<const W: usize> UnwindSafe for PauliRotation<W>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more