pub trait NoiseChannel: Send + Sync {
// Required methods
fn kraus_operators(&self) -> Vec<Array2<Complex64>> ⓘ;
fn name(&self) -> &str;
fn num_qubits(&self) -> usize;
// Provided methods
fn apply(
&self,
state: &ArrayView1<'_, Complex64>,
) -> NoiseResult<Array1<Complex64>> { ... }
fn verify_completeness(&self) -> bool { ... }
}Expand description
Trait for quantum noise channels
A noise channel is characterized by its Kraus operators {K_i}, which satisfy the completeness relation: ∑_i K_i† K_i = I
Required Methods§
Sourcefn kraus_operators(&self) -> Vec<Array2<Complex64>> ⓘ
fn kraus_operators(&self) -> Vec<Array2<Complex64>> ⓘ
Returns the Kraus operators for this noise channel
Sourcefn num_qubits(&self) -> usize
fn num_qubits(&self) -> usize
Returns the number of qubits this channel acts on
Provided Methods§
Sourcefn apply(
&self,
state: &ArrayView1<'_, Complex64>,
) -> NoiseResult<Array1<Complex64>>
fn apply( &self, state: &ArrayView1<'_, Complex64>, ) -> NoiseResult<Array1<Complex64>>
Apply the noise channel to a quantum state using Kraus operators
For a state |ψ⟩, the noisy state is: ρ = ∑_i K_i |ψ⟩⟨ψ| K_i†
Sourcefn verify_completeness(&self) -> bool
fn verify_completeness(&self) -> bool
Check if Kraus operators satisfy completeness relation