Quantum Resource Manager and Compiler Infrastructure (QRM&CI) 0.1.0
mqss::qrmci::Error Struct Reference

A failure reported by a QRM&CI operation: a kind the caller can act on, plus a human-readable detail for logs and result messages. More...

Public Types

enum class  Kind : std::uint8_t {
  NoBackendAvailable , UnsupportedFormat , CompilationFailed , SubmissionFailed ,
  DeviceError , MessagingFailed , Internal , ConfigError ,
  DriverUnavailable , ShutdownRequested
}
 What kind of failure occurred. More...

Public Attributes

Kind kind
 The kind of failure, for a caller deciding what to do next.
std::string detail
 A human-readable description, for log lines and for the cancellation message sent back to the task's submitter.

Detailed Description

A failure reported by a QRM&CI operation: a kind the caller can act on, plus a human-readable detail for logs and result messages.

Categorically different failures – a backend that is merely not up yet, a circuit format that will never be accepted, a violated invariant – need different responses, and the wording of a message is no basis for telling them apart. The kind states the category outright; the detail carries the specifics for the log line and the cancellation message.

Definition at line 29 of file Error.h.

Member Enumeration Documentation

◆ Kind

enum class mqss::qrmci::Error::Kind : std::uint8_t
strong

What kind of failure occurred.

This, not the wording of detail, is what callers dispatch on.

Enumerator
NoBackendAvailable 

No registered backend can run the task.

UnsupportedFormat 

The circuit format is not one the compiler or the backend accepts – the submitter's input is at fault.

CompilationFailed 

The compiler rejected the task's circuit – the submitter's input is at fault.

SubmissionFailed 

The device refused the job at submission time.

DeviceError 

The device took the job but produced no usable result.

MessagingFailed 

A messaging operation against the broker failed.

Internal 

An invariant this process relies on was violated, for a human to see.

ConfigError 

The configuration file exists but could not be parsed or failed validation.

A human has to fix the file.

DriverUnavailable 

The QDMI driver could not be used: the driver library was not found or would not load, the configured device does not exist, or the driver speaks a QDMI version this build cannot – every one of these is a deployment fault.

ShutdownRequested 

Daemon shutdown was requested while an interruptible operation was in progress.

Not a fault of the task or the device – the caller should not send a result for it and should let its work loop exit instead.

Definition at line 32 of file Error.h.

Member Data Documentation

◆ detail

std::string mqss::qrmci::Error::detail

A human-readable description, for log lines and for the cancellation message sent back to the task's submitter.

Definition at line 67 of file Error.h.

◆ kind

Kind mqss::qrmci::Error::kind

The kind of failure, for a caller deciding what to do next.

Definition at line 64 of file Error.h.


The documentation for this struct was generated from the following file: