Expand description
Quantum State Vector Simulation
This module provides quantum state vector representation and operations. State vectors represent pure quantum states using complex probability amplitudes.
§Mathematical Background
A quantum state of n qubits is represented by a normalized complex vector in 2^n dimensional Hilbert space: |ψ⟩ = Σ αᵢ|i⟩, where Σ|αᵢ|² = 1
§Examples
use numrs2::new_modules::quantum::statevector::StateVector;
// Create a 2-qubit state |00⟩
let state = StateVector::<f64>::new(2).expect("valid qubit count");
assert_eq!(state.num_qubits(), 2);Structs§
- Density
Matrix - Density matrix representation of quantum states
- State
Vector - Quantum state vector representing pure quantum states