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§
Source§impl 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§
Source§impl Debug for NoiseModel
impl Debug for NoiseModel
Source§impl<'de> Deserialize<'de> for NoiseModel
impl<'de> Deserialize<'de> for NoiseModel
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>,
Auto Trait Implementations§
impl Freeze for NoiseModel
impl RefUnwindSafe for NoiseModel
impl Send for NoiseModel
impl Sync for NoiseModel
impl Unpin for NoiseModel
impl UnwindSafe for NoiseModel
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 more