Struct roqoqo::noise_models::DecoherenceOnIdleModel
source · pub struct DecoherenceOnIdleModel {
pub lindblad_noise: PlusMinusLindbladNoiseOperator,
}
Expand description
Noise model representing a continuous decoherence process on idle qubits.
The purpose of this noise model is to enable defining background noise models that exclude the qubits involved in a gate, as these might be decoupled from the background noise.The noise for each qubit can be different but only single qubit noise is included in the model.
Noise is given by the rates of the Lindblad equation. The Lindblad equation is a so-called master equation for the time evolution of a density matrix. For the example of a single qubit the non-coherent part of the Lindblad equation can take the following form:
d/dt * ρ = Σ Mij * Li * ρ * Lj† - 1/2 * ( Lj† * Li * ρ + ρ * Lj† * Li),
where the indices i and j run from 0 to 2
with L0 = σ+, L1 = σ- and L3 = σz.
Here the general incoherent part of the Lindblad equation is internally represented by a struqture::spins::PlusMinusLindbladNoiseOperator.
To create a complex decoherence model first create the Lindblad noise and then turn it into a DecoherenceOnIdleModel. For a simple decoherence model, use new to create an empty model and use the add_damping, add_excitation, add_depolarising and add_dephasing methods. For more fine control access the internal lindblad_noise directly and modify it.
Fields§
§lindblad_noise: PlusMinusLindbladNoiseOperator
Decoherence rates for all qubits
Implementations§
source§impl DecoherenceOnIdleModel
impl DecoherenceOnIdleModel
sourcepub fn add_damping_rate(self, qubits: &[usize], rate: f64) -> Self
pub fn add_damping_rate(self, qubits: &[usize], rate: f64) -> Self
sourcepub fn add_excitation_rate(self, qubits: &[usize], rate: f64) -> Self
pub fn add_excitation_rate(self, qubits: &[usize], rate: f64) -> Self
sourcepub fn add_dephasing_rate(self, qubits: &[usize], rate: f64) -> Self
pub fn add_dephasing_rate(self, qubits: &[usize], rate: f64) -> Self
sourcepub fn add_depolarising_rate(self, qubits: &[usize], rate: f64) -> Self
pub fn add_depolarising_rate(self, qubits: &[usize], rate: f64) -> Self
Trait Implementations§
source§impl Clone for DecoherenceOnIdleModel
impl Clone for DecoherenceOnIdleModel
source§fn clone(&self) -> DecoherenceOnIdleModel
fn clone(&self) -> DecoherenceOnIdleModel
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for DecoherenceOnIdleModel
impl Debug for DecoherenceOnIdleModel
source§impl Default for DecoherenceOnIdleModel
impl Default for DecoherenceOnIdleModel
source§fn default() -> DecoherenceOnIdleModel
fn default() -> DecoherenceOnIdleModel
source§impl<'de> Deserialize<'de> for DecoherenceOnIdleModel
impl<'de> Deserialize<'de> for DecoherenceOnIdleModel
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
source§impl From<DecoherenceOnIdleModel> for NoiseModel
impl From<DecoherenceOnIdleModel> for NoiseModel
source§fn from(value: DecoherenceOnIdleModel) -> Self
fn from(value: DecoherenceOnIdleModel) -> Self
source§impl From<DecoherenceOnIdleModel> for PlusMinusLindbladNoiseOperator
impl From<DecoherenceOnIdleModel> for PlusMinusLindbladNoiseOperator
source§fn from(value: DecoherenceOnIdleModel) -> Self
fn from(value: DecoherenceOnIdleModel) -> Self
source§impl From<PlusMinusLindbladNoiseOperator> for DecoherenceOnIdleModel
impl From<PlusMinusLindbladNoiseOperator> for DecoherenceOnIdleModel
source§fn from(value: PlusMinusLindbladNoiseOperator) -> Self
fn from(value: PlusMinusLindbladNoiseOperator) -> Self
source§impl PartialEq for DecoherenceOnIdleModel
impl PartialEq for DecoherenceOnIdleModel
source§fn eq(&self, other: &DecoherenceOnIdleModel) -> bool
fn eq(&self, other: &DecoherenceOnIdleModel) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for DecoherenceOnIdleModel
impl Serialize for DecoherenceOnIdleModel
impl StructuralPartialEq for DecoherenceOnIdleModel
Auto Trait Implementations§
impl Freeze for DecoherenceOnIdleModel
impl RefUnwindSafe for DecoherenceOnIdleModel
impl Send for DecoherenceOnIdleModel
impl Sync for DecoherenceOnIdleModel
impl Unpin for DecoherenceOnIdleModel
impl UnwindSafe for DecoherenceOnIdleModel
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
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self
from the equivalent element of its
superset. Read moresource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self
is actually part of its subset T
(and can be converted to it).source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset
but without any property checks. Always succeeds.source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self
to the equivalent element of its superset.