QM Job Queue API¶
qm.jobs.job_queue.QmQueue
¶
count: int
property
¶
pending_jobs: List[QmPendingJob]
property
¶
Returns all currently pending jobs
RETURNS | DESCRIPTION |
---|---|
List[QmPendingJob]
|
A list of all of the currently pending jobs |
add
¶
Adds a QmJob to the queue. Programs in the queue will play as soon as possible.
PARAMETER | DESCRIPTION |
---|---|
program |
A QUA program
TYPE:
|
compiler_options |
Optional arguments for compilation
TYPE:
|
add_compiled
¶
Adds a compiled QUA program to the end of the queue, optionally overriding the values of analog waveforms defined in the program. Programs in the queue will play as soon as possible. For a detailed explanation see Precompile Jobs.
PARAMETER | DESCRIPTION |
---|---|
program_id |
A QUA program ID returned from the compile function
TYPE:
|
overrides |
Object containing Waveforms to run the program with
TYPE:
|
add_to_start
¶
Adds a QMJob to the start of the queue. Programs in the queue will play as soon as possible.
PARAMETER | DESCRIPTION |
---|---|
program |
A QUA program
TYPE:
|
compiler_options |
Optional arguments for compilation
TYPE:
|
clear
¶
Empties the queue from all pending jobs
RETURNS | DESCRIPTION |
---|---|
int
|
The number of jobs removed |
get
¶
Get a pending job object by job_id
PARAMETER | DESCRIPTION |
---|---|
job_id |
a QMJob id
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
QmPendingJob
|
The pending job |
get_at
¶
Gets the pending job object at the given position in the queue
PARAMETER | DESCRIPTION |
---|---|
position |
An integer position in queue
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
QmPendingJob
|
The pending job |
remove_by_id
¶
remove_by_position
¶
Remove the PendingQmJob object by position in queue
PARAMETER | DESCRIPTION |
---|---|
position |
position in queue
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
int
|
The number of jobs removed |
Example
python
qm.queue.remove_by_position(position)
python