Struct qdk_sim::NoiseModel [−][src]
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
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 exceptNoiseModel::t
andNoiseModel::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
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>,
Deserialize this value from the given Serde deserializer. Read more