QM Job API

class QmJob(qmm: qm.QuantumMachinesManager.QuantumMachinesManager, job_id: str, execute_response=None)
execution_report() → qm._report.ExecutionReport

Get runtime errors report for this job. See Runtime Errors.

Type

qm._report.ExecutionReport

Returns

An object holding the errors that this job generated.

get_simulated_samples(include_analog=True, include_digital=True)

Obtain the output samples of a QUA program simulation.

Samples are returned in an object that holds the controllers in the current simulation, where each controller’s name will be a property of this object. The value of each property of the returned value is an object with the following properties:

analog:

holds a dictionary with analog port names as keys and numpy array of samples as values.

digital:

holds a dictionary with digital port names as keys and numpy array of samples as values.

Example:

    >>> samples = job.get_simulated_samples()
    >>> analog1 = samples.con1.analog["1"]  # obtain analog port 1 of controller "con1"
    >>> digital9 = samples.con1.analog["9"] # obtain digital port 9 of controller "con1"

:param include_analog: Should we collect simulated analog samples
:param include_digital: Should we collect simulated digital samples

:return: The simulated samples of the job.
halt() → bool

Halts the job on the opx

id()
Returns

The id of the job

is_paused()
Returns

Returns True if the job is in a paused state.

see also:

resume()

property manager

The QM object where this job lives :return:

property result_handles
Type

qm._results.JobResults

Returns

A holding the handles that this job generated

resume()

Resumes a program that was halted using the pause statement

simulated_analog_waveforms()

Return the results of the simulation of quantum elements and analog outputs.

The returned dictionary has the following keys and entries:

elements: a dictionary containing the outputs with timestamps and values arranged by quantum elements.

controllers: a dictionary containing the outputs with timestamps and values arranged by controllers.

ports: a dictionary containing the outputs with timestamps and values arranged by output ports.

for each element or output port, the entry is a list of dictionaries with the following information:

timestamp:

The time, in nsec, from the start of the program to the start of the pulse.

samples:

Output information, with duration given in nsec and value given normalized OPX output units.

Returns

A dictionary containing output information for the analog outputs of the controller.

simulated_digital_waveforms()

Return the results of the simulation of digital outputs.

controllers: a dictionary containing the outputs with timestamps and values arranged by controllers.

ports: a dictionary containing the outputs with timestamps and values arranged by output ports.

for each element or output port, the entry is a list of dictionaries with the following information:

timestamp:

The time, in nsec, from the start of the program to the start of the pulse.

samples:

A list containing the sequence of outputted values, with duration given in nsec and value given as a boolean value.

Returns

A dictionary containing output information for the analog outputs of the controller.