Struct qdk_sim::NoiseModel
source · [−]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
sourceimpl NoiseModel
impl NoiseModel
sourcepub fn get_by_name(name: &str) -> Result<NoiseModel, String>
pub fn get_by_name(name: &str) -> Result<NoiseModel, String>
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");
sourcepub fn ideal() -> NoiseModel
pub fn ideal() -> NoiseModel
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.
sourcepub fn ideal_stabilizer() -> NoiseModel
pub fn ideal_stabilizer() -> NoiseModel
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
sourceimpl Debug for NoiseModel
impl Debug for NoiseModel
sourceimpl<'de> Deserialize<'de> for NoiseModel
impl<'de> Deserialize<'de> for NoiseModel
sourcefn 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
sourceimpl Serialize for NoiseModel
impl Serialize for NoiseModel
Auto Trait Implementations
impl RefUnwindSafe for NoiseModel
impl Send for NoiseModel
impl Sync for NoiseModel
impl Unpin for NoiseModel
impl UnwindSafe for NoiseModel
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more