qblox_scheduler.backends.qblox.operations#
Submodules#
- qblox_scheduler.backends.qblox.operations.control_flow_library
- qblox_scheduler.backends.qblox.operations.gate_library
- qblox_scheduler.backends.qblox.operations.inline_q1asm
- qblox_scheduler.backends.qblox.operations.pulse_factories
- qblox_scheduler.backends.qblox.operations.pulse_library
- qblox_scheduler.backends.qblox.operations.rf_switch_toggle
Classes#
Conditional over another operation. |
Functions#
|
|
|
|
|
Package Contents#
- class ConditionalOperation(body: qblox_scheduler.operations.operation.Operation | qblox_scheduler.schedules.schedule.TimeableSchedule | qblox_scheduler.schedule.Schedule, qubit_name: str, t0: float = 0.0, hardware_buffer_time: float = constants.MIN_TIME_BETWEEN_OPERATIONS * 1e-09)[source]#
Bases:
qblox_scheduler.operations.control_flow_library.ConditionalOperationConditional over another operation.
If a preceding thresholded acquisition on
qubit_nameresults in a “1”, the body will be executed, otherwise it will generate a wait time that is equal to the time of the subschedule, to ensure the absolute timing of later operations remains consistent.- Parameters:
body – Operation to be conditionally played
qubit_name – Name of the device element on which the body will be conditioned
t0 – Time offset, by default 0
hardware_buffer_time – Time buffer, by default the minimum time between operations on the hardware
Example
A conditional reset can be implemented as follows:
# relevant imports from qblox_scheduler import Schedule from qblox_scheduler.operations import ConditionalOperation, Measure, X # define conditional reset as a Schedule conditional_reset = Schedule("conditional reset") conditional_reset.add(Measure("q0", feedback_trigger_label="q0")) conditional_reset.add( ConditionalOperation(body=X("q0"), qubit_name="q0"), rel_time=364e-9, )
{'name': '40d1269d-346b-4e4a-89e1-81871cf7cf78', 'operation_id': '4830978778531682092', 'timing_constraints': [TimingConstraint(ref_schedulable=None, ref_pt=None, ref_pt_new=None, rel_time=3.64e-07)], 'label': '40d1269d-346b-4e4a-89e1-81871cf7cf78'}Added in version 0.22.0: For some hardware specific implementations, a
hardware_buffer_timemight be required to ensure the correct timing of the operations. This will be added to the duration of thebodyto prevent overlap with other operations.