pub struct NoiseModel {
    pub initial_state: State,
    pub i: Process,
    pub x: Process,
    pub y: Process,
    pub z: Process,
    pub h: Process,
    pub s: Process,
    pub s_adj: Process,
    pub t: Process,
    pub t_adj: Process,
    pub cnot: Process,
    pub z_meas: Instrument,
}
Expand description

A description of the noise that applies to the state of a quantum system as the result of applying operations.

Fields

initial_state: State

The initial state that freshly allocated qubits start off in.

i: Process

The process that applies to the state of a simulator when the I operation is called.

x: Process

The process that applies to the state of a simulator when the X operation is called.

y: Process

The process that applies to the state of a simulator when the Y operation is called.

z: Process

The process that applies to the state of a simulator when the Z operation is called.

h: Process

The process that applies to the state of a simulator when the H operation is called.

s: Process

The process that applies to the state of a simulator when the S operation is called.

s_adj: Process

The process that applies to the state of a simulator when the Adjoint S operation is called.

t: Process

The process that applies to the state of a simulator when the T operation is called.

t_adj: Process

The process that applies to the state of a simulator when the Adjoint T operation is called.

cnot: Process

The process that applies to the state of a simulator when the CNOT operation is called.

z_meas: Instrument

The instrument that is used to the measure the state of a simulator in the $Z$-basis.

Implementations

Returns a serialization of this noise model as a JSON object.

Given the name of a built-in noise model, returns either that noise model if it exists, or an Err variant if no such model exists.

Currently accepted noise model names:

  • "ideal": A full-state noise model in which all operations are ideal (that is, without errors).
  • "ideal_stabilizer": A noise model in which all operations except NoiseModel::t and NoiseModel::t_adj are ideal, and represented in a form compatible with stabilizer simulation.
Example
let noise_model = NoiseModel::get_by_name("ideal");

Returns a copy of the ideal noise model; that is, a noise model describing the case in which no noise acts on the quantum system.

Returns a copy of the ideal noise model suitable for use with stabilizer simulation; that is, a noise model describing the case in which no noise acts on the quantum system, and in which all channels can be represented by CHP decompositions.

Trait Implementations

Formats the value using the given formatter. Read more

Deserialize this value from the given Serde deserializer. Read more

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.