qat.qlmaas.qpus.QLMaaSQPU
Remote QPUs are managed by QLMaaSQPU
objects. These objects can be
built using:
qlmaas.qpus
module if a configuration exists on your computera
QLMaaSConnection
object (when the connection is defined manually). Please note that, even if there is no configuration file on your computer, instantiating aQLMaaSConnection
object enables theqlmaas.qpus
module
- class qat.qlmaas.qpus.QLMaaSQPU(connection, name: str, constructor: SerializedArguments, description: str)
Class describing a QPU defined on a remote server.
If a configuration file is present on your computer, you can use the module
qlmaas.qpus
to instantiate a remote QPU:from qlmaas.qpus import LinAlg # Define a qpu qpu = LinAlg()
Otherwise, if no configuration file is set on your machine, you can use a
QLMaaSConnection
object:from qat.qlmaas import QLMaaSConnection # Connect to the server conn = QLMaaSConnection() # Get remote QPU LinAlg = conn.get_qpu("qat.qpus:LinAlg") qpu = LinAlg()
- submit(batch, meta_data: Optional[dict] = None, mem_usage: Optional[int] = None, core_usage: Optional[int] = None, nb_nodes: Optional[int] = None)
Submit a batch to the server
- Parameters
batch (
Batch
) – batch to submitmeta_data (dict, optional) – override the meta_data of the batch
mem_usage (int, optional) – override default memory usage (in MB) calculation
core_usage (int, optional) – override default core usage calculation
nb_nodes (int, optional) – override default number of nodes
- Returns
asynchronous result
- Return type