pub enum Error {
Show 14 variants
Settings(String),
Authentication,
QpuNotFound,
QpuUnavailable(Duration),
Connection(Service),
Quil(ProgramError<Program>),
Compilation(String),
Translation(String),
RewriteArithmetic(Error),
Substitution(String),
MissingRoSources,
Unexpected(String),
InvalidJobHandle,
QcsConfigLoadFailure(LoadError),
}Expand description
The possible errors which can be returned by Executable::execute_on_qpu and
Executable::execute_on_qvm..
Variants
Settings(String)
Communicating with QCS requires appropriate settings and secrets files. By default, these
should be $HOME/.qcs/settings.toml and $HOME/.qcs/secrets.toml, though those files can
be overridden by setting the QCS_SETTINGS_FILE_PATH and QCS_SECRETS_FILE_PATH
environment variables.
This error can occur when one of those files is required but missing or there is a problem with the contents of those files.
Authentication
This error occurs when the SDK was unable to authenticate a request to QCS. This could mean that your credentials are invalid or expired, or that you do not have access to the requested QPU.
QpuNotFound
The requested QPU was not found. Either the QPU does not exist or you do not have access to it.
QpuUnavailable(Duration)
This happens when the QPU is down for maintenance and not accepting new jobs. If you receive this error, internal compilation caches will have been cleared as programs should be recompiled with new settings after a maintenance window. If you are mid-experiment, you might want to start over.
Connection(Service)
Indicates a problem connecting to an external service. Check your network connection and
ensure that any required local services (e.g., qvm or quilc) are running.
Quil(ProgramError<Program>)
There was some problem with the provided Quil program. This could be a syntax error with
quil, providing Quil-T to quilc or qvm (which is not supported), or forgetting to set
some parameters.
Compilation(String)
There was a problem when compiling the Quil program.
Translation(String)
There was a problem when translating the Quil program.
RewriteArithmetic(Error)
There was a problem when rewriting parameter arithmetic in the Quil program.
Substitution(String)
There was a problem when substituting parameters in the Quil program.
MissingRoSources
The Quil program is missing readout sources.
Unexpected(String)
This error returns when a runtime check that should always pass fails. This most likely indicates a bug in the SDK and should be reported to GitHub,
InvalidJobHandle
Occurs when Executable::retrieve_results is called with an invalid JobHandle.
Calling functions on Executable between Executable::submit_to_qpu and
Executable::retrieve_results can invalidate the handle.
QcsConfigLoadFailure(LoadError)
Occurs when failing to construct a [QcsClient].
Trait Implementations
sourceimpl Error for Error
impl Error for Error
sourcefn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · sourcefn description(&self) -> &str
fn description(&self) -> &str
sourceimpl From<ProgramError<Program>> for Error
impl From<ProgramError<Program>> for Error
sourcefn from(source: ProgramError<Program>) -> Self
fn from(source: ProgramError<Program>) -> Self
Auto Trait Implementations
impl !RefUnwindSafe for Error
impl Send for Error
impl !Sync for Error
impl Unpin for Error
impl !UnwindSafe for Error
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
sourcefn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request