pub struct ContinuousDecoherenceModel {
    pub lindblad_noise: PlusMinusLindbladNoiseOperator,
}
Expand description

Noise model representing a continuous decoherence process on qubits.

This noise model assumes that all qubits are constantly experiencing decoherence over time (e.g. due to coupling to the environment). 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 ContinuousDecoherenceModel. 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 ContinuousDecoherenceModel

source

pub fn new() -> Self

Create a new empty ContinuousDecoherenceModel.

source

pub fn add_damping_rate(self, qubits: &[usize], rate: f64) -> Self

Convenience function to add damping to several qubits

§Arguments
  • qubits - The qubits to add damping to.
  • rate - The damping rate.
§Returns

self - The ContinuousDecoherenceModel with the damping added.

source

pub fn add_excitation_rate(self, qubits: &[usize], rate: f64) -> Self

Convenience function to add rate of excitation from 0 to 1 state to several qubits

§Arguments
  • qubits - The qubits to add the rate of excitation to.
  • rate - The rate of excitation.
§Returns
  • self - The ContinuousDecoherenceModel with the rate of excitation added.
source

pub fn add_dephasing_rate(self, qubits: &[usize], rate: f64) -> Self

Convenience function to add damping to several qubits

§Arguments
  • qubits - The qubits to add dephasing to.
  • rate - The dephasing rate.
§Returns
  • self - The ContinuousDecoherenceModel with the dephasing added.
source

pub fn add_depolarising_rate(self, qubits: &[usize], rate: f64) -> Self

Convenience function to add depolarising to several qubits

§Arguments
  • qubits - The qubits to add depolarising to.
  • rate - The rate of depolarising.
§Returns
  • self - The ContinuousDecoherenceModel with the rate of depolarising added.

Trait Implementations§

source§

impl Clone for ContinuousDecoherenceModel

source§

fn clone(&self) -> ContinuousDecoherenceModel

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for ContinuousDecoherenceModel

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for ContinuousDecoherenceModel

source§

fn default() -> ContinuousDecoherenceModel

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for ContinuousDecoherenceModel

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl From<ContinuousDecoherenceModel> for NoiseModel

source§

fn from(value: ContinuousDecoherenceModel) -> Self

Converts to this type from the input type.
source§

impl From<ContinuousDecoherenceModel> for PlusMinusLindbladNoiseOperator

source§

fn from(value: ContinuousDecoherenceModel) -> Self

Converts to this type from the input type.
source§

impl From<PlusMinusLindbladNoiseOperator> for ContinuousDecoherenceModel

source§

fn from(value: PlusMinusLindbladNoiseOperator) -> Self

Converts to this type from the input type.
source§

impl PartialEq for ContinuousDecoherenceModel

source§

fn eq(&self, other: &ContinuousDecoherenceModel) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Serialize for ContinuousDecoherenceModel

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl SupportedVersion for ContinuousDecoherenceModel

source§

fn minimum_supported_roqoqo_version(&self) -> (u32, u32, u32)

Returns the minimum roqoqo version that supports the operation. Read more
source§

impl StructuralPartialEq for ContinuousDecoherenceModel

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> DynClone for T
where T: Clone,

source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<SS, SP> SupersetOf<SS> for SP
where SS: SubsetOf<SP>,

source§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
source§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
source§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
source§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

source§

impl<T> Scalar for T
where T: 'static + Clone + PartialEq + Debug,