Source code for qblox_scheduler.backends.qblox.operations.pulse_library
# Repository: https://gitlab.com/qblox/packages/software/qblox-scheduler
# Licensed according to the LICENSE file on the main branch
#
# Copyright 2020-2025, Quantify Consortium
# Copyright 2025, Qblox B.V.
"""Standard pulse-level operations for use with the qblox_scheduler."""
from __future__ import annotations
from qblox_scheduler.operations.operation import Operation
from qblox_scheduler.resources import BasebandClockResource
[docs]
class SinglePortNetZeroPulse(Operation):
"""
Play a pulse to remove any accumulated DC bias from the given ports.
As opposed to :class:`~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.
port
The port of the net-zero pulse.
clock
The clock of the net-zero pulse. By default the baseband clock.
"""
def __init__(
self,
max_duration: float,
port: str,
clock: str = BasebandClockResource.IDENTITY,
t0: float = 0.0,
) -> None:
super().__init__(name="SinglePortNetZeroPulse")
self.data.update(
{
"pulse_info": {
"wf_func": None,
"net_zero_pulse": True,
"duration": max_duration,
"port": port,
"clock": clock,
"t0": t0,
},
}
)
[docs]
class SinglePortResetNetZero(Operation):
"""
Reset the DC bias accumulator to zero without playing any compensation pulse.
Parameters
----------
port
The port of the net-zero pulse.
clock
The clock of the net-zero pulse. By default the baseband clock.
"""
def __init__(
self,
port: str,
clock: str = BasebandClockResource.IDENTITY,
t0: float = 0.0,
) -> None:
super().__init__(name="SinglePortResetNetZero")
self.data.update(
{
"pulse_info": {
"wf_func": None,
"reset_netzero": True,
"duration": 0,
"port": port,
"clock": clock,
"t0": t0,
},
}
)