pub struct RandomUnitary<T> { /* private fields */ }Expand description
A struct for generating random unitary matrices.
This struct creates a random matrix distributed according to the Haar measure, with complex case and an orthogonal matrix in the real case.
§Example
use quantum_sim::random_gate::RandomUnitary;
let ru = RandomUnitary::<f64>::new(4).build();
let ru1 = RandomUnitary::<f64>::new(4).is_real(true).build();Implementations§
Auto Trait Implementations§
impl<T> Freeze for RandomUnitary<T>
impl<T> RefUnwindSafe for RandomUnitary<T>where
T: RefUnwindSafe,
impl<T> Send for RandomUnitary<T>where
T: Send,
impl<T> Sync for RandomUnitary<T>where
T: Sync,
impl<T> Unpin for RandomUnitary<T>where
T: Unpin,
impl<T> UnwindSafe for RandomUnitary<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