qibosoq.programs package¶
Program modules.
Submodules¶
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.
- Parameters:
pulse_sequence (PulseSequence) – pulse_sequence of pulses to consider
- add_pulse_to_register(pulse: Pulse)[source]¶
Call the set_pulse_registers function, needed before firing a pulse.
- Parameters:
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
- Parameters:
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).
- add_muxed_readout_to_register(ro_pulses: List[Rectangular])[source]¶
Register multiplexed pulse before firing it.
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
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.
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_bias(sweeper: Sweeper) List[Sweeper] [source]¶
Generate RfsocSweep objects for biases.
- Parameters:
sweeper – single qibolab sweeper object to register