Base program used by qibosoq to execute sequences and sweeps.
- class qibosoq.programs.base.BaseProgram(*args: Any, **kwargs: Any)#
Abstract class for QickPrograms.
- declare_nqz_zones(sequence: List[Pulse])#
Declare nqz zone (1-2) for a given PulseSequence.
sequence (PulseSequence) – sequence of pulses to consider
Declare ADCs downconversion frequencies.
- add_pulse_to_register(pulse: Pulse)#
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)#
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(pulse: Pulse, muxed_pulses_executed: List[Pulse], muxed_ro_executed_indexes: List[int])#
Register a readout pulse and perform a measurement.
- perform_experiment(soc: qick.QickSoc, average: bool = False) Tuple[list, list] #
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
Declare nqz zone for multiplexed readout.
- add_muxed_readout_to_register(ro_pulses: List[Rectangular])#
Register multiplexed pulse before firing it.
- group_mux_ro() list #
Create a list containing readout pulses grouped by start time.
Example of list: [[pulse1, pulse2], [pulse3]]
- abstract initialize()#
Flux program used by qibosoq to execute sequences and sweeps.
- class qibosoq.programs.flux.FluxProgram(*args: Any, **kwargs: Any)#
Abstract class for flux-tunable qubits programs.
- set_bias(mode: str = 'sweetspot')#
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
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.
Program used by qibosoq to execute sequences.
Program used by qibosoq to execute sweeps.
- qibosoq.programs.sweepers.reversed_sweepers(sweepers: Sweeper | Iterable[Sweeper]) List[Sweeper] #
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)#
Class to execute arbitrary PulseSequences with a single sweep.
- validate(sweeper: Sweeper)#
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)#
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__.