pub struct RandomDensityMat<T: Float + Scalar> { /* private fields */ }Expand description
A struct for generating random density matrices.
It can generate random density matrices from different statistical ensembles (Haar or Bures), both real and complex matrices.
§Example
use quantum_sim::random_gate::{RandomDensityMat, RandomUnitary};
let rho = RandomDensityMat::<f64>::new(4).build();
let rho_bures = RandomDensityMat::<f64>::new(4).bures().is_real(true).build();Implementations§
Auto Trait Implementations§
impl<T> Freeze for RandomDensityMat<T>
impl<T> RefUnwindSafe for RandomDensityMat<T>where
T: RefUnwindSafe,
impl<T> Send for RandomDensityMat<T>where
T: Send,
impl<T> Sync for RandomDensityMat<T>where
T: Sync,
impl<T> Unpin for RandomDensityMat<T>where
T: Unpin,
impl<T> UnwindSafe for RandomDensityMat<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