pub struct CalibrationManager {
pub backend_name: String,
pub custom_calibrations: Vec<CustomCalibration>,
pub constraints: PulseBackendConstraints,
pub defaults: Option<CalibrationData>,
}Expand description
Manager for custom pulse calibrations
Fields§
§backend_name: StringBackend name
custom_calibrations: Vec<CustomCalibration>Custom calibrations
constraints: PulseBackendConstraintsBackend constraints
defaults: Option<CalibrationData>Default calibrations from backend
Implementations§
Source§impl CalibrationManager
impl CalibrationManager
Sourcepub fn new(backend_name: impl Into<String>) -> Self
pub fn new(backend_name: impl Into<String>) -> Self
Create a new CalibrationManager for a backend
Sourcepub fn with_defaults(
backend_name: impl Into<String>,
defaults: CalibrationData,
) -> Self
pub fn with_defaults( backend_name: impl Into<String>, defaults: CalibrationData, ) -> Self
Create with calibration data from backend
Sourcepub fn with_constraints(self, constraints: PulseBackendConstraints) -> Self
pub fn with_constraints(self, constraints: PulseBackendConstraints) -> Self
Set backend constraints
Sourcepub fn add_calibration(
&mut self,
calibration: CustomCalibration,
) -> DeviceResult<()>
pub fn add_calibration( &mut self, calibration: CustomCalibration, ) -> DeviceResult<()>
Add a custom calibration
Sourcepub fn remove_calibration(&mut self, gate_name: &str, qubits: &[usize]) -> bool
pub fn remove_calibration(&mut self, gate_name: &str, qubits: &[usize]) -> bool
Remove a custom calibration by gate name and qubits
Sourcepub fn get_calibration(
&self,
gate_name: &str,
qubits: &[usize],
) -> Option<&CustomCalibration>
pub fn get_calibration( &self, gate_name: &str, qubits: &[usize], ) -> Option<&CustomCalibration>
Get a custom calibration
Sourcepub fn validate_calibration(
&self,
calibration: &CustomCalibration,
) -> DeviceResult<CalibrationValidation>
pub fn validate_calibration( &self, calibration: &CustomCalibration, ) -> DeviceResult<CalibrationValidation>
Validate a calibration against backend constraints
Sourcepub fn generate_defcal_statements(&self) -> String
pub fn generate_defcal_statements(&self) -> String
Generate QASM 3.0 defcal statements for custom calibrations
Sourcepub fn to_ibm_format(&self) -> DeviceResult<Value>
pub fn to_ibm_format(&self) -> DeviceResult<Value>
Convert to IBM-compatible JSON format for upload
Sourcepub fn calibration_names(&self) -> Vec<(&str, &[usize])>
pub fn calibration_names(&self) -> Vec<(&str, &[usize])>
List all custom calibration gate names
Trait Implementations§
Source§impl Clone for CalibrationManager
impl Clone for CalibrationManager
Source§fn clone(&self) -> CalibrationManager
fn clone(&self) -> CalibrationManager
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 CalibrationManager
impl RefUnwindSafe for CalibrationManager
impl Send for CalibrationManager
impl Sync for CalibrationManager
impl Unpin for CalibrationManager
impl UnwindSafe for CalibrationManager
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.