qibosoq.programs package#

Program modules.


qibosoq.programs.base module#

Base program used by qibosoq to execute sequences and sweeps.

class qibosoq.programs.base.BaseProgram(*args: Any, **kwargs: Any)[source]#

Bases: ABC, QickProgram

Abstract class for QickPrograms.

declare_nqz_zones(pulse_sequence: List[Pulse])[source]#

Declare nqz zone (1-2) for a given PulseSequence.


pulse_sequence (PulseSequence) – pulse_sequence of pulses to consider


Declare ADCs downconversion frequencies.

add_pulse_to_register(pulse: Pulse)[source]#

Call the set_pulse_registers function, needed before firing a pulse.


pulse (Pulse) – pulse object to load in the register

execute_drive_pulse(pulse: Pulse, last_pulse_registered: Dict)[source]#

Register a drive pulse if needed, then trigger the respective DAC.

A pulse gets register if: - it didn’t happen in initialize (self.pulses_registered is False) - it is not identical to the last pulse registered

execute_readout_pulse(elem: Element, muxed_pulses_executed: List[Element], muxed_ro_executed_indexes: List[int])[source]#

Register a readout pulse and perform a measurement.

perform_experiment(soc: qick.QickSoc, average: bool = False) Tuple[list, list][source]#

Call the acquire function, executing the experiment.

The acquire function is coded in qick.AveragerProgram or qick.NDAveragerProgram


average (bool) – if true return averaged res, otherwise single shots

collect_shots() Tuple[list, list][source]#

Read the internal buffers and returns single shots (i,q).


Declare nqz zone for multiplexed readout.

add_muxed_readout_to_register(ro_pulses: List[Rectangular])[source]#

Register multiplexed pulse before firing it.

group_mux_ro() list[source]#

Create a list containing readout pulses grouped by start time.

Example of list: [[pulse1, pulse2], [pulse3]]

abstract initialize()[source]#

Abstract initialization.

qibosoq.programs.flux module#

Flux program used by qibosoq to execute sequences and sweeps.

class qibosoq.programs.flux.FluxProgram(*args: Any, **kwargs: Any)[source]#

Bases: BaseProgram

Abstract class for flux-tunable qubits programs.

set_bias(mode: str = 'sweetspot')[source]#

Set qubits flux lines to a bias level.

Note that this fuction acts only on the qubits used in self.sequence. :param mode: can be ‘sweetspot’ or ‘zero’ :type mode: str

find_qubit_sweetspot(pulse: Pulse) float[source]#

Return bias of a qubit from flux pulse.

execute_flux_pulse(pulse: Pulse)[source]#

Fire a fast flux pulse the starts and ends in sweetspot.


Declare nqz = 1 for used flux channel.


Execute sequence of pulses.

For each pulses calls the add_pulse_to_register function (if not already registered) before firing it. If the pulse is a readout, it does a measurement and does not wait for the end of it. At the end of the sequence wait for meas and clock.

declare_zones_and_ro(sequence: List[Pulse])[source]#

Declare all nqz zones and readout frequencies.

Declares drives, fluxes and readout (mux or not) and readout freq.

qibosoq.programs.pulse_sequence module#

Program used by qibosoq to execute sequences.

class qibosoq.programs.pulse_sequence.ExecutePulseSequence(*args: Any, **kwargs: Any)[source]#

Bases: FluxProgram, AveragerProgram

Class to execute arbitrary PulseSequences.


Declre nyquist zones for all the DACs and all the readout frequencies.

Function called by AveragerProgram.__init__.

qibosoq.programs.sweepers module#

Program used by qibosoq to execute sweeps.

qibosoq.programs.sweepers.reversed_sweepers(sweepers: Sweeper | Iterable[Sweeper]) List[Sweeper][source]#

Ensure that sweepers is a list and reverse it.

This is because sweepers are handled by Qick in the opposite order.

class qibosoq.programs.sweepers.ExecuteSweeps(*args: Any, **kwargs: Any)[source]#

Bases: FluxProgram, NDAveragerProgram

Class to execute arbitrary PulseSequences with a single sweep.

validate(sweeper: Sweeper)[source]#

Check if a sweeper is valid.

In particular, it raises an error if:
  • sweeper is on bias, but not enough information has been given with the qubit

  • sweeper is on bias wih flux pulses in the sequence

  • sweeper is on flux pulses

  • sweeper is on duration

  • sweeper has pulse paramaters and bias

add_sweep_info(sweeper: Sweeper)[source]#

Register RfsocSweep objects.


sweeper – single qibolab sweeper object to register


Declre nyquist zones for all the DACs and all the readout frequencies.

Function called by AveragerProgram.__init__.