pub enum HardwareError {
NetworkError {
message: String,
source: Option<Error>,
},
AuthenticationFailed,
QueueTimeout {
timeout_secs: u64,
},
CalibrationDrift {
device: String,
fidelity: f64,
},
InvalidCircuit {
reason: String,
},
DeviceUnavailable {
device: String,
reason: String,
},
JobFailed {
job_id: String,
message: String,
},
RateLimited {
retry_after_secs: u64,
},
SerializationError(Error),
}Expand description
Errors that can occur during hardware interactions.
This enum covers all failure modes when communicating with quantum hardware, from network issues to QPU-specific problems like calibration drift.
§Example
ⓘ
use logosq_hardware_integrator::HardwareError;
fn handle_error(err: HardwareError) {
match err {
HardwareError::NetworkError { .. } => println!("Check connection"),
_ => println!("Other error: {}", err),
}
}Variants§
NetworkError
Network communication failure
AuthenticationFailed
API authentication failed (invalid or expired token)
QueueTimeout
Job queue timeout exceeded
CalibrationDrift
QPU calibration has drifted beyond acceptable thresholds
InvalidCircuit
Circuit exceeds device capabilities
Device is offline or under maintenance
JobFailed
Job execution failed on the QPU
RateLimited
Rate limit exceeded
SerializationError(Error)
Serialization/deserialization error
Trait Implementations§
Source§impl Debug for HardwareError
impl Debug for HardwareError
Source§impl Display for HardwareError
impl Display for HardwareError
Source§impl Error for HardwareError
impl Error for HardwareError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for HardwareError
impl !RefUnwindSafe for HardwareError
impl Send for HardwareError
impl Sync for HardwareError
impl Unpin for HardwareError
impl !UnwindSafe for HardwareError
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