15#include "mqss/Protocol.hpp"
20#include <MQSSCIInterfaces/MQSSCompiler.h>
31namespace mqss::submitter {
35namespace mqss::qrmci::test {
39namespace mqss::qrmci {
81 [[nodiscard]]
static std::expected<BackendWrapper, Error>
83 std::string_view dispatchQueue =
"");
98 [[nodiscard]]
static std::expected<BackendWrapper, Error>
115 [[nodiscard]]
bool canRun(const mqss::QuantumTask &task) const;
126 [[nodiscard]] const std::
string &
getName() const noexcept {
return name; }
134 [[nodiscard]] mqss::BackendStatus
getStatus() const noexcept {
139 [[nodiscard]]
const std::vector<std::string> &
146 [[nodiscard]]
const std::vector<std::pair<std::uint32_t, std::uint32_t>> &
148 return qubitConnectivity;
152 [[nodiscard]]
const std::vector<mqss::CircuitFormat> &
154 return supportedCircuitFormats;
174 friend class mqss::qrmci::test::BackendBuilder;
177 std::uint32_t numQubits{};
178 mqss::BackendType type{};
179 mqss::BackendStatus status{};
180 std::uint32_t queueLength{};
182 std::string queueName;
183 std::vector<std::string> instructions;
184 std::vector<std::pair<std::uint32_t, std::uint32_t>> qubitConnectivity;
185 std::vector<mqss::CircuitFormat> supportedCircuitFormats;
Pure translations between the submitter, mqss protocol and mqss-ci enumerations: status,...
The error type every std::expected in QRM&CI's public interfaces carries.
bool canRun(const mqss::QuantumTask &task) const
Check whether this backend can run a given task.
BackendWrapper & operator=(const BackendWrapper &)=default
Copy-assign a BackendWrapper.
const std::vector< std::string > & getInstructions() const noexcept
Get the instructions supported by the backend.
bool isOnline() const noexcept
Check whether this backend is currently able to accept tasks.
static std::expected< BackendWrapper, Error > fromPublishedStatus(const mqss::Backend &backend)
Build a validated snapshot from a published backend-status message.
static std::expected< BackendWrapper, Error > fromSubmitter(const mqss::submitter::Device &device, std::string_view dispatchQueue="")
Read a backend's capabilities from a live device.
BackendWrapper(const BackendWrapper &)=default
Copy-construct a BackendWrapper.
BackendWrapper(BackendWrapper &&)=default
Move-construct a BackendWrapper.
std::uint32_t getNumQubits() const noexcept
Get the number of qubits supported by the backend.
std::expected< CompilerTarget, Error > compilerTarget() const
Find the one compiler target this backend's supported circuit formats make available,...
BackendWrapper()=default
Default-construct an empty BackendWrapper.
mqss::Backend toBackend() const
Build a backend-status message from this snapshot, for publication to other QRM&CI processes.
const std::vector< std::pair< std::uint32_t, std::uint32_t > > & getQubitConnectivity() const noexcept
Get the qubit connectivity of the backend.
BackendWrapper & operator=(BackendWrapper &&)=default
Move-assign a BackendWrapper.
const std::string & getQueueName() const noexcept
Get the backend's dispatch queue name.
mqss::BackendStatus getStatus() const noexcept
Get the backend status.
const std::vector< mqss::CircuitFormat > & getSupportedCircuitFormats() const noexcept
Get the circuit formats supported by the backend.
const std::string & getName() const noexcept
Get the backend name.
One deterministic compilation target: the mqss-ci ResultFormat the compiler must be asked to emit,...
A failure reported by a QRM&CI operation: a kind the caller can act on, plus a human-readable detail ...