pub struct Complex<T> {
pub re: T,
pub im: T,
}Expand description
Generic complex number for the quantum computer. Will mostly use f64.
Fields§
§re: T§im: TImplementations§
Trait Implementations§
source§impl<T: Mul<Output = T> + Add<Output = T> + Sub<Output = T> + Copy> Mul for Complex<T>
impl<T: Mul<Output = T> + Add<Output = T> + Sub<Output = T> + Copy> Mul for Complex<T>
Multiplying two generic complex numbers.
source§impl<T: PartialEq> PartialEq for Complex<T>
impl<T: PartialEq> PartialEq for Complex<T>
impl<T: Copy> Copy for Complex<T>
impl<T> StructuralPartialEq for Complex<T>
Auto Trait Implementations§
impl<T> RefUnwindSafe for Complex<T>where T: RefUnwindSafe,
impl<T> Send for Complex<T>where T: Send,
impl<T> Sync for Complex<T>where T: Sync,
impl<T> Unpin for Complex<T>where T: Unpin,
impl<T> UnwindSafe for Complex<T>where T: UnwindSafe,
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