pub struct CalibrationData {
pub backend_name: String,
pub last_update_date: String,
pub qubits: Vec<QubitCalibration>,
pub gates: HashMap<String, Vec<GateCalibration>>,
pub general: GeneralProperties,
}Expand description
Calibration data for an IBM Quantum backend
Fields§
§backend_name: StringBackend name
last_update_date: StringCalibration timestamp
qubits: Vec<QubitCalibration>Qubit properties
gates: HashMap<String, Vec<GateCalibration>>Gate calibration data
general: GeneralPropertiesGeneral backend properties
Implementations§
Source§impl CalibrationData
impl CalibrationData
Sourcepub async fn fetch(
client: &IBMQuantumClient,
backend_name: &str,
) -> DeviceResult<Self>
pub async fn fetch( client: &IBMQuantumClient, backend_name: &str, ) -> DeviceResult<Self>
Create calibration data from a backend
Sourcepub fn qubit(&self, qubit_id: usize) -> Option<&QubitCalibration>
pub fn qubit(&self, qubit_id: usize) -> Option<&QubitCalibration>
Get qubit calibration data
Sourcepub fn gate_length(&self, gate_name: &str, qubits: &[usize]) -> Option<Duration>
pub fn gate_length(&self, gate_name: &str, qubits: &[usize]) -> Option<Duration>
Get gate length
Sourcepub fn best_qubits(&self, n: usize) -> DeviceResult<Vec<usize>>
pub fn best_qubits(&self, n: usize) -> DeviceResult<Vec<usize>>
Find the best N qubits based on T1, T2, and readout error
Sourcepub fn best_cx_pairs(&self, n: usize) -> DeviceResult<Vec<(usize, usize)>>
pub fn best_cx_pairs(&self, n: usize) -> DeviceResult<Vec<(usize, usize)>>
Find the best connected qubit pairs for two-qubit gates
Sourcepub fn estimate_circuit_fidelity(&self, gates: &[(String, Vec<usize>)]) -> f64
pub fn estimate_circuit_fidelity(&self, gates: &[(String, Vec<usize>)]) -> f64
Calculate expected circuit fidelity based on calibration data
Sourcepub fn avg_single_qubit_error(&self) -> f64
pub fn avg_single_qubit_error(&self) -> f64
Get average single-qubit gate error
Sourcepub fn avg_two_qubit_error(&self) -> f64
pub fn avg_two_qubit_error(&self) -> f64
Get average two-qubit gate error
Sourcepub fn avg_readout_error(&self) -> f64
pub fn avg_readout_error(&self) -> f64
Get average readout error
Trait Implementations§
Source§impl Clone for CalibrationData
impl Clone for CalibrationData
Source§fn clone(&self) -> CalibrationData
fn clone(&self) -> CalibrationData
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for CalibrationData
impl RefUnwindSafe for CalibrationData
impl Send for CalibrationData
impl Sync for CalibrationData
impl Unpin for CalibrationData
impl UnwindSafe for CalibrationData
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
Converts
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>
Converts
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<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§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>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
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
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.