pub struct PhasedPauliString {
pub paulis: PauliString,
/* private fields */
}Expand description
A packed Hermitian PauliString with an exact phase i^k.
Fields§
§paulis: PauliStringHermitian body. Mutating it does not change the phase.
Implementations§
Source§impl PhasedPauliString
impl PhasedPauliString
Sourcepub fn new(paulis: PauliString, phase: u8) -> Self
pub fn new(paulis: PauliString, phase: u8) -> Self
Attaches i^phase to paulis, reducing the exponent modulo four.
Sourcepub fn positive(paulis: PauliString) -> Self
pub fn positive(paulis: PauliString) -> Self
Creates +paulis.
Sourcepub fn shift_phase(&mut self, exponent: u8)
pub fn shift_phase(&mut self, exponent: u8)
Adds a phase exponent modulo four.
Sourcepub fn multiply_assign(&mut self, other: &Self)
pub fn multiply_assign(&mut self, other: &Self)
Multiplies by other, retaining the exact phase.
Sourcepub fn conjugate_h(&mut self, column: usize)
pub fn conjugate_h(&mut self, column: usize)
Conjugates one column by Hadamard, including HYH = -Y.
Sourcepub const fn hermitian_sign(&self) -> Option<bool>
pub const fn hermitian_sign(&self) -> Option<bool>
Returns the sign of a Hermitian operator (true means negative).
Trait Implementations§
Source§impl Clone for PhasedPauliString
impl Clone for PhasedPauliString
Source§fn clone(&self) -> PhasedPauliString
fn clone(&self) -> PhasedPauliString
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PhasedPauliString
impl Debug for PhasedPauliString
impl Eq for PhasedPauliString
Source§impl PartialEq for PhasedPauliString
impl PartialEq for PhasedPauliString
impl StructuralPartialEq for PhasedPauliString
Auto Trait Implementations§
impl Freeze for PhasedPauliString
impl RefUnwindSafe for PhasedPauliString
impl Send for PhasedPauliString
impl Sync for PhasedPauliString
impl Unpin for PhasedPauliString
impl UnsafeUnpin for PhasedPauliString
impl UnwindSafe for PhasedPauliString
Blanket Implementations§
§impl<T, BorrowedSelf> BitwiseMutViaBorrow<BorrowedSelf> for T
impl<T, BorrowedSelf> BitwiseMutViaBorrow<BorrowedSelf> for T
fn assign_index(&mut self, index: usize, to: bool)
fn negate_index(&mut self, index: usize)
fn clear_bits(&mut self)
fn assign_random(
&mut self,
bit_count: usize,
random_number_generator: &mut impl RngExt,
)where
BorrowedSelf: BitLength,
§impl<Bits, Other, BorrowedSelf, BorrowedOther> BitwisePairMutViaBorrow<Other, BorrowedSelf, BorrowedOther> for Bits
impl<Bits, Other, BorrowedSelf, BorrowedOther> BitwisePairMutViaBorrow<Other, BorrowedSelf, BorrowedOther> for Bits
fn assign(&mut self, other: &Other)
fn bitxor_assign(&mut self, other: &Other)
fn bitand_assign(&mut self, other: &Other)
fn bitor_assign(&mut self, other: &Other)
§impl<T, Other, BorrowedSelf, BorrowedOther> BitwisePairViaBorrow<Other, BorrowedSelf, BorrowedOther> for T
impl<T, Other, BorrowedSelf, BorrowedOther> BitwisePairViaBorrow<Other, BorrowedSelf, BorrowedOther> for T
§impl<T, BorrowedSelf> BitwiseViaBorrow<BorrowedSelf> for T
impl<T, BorrowedSelf> BitwiseViaBorrow<BorrowedSelf> for T
fn index(&self, index: usize) -> bool
fn weight(&self) -> usize
fn parity(&self) -> bool
fn is_zero(&self) -> bool
fn is_unit(&self, index: usize) -> bool
fn support<'a>(&'a self) -> impl SortedIteratorwhere
BorrowedSelf: 'a,
fn max_support(&self) -> Option<usize>
fn min_support(&self) -> Option<usize>
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,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.