Expand description
§Random Operator Generator
This module provides tools to generate random unitary matrices, density matrices, and state vectors…. It supports different distributions (Haar, Bures) and both real and complex cases. The API follows a builder pattern for flexible, keyword-like usage.
§Example
use quantum_sim::random_gate::{RandomDensityMat, RandomUnitary};
use num_complex::Complex;
let u = RandomUnitary::<f64>::new(4).is_real(false).build();
let rho = RandomDensityMat::<f64>::new(4).build();
let rho_bures = RandomDensityMat::<f64>::new(4).bures().is_real(true).build();§Features
- Haar and Bures random state generation
- Real or complex support
- Generic over f32/f64
- Type-safe and builder-based interface
Structs§
- Random
Density Mat - A struct for generating random density matrices.
- Random
Unitary - A struct for generating random unitary matrices.