pub trait NoiseChannel: Debug + Clone {
// Required methods
fn name(&self) -> &'static str;
fn qubits(&self) -> Vec<QubitId>;
fn apply_to_statevector(
&self,
state: &mut [Complex64],
) -> QuantRS2Result<()>;
fn kraus_operators(&self) -> Vec<Vec<Complex64>>;
fn probability(&self) -> f64;
}Expand description
Trait for quantum noise channels
Required Methods§
Sourcefn apply_to_statevector(&self, state: &mut [Complex64]) -> QuantRS2Result<()>
fn apply_to_statevector(&self, state: &mut [Complex64]) -> QuantRS2Result<()>
Apply the noise channel to a state vector
Sourcefn kraus_operators(&self) -> Vec<Vec<Complex64>>
fn kraus_operators(&self) -> Vec<Vec<Complex64>>
Return the Kraus operators for this channel
Sourcefn probability(&self) -> f64
fn probability(&self) -> f64
Probability of the noise occurring
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".