qblox_scheduler.operations.pulse_compensation_library#

Pulse compensation operations for use with the qblox_scheduler.

Attributes#

Port

Port on the hardware; this is an alias to str.

Classes#

PulseCompensation

Apply pulse compensation to an operation or schedule.

NetZeroPulse

Play a pulse to remove any accumulated DC bias from the given ports.

ResetNetZero

Reset the DC bias accumulator to zero without playing any compensation pulse.

Module Contents#

Port[source]#

Port on the hardware; this is an alias to str.

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, min_duration: 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.

  • min_duration – The minimum duration of the compensation pulse.

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

Body of a pulse compensation.

property max_compensation_amp: dict[Port, float][source]#

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

property time_grid: float[source]#

Grid time of the duration of the compensation pulse.

property sampling_rate: float[source]#

Sampling rate for pulse integration calculation.

property min_duration: float[source]#

The minimum duration of the compensation pulse.

class NetZeroPulse(max_duration: float, *, ports: list[str] | None = None, device_elements: str | collections.abc.Iterable[str] | None = None)[source]#

Bases: qblox_scheduler.operations.operation.Operation

Play a pulse to remove any accumulated DC bias from the given ports.

As opposed to PulseCompensation, the bias correction is calculated by the hardware at runtime, instead of by software at compile-time.

Parameters:
  • max_duration – The maximum duration of the pulse, in seconds.

  • ports – The ports to be compensated.

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

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.

property duration: float[source]#

Determine operation duration from pulse_info.

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

property valid_pulse: bool[source]#

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

property max_duration: float[source]#

The maximum duration of the pulse, in seconds.

The compiler treats this as the normal pulse duration.

class ResetNetZero(*, ports: list[str] | None = None, device_elements: str | collections.abc.Iterable[str] | None = None)[source]#

Bases: qblox_scheduler.operations.operation.Operation

Reset the DC bias accumulator to zero without playing any compensation pulse.

Parameters:
  • ports – The ports to be compensated.

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

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.

property duration: float[source]#

Determine operation duration from pulse_info.

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

property valid_pulse: bool[source]#

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