pub struct SingleQubitOverrotationDescription {
gate: String,
theta_mean: f64,
theta_std: f64,
}
Expand description
Description of single qubit overrotation noise model, [roqoqo::noise_models::SingleQubitOverrotationOnGate].
Consists of the raw data needed to construct a rotation gate that adds overrotation: gate name and statistics (mean and standard deviation) of a Gaussian distribution from which the overrotation angle is sampled.
Example:
use roqoqo::noise_models::SingleQubitOverrotationDescription;
let gate = "RotateX";
let theta_mean = 0.0;
let theta_std = 1.0;
let mut noise_desc = SingleQubitOverrotationDescription::new(gate, theta_mean, theta_std);
Fields§
§gate: String
Name of the single qubit rotation gate
theta_mean: f64
Mean value for the overrotation: overrottation are stochastically distributed around this base overrotation value
theta_std: f64
Standard deviation of Gaussian distribution around mean value of theta
Implementations§
source§impl SingleQubitOverrotationDescription
impl SingleQubitOverrotationDescription
sourcepub fn new(gate: &str, theta_mean: f64, theta_std: f64) -> Self
pub fn new(gate: &str, theta_mean: f64, theta_std: f64) -> Self
Creates a new SingleQubitOverrotationDescription.
§Arguments
gate
- The name of the gate.theta_mean
- The mean of Gaussian distribution from which overrotation angle is sampled.theta_std
- The standard deviation of Gaussian distribution from which overrotation angle is sampled.
§Returns
Self
- New description for overrotation noise model.
sourcepub fn theta_mean(&self) -> f64
pub fn theta_mean(&self) -> f64
Returns mean of Gaussian distribution of overrotation angles name of SingleQubitOverrotationDescription.
§Returns
theta_mean
- mean of distribution.
Trait Implementations§
source§impl Clone for SingleQubitOverrotationDescription
impl Clone for SingleQubitOverrotationDescription
source§fn clone(&self) -> SingleQubitOverrotationDescription
fn clone(&self) -> SingleQubitOverrotationDescription
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Default for SingleQubitOverrotationDescription
impl Default for SingleQubitOverrotationDescription
source§fn default() -> SingleQubitOverrotationDescription
fn default() -> SingleQubitOverrotationDescription
source§impl<'de> Deserialize<'de> for SingleQubitOverrotationDescription
impl<'de> Deserialize<'de> for SingleQubitOverrotationDescription
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>,
source§impl PartialEq for SingleQubitOverrotationDescription
impl PartialEq for SingleQubitOverrotationDescription
source§fn eq(&self, other: &SingleQubitOverrotationDescription) -> bool
fn eq(&self, other: &SingleQubitOverrotationDescription) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for SingleQubitOverrotationDescription
Auto Trait Implementations§
impl Freeze for SingleQubitOverrotationDescription
impl RefUnwindSafe for SingleQubitOverrotationDescription
impl Send for SingleQubitOverrotationDescription
impl Sync for SingleQubitOverrotationDescription
impl Unpin for SingleQubitOverrotationDescription
impl UnwindSafe for SingleQubitOverrotationDescription
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 moresource§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self
from the equivalent element of its
superset. Read moresource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self
is actually part of its subset T
(and can be converted to it).source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset
but without any property checks. Always succeeds.source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self
to the equivalent element of its superset.