Quantum Machine Manager API¶
qm.quantum_machines_manager.QuantumMachinesManager
¶
PARAMETER | DESCRIPTION |
---|---|
host |
Host where to find the QM orchestrator. If
TYPE:
|
port |
Port where to find the QM orchestrator. If None, local settings are used
TYPE:
|
clear_all_job_results
¶
Deletes all data from all previous jobs
close
¶
Closes the Quantum machine manager
close_all_quantum_machines
¶
Closes ALL open quantum machines
get_controllers
¶
Returns a list of all the controllers that are available
get_qm
¶
Gets an open quantum machine object with the given machine id
PARAMETER | DESCRIPTION |
---|---|
machine_id |
The id of the open quantum machine to get
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
QuantumMachine
|
A quantum machine obj that can be used to execute programs |
list_open_quantum_machines
¶
Return a list of open quantum machines. (Returns only the ids, use get_qm(...)
to get the machine object)
RETURNS | DESCRIPTION |
---|---|
List[str]
|
The ids list |
open_qm
¶
Opens a new quantum machine. A quantum machine can use multiple OPXes, and a single OPX can also be used by multiple quantum machines as long as they do not share the same physical resources (input/output ports) as defined in the config.
PARAMETER | DESCRIPTION |
---|---|
config |
The config that will be used by the quantum machine
TYPE:
|
close_other_machines |
When set to true (default) any open quantum machines will be closed. This simplifies the workflow, but does not enable opening more than one quantum machine.
TYPE:
|
validate_with_protobuf |
Validates config with protobuf instead of marshmallow. It is usually faster when working with large configs. Defaults to False.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
QuantumMachine
|
A quantum machine obj that can be used to execute programs |
open_qm_from_file
¶
Opens a new quantum machine with config taken from a file on the local file system
PARAMETER | DESCRIPTION |
---|---|
filename |
The path to the file that contains the config
TYPE:
|
close_other_machines |
Flag whether to close all other running machines
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
QuantumMachine
|
A quantum machine obj that can be used to execute programs |
perform_healthcheck
¶
Perform a health check against the QM server.
PARAMETER | DESCRIPTION |
---|---|
strict |
Will raise an exception if health check failed
TYPE:
|
reset_data_processing
¶
Stops current data processing for ALL running jobs
simulate
¶
Simulate the outputs of a deterministic QUA program.
The following example shows a simple execution of the simulator, where the associated config object is omitted for brevity.
Example
PARAMETER | DESCRIPTION |
---|---|
config |
A QM config
TYPE:
|
program |
A QUA
TYPE:
|
simulate |
A
TYPE:
|
compiler_options |
additional parameters to pass to execute
TYPE:
|
strict |
a deprecated option for the compiler
TYPE:
|
flags |
deprecated way to provide flags to the compiler
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
SimulatedJob
|
a |
validate_qua_config
¶
Validates a qua config based on the connected server's capabilities. Raises an exception if the config is invalid.
PARAMETER | DESCRIPTION |
---|---|
qua_config |
A python dict containing the qua config to validate
TYPE:
|
version
¶
RETURNS | DESCRIPTION |
---|---|
Version
|
A dictionary with the qm-qua and QOP versions |
version_dict
¶
RETURNS | DESCRIPTION |
---|---|
Version
|
A dictionary with the qm-qua and QOP versions |