inline_q1asm#

Qblox specific operation which can be used to inject Q1ASM code directly into a Schedule.

Module Contents#

Classes#

InlineQ1ASM

Initialize an InlineQ1ASM operation.

Q1ASMOpInfo

Structure describing an inline Q1ASM operation and containing all the information

class InlineQ1ASM(program: str, duration: float, port: str, clock: str, *, waveforms: dict | None = None, safe_labels: bool = True)[source]#

Bases: quantify_scheduler.operations.operation.Operation

Initialize an InlineQ1ASM operation.

This method sets up an operation that contains inline Q1ASM code

to be injected directly into a Schedule.

All comments in the program will be prefixed with an ‘[inline]’ prefix to help identify the inline assembly within the sequencer program.

When using safe labels, then all labels included in the input program will get a prefix of ‘inj<digits>_’. By default, safe labels are always used. Labels in comments will not be modified.

Parameters:
  • program – The Q1ASM program to be injected.

  • duration – The duration of the operation in seconds.

  • port – The port on which the operation is to be executed.

  • clock – The clock associated with the operation.

  • waveforms – Dictionary containing waveform information, by default None.

  • safe_labels – Flag to indicate if safe labels should be used, by default True.

Returns:

None

Notes

Warning

When using safe_labels=False then all labels in the sequencer program are accessible from inside the inline Q1ASM injection, and so can be jumped to or overwritten. Disabling this feature is available for debugging and advanced compilation strategies only.

_name = 'InlineQ1ASM'[source]#
program[source]#
_duration[source]#
port[source]#
clock[source]#
waveforms[source]#
safe_labels = True[source]#
property name: str[source]#

Return the name of the operation.

_update() None[source]#

Update the Operation’s internals.

get_used_port_clocks() set[tuple[str, str]][source]#

Extracts which port-clock combinations are used in this operation.

Returns:

: All (port, clock) combinations this operation uses.

class Q1ASMOpInfo(inline_q1asm: InlineQ1ASM, operation_start_time: float)[source]#

Bases: quantify_scheduler.backends.types.qblox.OpInfo

Structure describing an inline Q1ASM operation and containing all the information required to play it.