qblox_scheduler.operations#

Module containing the standard library of commonly used operations as well as the Operation class.

Tip

Quantify scheduler can trivially be extended by creating custom operations. Take a look at e.g., the pulse library for examples on how to implement custom pulses.

Submodules#

Classes#

Acquisition

An operation representing data acquisition at the quantum-device abstraction layer.

DualThresholdedTriggerCount

Thresholded trigger count protocol that uses two thresholds.

NumericalSeparatedWeightedIntegration

Subclass of WeightedIntegratedSeparated with parameterized waveforms as weights.

NumericalWeightedIntegration

Subclass of NumericalSeparatedWeightedIntegration returning a complex number.

SSBIntegrationComplex

Single sideband integration acquisition protocol with complex results.

ThresholdedAcquisition

Acquisition protocol allowing to control rotation and threshold.

ThresholdedTriggerCount

Thresholded trigger counting acquisition protocol returning the comparison result with a

Timetag

Acquire a single timetag per acquisition index.

TimetagTrace

The TimetagTrace acquisition protocol records timetags within an acquisition window.

Trace

The Trace acquisition protocol measures a signal s(t).

TriggerCount

Trigger counting acquisition protocol returning an integer.

WeightedIntegratedSeparated

Weighted integration acquisition protocol where two sets weights

WeightedThresholdedAcquisition

Subclass of NumericalWeightedIntegration but Thresholded.

ConditionalReset

Reset a qubit to the \(|0\rangle\) state.

ConditionalOperation

Conditional over another operation.

ControlFlowOperation

Control flow operation that can be used as an Operation in .TimeableSchedule.

ControlFlowSpec

Control flow specification to be used at Schedule.add.

LoopOperation

Loop over another operation predefined times.

LoopStrategy

Strategy to use for implementing loops.

DType

Data type of a variable or expression.

CNOT

Conditional-NOT gate, a common entangling gate.

CZ

Conditional-phase gate, a common entangling gate.

X90

A single qubit rotation of 90 degrees around the X-axis.

Y90

A single qubit rotation of 90 degrees around the Y-axis.

Z90

A single qubit rotation of 90 degrees around the Z-axis.

H

A single qubit Hadamard gate.

Measure

A projective measurement in the Z-basis.

Reset

Reset a qubit to the \(|0\rangle\) state.

Rxy

A single qubit rotation around an axis in the equator of the Bloch sphere.

Rz

A single qubit rotation about the Z-axis of the Bloch sphere.

S

A single qubit rotation of 90 degrees around the Z-axis.

SDagger

A single qubit rotation of -90 degrees around the Z-axis.

T

A single qubit rotation of 45 degrees around the Z-axis.

TDagger

A single qubit rotation of -45 degrees around the Z-axis.

X

A single qubit rotation of 180 degrees around the X-axis.

Y

A single qubit rotation of 180 degrees around the Y-axis.

Z

A single qubit rotation of 180 degrees around the Z-axis.

InlineQ1ASM

Initialize an InlineQ1ASM operation.

LatchReset

Operation that resets the feedback trigger addresses from the hardware.

SimpleNumericalPulse

Wrapper on top of NumericalPulse to provide a simple interface for creating a pulse

ChargeReset

Prepare a NV to its negative charge state NV$^-$.

CRCount

Operate ionization and spin pump lasers for charge and resonance counting.

Operation

A representation of quantum circuit operations.

PulseCompensation

Apply pulse compensation to an operation or schedule.

ChirpPulse

A linear chirp signal. A sinusoidal signal that ramps up in frequency.

DRAGPulse

A Gaussian pulse with a derivative component added to the out-of-phase channel.

GaussPulse

The GaussPulse Operation is a real-valued pulse with the specified

IdlePulse

The IdlePulse Operation is a placeholder for a specified duration of time.

MarkerPulse

Digital pulse that is HIGH for the specified duration.

NumericalPulse

A pulse where the shape is determined by specifying an array of (complex) points.

RampPulse

RampPulse Operation is a pulse that ramps from zero to a set amplitude over its duration.

ReferenceMagnitude

Dataclass defining a reference level for pulse amplitudes in units of 'V', 'dBm', or 'A'.

ResetClockPhase

An operation that resets the phase of a clock.

SetClockFrequency

Operation that sets updates the frequency of a clock.

ShiftClockPhase

Operation that shifts the phase of a clock by a specified amount.

SkewedHermitePulse

Hermite pulse intended for single qubit gates in diamond based systems.

SoftSquarePulse

A real valued square pulse convolved with a Hann window for smoothing.

SquarePulse

A real-valued pulse with the specified amplitude during the pulse.

StaircasePulse

A real valued staircase pulse, which reaches it's final amplitude in discrete steps.

SuddenNetZeroPulse

A pulse that can be used to implement a conditional phase gate in transmon device elements.

Timestamp

Operation that marks a time reference for timetags.

VoltageOffset

Operation that represents setting a constant offset to the output voltage.

WindowOperation

The WindowOperation is an operation for visualization purposes.

Functions#

long_chirp_pulse(...)

Create a long chirp pulse using SetClockFrequency.

long_ramp_pulse(...)

Creates a long ramp pulse by stitching together shorter ramps.

long_square_pulse(...)

Create a long square pulse using DC voltage offsets.

staircase_pulse(...)

Create a staircase-shaped pulse using DC voltage offsets.

arange(→ LinearDomain)

Linear range of values to loop over, specified with a start value, an exclusive stop value and a

linspace(→ LinearDomain)

Linear range of values to loop over, specified with a start value, an inclusive stop value and

composite_square_pulse(...)

An example composite pulse to implement a CZ gate.

non_implemented_pulse(...)

Raise an error indicating that the requested gate or pulse is not implemented.

nv_spec_pulse_mw(...)

Generate a microwave pulse for spectroscopy experiments.

phase_shift(...)

Generate a ShiftClockPhase that shifts the phase of the

rxy_drag_pulse(...)

Generate a DRAGPulse that achieves the right

rxy_gauss_pulse(...)

Generate a Gaussian drive with GaussPulse that achieves

rxy_pulse(...)

Generate a Hermite or Gaussian drive pulse for a specified rotation on the Bloch sphere.

spin_init_pulse(...)

Device compilation of the spin init operation.

Package Contents#

class Acquisition(name: str)[source]#

Bases: qblox_scheduler.operations.operation.Operation

An operation representing data acquisition at the quantum-device abstraction layer.

An Acquisition must consist of (at least) an AcquisitionProtocol specifying how the acquired signal is to be processed, and an AcquisitionChannel and AcquisitionIndex specifying where the acquired data is to be stored in the RawDataset.

N.B. This class helps differentiate an acquisition operation from the regular operations. This enables us to use plot_acquisition_operations() to highlight acquisition pulses in the pulse diagrams.

class DualThresholdedTriggerCount(port: str, clock: str, duration: float, threshold_low: int, threshold_high: int, *, label_low: str | None = None, label_mid: str | None = None, label_high: str | None = None, label_invalid: str | None = None, acq_channel: collections.abc.Hashable = 0, coords: dict | None = None, acq_index: int | None = None, bin_mode: qblox_scheduler.enums.BinMode | str = BinMode.APPEND, t0: float = 0)[source]#

Bases: Acquisition

Thresholded trigger count protocol that uses two thresholds.

Four outcomes are possible for this measurement, and each of those four can be assigned a label to use in a ConditionalOperation:

  • “low” if counts < threshold_low,

  • “mid” if threshold_low <= counts < threshold_high,

  • “high” if counts >= threshold_high,

  • “invalid” if the counts are invalid (can occur in very rare cases, e.g. when the counter overflows).

The returned acquisition data is the raw number of counts.

Important

The exact duration of this operation, and the possible bin modes may depend on the control hardware. Please consult your hardware vendor’s Reference guide for more information.

Parameters:
  • port – The acquisition port.

  • clock – The clock used to demodulate the acquisition.

  • duration – The duration of the operation in seconds.

  • threshold_low – The lower counts threshold of the ThresholdedTriggerCount acquisition.

  • threshold_high – The upper counts threshold of the ThresholdedTriggerCount acquisition.

  • label_low – The label that can be used to link a result of counts < threshold_low to a ConditionalOperation, by default None.

  • label_mid – The label that can be used to link a result of threshold_low <= counts < threshold_high to a ConditionalOperation, by default None.

  • label_high – The label that can be used to link a result of counts >= threshold_high to a ConditionalOperation, by default None.

  • label_invalid – The label that can be used to link an invalid counts result (e.g. a counter overflow) to a ConditionalOperation, by default None.

  • feedback_trigger_condition – The comparison condition (greater-equal, less-than) for the ThresholdedTriggerCount acquisition.

  • acq_channel – The data channel in which the acquisition is stored, by default 0. Describes the “where” information of the measurement, which typically corresponds to a qubit idx.

  • coords – Coords for the acquisition. These coordinates for the measured value for this operation appear in the retrieved acquisition data. For example coords={"amp": 0.1} has the effect, that the measured value for this acquisition will be associated with amp==0.1. By default None, no coords are added.

  • acq_index – Deprecated. The data register in which the acquisition is stored, by default None. Describes the “when” information of the measurement, used to label or tag individual measurements in a large circuit. Typically corresponds to the setpoints of a schedule (e.g., tau in a T1 experiment).

  • bin_mode – Describes what is done when data is written to a register that already contains a value. Options are “append” which appends the result to the list or “average” which stores the count value of the new result and the old register value, by default BinMode.APPEND.

  • t0 – The acquisition start time in seconds, by default 0.

class NumericalSeparatedWeightedIntegration(port: str, clock: str, weights_a: list[complex] | numpy.ndarray, weights_b: list[complex] | numpy.ndarray, weights_sampling_rate: float = 1000000000.0, interpolation: str = 'linear', acq_channel: collections.abc.Hashable = 0, coords: dict | None = None, acq_index: int | None = None, bin_mode: qblox_scheduler.enums.BinMode | str = BinMode.AVERAGE_APPEND, phase: float = 0, t0: float = 0)[source]#

Bases: WeightedIntegratedSeparated

Subclass of WeightedIntegratedSeparated with parameterized waveforms as weights.

A WeightedIntegratedSeparated class using parameterized waveforms and interpolation as the integration weights.

Weights are applied as:

\[\widetilde{A} = \int \mathrm{Re}(S(t)\cdot W_A(t) \mathrm{d}t\]
\[\widetilde{B} = \int \mathrm{Im}(S(t))\cdot W_B(t) \mathrm{d}t\]
Parameters:
  • port – The acquisition port.

  • clock – The clock used to demodulate the acquisition.

  • weights_a – The list of complex values used as weights \(A(t)\) on the incoming complex signal.

  • weights_b – The list of complex values used as weights \(B(t)\) on the incoming complex signal.

  • weights_sampling_rate – The rate with which the weights have been sampled, in Hz. By default equal to 1 GHz. Note that during hardware compilation, the weights will be resampled with the sampling rate supported by the target hardware.

  • interpolation – The type of interpolation to use, by default “linear”. This argument is passed to interp1d.

  • acq_channel – The data channel in which the acquisition is stored, by default 0. Describes the “where” information of the measurement, which typically corresponds to a device element idx.

  • coords – Coords for the acquisition. These coordinates for the measured value for this operation appear in the retrieved acquisition data. For example coords={"amp": 0.1} has the effect, that the measured value for this acquisition will be associated with amp==0.1. By default None, no coords are added.

  • acq_index – Deprecated. The data register in which the acquisition is stored, by default None. Describes the “when” information of the measurement, used to label or tag individual measurements in a large circuit. Typically corresponds to the setpoints of a schedule (e.g., tau in a T1 experiment).

  • bin_mode – Describes what is done when data is written to a register that already contains a value. Options are “append” which appends the result to the list or “average” which stores the weighted average value of the new result and the old register value, by default BinMode.APPEND.

  • phase – The phase of the pulse and acquisition in degrees, by default 0.

  • t0 – The acquisition start time in seconds, by default 0.

class NumericalWeightedIntegration(port: str, clock: str, weights_a: list[complex] | numpy.ndarray, weights_b: list[complex] | numpy.ndarray, weights_sampling_rate: float = 1000000000.0, interpolation: str = 'linear', acq_channel: collections.abc.Hashable = 0, coords: dict | None = None, acq_index: int | None = None, bin_mode: qblox_scheduler.enums.BinMode | str = BinMode.AVERAGE_APPEND, phase: float = 0, t0: float = 0)[source]#

Bases: NumericalSeparatedWeightedIntegration

Subclass of NumericalSeparatedWeightedIntegration returning a complex number.

Parameters:
  • port – The acquisition port.

  • clock – The clock used to demodulate the acquisition.

  • weights_a – The list of complex values used as weights \(A(t)\) on the incoming complex signal.

  • weights_b – The list of complex values used as weights \(B(t)\) on the incoming complex signal.

  • weights_sampling_rate – The rate with which the weights have been sampled, in Hz. By default equal to 1 GHz. Note that during hardware compilation, the weights will be resampled with the sampling rate supported by the target hardware.

  • interpolation – The type of interpolation to use, by default “linear”. This argument is passed to interp1d.

  • acq_channel – The data channel in which the acquisition is stored, by default 0. Describes the “where” information of the measurement, which typically corresponds to a device element idx.

  • coords – Coords for the acquisition. These coordinates for the measured value for this operation appear in the retrieved acquisition data. For example coords={"amp": 0.1} has the effect, that the measured value for this acquisition will be associated with amp==0.1. By default None, no coords are added.

  • acq_index – Deprecated. The data register in which the acquisition is stored, by default None. Describes the “when” information of the measurement, used to label or tag individual measurements in a large circuit. Typically corresponds to the setpoints of a schedule (e.g., tau in a T1 experiment).

  • bin_mode – Describes what is done when data is written to a register that already contains a value. Options are “append” which appends the result to the list or “average” which stores the weighted average value of the new result and the old register value, by default BinMode.APPEND.

  • phase – The phase of the pulse and acquisition in degrees, by default 0.

  • t0 – The acquisition start time in seconds, by default 0.

class SSBIntegrationComplex(port: str, clock: str, duration: float, acq_channel: collections.abc.Hashable = 0, coords: dict | None = None, acq_index: int | None = None, bin_mode: qblox_scheduler.enums.BinMode | str = BinMode.AVERAGE_APPEND, phase: float = 0, t0: float = 0)[source]#

Bases: Acquisition

Single sideband integration acquisition protocol with complex results.

A weighted integrated acquisition on a complex signal using a square window for the acquisition weights.

The signal is demodulated using the specified clock, and the square window then effectively specifies an integration window.

Parameters:
  • port – The acquisition port.

  • clock – The clock used to demodulate the acquisition.

  • duration – The acquisition duration in seconds.

  • acq_channel – The data channel in which the acquisition is stored, by default 0. Describes the “where” information of the measurement, which typically corresponds to a device element idx.

  • coords – Coords for the acquisition. These coordinates for the measured value for this operation appear in the retrieved acquisition data. For example coords={"amp": 0.1} has the effect, that the measured value for this acquisition will be associated with amp==0.1. By default None, no coords are added.

  • acq_index – Deprecated. The data register in which the acquisition is stored, by default None. Describes the “when” information of the measurement, used to label or tag individual measurements in a large circuit. Typically corresponds to the setpoints of a schedule (e.g., tau in a T1 experiment).

  • bin_mode – Describes what is done when data is written to a register that already contains a value. Options are “append” which appends the result to the list or “average” which stores the weighted average value of the new result and the old register value, by default BinMode.AVERAGE.

  • phase – The phase of the pulse and acquisition in degrees, by default 0.

  • t0 – The acquisition start time in seconds, by default 0.

class ThresholdedAcquisition(port: str, clock: str, duration: float, acq_channel: collections.abc.Hashable = 0, coords: dict | None = None, acq_index: int | None = None, bin_mode: qblox_scheduler.enums.BinMode | str = BinMode.AVERAGE_APPEND, feedback_trigger_label: str | None = None, phase: float = 0, t0: float = 0, acq_rotation: float = 0, acq_threshold: float = 0)[source]#

Bases: Acquisition

Acquisition protocol allowing to control rotation and threshold.

This acquisition protocol is similar to the SSBIntegrationComplex acquisition protocol, but the complex result is now rotated and thresholded to produce a “0” or a “1”, as controlled by the parameters for rotation angle <device_element>.measure.acq_rotation and threshold value <device_element>.measure.acq_threshold in the device configuration (see example below).

The rotation angle and threshold value for each qubit can be set through the device configuration.

Note

Thresholded acquisition is currently only supported by the Qblox backend.

Examples

from qblox_scheduler import TimeableSchedule
from qblox_scheduler.device_under_test.transmon_element import BasicTransmonElement
from qblox_scheduler.operations.acquisition_library import ThresholdedAcquisition

# set up qubit
device_element = BasicTransmonElement("q0")
device_element.clock_freqs.readout = 8.0e9

# set rotation and threshold value
rotation, threshold = 20, -0.1
device_element.measure.acq_rotation = rotation
device_element.measure.acq_threshold = threshold

# basic schedule
schedule = TimeableSchedule("thresholded acquisition")
schedule.add(ThresholdedAcquisition(port="q0:res", clock="q0.ro", duration=1e-6))
{'name': '48f787da-c01a-4de4-85e1-b9944d8f3101', 'operation_id': '4348362276438828475', 'timing_constraints': [TimingConstraint(ref_schedulable=None, ref_pt=None, ref_pt_new=None, rel_time=0)], 'label': '48f787da-c01a-4de4-85e1-b9944d8f3101'}
Parameters:
  • port (str) – The acquisition port.

  • clock (str) – The clock used to demodulate the acquisition.

  • duration (float) – The acquisition duration in seconds.

  • acq_channel – The data channel in which the acquisition is stored, by default 0. Describes the “where” information of the measurement, which typically corresponds to a device element idx.

  • coords – Coords for the acquisition. These coordinates for the measured value for this operation appear in the retrieved acquisition data. For example coords={"amp": 0.1} has the effect, that the measured value for this acquisition will be associated with amp==0.1. By default None, no coords are added.

  • acq_index – Deprecated. The data register in which the acquisition is stored, by default None. Describes the “when” information of the measurement, used to label or tag individual measurements in a large circuit. Typically corresponds to the setpoints of a schedule (e.g., tau in a T1 experiment).

  • bin_mode (BinMode or str) – Describes what is done when data is written to a register that already contains a value. Options are “append” which appends the result to the list or “average” which stores the weighted average value of the new result and the old register value, by default BinMode.AVERAGE.

  • feedback_trigger_label (str) – The label corresponding to the feedback trigger, which is mapped by the compiler to a feedback trigger address on hardware, by default None.

  • phase (float) – The phase of the pulse and acquisition in degrees, by default 0.

  • t0 (float) – The acquisition start time in seconds, by default 0.

class ThresholdedTriggerCount(port: str, clock: str, duration: float, threshold: int, *, feedback_trigger_label: str | None = None, feedback_trigger_condition: str | qblox_scheduler.enums.TriggerCondition = TriggerCondition.GREATER_THAN_EQUAL_TO, acq_channel: collections.abc.Hashable = 0, coords: dict | None = None, acq_index: int | None = None, bin_mode: qblox_scheduler.enums.BinMode | str = BinMode.APPEND, t0: float = 0)[source]#

Bases: Acquisition

Thresholded trigger counting acquisition protocol returning the comparison result with a threshold.

If the number of triggers counted is less than the threshold, a 0 is returned, otherwise a 1.

The analog threshold for registering a single count is set in the hardware configuration.

Important

The exact duration of this operation, and the possible bin modes may depend on the control hardware. Please consult your hardware vendor’s Reference guide for more information.

Parameters:
  • port – The acquisition port.

  • clock – The clock used to demodulate the acquisition.

  • duration – The duration of the operation in seconds.

  • threshold – The threshold of the ThresholdedTriggerCount acquisition.

  • feedback_trigger_label – The label corresponding to the feedback trigger, which is mapped by the compiler to a feedback trigger address on hardware, by default None. Note: this label is merely used to link this acquisition together with a ConditionalOperation. It does not affect the acquisition result.

  • feedback_trigger_condition – The comparison condition (greater-equal, less-than) for the ThresholdedTriggerCount acquisition.

  • acq_channel – The data channel in which the acquisition is stored, by default 0. Describes the “where” information of the measurement, which typically corresponds to a qubit idx.

  • coords – Coords for the acquisition. These coordinates for the measured value for this operation appear in the retrieved acquisition data. For example coords={"amp": 0.1} has the effect, that the measured value for this acquisition will be associated with amp==0.1. By default None, no coords are added.

  • acq_index – Deprecated. The data register in which the acquisition is stored, by default None. Describes the “when” information of the measurement, used to label or tag individual measurements in a large circuit. Typically corresponds to the setpoints of a schedule (e.g., tau in a T1 experiment).

  • bin_mode – Describes what is done when data is written to a register that already contains a value. Options are “append” which appends the result to the list or “average” which stores the count value of the new result and the old register value, by default BinMode.APPEND.

  • t0 – The acquisition start time in seconds, by default 0.

class Timetag(duration: float, port: str, clock: str = DigitalClockResource.IDENTITY, acq_channel: collections.abc.Hashable = 0, coords: dict | None = None, acq_index: int | None = None, bin_mode: qblox_scheduler.enums.BinMode | str = BinMode.APPEND, time_source: qblox_scheduler.enums.TimeSource | str = TimeSource.FIRST, time_ref: qblox_scheduler.enums.TimeRef | str = TimeRef.START, time_ref_port: str | None = None, t0: float = 0, fine_start_delay: float = 0, fine_end_delay: float = 0)[source]#

Bases: Acquisition

Acquire a single timetag per acquisition index.

Important

The exact duration of this operation, and the possible bin modes may depend on the control hardware. Please consult your hardware vendor’s Reference guide for more information.

Parameters:
  • port – The acquisition port.

  • clock – The clock used to demodulate the acquisition.

  • duration – The acquisition duration in seconds.

  • acq_channel – The data channel in which the acquisition is stored, by default 0. Describes the “where” information of the measurement, which typically corresponds to a device element idx.

  • coords – Coords for the acquisition. These coordinates for the measured value for this operation appear in the retrieved acquisition data. For example coords={"amp": 0.1} has the effect, that the measured value for this acquisition will be associated with amp==0.1. By default None, no coords are added.

  • acq_index – Deprecated. The data register in which the acquisition is stored, by default None. Describes the “when” information of the measurement, used to label or tag individual measurements in a large circuit. Typically corresponds to the setpoints of a schedule (e.g., tau in a T1 experiment).

  • bin_mode – Describes what is done when data is written to a register that already contains a value. Options are “append” which appends the result to the list or “average” which stores the weighted average value of the new result and the old register value, by default BinMode.APPEND.

  • time_source

    Selects the timetag data source for this acquisition type. String enumeration, one of:

    • first (default): record the first timetag in the window.

    • second: record the second timetag in the window. Can be used to measure pulse distance when combined with first as reference.

    • last: record the last timetag in the window.

  • time_ref

    Selects the time reference that the timetag is recorded in relation to. String enumeration, one of:

    • start (default): record relative to the start of the window.

    • end: record relative to the end of the window. Note that this always yields a negative timetag.

    • first: record relative to the first timetag in the window.

    • timestamp: record relative to the timestamp marked using the Timestamp operation.

    • port: record relative to the timetag measured on another port. If this option is used, the time_ref_port argument must be specified as well. The acquisition operation that is measuring the timetag on the other port must end before or at the same time as this acquisition operation.

  • time_ref_port – If the port time reference is used, time_ref_port specifies the port on which the other acquisition is executed.

  • t0 – The acquisition start time in seconds, by default 0.

  • fine_start_delay – Delays the start of the acquisition by the given amount in seconds. Does not delay the start time of the operation in the schedule. If the hardware supports it, this parameter can be used to shift the acquisition window by a small amount of time, independent of the hardware instruction timing grid. Currently only implemented for Qblox QTM modules, which allow only positive values for this parameter. By default 0.

  • fine_end_delay – Delays the end of the pulse by the given amount. Does not delay the end time of the operation in the schedule. If the hardware supports it, this parameter can be used to shift the acquisition window by a small amount of time, independent of the hardware instruction timing grid. Currently only implemented for Qblox QTM modules, which allow only positive values for this parameter. By default 0.

class TimetagTrace(duration: float, port: str, clock: str = DigitalClockResource.IDENTITY, acq_channel: collections.abc.Hashable = 0, coords: dict | None = None, acq_index: int | None = None, bin_mode: qblox_scheduler.enums.BinMode | str = BinMode.APPEND, time_ref: qblox_scheduler.enums.TimeRef | str = TimeRef.START, time_ref_port: str | None = None, t0: float = 0, fine_start_delay: float = 0, fine_end_delay: float = 0)[source]#

Bases: Acquisition

The TimetagTrace acquisition protocol records timetags within an acquisition window.

Important

The exact duration of this operation, and the possible bin modes may depend on the control hardware. Please consult your hardware vendor’s Reference guide for more information.

Parameters:
  • port – The acquisition port.

  • clock – The clock used to demodulate the acquisition.

  • duration – The acquisition duration in seconds.

  • acq_channel – The data channel in which the acquisition is stored, is by default 0. Describes the “where” information of the measurement, which typically corresponds to a device element idx.

  • coords – Coords for the acquisition. These coordinates for the measured value for this operation appear in the retrieved acquisition data. For example coords={"amp": 0.1} has the effect, that the measured value for this acquisition will be associated with amp==0.1. By default None, no coords are added.

  • acq_index – Deprecated. The data register in which the acquisition is stored, by default None. Describes the “when” information of the measurement, used to label or tag individual measurements in a large circuit. Typically corresponds to the setpoints of a schedule (e.g., tau in a T1 experiment).

  • bin_mode – Describes what is done when data is written to a register that already contains a value. Only “BinMode.APPEND” is available at the moment; this option concatenates timetag results with the same acquisition channel and index.

  • time_ref

    Selects the time reference that the timetag is recorded in relation to. String enumeration, one of:

    • start (default): record relative to the start of the window.

    • end: record relative to the end of the window. Note that this always yields a negative timetag.

    • first: syntactic sugar for first#, where # is the current channel.

    • timestamp: record relative to the timestamp marked using the Timestamp operation.

    • port: record relative to the timetag measured on another port. If this option is used, the time_ref_port argument must be specified as well. The acquisition operation that is measuring the timetag on the other port must end before or at the same time as this acquisition operation.

  • time_ref_port – If the port time reference is used, time_ref_port specifies the port on which the other acquisition is executed.

  • t0 – The acquisition start time in seconds, by default 0.

  • fine_start_delay – Delays the start of the acquisition by the given amount in seconds. Does not delay the start time of the operation in the schedule. If the hardware supports it, this parameter can be used to shift the acquisition window by a small amount of time, independent of the hardware instruction timing grid. Currently only implemented for Qblox QTM modules, which allow only positive values for this parameter. By default 0.

  • fine_end_delay – Delays the end of the pulse by the given amount in seconds. Does not delay the end time of the operation in the schedule. If the hardware supports it, this parameter can be used to shift the acquisition window by a small amount of time, independent of the hardware instruction timing grid. Currently only implemented for Qblox QTM modules, which allow only positive values for this parameter. By default 0.

class Trace(duration: float, port: str, clock: str, acq_channel: collections.abc.Hashable = 0, coords: dict | None = None, acq_index: int | None = None, bin_mode: qblox_scheduler.enums.BinMode | str = BinMode.AVERAGE, t0: float = 0)[source]#

Bases: Acquisition

The Trace acquisition protocol measures a signal s(t).

Only processing performed is rescaling and adding units based on a calibrated scale. Values are returned as a raw trace (numpy array of float datatype). Length of this array depends on the sampling rate of the acquisition device.

Important

The exact duration of this operation, and the possible bin modes may depend on the control hardware. Please consult your hardware vendor’s Reference guide for more information.

Parameters:
  • port – The acquisition port.

  • clock – The clock used to demodulate the acquisition.

  • duration – The acquisition duration in seconds.

  • acq_channel – The data channel in which the acquisition is stored, is by default 0. Describes the “where” information of the measurement, which typically corresponds to a device element idx.

  • coords – Coords for the acquisition. These coordinates for the measured value for this operation appear in the retrieved acquisition data. For example coords={"amp": 0.1} has the effect, that the measured value for this acquisition will be associated with amp==0.1. By default None, no coords are added.

  • acq_index – Deprecated. The data register in which the acquisition is stored, by default None. Describes the “when” information of the measurement, used to label or tag individual measurements in a large circuit. Typically corresponds to the setpoints of a schedule (e.g., tau in a T1 experiment).

  • bin_mode – Describes what is done when data is written to a memory location that already contains values. Which bin mode can be used for Trace acquisitions may depend on the hardware. BinMode.AVERAGE, the default, works on most hardware. This bin mode stores the weighted average value of the new result and the old values. BinMode.FIRST is used for hardware where only the result of the first acquisition in a TimeableSchedule is stored, e.g. for a Trace acquisition with Qblox QTM modules.

  • t0 – The acquisition start time in seconds, by default 0.

class TriggerCount(port: str, clock: str, duration: float, acq_channel: collections.abc.Hashable = 0, coords: dict | None = None, acq_index: int | None = None, bin_mode: qblox_scheduler.enums.BinMode | str = BinMode.APPEND, t0: float = 0, fine_start_delay: float = 0, fine_end_delay: float = 0)[source]#

Bases: Acquisition

Trigger counting acquisition protocol returning an integer.

The trigger acquisition mode is used to measure how many times the trigger level is surpassed. The level is set in the hardware configuration.

Important

The exact duration of this operation, and the possible bin modes may depend on the control hardware. Please consult your hardware vendor’s Reference guide for more information.

Parameters:
  • port – The acquisition port.

  • clock – The clock used to demodulate the acquisition.

  • duration – The duration of the operation in seconds.

  • acq_channel – The data channel in which the acquisition is stored, by default 0. Describes the “where” information of the measurement, which typically corresponds to a device element idx.

  • coords – Coords for the acquisition. These coordinates for the measured value for this operation appear in the retrieved acquisition data. For example coords={"amp": 0.1} has the effect, that the measured value for this acquisition will be associated with amp==0.1. By default None, no coords are added.

  • acq_index – Deprecated. The data register in which the acquisition is stored, by default None. Describes the “when” information of the measurement, used to label or tag individual measurements in a large circuit. Typically corresponds to the setpoints of a schedule (e.g., tau in a T1 experiment).

  • bin_mode – Describes what is done when data is written to a register that already contains a value. Options are “append” which appends the result to the list or “distribution” which stores the count value of the new result and the old register value, by default BinMode.APPEND.

  • t0 – The acquisition start time in seconds, by default 0.

  • fine_start_delay – Delays the start of the acquisition by the given amount in seconds. Does not delay the start time of the operation in the schedule. If the hardware supports it, this parameter can be used to shift the acquisition window by a small amount of time, independent of the hardware instruction timing grid. Currently only implemented for Qblox QTM modules, which allow only positive values for this parameter. By default 0.

  • fine_end_delay – Delays the end of the pulse by the given amount in seconds. Does not delay the end time of the operation in the schedule. If the hardware supports it, this parameter can be used to shift the acquisition window by a small amount of time, independent of the hardware instruction timing grid. Currently only implemented for Qblox QTM modules, which allow only positive values for this parameter. By default 0.

class WeightedIntegratedSeparated(waveform_a: dict[str, Any], waveform_b: dict[str, Any], port: str, clock: str, duration: float, acq_channel: collections.abc.Hashable = 0, coords: dict | None = None, acq_index: int | None = None, bin_mode: qblox_scheduler.enums.BinMode | str = BinMode.AVERAGE_APPEND, phase: float = 0, t0: float = 0)[source]#

Bases: Acquisition

Weighted integration acquisition protocol where two sets weights are applied separately to the real and imaginary parts of the signal.

Weights are applied as:

\[\widetilde{A} = \int \mathrm{Re}(S(t))\cdot W_A(t) \mathrm{d}t\]
\[\widetilde{B} = \int \mathrm{Im}(S(t))\cdot W_B(t) \mathrm{d}t\]
Parameters:
  • waveform_a – The complex waveform used as integration weights \(W_A(t)\).

  • waveform_b – The complex waveform used as integration weights \(W_B(t)\).

  • port – The acquisition port.

  • clock – The clock used to demodulate the acquisition.

  • duration – The acquisition duration in seconds.

  • acq_channel – The data channel in which the acquisition is stored, by default 0. Describes the “where” information of the measurement, which typically corresponds to a device element idx.

  • coords – Coords for the acquisition. These coordinates for the measured value for this operation appear in the retrieved acquisition data. For example coords={"amp": 0.1} has the effect, that the measured value for this acquisition will be associated with amp==0.1. By default None, no coords are added.

  • acq_index – Deprecated. The data register in which the acquisition is stored, by default None. Describes the “when” information of the measurement, used to label or tag individual measurements in a large circuit. Typically corresponds to the setpoints of a schedule (e.g., tau in a T1 experiment).

  • bin_mode – Describes what is done when data is written to a register that already contains a value. Options are “append” which appends the result to the list or “average” which stores the weighted average value of the new result and the old register value, by default BinMode.APPEND.

  • phase – The phase of the pulse and acquisition in degrees, by default 0.

  • t0 – The acquisition start time in seconds, by default 0.

Raises:

NotImplementedError

class WeightedThresholdedAcquisition(port: str, clock: str, weights_a: list[complex] | numpy.ndarray, weights_b: list[complex] | numpy.ndarray, weights_sampling_rate: float = 1000000000.0, interpolation: str = 'linear', acq_channel: collections.abc.Hashable = 0, coords: dict | None = None, acq_index: int | None = None, bin_mode: qblox_scheduler.enums.BinMode | str = BinMode.AVERAGE_APPEND, phase: float = 0, t0: float = 0, feedback_trigger_label: str | None = None, acq_rotation: float | None = None, acq_threshold: float = 0)[source]#

Bases: NumericalWeightedIntegration

Subclass of NumericalWeightedIntegration but Thresholded.

Acquisition protocol allowing to control rotation and threshold.

This acquisition protocol is similar to the SSBIntegrationComplex acquisition protocol, but the complex result is now rotated and thresholded to produce a “0” or a “1”, as controlled by the parameters for rotation angle <qubit>.measure.acq_rotation and threshold value <qubit>.measure.acq_threshold in the device configuration (see example below).

The rotation angle and threshold value for each qubit can be set through the device configuration.

Note

Thresholded acquisition is currently only supported by the Qblox backend.

Parameters:
  • port – The acquisition port.

  • clock – The clock used to demodulate the acquisition.

  • weights_a – The list of complex values used as weights \(A(t)\) on the incoming complex signal.

  • weights_b – The list of complex values used as weights \(B(t)\) on the incoming complex signal.

  • weights_sampling_rate – The rate with which the weights have been sampled, in Hz. By default equal to 1 GHz. Note that during hardware compilation, the weights will be resampled with the sampling rate supported by the target hardware.

  • interpolation – The type of interpolation to use, by default “linear”. This argument is passed to interp1d.

  • acq_channel – The data channel in which the acquisition is stored, by default 0. Describes the “where” information of the measurement, which typically corresponds to a qubit idx.

  • coords – Coords for the acquisition. These coordinates for the measured value for this operation appear in the retrieved acquisition data. For example coords={"amp": 0.1} has the effect, that the measured value for this acquisition will be associated with amp==0.1. By default None, no coords are added.

  • acq_index – Deprecated. The data register in which the acquisition is stored, by default None. Describes the “when” information of the measurement, used to label or tag individual measurements in a large circuit. Typically corresponds to the setpoints of a schedule (e.g., tau in a T1 experiment).

  • bin_mode – Describes what is done when data is written to a register that already contains a value. Options are “append” which appends the result to the list or “average” which stores the weighted average value of the new result and the old register value, by default BinMode.APPEND.

  • phase – The phase of the pulse and acquisition in degrees, by default 0.

  • t0 – The acquisition start time in seconds, by default 0.

  • feedback_trigger_label (str) – The label corresponding to the feedback trigger, which is mapped by the compiler to a feedback trigger address on hardware, by default None.

class ConditionalReset(qubit_name: str, name: str = 'conditional_reset', **kwargs)[source]#

Bases: qblox_scheduler.schedules.schedule.TimeableSchedule

Reset a qubit to the \(|0\rangle\) state.

The ConditionalReset gate is a conditional gate that first measures the state of the device element using an ThresholdedAcquisition operation and then performs a \(\pi\) rotation on the condition that the measured state is \(|1\rangle\). If the measured state is in \(|0\rangle\), the hardware will wait the same amount of time the \(\pi\) rotation would’ve taken to ensure that total execution time of ConditionalReset is the same regardless of the measured state.

Note

The total time of the ConditionalReset is the sum of

  1. integration time (<device_element>.measure.integration_time)

  2. acquisition delay (<device_element>.measure.acq_delay)

  3. trigger delay (364ns)

  4. pi-pulse duration (<device_element>.rxy.duration)

  5. idle time (4ns)

Note

Due to current hardware limitations, overlapping conditional resets might not work correctly if multiple triggers are sent within a 364ns window. See sec-qblox-conditional-playback for more information.

Note

ConditionalReset is currently implemented as a subschedule, but can be added to an existing schedule as if it were a gate. See examples below.

Parameters:
  • name (str) – The name of the conditional subschedule, by default “conditional_reset”.

  • qubit_name (str) – The name of the device element to reset to the \(|0\rangle\) state.

  • **kwargs – Additional keyword arguments are passed to Measure. e.g. acq_channel, acq_index, and bin_mode.

Examples

from qblox_scheduler import Schedule
from qblox_scheduler.operations import ConditionalReset

schedule = Schedule("example schedule")
schedule.add(ConditionalReset("q0"))
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: ControlFlowOperation

Conditional over another operation.

If a preceding thresholded acquisition on qubit_name results 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': 'bf6b1b2e-5904-48e8-a490-5c5405f9bf0b', 'operation_id': '-7562371566190481951', 'timing_constraints': [TimingConstraint(ref_schedulable=None, ref_pt=None, ref_pt_new=None, rel_time=3.64e-07)], 'label': 'bf6b1b2e-5904-48e8-a490-5c5405f9bf0b'}

Added in version 0.22.0: For some hardware specific implementations, a hardware_buffer_time might be required to ensure the correct timing of the operations. This will be added to the duration of the body to prevent overlap with other operations.

property body: qblox_scheduler.operations.operation.Operation | qblox_scheduler.schedules.schedule.TimeableSchedule#

Body of a control flow.

property duration: float#

Duration of a control flow.

class ControlFlowOperation(name: str)[source]#

Bases: qblox_scheduler.operations.operation.Operation

Control flow operation that can be used as an Operation in .TimeableSchedule.

This is an abstract class. Each concrete implementation of the control flow operation decides how and when their body operation is executed.

property body: qblox_scheduler.operations.operation.Operation | qblox_scheduler.schedules.schedule.TimeableSchedule#
Abstractmethod:

Body of a control flow.

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

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

Returns:

: All (port, clock) combinations that operations in the body of this control flow operation uses.

class ControlFlowSpec[source]#

Control flow specification to be used at Schedule.add.

The users can specify any concrete control flow with the control_flow argument to Schedule.add. The ControlFlowSpec is only a type which by itself cannot be used for the control_flow argument, use any concrete control flow derived from it.

abstract create_operation(body: qblox_scheduler.operations.operation.Operation | qblox_scheduler.schedules.schedule.TimeableSchedule) qblox_scheduler.operations.operation.Operation | qblox_scheduler.schedules.schedule.TimeableSchedule[source]#

Transform the control flow specification to an operation or schedule.

class LoopOperation(body: qblox_scheduler.operations.operation.Operation | qblox_scheduler.schedules.schedule.TimeableSchedule | qblox_scheduler.schedule.Schedule, *, repetitions: int | None = None, domain: dict[qblox_scheduler.operations.variables.Variable, qblox_scheduler.operations.loop_domains.LinearDomain] | None = None, t0: float = 0.0, strategy: LoopStrategy | None = None)[source]#

Bases: ControlFlowOperation

Loop over another operation predefined times.

Repeats the operation defined in body repetitions times. The actual implementation depends on the backend.

One of domain or repetitions must be specified.

Parameters:
  • body – Operation to be repeated

  • repetitions – Number of repetitions, by default None

  • domain – Linear domain to loop over, by default None

  • t0 – Time offset, by default 0

  • strategy – Strategy to use for implementing this loop, by default None to make own decision

property body: qblox_scheduler.operations.operation.Operation | qblox_scheduler.schedules.schedule.TimeableSchedule#

Body of a control flow.

property duration: float#

Duration of a control flow.

property domain: dict[qblox_scheduler.operations.variables.Variable, qblox_scheduler.operations.loop_domains.LinearDomain]#

Linear domain to loop over.

property repetitions: int#

Number of times the body will execute.

property strategy: LoopStrategy | None#

What strategy to use for implementing this loop.

class LoopStrategy[source]#

Bases: qblox_scheduler.enums.StrEnum

Strategy to use for implementing loops.

REALTIME: Use native loops. UNROLLED: Unroll loop at compilation time into separate instructions.

REALTIME = 'realtime'#
UNROLLED = 'unrolled'#
class DType[source]#

Bases: qblox_scheduler.enums.StrEnum

Data type of a variable or expression.

NUMBER = 'number'#

A number, corresponding to 1, 2, 3, etc.

AMPLITUDE = 'amplitude'#

An amplitude, corresponding to 0.1, 0.2, 0.3, etc. in dimensionless units ranging from -1 to 1.

TIME = 'time'#

A time, corresponding to 20e-9, 40e-9, 60e-9, etc. in seconds.

FREQUENCY = 'frequency'#

A frequency, corresponding to 1e9, 2e9, 3e9, etc. in Hz.

PHASE = 'phase'#

A phase, corresponding to e.g. 0, 30, 60, 90, etc. in degrees ranging from 0 to 360.

is_timing_sensitive() bool[source]#

Whether an expression of this type affects timing.

class CNOT(qC: str, qT: str, **device_overrides)[source]#

Bases: qblox_scheduler.operations.operation.Operation

Conditional-NOT gate, a common entangling gate.

Performs an X gate on the target qubit qT conditional on the state of the control qubit qC.

This operation can be represented by the following unitary:

\[\begin{split}\mathrm{CNOT} = \begin{bmatrix} 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & 0 & 1 \\ 0 & 0 & 1 & 0 \\ \end{bmatrix}\end{split}\]
Parameters:
  • qC – The control device element.

  • qT – The target device element

  • device_overrides – Device level parameters that override device configuration values when compiling from circuit to device level.

class CZ(qC: str, qT: str, **device_overrides)[source]#

Bases: qblox_scheduler.operations.operation.Operation

Conditional-phase gate, a common entangling gate.

Performs a Z gate on the target device element qT conditional on the state of the control device element qC.

This operation can be represented by the following unitary:

\[\begin{split}\mathrm{CZ} = \begin{bmatrix} 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & -1 \\ \end{bmatrix}\end{split}\]
Parameters:
  • qC – The control device element.

  • qT – The target device element

  • device_overrides – Device level parameters that override device configuration values when compiling from circuit to device level.

class X90(qubit: str, **device_overrides)[source]#

Bases: Rxy

A single qubit rotation of 90 degrees around the X-axis.

It is identical to the Rxy gate with theta=90 and phi=0

Defined by the unitary:

\[\begin{split}X90 = R_{X90} = \frac{1}{\sqrt{2}}\begin{bmatrix} 1 & -i \\ -i & 1 \\ \end{bmatrix}\end{split}\]
Parameters:
  • qubit – The target device element.

  • device_overrides – Device level parameters that override device configuration values when compiling from circuit to device level.

class Y90(qubit: str, **device_overrides)[source]#

Bases: Rxy

A single qubit rotation of 90 degrees around the Y-axis.

It is identical to the Rxy gate with theta=90 and phi=90

Defined by the unitary:

\[\begin{split}Y90 = R_{Y90} = \frac{1}{\sqrt{2}}\begin{bmatrix} 1 & -1 \\ 1 & 1 \\ \end{bmatrix}\end{split}\]
Parameters:
  • qubit – The target device element.

  • device_overrides – Device level parameters that override device configuration values when compiling from circuit to device level.

class Z90(qubit: str, **device_overrides)[source]#

Bases: Rz

A single qubit rotation of 90 degrees around the Z-axis.

This operation can be represented by the following unitary:

\[\begin{split}Z90 = R_{Z90} = e^{-\frac{\pi/2}{2}}S = e^{-\frac{\pi/2}{2}}\sqrt{Z} = \frac{1}{\sqrt{2}}\begin{bmatrix} 1-i & 0 \\ 0 & 1+i \\ \end{bmatrix}\end{split}\]
Parameters:
  • qubit – The target device element.

  • device_overrides – Device level parameters that override device configuration values when compiling from circuit to device level.

class H(*qubits: str, **device_overrides)[source]#

Bases: qblox_scheduler.operations.operation.Operation

A single qubit Hadamard gate.

Note that the gate uses \(R_z(\pi) = -iZ\), adding a global phase of \(-\pi/2\). This operation can be represented by the following unitary:

\[\begin{split}H = Y90 \cdot Z = \frac{-i}{\sqrt{2}}\begin{bmatrix} 1 & 1 \\ 1 & -1 \\ \end{bmatrix}\end{split}\]
Parameters:
  • qubit – The target device element.

  • device_overrides – Device level parameters that override device configuration values when compiling from circuit to device level.

class Measure(*qubits: str, acq_channel: collections.abc.Hashable | None = None, coords: dict | None = None, acq_index: tuple[int, Ellipsis] | tuple[None, Ellipsis] | int | None = None, acq_protocol: Literal['SSBIntegrationComplex', 'Timetag', 'TimetagTrace', 'Trace', 'TriggerCount', 'ThresholdedTriggerCount', 'NumericalSeparatedWeightedIntegration', 'NumericalWeightedIntegration', 'ThresholdedAcquisition'] | None = None, bin_mode: qblox_scheduler.enums.BinMode | str | None = None, feedback_trigger_label: str | None = None, **device_overrides)[source]#

Bases: qblox_scheduler.operations.operation.Operation

A projective measurement in the Z-basis.

The measurement is compiled according to the type of acquisition specified in the device configuration.

Note

Strictly speaking this is not a gate as it can not be described by a unitary.

Parameters:
  • qubits – The device elements you want to measure.

  • acq_channel – Only for special use cases. By default (if None): the acquisition channel specified in the device element is used. If set, this acquisition channel is used for this measurement.

  • coords – Coords for the acquisition. These coordinates for the measured value for this operation appear in the retrieved acquisition data. For example coords={"amp": 0.1} has the effect, that the measured value for this acquisition will be associated with amp==0.1. By default None, no coords are added.

  • acq_index – Index of the register where the measurement is stored. If None specified, this defaults to writing the result of all device elements to acq_index 0. By default None.

  • acq_protocol ("SSBIntegrationComplex" | "Trace" | "TriggerCount" | "NumericalSeparatedWeightedIntegration" | "NumericalWeightedIntegration" | None, Optional) – Acquisition protocols that are supported. If None is specified, the default protocol is chosen based on the device and backend configuration. By default None.

  • bin_mode – The binning mode that is to be used. If not None, it will overwrite the binning mode used for Measurements in the circuit-to-device compilation step. By default None.

  • feedback_trigger_label (str) – The label corresponding to the feedback trigger, which is mapped by the compiler to a feedback trigger address on hardware, by default None.

  • device_overrides – Device level parameters that override device configuration values when compiling from circuit to device level.

class Reset(*qubits: str, **device_overrides)[source]#

Bases: qblox_scheduler.operations.operation.Operation

Reset a qubit to the \(|0\rangle\) state.

The Reset gate is an idle operation that is used to initialize one or more qubits.

Note

Strictly speaking this is not a gate as it can not be described by a unitary.

Examples

The operation can be used in several ways:

from qblox_scheduler.operations.gate_library import Reset

reset_1 = Reset("q0")
reset_2 = Reset("q1", "q2")
reset_3 = Reset(*[f"q{i}" for i in range(3, 6)])
Parameters:
  • qubits – The device element(s) to reset. NB one or more device element can be specified, e.g., Reset("q0"), Reset("q0", "q1", "q2"), etc..

  • device_overrides – Device level parameters that override device configuration values when compiling from circuit to device level.

class Rxy(theta: float, phi: float, qubit: str, **device_overrides)[source]#

Bases: qblox_scheduler.operations.operation.Operation

A single qubit rotation around an axis in the equator of the Bloch sphere.

This operation can be represented by the following unitary as defined in https://doi.org/10.1109/TQE.2020.2965810:

\[\begin{split}\mathsf {R}_{xy} \left(\theta, \varphi\right) = \begin{bmatrix} \textrm {cos}(\theta /2) & -ie^{-i\varphi }\textrm {sin}(\theta /2) \\ -ie^{i\varphi }\textrm {sin}(\theta /2) & \textrm {cos}(\theta /2) \end{bmatrix}\end{split}\]
Parameters:
  • theta – Rotation angle in degrees, will be casted to the [-180, 180) domain.

  • phi – Phase of the rotation axis, will be casted to the [0, 360) domain.

  • qubit – The target device element.

  • device_overrides – Device level parameters that override device configuration values when compiling from circuit to device level.

class Rz(theta: float, qubit: str, **device_overrides)[source]#

Bases: qblox_scheduler.operations.operation.Operation

A single qubit rotation about the Z-axis of the Bloch sphere.

This operation can be represented by the following unitary as defined in https://www.quantum-inspire.com/kbase/rz-gate/:

\[\begin{split}\mathsf {R}_{z} \left(\theta\right) = \begin{bmatrix} e^{-i\theta/2} & 0 \\ 0 & e^{i\theta/2} \end{bmatrix}\end{split}\]
Parameters:
  • theta – Rotation angle in degrees, will be cast to the [-180, 180) domain.

  • qubit – The target device element.

  • device_overrides – Device level parameters that override device configuration values when compiling from circuit to device level.

class S(qubit: str, **device_overrides)[source]#

Bases: Z90

A single qubit rotation of 90 degrees around the Z-axis.

This implements an \(S\) gate up to a global phase. Therefore, this operation is a direct alias of the Z90 operations

This operation can be represented by the following unitary:

\[\begin{split}R_{Z90} = e^{-i\frac{\pi}{4}}S = e^{-i\frac{\pi}{4}}\sqrt{Z} = \frac{1}{\sqrt{2}}\begin{bmatrix} 1-i & 0 \\ 0 & 1+i \\ \end{bmatrix}\end{split}\]
Parameters:
  • qubit – The target device element.

  • device_overrides – Device level parameters that override device configuration values when compiling from circuit to device level.

class SDagger(qubit: str, **device_overrides)[source]#

Bases: Rz

A single qubit rotation of -90 degrees around the Z-axis.

Implements \(S^\dagger\) up to a global phase.

This operation can be represented by the following unitary:

\[\begin{split}R_{Z270} = e^{\frac{\pi}{4}}S^\dagger = e^{\frac{\pi}{4}}\sqrt{Z}^\dagger = \frac{1}{\sqrt{2}}\begin{bmatrix} 1+i & 0 \\ 0 & 1-i \\ \end{bmatrix}\end{split}\]
Parameters:
  • qubit – The target device element.

  • device_overrides – Device level parameters that override device configuration values when compiling from circuit to device level.

class T(qubit: str, **device_overrides)[source]#

Bases: Rz

A single qubit rotation of 45 degrees around the Z-axis.

Implements \(T\) up to a global phase.

This operation can be represented by the following unitary:

\[\begin{split}R_{Z45} = e^{-\frac{\pi}{8}}T = e^{-\frac{\pi}{8}}\begin{bmatrix} 1 & 0 \\ 0 & \frac{1+i}{\sqrt{2}} \\ \end{bmatrix}\end{split}\]
Parameters:
  • qubit – The target device element.

  • device_overrides – Device level parameters that override device configuration values when compiling from circuit to device level.

class TDagger(qubit: str, **device_overrides)[source]#

Bases: Rz

A single qubit rotation of -45 degrees around the Z-axis.

Implements \(T^\dagger\) up to a global phase.

This operation can be represented by the following unitary:

\[\begin{split}R_{Z315} = e^{\frac{\pi}{8}}T^\dagger = e^{\frac{\pi}{8}}\begin{bmatrix} 1 & 0 \\ 0 & \frac{1-i}{\sqrt{2}} \\ \end{bmatrix}\end{split}\]
Parameters:
  • qubit – The target device element.

  • device_overrides – Device level parameters that override device configuration values when compiling from circuit to device level.

class X(qubit: str, **device_overrides)[source]#

Bases: Rxy

A single qubit rotation of 180 degrees around the X-axis.

This operation can be represented by the following unitary:

\[\begin{split}X180 = R_{X180} = \begin{bmatrix} 0 & -i \\ -i & 0 \\ \end{bmatrix}\end{split}\]
Parameters:
  • qubit – The target device element.

  • device_overrides – Device level parameters that override device configuration values when compiling from circuit to device level.

class Y(qubit: str, **device_overrides)[source]#

Bases: Rxy

A single qubit rotation of 180 degrees around the Y-axis.

It is identical to the Rxy gate with theta=180 and phi=90

Defined by the unitary:

\[\begin{split}Y180 = R_{Y180} = \begin{bmatrix} 0 & -1 \\ 1 & 0 \\ \end{bmatrix}\end{split}\]
Parameters:
  • qubit – The target device element.

  • device_overrides – Device level parameters that override device configuration values when compiling from circuit to device level.

class Z(qubit: str, **device_overrides)[source]#

Bases: Rz

A single qubit rotation of 180 degrees around the Z-axis.

Note that the gate implements \(R_z(\pi) = -iZ\), adding a global phase of \(-\pi/2\). This operation can be represented by the following unitary:

\[\begin{split}Z180 = R_{Z180} = -iZ = e^{-\frac{\pi}{2}}Z = \begin{bmatrix} -i & 0 \\ 0 & i \\ \end{bmatrix}\end{split}\]
Parameters:
  • qubit – The target device element.

  • device_overrides – Device level parameters that override device configuration values when compiling from circuit to device level.

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

Bases: qblox_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'#
program#
_duration#
port#
clock#
waveforms#
safe_labels = True#
property name: str#

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.

long_chirp_pulse(amp: float, duration: float, port: str, start_freq: float, end_freq: float, clock: str = BasebandClockResource.IDENTITY, t0: float = 0, part_duration_ns: int = constants.STITCHED_PULSE_PART_DURATION_NS, reference_magnitude: qblox_scheduler.operations.pulse_library.ReferenceMagnitude | None = None) qblox_scheduler.schedules.schedule.TimeableSchedule[source]#

Create a long chirp pulse using SetClockFrequency.

Parameters:
  • amp (float) – Amplitude of the envelope.

  • duration (float) – The pulse duration in seconds.

  • port (str) – Port of the pulse, must be capable of playing a complex waveform.

  • start_freq (float) – Start frequency of the Chirp. Note that this is the frequency at which the waveform is calculated, this may differ from the clock frequency.

  • end_freq (float) – End frequency of the Chirp.

  • clock (str, Optional) – Clock used to modulate the pulse. By default the baseband clock.

  • t0 (float, Optional) – Time in seconds when to start the pulses relative to the start time of the Operation in the TimeableSchedule. By default 0.

  • part_duration_ns (int, Optional) – Chunk size in nanoseconds.

  • reference_magnitude (Optional) – Scaling value and unit for the unitless amplitude. Uses settings in hardware config if not provided.

Returns:

TimeableSchedule A TimeableSchedule object describing a chirp pulse.

Raises:

ValueError – When the duration of the pulse is not a multiple of grid_time_ns.

long_ramp_pulse(amp: float, duration: float, port: str, offset: float = 0, clock: str = BasebandClockResource.IDENTITY, t0: float = 0, part_duration_ns: int = constants.STITCHED_PULSE_PART_DURATION_NS, reference_magnitude: qblox_scheduler.operations.pulse_library.ReferenceMagnitude | None = None) qblox_scheduler.schedules.schedule.TimeableSchedule[source]#

Creates a long ramp pulse by stitching together shorter ramps.

This function creates a long ramp pulse by stitching together ramp pulses of the specified duration part_duration_ns, with DC voltage offset instructions placed in between.

Warning

This function creates a TimeableSchedule object, containing a combination of voltage offsets and waveforms. Overlapping Schedules with VoltageOffsets in time on the same port and clock may lead to unexpected results.

Parameters:
  • amp (float) – Amplitude of the ramp envelope function.

  • duration (float) – The pulse duration in seconds.

  • port (str) – Port of the pulse.

  • offset (float, Optional) – Starting point of the ramp pulse. By default 0.

  • clock (str, Optional) – Clock used to modulate the pulse, by default the baseband clock.

  • t0 (float, Optional) – Time in seconds when to start the pulses relative to the start time of the Operation in the TimeableSchedule. By default 0.

  • part_duration_ns (int, Optional) – Duration of each partial ramp in nanoseconds, by default STITCHED_PULSE_PART_DURATION_NS.

  • reference_magnitude (Optional) – Scaling value and unit for the unitless amplitude. Uses settings in hardware config if not provided.

Returns:

TimeableSchedule A TimeableSchedule composed of shorter ramp pulses with varying DC offsets, forming one long ramp pulse.

long_square_pulse(amp: complex | qblox_scheduler.operations.variables.Variable | collections.abc.Sequence[float | qblox_scheduler.operations.variables.Variable], duration: float, port: str, clock: str = BasebandClockResource.IDENTITY, t0: float = 0, reference_magnitude: qblox_scheduler.operations.pulse_library.ReferenceMagnitude | None = None) qblox_scheduler.schedules.schedule.TimeableSchedule[source]#

Create a long square pulse using DC voltage offsets.

Warning

This function creates a TimeableSchedule object, containing a combination of voltage offsets and waveforms. Overlapping Schedules with VoltageOffsets in time on the same port and clock may lead to unexpected results.

Parameters:
  • amp (float) – Amplitude of the envelope.

  • duration (float) – The pulse duration in seconds.

  • port (str) – Port of the pulse, must be capable of playing a complex waveform.

  • clock (str, Optional) – Clock used to modulate the pulse. By default the baseband clock.

  • t0 (float, Optional) – Time in seconds when to start the pulses relative to the start time of the Operation in the TimeableSchedule. By default 0.

  • reference_magnitude (Optional) – Scaling value and unit for the unitless amplitude. Uses settings in hardware config if not provided.

Returns:

TimeableSchedule A Schedule object containing an offset instruction with the specified amplitude.

Raises:

ValueError – When the duration of the pulse is not a multiple of grid_time_ns.

staircase_pulse(start_amp: float, final_amp: float, num_steps: int, duration: float, port: str, clock: str = BasebandClockResource.IDENTITY, t0: float = 0, min_operation_time_ns: int = constants.MIN_TIME_BETWEEN_OPERATIONS, reference_magnitude: qblox_scheduler.operations.pulse_library.ReferenceMagnitude | None = None) qblox_scheduler.schedules.schedule.TimeableSchedule[source]#

Create a staircase-shaped pulse using DC voltage offsets.

This function generates a real valued staircase pulse, which reaches its final amplitude in discrete steps. In between it will maintain a plateau.

Warning

This function creates a TimeableSchedule object, containing a combination of voltage offsets and waveforms. Overlapping Schedules with VoltageOffsets in time on the same port and clock may lead to unexpected results.

Parameters:
  • start_amp (float) – Starting amplitude of the staircase envelope function.

  • final_amp (float) – Final amplitude of the staircase envelope function.

  • num_steps (int) – The number of plateaus.

  • duration (float) – Duration of the pulse in seconds.

  • port (str) – Port of the pulse.

  • clock (str, Optional) – Clock used to modulate the pulse. By default the baseband clock.

  • t0 (float, Optional) – Time in seconds when to start the pulses relative to the start time of the Operation in the TimeableSchedule. By default 0.

  • min_operation_time_ns (int, Optional) – Min operation time in ns. The duration of the long_square_pulse must be a multiple of this. By default equal to the min operation time time of Qblox modules.

  • reference_magnitude (Optional) – Scaling value and unit for the unitless amplitude. Uses settings in hardware config if not provided.

Returns:

TimeableSchedule A Schedule object containing incrementing or decrementing offset instructions.

Raises:

ValueError – When the duration of a step is not a multiple of grid_time_ns.

class LatchReset(portclock: tuple[str, str], t0: float = 0, duration: float = 4e-09)[source]#

Bases: qblox_scheduler.operations.operation.Operation

Operation that resets the feedback trigger addresses from the hardware.

Currently only implemented for Qblox backend, refer to ResetFeedbackTriggersStrategy for more details.

class SimpleNumericalPulse(samples: numpy.ndarray | list, port: str, clock: str = BasebandClockResource.IDENTITY, gain: complex | float | operations.expressions.Expression | collections.abc.Sequence[complex | float | operations.expressions.Expression] = 1, reference_magnitude: qblox_scheduler.operations.pulse_library.ReferenceMagnitude | None = None, t0: float = 0)[source]#

Bases: qblox_scheduler.operations.pulse_library.NumericalPulse

Wrapper on top of NumericalPulse to provide a simple interface for creating a pulse where the samples correspond 1:1 to the produced waveform, without needing to specify the time samples.

Parameters:
  • samples – An array of (possibly complex) values specifying the shape of the pulse.

  • port – The port that the pulse should be played on.

  • clock – Clock used to (de)modulate the pulse. By default the baseband clock.

  • gain – Gain factor between -1 and 1 that multiplies with the samples, by default 1.

  • reference_magnitude – Scaling value and unit for the unitless samples. Uses settings in hardware config if not provided.

  • t0 – Time in seconds when to start the pulses relative to the start time of the Operation in the TimeableSchedule.

Example

from qblox_scheduler.operations.hardware_operations.pulse_library import (
    SimpleNumericalPulse
)
from qblox_scheduler import TimeableSchedule

waveform = [0.1,0.2,0.2,0.3,0.5,0.4]

schedule = TimeableSchedule("")
schedule.add(SimpleNumericalPulse(waveform, port="q0:out"))
{'name': 'b7d1455b-1681-49b0-86d6-9071190f310d', 'operation_id': '6633773451202662734', 'timing_constraints': [TimingConstraint(ref_schedulable=None, ref_pt=None, ref_pt_new=None, rel_time=0)], 'label': 'b7d1455b-1681-49b0-86d6-9071190f310d'}
arange(start: float, stop: float, step: float, dtype: qblox_scheduler.operations.expressions.DType) LinearDomain[source]#

Linear range of values to loop over, specified with a start value, an exclusive stop value and a step size.

Parameters:
  • start – Start of interval. The interval includes this value.

  • stop – End of interval. The interval does not include this value, except in some cases where step is not an integer and floating point round-off affects the length of out.

  • step – Spacing between values. For any output out, this is the distance between two adjacent values, out[i+1] - out[i].

  • dtype – Data type of the linear domain.

linspace(start: complex | float, stop: complex | float, num: int, dtype: qblox_scheduler.operations.expressions.DType) LinearDomain[source]#

Linear range of values to loop over, specified with a start value, an inclusive stop value and the number of linearly spaced points to generate.

Parameters:
  • start – The starting value of the sequence.

  • stop – The end value of the sequence.

  • num – Number of samples to generate. Must be non-negative.

  • dtype – Data type of the linear domain.

class ChargeReset(*qubits: str)[source]#

Bases: qblox_scheduler.operations.operation.Operation

Prepare a NV to its negative charge state NV$^-$.

Create a new instance of ChargeReset operation that is used to initialize the charge state of an NV center.

Parameters:

qubit – The qubit to charge-reset. NB one or more qubits can be specified, e.g., ChargeReset("qe0"), ChargeReset("qe0", "qe1", "qe2"), etc..

class CRCount(*qubits: str, acq_channel: collections.abc.Hashable | None = None, coords: dict | None = None, acq_index: tuple[int, Ellipsis] | tuple[None, Ellipsis] | int | None = None, acq_protocol: Literal['Trace', 'TriggerCount', None] = None, bin_mode: qblox_scheduler.enums.BinMode | None = None)[source]#

Bases: qblox_scheduler.operations.operation.Operation

Operate ionization and spin pump lasers for charge and resonance counting.

Gate level description for an optical CR count measurement.

The measurement is compiled according to the type of acquisition specified in the device configuration.

Parameters:
  • qubits – The qubits you want to measure

  • acq_channel – Only for special use cases. By default (if None): the acquisition channel specified in the device element is used. If set, this acquisition channel is used for this measurement.

  • coords – Coords for the acquisition. These coordinates for the measured value for this operation appear in the retrieved acquisition data. For example coords={"amp": 0.1} has the effect, that the measured value for this acquisition will be associated with amp==0.1. By default None, no coords are added.

  • acq_index – Index of the register where the measurement is stored. If None specified, it will default to a list of zeros of len(qubits)

  • acq_protocol – Acquisition protocol (currently "TriggerCount" and "Trace") are supported. If None is specified, the default protocol is chosen based on the device and backend configuration.

  • bin_mode – The binning mode that is to be used. If not None, it will overwrite the binning mode used for Measurements in the quantum-circuit to quantum-device compilation step.

class Operation(name: str)[source]#

Bases: qblox_scheduler.json_utils.JSONSchemaValMixin, collections.UserDict

A representation of quantum circuit operations.

The Operation class is a JSON-compatible data structure that contains information on how to represent the operation on the quantum-circuit and/or the quantum-device layer. It also contains information on where the operation should be applied: the Resource s used.

An operation always has the following attributes:

  • duration (float): duration of the operation in seconds (can be 0).

  • hash (str): an auto generated unique identifier.

  • name (str): a readable identifier, does not have to be unique.

An Operation can contain information on several levels of abstraction. This information is used when different representations are required. Note that when initializing an operation not all of this information needs to be available as operations are typically modified during the compilation steps.

Tip

qblox_scheduler comes with a gate_library and a pulse_library , both containing common operations.

JSON schema of a valid Operation

qblox://operation

JSON schema for a qblox sequencer operation.

type

object

properties

  • name

type

string

  • gate_info

type

object

properties

  • unitary

A unitary matrix describing the operation.

  • operation_type

Defines what class of operations this gate refers to (e.g. Rxy, CZ etc.).

type

string

  • qubits

Deprecated. A list of strings indicating the qubits the gate acts on. Valid qubits are strings that appear in the device_config.json file.

type

array

  • device_elements

A list of strings indicating the device_elements the gate acts on. Valid device_elements are strings that appear in the device_config.json file.

type

array

  • symmetric

A boolean to indicate whether a two device elements is symmetric. This is used in the device config compilation stage. By default, it is set as False

type

boolean

  • tex

latex snippet for plotting

type

string

  • plot_func

reference to a function for plotting this operation. If not specified, defaults to using gate_box().

type

string / null

additionalProperties

True

  • pulse_info

A list containing the pulses that are part of the operation

type

array

items

Info to generate an individual pulse.

type

object

properties

  • port

A string specifying the port used by the pulse.

type

string / null

  • clock

A string specifying the clock used to modulate the pulse.

type

string

  • wf_func

reference to a function to generate the pulse of this operation.

type

string / null

  • t0

Starting time of the pulse with respect to the start of the operation in seconds.

type

number

  • duration

The duration of the pulse in seconds.

type

number

  • acquisition_info

A list containing the acquisitions that are part of the operation

type

array

items

Info to generate an individual acquisition.

type

object

properties

  • port

A string specifying the port used by the acquisition.

type

string

  • clock

A string specifying the clock used to demodulate the acquisition.

type

string

  • t0

Starting time of the pulse with respect to the start of the operation in seconds.

type

number

  • duration

The duration of the acquisition in seconds.

type

number

  • acq_channel

The acquisition channel to use.

type

number

  • acq_index

The acquisition index where to store the result of the acquisition protocol.

type

number / null

  • acq_return_type

Describes the return type of an acquisition performed using this protocol.

additionalProperties

True

  • logic_info

Not Implemented.

  • statement_info

type

object

properties

  • variable

type

object

  • assigned_value

type

object / number

  • drop_variable

type

boolean

  • port-clocks

type

array

additionalProperties

True

additionalProperties

False

Note

Two different Operations containing the same information generate the same hash and are considered identical.

schema_filename = 'operation.json'#
_class_signature = None#
_duration: float = 0#
_update() None[source]#

Update the Operation’s internals.

clone() Operation[source]#

Clone this operation into a new independent operation.

substitute(substitutions: dict[qblox_scheduler.operations.expressions.Expression, qblox_scheduler.operations.expressions.Expression | int | float | complex]) Operation[source]#

Substitute matching expressions in operand, possibly evaluating a result.

property name: str#

Return the name of the operation.

property duration: float#

Determine operation duration from pulse_info.

If the operation contains no pulse info, it is assumed to be ideal and have zero duration.

property hash: str#

A hash based on the contents of the Operation.

Needs to be a str for easy compatibility with json.

classmethod _get_signature(parameters: dict) str[source]#

Returns the constructor call signature of this instance for serialization.

The string constructor representation can be used to recreate the object using eval(signature).

Parameters:

parameters (dict) – The current data dictionary.

Returns:

:

add_gate_info(gate_operation: Operation) None[source]#

Updates self.data[‘gate_info’] with contents of gate_operation.

Parameters:

gate_operation – an operation containing gate_info.

add_device_representation(device_operation: Operation) None[source]#

Adds device-level representation details to the current operation.

Parameters:

device_operation – an operation containing the pulse_info and/or acquisition info describing how to represent the current operation at the quantum-device layer.

add_pulse(pulse_operation: Operation) None[source]#

Adds pulse_info of pulse_operation Operation to this Operation.

Parameters:

pulse_operation – an operation containing pulse_info.

add_acquisition(acquisition_operation: Operation) None[source]#

Adds acquisition_info of acquisition_operation Operation to this Operation.

Parameters:

acquisition_operation – an operation containing acquisition_info.

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.

classmethod is_valid(object_to_be_validated: Operation) bool[source]#

Validates the object’s contents against the schema.

Additionally, checks if the hash property of the object evaluates correctly.

property valid_gate: bool#

An operation is a valid gate if it has gate-level representation details.

property valid_pulse: bool#

An operation is a valid pulse if it has pulse-level representation details.

property valid_acquisition: bool#

An operation is a valid acquisition if it has pulse-level acquisition representation details.

property is_conditional_acquisition: bool#

An operation is conditional if one of the following holds, self is an an acquisition with a feedback_trigger_label assigned to it.

property is_control_flow: bool#

Determine if operation is a control flow operation.

Returns:

bool Whether the operation is a control flow operation.

property has_voltage_offset: bool#

Checks if the operation contains information for a voltage offset.

class PulseCompensation(body: qblox_scheduler.operations.operation.Operation | qblox_scheduler.schedules.schedule.TimeableSchedule | qblox_scheduler.schedule.Schedule, qubits: str | collections.abc.Iterable[str] | None = None, max_compensation_amp: dict[Port, float] | None = None, time_grid: float | None = None, sampling_rate: float | None = None)[source]#

Bases: qblox_scheduler.operations.operation.Operation

Apply pulse compensation to an operation or schedule.

Inserts a pulse at the end of the operation or schedule set in body for each port. The compensation pulses are calculated so that the integral of all pulses (including the compensation pulses) are zero for each port. Moreover, the compensating pulses are square pulses, and start just after the last pulse on each port individually, and their maximum amplitude is the one specified in the max_compensation_amp. Their duration is divisible by duration_grid. The clock is assumed to be the baseband clock; any other clock is not allowed.

Parameters:
  • body – Operation to be pulse-compensated

  • qubits – For circuit-level operations, this is a list of device element names.

  • max_compensation_amp – Dictionary for each port the maximum allowed amplitude for the compensation pulse.

  • time_grid – Grid time of the duration of the compensation pulse.

  • sampling_rate – Sampling rate for pulse integration calculation.

property body: qblox_scheduler.operations.operation.Operation | qblox_scheduler.schedules.schedule.TimeableSchedule#

Body of a pulse compensation.

property max_compensation_amp: dict[Port, float]#

For each port the maximum allowed amplitude for the compensation pulse.

property time_grid: float#

Grid time of the duration of the compensation pulse.

property sampling_rate: float#

Sampling rate for pulse integration calculation.

composite_square_pulse(square_amp: float, square_duration: float, square_port: str, square_clock: str, virt_z_parent_qubit_phase: float, virt_z_parent_qubit_clock: str, virt_z_child_qubit_phase: float, virt_z_child_qubit_clock: str, reference_magnitude: qblox_scheduler.operations.pulse_library.ReferenceMagnitude | None = None, t0: float = 0) qblox_scheduler.operations.pulse_library.SquarePulse[source]#

An example composite pulse to implement a CZ gate.

It applies the square pulse and then corrects for the phase shifts on both the device elements.

Parameters:
  • square_amp – Amplitude of the square envelope.

  • square_duration – The square pulse duration in seconds.

  • square_port – Port of the pulse, must be capable of playing a complex waveform.

  • square_clock – Clock used to modulate the pulse.

  • virt_z_parent_qubit_phase – The phase shift in degrees applied to the parent qubit.

  • virt_z_parent_qubit_clock – The clock of which to shift the phase applied to the parent qubit.

  • virt_z_child_qubit_phase – The phase shift in degrees applied to the child qubit.

  • virt_z_child_qubit_clock – The clock of which to shift the phase applied to the child qubit.

  • reference_magnitude (ReferenceMagnitude,) – Optional scaling value and unit for the unitless amplitude. Uses settings in hardware config if not provided.

  • t0 – Time in seconds when to start the pulses relative to the start time of the Operation in the TimeableSchedule.

Returns:

: SquarePulse operation.

non_implemented_pulse(**kwargs) qblox_scheduler.schedules.TimeableSchedule[source]#

Raise an error indicating that the requested gate or pulse is not implemented.

nv_spec_pulse_mw(duration: float, amplitude: float, clock: str, port: str, pulse_shape: Literal['SquarePulse', 'SkewedHermitePulse', 'GaussPulse'], reference_magnitude: qblox_scheduler.operations.pulse_library.ReferenceMagnitude | None = None) qblox_scheduler.operations.pulse_library.SquarePulse | qblox_scheduler.operations.pulse_library.SkewedHermitePulse | qblox_scheduler.operations.pulse_library.GaussPulse[source]#

Generate a microwave pulse for spectroscopy experiments.

The pulse can take one of three shapes: Square, Skewed Hermite, or Gaussian, based on the specified pulse_shape. This function supports frequency-modulated pulses for spectroscopy applications.

Parameters:
  • duration (float) – Duration of the pulse, in seconds.

  • amplitude (float) – Amplitude of the pulse.

  • clock (str) – Name of the clock used for frequency modulation.

  • port (str) – Name of the port where the pulse is applied.

  • pulse_shape (Literal["SquarePulse", "SkewedHermitePulse", "GaussPulse"]) – Shape of the pulse. The default is “SquarePulse”.

  • reference_magnitude (pulse_library.ReferenceMagnitude | None, Optional) – Scaling value and unit for the unitless amplitude. If not provided, settings from the hardware configuration are used.

Returns:

pulse_library.SquarePulse | pulse_library.SkewedHermitePulse | pulse_library.GaussPulse The generated pulse operation based on the specified shape and parameters.

phase_shift(theta: float, clock: str) qblox_scheduler.operations.pulse_library.ShiftClockPhase[source]#

Generate a ShiftClockPhase that shifts the phase of the clock by an angle theta.

Parameters:
  • theta – Angle to shift the clock by, in degrees.

  • clock – Name of the clock to shift.

Returns:

: ShiftClockPhase operation.

rxy_drag_pulse(amp180: float, beta: float, theta: float, phi: float, port: str, duration: float, clock: str, reference_magnitude: qblox_scheduler.operations.pulse_library.ReferenceMagnitude | None = None) qblox_scheduler.operations.pulse_library.DRAGPulse[source]#

Generate a DRAGPulse that achieves the right rotation angle theta based on a calibrated pi-pulse amplitude and beta parameter based on linear interpolation of the pulse amplitudes.

Parameters:
  • amp180 – Unitless amplitude of excitation pulse to get the maximum 180 degree theta.

  • beta – Unitless amplitude of the derivative component, the DRAG-pulse parameter.

  • theta – Angle in degrees to rotate around an equatorial axis on the Bloch sphere.

  • phi – Phase of the pulse in degrees.

  • port – Name of the port where the pulse is played.

  • duration – Duration of the pulse in seconds.

  • clock – Name of the clock used to modulate the pulse.

  • reference_magnitude (ReferenceMagnitude,) – Optional scaling value and unit for the unitless amplitude. Uses settings in hardware config if not provided.

Returns:

: DRAGPulse operation.

rxy_gauss_pulse(amp180: float, theta: float, phi: float, port: str, duration: float, clock: str, reference_magnitude: qblox_scheduler.operations.pulse_library.ReferenceMagnitude | None = None) qblox_scheduler.operations.pulse_library.GaussPulse[source]#

Generate a Gaussian drive with GaussPulse that achieves the right rotation angle theta based on a calibrated pi-pulse amplitude.

Parameters:
  • amp180 – Unitless amplitude of excitation pulse to get the maximum 180 degree theta.

  • theta – Angle in degrees to rotate around an equatorial axis on the Bloch sphere.

  • phi – Phase of the pulse in degrees.

  • port – Name of the port where the pulse is played.

  • duration – Duration of the pulse in seconds.

  • clock – Name of the clock used to modulate the pulse.

  • reference_magnitude (ReferenceMagnitude,) – Optional scaling value and unit for the unitless amplitude. Uses settings in hardware config if not provided.

Returns:

: GaussPulse operation.

rxy_pulse(amp180: float, skewness: float, theta: float, phi: float, port: str, duration: float, clock: str, pulse_shape: Literal['SkewedHermitePulse', 'GaussPulse'], reference_magnitude: qblox_scheduler.operations.pulse_library.ReferenceMagnitude | None = None) qblox_scheduler.operations.pulse_library.SkewedHermitePulse | qblox_scheduler.operations.pulse_library.GaussPulse[source]#

Generate a Hermite or Gaussian drive pulse for a specified rotation on the Bloch sphere.

The pulse achieves the desired rotation angle theta using a calibrated pi-pulse amplitude amp180. The shape of the pulse can be either a skewed Hermite pulse or a Gaussian pulse, depending on the specified pulse_shape.

Parameters:
  • amp180 (float) – Unitless amplitude of the excitation pulse for a 180-degree rotation.

  • skewness (float) – Amplitude correction for the Hermite pulse. A value of 0 results in a standard Hermite pulse.

  • theta (float) – Rotation angle around an equatorial axis on the Bloch sphere, in degrees.

  • phi (float) – Phase of the pulse, in degrees.

  • port (str) – Name of the port where the pulse will be played.

  • duration (float) – Duration of the pulse, in seconds.

  • clock (str) – Name of the clock used to modulate the pulse.

  • pulse_shape (Literal["SkewedHermitePulse", "GaussPulse"]) – Shape of the pulse to be generated.

  • reference_magnitude (pulse_library.ReferenceMagnitude | None, Optional) – Reference magnitude for hardware configuration. If not provided, defaults to None.

Returns:

pulse_library.SkewedHermitePulse | pulse_library.GaussPulse The generated pulse operation based on the specified shape and parameters.

spin_init_pulse(square_duration: float, ramp_diff: float, parent_port: str, parent_clock: str, parent_square_amp: float, parent_ramp_amp: float, parent_ramp_rate: float, child_port: str, child_clock: str, child_square_amp: float, child_ramp_amp: float, child_ramp_rate: float) qblox_scheduler.schedules.TimeableSchedule[source]#

Device compilation of the spin init operation.

class ChirpPulse(amp: float | qblox_scheduler.operations.expressions.Expression | collections.abc.Sequence[float | qblox_scheduler.operations.expressions.Expression], duration: float | qblox_scheduler.operations.expressions.Expression, port: str, clock: str, start_freq: float | qblox_scheduler.operations.expressions.Expression, end_freq: float | qblox_scheduler.operations.expressions.Expression, reference_magnitude: ReferenceMagnitude | None = None, t0: float | qblox_scheduler.operations.expressions.Expression = 0)[source]#

Bases: qblox_scheduler.operations.operation.Operation

A linear chirp signal. A sinusoidal signal that ramps up in frequency.

Parameters:
  • amp – Unitless amplitude of the envelope.

  • duration – Duration of the pulse.

  • port – The port of the pulse.

  • clock – Clock used to modulate the pulse.

  • start_freq – Start frequency of the Chirp. Note that this is the frequency at which the waveform is calculated, this may differ from the clock frequency.

  • end_freq – End frequency of the Chirp.

  • reference_magnitude – Scaling value and unit for the unitless amplitude. Uses settings in hardware config if not provided.

  • t0 – Shift of the start time with respect to the start of the operation.

class DRAGPulse(amplitude: float | qblox_scheduler.operations.expressions.Expression, beta: float, phase: float | qblox_scheduler.operations.expressions.Expression, duration: float | qblox_scheduler.operations.expressions.Expression, port: str, clock: str, reference_magnitude: ReferenceMagnitude | None = None, sigma: float | qblox_scheduler.operations.expressions.Expression | None = None, t0: float | qblox_scheduler.operations.expressions.Expression = 0)[source]#

Bases: qblox_scheduler.operations.operation.Operation

A Gaussian pulse with a derivative component added to the out-of-phase channel. It uses the specified amplitude and sigma. If sigma is not specified it is set to 1/4 of the duration.

The DRAG pulse is intended for single qubit gates in transmon based systems. It can be calibrated to reduce unwanted excitations of the \(|1\rangle - |2\rangle\) transition (:cite:t:`motzoi_simple_2009` and :cite:t:`gambetta_analytic_2011`).

The waveform is generated using waveforms.drag() .

Parameters:
  • amplitude – Unitless amplitude of the Gaussian envelope.

  • beta – Unitless amplitude of the derivative component, the DRAG-pulse parameter.

  • duration – The pulse duration in seconds.

  • phase – Phase of the pulse in degrees.

  • clock – Clock used to modulate the pulse.

  • port – Port of the pulse, must be capable of carrying a complex waveform.

  • reference_magnitude – Scaling value and unit for the unitless amplitude. Uses settings in hardware config if not provided.

  • sigma – Width of the Gaussian envelope in seconds. If not provided, the sigma is set to 1/4 of the duration.

  • t0 – Time in seconds when to start the pulses relative to the start time of the Operation in the TimeableSchedule.

class GaussPulse(amplitude: float | qblox_scheduler.operations.expressions.Expression, phase: float | qblox_scheduler.operations.expressions.Expression, duration: float | qblox_scheduler.operations.expressions.Expression, port: str, clock: str = BasebandClockResource.IDENTITY, reference_magnitude: ReferenceMagnitude | None = None, sigma: float | qblox_scheduler.operations.expressions.Expression | None = None, t0: float | qblox_scheduler.operations.expressions.Expression = 0)[source]#

Bases: qblox_scheduler.operations.operation.Operation

The GaussPulse Operation is a real-valued pulse with the specified amplitude and sigma. If sigma is not specified it is set to 1/4 of the duration.

The waveform is generated using waveforms.drag() with a beta set to zero, corresponding to a Gaussian pulse.

Parameters:
  • amplitude – Unitless amplitude of the Gaussian envelope.

  • duration – The pulse duration in seconds.

  • phase – Phase of the pulse in degrees.

  • clock – Clock used to modulate the pulse. By default the baseband clock.

  • port – Port of the pulse, must be capable of carrying a complex waveform.

  • reference_magnitude – Scaling value and unit for the unitless amplitude. Uses settings in hardware config if not provided.

  • sigma – Width of the Gaussian envelope in seconds. If not provided, the sigma is set to 1/4 of the duration.

  • t0 – Time in seconds when to start the pulses relative to the start time of the Operation in the TimeableSchedule.

class IdlePulse(duration: float | qblox_scheduler.operations.expressions.Expression)[source]#

Bases: qblox_scheduler.operations.operation.Operation

The IdlePulse Operation is a placeholder for a specified duration of time.

Parameters:

duration – The duration of idle time in seconds.

class MarkerPulse(duration: float | qblox_scheduler.operations.expressions.Expression, port: str, t0: float | qblox_scheduler.operations.expressions.Expression = 0, clock: str = DigitalClockResource.IDENTITY, fine_start_delay: float | qblox_scheduler.operations.expressions.Expression = 0, fine_end_delay: float | qblox_scheduler.operations.expressions.Expression = 0)[source]#

Bases: qblox_scheduler.operations.operation.Operation

Digital pulse that is HIGH for the specified duration.

Marker pulse is played on marker output. Currently only implemented for Qblox backend.

Parameters:
  • duration – Duration of the HIGH signal.

  • port – Name of the associated port.

  • t0 – Time in seconds when to start the pulses relative to the start time of the Operation in the TimeableSchedule.

  • clock – Name of the associated clock. By default DigitalClockResource. This only needs to be specified if a custom clock name is used for a digital channel (for example, when a port-clock combination of a device element is used with a digital channel).

  • fine_start_delay – Delays the start of the pulse by the given amount in seconds. Does not delay the start time of the operation in the schedule. If the hardware supports it, this parameter can be used to shift the pulse by a small amount of time, independent of the hardware instruction timing grid. Currently only implemented for Qblox QTM modules, which allow only positive values for this parameter. By default 0.

  • fine_end_delay – Delays the end of the pulse by the given amount in seconds. Does not delay the end time of the operation in the schedule. If the hardware supports it, this parameter can be used to shift the pulse by a small amount of time, independent of the hardware instruction timing grid. Currently only implemented for Qblox QTM modules, which allow only positive values for this parameter. By default 0.

class NumericalPulse(samples: numpy.ndarray | list, t_samples: numpy.ndarray | list, port: str, clock: str = BasebandClockResource.IDENTITY, gain: complex | float | qblox_scheduler.operations.expressions.Expression | collections.abc.Sequence[complex | float | qblox_scheduler.operations.expressions.Expression] = 1, reference_magnitude: ReferenceMagnitude | None = None, t0: float | qblox_scheduler.operations.expressions.Expression = 0, interpolation: str = 'linear')[source]#

Bases: qblox_scheduler.operations.operation.Operation

A pulse where the shape is determined by specifying an array of (complex) points.

If points are required between the specified samples (such as could be required by the sampling rate of the hardware), meaning \(t[n] < t' < t[n+1]\), scipy.interpolate.interp1d will be used to interpolate between the two points and determine the value.

Parameters:
  • samples – An array of (possibly complex) values specifying the shape of the pulse.

  • t_samples – An array of values specifying the corresponding times at which the samples are evaluated.

  • port – The port that the pulse should be played on.

  • clock – Clock used to (de)modulate the pulse. By default the baseband clock.

  • gain – Gain factor between -1 and 1 that multiplies with the samples, by default 1.

  • reference_magnitude – Scaling value and unit for the unitless samples. Uses settings in hardware config if not provided.

  • t0 – Time in seconds when to start the pulses relative to the start time of the Operation in the TimeableSchedule.

  • interpolation – Specifies the type of interpolation used. This is passed as the “kind” argument to scipy.interpolate.interp1d.

class RampPulse(amp: float | qblox_scheduler.operations.expressions.Expression, duration: float | qblox_scheduler.operations.expressions.Expression, port: str, clock: str = BasebandClockResource.IDENTITY, reference_magnitude: ReferenceMagnitude | None = None, offset: float | qblox_scheduler.operations.expressions.Expression = 0, t0: float | qblox_scheduler.operations.expressions.Expression = 0)[source]#

Bases: qblox_scheduler.operations.operation.Operation

RampPulse Operation is a pulse that ramps from zero to a set amplitude over its duration.

The pulse is given as a function of time \(t\) and the parameters offset and amplitude by

\[P(t) = \mathrm{offset} + t \times \mathrm{amp}.\]
Parameters:
  • amp – Unitless amplitude of the ramp envelope function.

  • duration – The pulse duration in seconds.

  • offset – Starting point of the ramp pulse

  • port – Port of the pulse.

  • clock – Clock used to modulate the pulse. By default the baseband clock.

  • reference_magnitude – Scaling value and unit for the unitless amplitude. Uses settings in hardware config if not provided.

  • t0 – Time in seconds when to start the pulses relative to the start time of the Operation in the TimeableSchedule.

class ReferenceMagnitude[source]#

Dataclass defining a reference level for pulse amplitudes in units of ‘V’, ‘dBm’, or ‘A’.

TODO: Deprecate?

value: float#
unit: Literal['V', 'dBm', 'A']#
classmethod from_parameter(parameter: qblox_scheduler.device_under_test.transmon_element.ReferenceMagnitude | None) ReferenceMagnitude | None[source]#

Initialize from ReferenceMagnitude QCoDeS InstrumentChannel values.

class ResetClockPhase(clock: str, t0: float | qblox_scheduler.operations.expressions.Expression = 0)[source]#

Bases: qblox_scheduler.operations.operation.Operation

An operation that resets the phase of a clock.

Parameters:

clock – The clock of which to reset the phase.

class SetClockFrequency(clock: str, clock_freq_new: float | qblox_scheduler.operations.expressions.Expression | None, t0: float | qblox_scheduler.operations.expressions.Expression = 0)[source]#

Bases: qblox_scheduler.operations.operation.Operation

Operation that sets updates the frequency of a clock.

This is a low-level operation and therefore depends on the backend.

Currently only implemented for Qblox backend, refer to NcoSetClockFrequencyStrategy for more details.

Parameters:
  • clock – The clock for which a new frequency is to be set.

  • clock_freq_new – The new frequency in Hz. If None, it will reset to the clock frequency set by the configuration or resource.

  • t0 – Time in seconds when to execute the command relative to the start time of the Operation in the TimeableSchedule.

class ShiftClockPhase(phase_shift: float | qblox_scheduler.operations.expressions.Expression, clock: str, t0: float | qblox_scheduler.operations.expressions.Expression = 0)[source]#

Bases: qblox_scheduler.operations.operation.Operation

Operation that shifts the phase of a clock by a specified amount.

This is a low-level operation and therefore depends on the backend.

Currently only implemented for Qblox backend, refer to NcoPhaseShiftStrategy for more details.

Parameters:
  • phase_shift – The phase shift in degrees.

  • clock – The clock of which to shift the phase.

  • t0 – Time in seconds when to execute the command relative to the start time of the Operation in the TimeableSchedule.

class SkewedHermitePulse(duration: float | qblox_scheduler.operations.expressions.Expression, amplitude: float | qblox_scheduler.operations.expressions.Expression, skewness: float | qblox_scheduler.operations.expressions.Expression, phase: float | qblox_scheduler.operations.expressions.Expression, port: str, clock: str, reference_magnitude: ReferenceMagnitude | None = None, t0: float | qblox_scheduler.operations.expressions.Expression = 0)[source]#

Bases: qblox_scheduler.operations.operation.Operation

Hermite pulse intended for single qubit gates in diamond based systems.

The waveform is generated using skewed_hermite().

Parameters:
  • duration – The pulse duration in seconds.

  • amplitude – Unitless amplitude of the hermite pulse.

  • skewness – Skewness in the frequency space.

  • phase – Phase of the pulse in degrees.

  • clock – Clock used to modulate the pulse.

  • port – Port of the pulse, must be capable of carrying a complex waveform.

  • reference_magnitude – Scaling value and unit for the unitless amplitude. Uses settings in hardware config if not provided.

  • t0 – Time in seconds when to start the pulses relative to the start time of the Operation in the TimeableSchedule. By default 0.

class SoftSquarePulse(amp: float | qblox_scheduler.operations.expressions.Expression | collections.abc.Sequence[float | qblox_scheduler.operations.expressions.Expression], duration: float | qblox_scheduler.operations.expressions.Expression, port: str, clock: str = BasebandClockResource.IDENTITY, reference_magnitude: ReferenceMagnitude | None = None, t0: float | qblox_scheduler.operations.expressions.Expression = 0)[source]#

Bases: qblox_scheduler.operations.operation.Operation

A real valued square pulse convolved with a Hann window for smoothing.

Parameters:
  • amp – Unitless amplitude of the envelope.

  • duration – The pulse duration in seconds.

  • port – Port of the pulse, must be capable of playing a complex waveform.

  • clock – Clock used to modulate the pulse. By default the baseband clock.

  • reference_magnitude – Scaling value and unit for the unitless amplitude. Uses settings in hardware config if not provided.

  • t0 – Time in seconds when to start the pulses relative to the start time of the Operation in the TimeableSchedule.

class SquarePulse(amp: complex | float | qblox_scheduler.operations.expressions.Expression | collections.abc.Sequence[complex | float | qblox_scheduler.operations.expressions.Expression], duration: complex | float | qblox_scheduler.operations.expressions.Expression, port: str, clock: str = BasebandClockResource.IDENTITY, reference_magnitude: ReferenceMagnitude | None = None, t0: float | qblox_scheduler.operations.expressions.Expression = 0)[source]#

Bases: qblox_scheduler.operations.operation.Operation

A real-valued pulse with the specified amplitude during the pulse.

Parameters:
  • amp – Unitless complex valued amplitude of the envelope.

  • duration – The pulse duration in seconds.

  • port – Port of the pulse, must be capable of playing a complex waveform.

  • clock – Clock used to modulate the pulse. By default the baseband clock.

  • reference_magnitude – Scaling value and unit for the unitless amplitude. Uses settings in hardware config if not provided.

  • t0 – Time in seconds when to start the pulses relative to the start time of the Operation in the TimeableSchedule.

class StaircasePulse(start_amp: float | qblox_scheduler.operations.expressions.Expression, final_amp: float | qblox_scheduler.operations.expressions.Expression, num_steps: int, duration: float | qblox_scheduler.operations.expressions.Expression, port: str, clock: str = BasebandClockResource.IDENTITY, reference_magnitude: ReferenceMagnitude | None = None, t0: float | qblox_scheduler.operations.expressions.Expression = 0)[source]#

Bases: qblox_scheduler.operations.operation.Operation

A real valued staircase pulse, which reaches it’s final amplitude in discrete steps.

In between it will maintain a plateau.

Parameters:
  • start_amp – Starting unitless amplitude of the staircase envelope function.

  • final_amp – Final unitless amplitude of the staircase envelope function.

  • num_steps – The number of plateaus.

  • duration – Duration of the pulse in seconds.

  • port – Port of the pulse.

  • clock – Clock used to modulate the pulse. By default the baseband clock.

  • reference_magnitude – Scaling value and unit for the unitless amplitude. Uses settings in hardware config if not provided.

  • t0 – Time in seconds when to start the pulses relative to the start time of the Operation in the TimeableSchedule.

class SuddenNetZeroPulse(amp_A: float | qblox_scheduler.operations.expressions.Expression, amp_B: float | qblox_scheduler.operations.expressions.Expression, net_zero_A_scale: float | qblox_scheduler.operations.expressions.Expression, t_pulse: float | qblox_scheduler.operations.expressions.Expression, t_phi: float | qblox_scheduler.operations.expressions.Expression, t_integral_correction: float | qblox_scheduler.operations.expressions.Expression, port: str, clock: str = BasebandClockResource.IDENTITY, reference_magnitude: ReferenceMagnitude | None = None, t0: float | qblox_scheduler.operations.expressions.Expression = 0)[source]#

Bases: qblox_scheduler.operations.operation.Operation

A pulse that can be used to implement a conditional phase gate in transmon device elements.

The sudden net-zero (SNZ) pulse is defined in :cite:t:`negirneac_high_fidelity_2021`.

Parameters:
  • amp_A – Unitless amplitude of the main square pulse.

  • amp_B – Unitless scaling correction for the final sample of the first square and first sample of the second square pulse.

  • net_zero_A_scale – Amplitude scaling correction factor of the negative arm of the net-zero pulse.

  • t_pulse – The total duration of the two half square pulses

  • t_phi – The idling duration between the two half pulses

  • t_integral_correction – The duration in which any non-zero pulse amplitude needs to be corrected.

  • port – Port of the pulse, must be capable of playing a complex waveform.

  • clock – Clock used to modulate the pulse. By default the baseband clock.

  • reference_magnitude – Scaling value and unit for the unitless amplitude. Uses settings in hardware config if not provided.

  • t0 – Time in seconds when to start the pulses relative to the start time of the Operation in the TimeableSchedule.

class Timestamp(port: str, t0: float | qblox_scheduler.operations.expressions.Expression = 0, clock: str = DigitalClockResource.IDENTITY)[source]#

Bases: qblox_scheduler.operations.operation.Operation

Operation that marks a time reference for timetags.

Specifically, all timetags in Timetag and TimetagTrace are measured relative to the timing of this operation, if they have a matching port and clock, and if time_ref=TimeRef.TIMESTAMP is given as an argument.

Parameters:
  • port – The same port that the timetag acquisition is defined on.

  • clock – The same clock that the timetag acquisition is defined on.

  • t0 – Time offset (in seconds) of this Operation, relative to the start time in the TimeableSchedule. By default 0.

class VoltageOffset(offset_path_I: float | qblox_scheduler.operations.expressions.Expression, offset_path_Q: float | qblox_scheduler.operations.expressions.Expression, port: str, clock: str = BasebandClockResource.IDENTITY, t0: float | qblox_scheduler.operations.expressions.Expression = 0, reference_magnitude: ReferenceMagnitude | None = None)[source]#

Bases: qblox_scheduler.operations.operation.Operation

Operation that represents setting a constant offset to the output voltage.

Please refer to sec-qblox-offsets-long-voltage-offsets in the reference guide for more details.

Parameters:
  • offset_path_I (float) – Offset of path I.

  • offset_path_Q (float) – Offset of path Q.

  • port (str) – Port of the voltage offset.

  • clock (str, Optional) – Clock used to modulate the voltage offset. By default the baseband clock.

  • t0 (float, Optional) – Time in seconds when to start the pulses relative to the start time of the Operation in the TimeableSchedule.

  • reference_magnitude – Scaling value and unit for the unitless amplitude. Uses settings in hardware config if not provided.

class WindowOperation(window_name: str, duration: float | qblox_scheduler.operations.expressions.Expression, t0: float | qblox_scheduler.operations.expressions.Expression = 0.0)[source]#

Bases: qblox_scheduler.operations.operation.Operation

The WindowOperation is an operation for visualization purposes.

The WindowOperation has a starting time and duration.

property window_name: str#

Return the window name of this operation.