pub struct Complex32 {
pub re: f32,
pub im: f32,
}Expand description
Complex number using f32 precision (8 bytes vs 16 bytes for f64).
This is the building block for QuantumStateF32. Each amplitude occupies
half the memory of the standard Complex (f64) type, doubling the number
of amplitudes that fit in a given memory budget and thus enabling roughly
one additional qubit of simulation capacity.
Fields§
§re: f32Real component.
im: f32Imaginary component.
Implementations§
Trait Implementations§
Source§impl AddAssign for Complex32
impl AddAssign for Complex32
Source§fn add_assign(&mut self, rhs: Self)
fn add_assign(&mut self, rhs: Self)
Performs the
+= operation. Read moreimpl Copy for Complex32
impl StructuralPartialEq for Complex32
Auto Trait Implementations§
impl Freeze for Complex32
impl RefUnwindSafe for Complex32
impl Send for Complex32
impl Sync for Complex32
impl Unpin for Complex32
impl UnsafeUnpin for Complex32
impl UnwindSafe for Complex32
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