qibolab.instruments package#
Subpackages#
- qibolab.instruments.qblox package
- Submodules
- qibolab.instruments.qblox.cluster module
- qibolab.instruments.qblox.cluster_qcm_bb module
ClusterQCM_BB_Settings
ClusterQCM_BB
ClusterQCM_BB.name
ClusterQCM_BB.address
ClusterQCM_BB.device
ClusterQCM_BB.DEFAULT_SEQUENCERS
ClusterQCM_BB.SAMPLING_RATE
ClusterQCM_BB.FREQUENCY_LIMIT
ClusterQCM_BB.property_wrapper()
ClusterQCM_BB.sequencer_property_wrapper()
ClusterQCM_BB.connect()
ClusterQCM_BB.setup()
ClusterQCM_BB.get_if()
ClusterQCM_BB.process_pulse_sequence()
ClusterQCM_BB.upload()
ClusterQCM_BB.play_sequence()
ClusterQCM_BB.start()
ClusterQCM_BB.stop()
ClusterQCM_BB.disconnect()
- qibolab.instruments.qblox.cluster_qcm_rf module
ClusterQCM_RF_Settings
ClusterQCM_RF
ClusterQCM_RF.name
ClusterQCM_RF.address
ClusterQCM_RF.device
ClusterQCM_RF.channels
ClusterQCM_RF.DEFAULT_SEQUENCERS
ClusterQCM_RF.SAMPLING_RATE
ClusterQCM_RF.FREQUENCY_LIMIT
ClusterQCM_RF.property_wrapper()
ClusterQCM_RF.sequencer_property_wrapper()
ClusterQCM_RF.connect()
ClusterQCM_RF.setup()
ClusterQCM_RF.get_if()
ClusterQCM_RF.process_pulse_sequence()
ClusterQCM_RF.upload()
ClusterQCM_RF.play_sequence()
ClusterQCM_RF.start()
ClusterQCM_RF.stop()
ClusterQCM_RF.disconnect()
- qibolab.instruments.qblox.cluster_qrm_rf module
ClusterQRM_RF_Settings
ClusterQRM_RF
ClusterQRM_RF.name
ClusterQRM_RF.address
ClusterQRM_RF.device
ClusterQRM_RF.classification_parameters
ClusterQRM_RF.qubit_id
ClusterQRM_RF.threshold
ClusterQRM_RF.channels
ClusterQRM_RF.DEFAULT_SEQUENCERS
ClusterQRM_RF.SAMPLING_RATE
ClusterQRM_RF.FREQUENCY_LIMIT
ClusterQRM_RF.property_wrapper()
ClusterQRM_RF.sequencer_property_wrapper()
ClusterQRM_RF.connect()
ClusterQRM_RF.setup()
ClusterQRM_RF.get_if()
ClusterQRM_RF.process_pulse_sequence()
ClusterQRM_RF.upload()
ClusterQRM_RF.play_sequence()
ClusterQRM_RF.acquire()
ClusterQRM_RF.start()
ClusterQRM_RF.stop()
ClusterQRM_RF.disconnect()
- qibolab.instruments.qblox.controller module
- qibolab.instruments.qblox.debug module
- qibolab.instruments.qblox.port module
- qibolab.instruments.qblox.q1asm module
- qibolab.instruments.qblox.sequencer module
- qibolab.instruments.qblox.sweeper module
- qibolab.instruments.qm package
- Submodules
- qibolab.instruments.qm.acquisition module
- qibolab.instruments.qm.config module
PortId
IQPortId
QMPort
QMConfig
QMConfig.version
QMConfig.controllers
QMConfig.elements
QMConfig.pulses
QMConfig.waveforms
QMConfig.digital_waveforms
QMConfig.integration_weights
QMConfig.mixers
QMConfig.register_analog_output_controllers()
QMConfig.iq_imbalance()
QMConfig.register_drive_element()
QMConfig.register_readout_element()
QMConfig.register_flux_element()
QMConfig.register_element()
QMConfig.register_pulse()
QMConfig.register_waveform()
QMConfig.register_integration_weights()
- qibolab.instruments.qm.driver module
QMOPX
QMOPX.PortType
QMOPX.name
QMOPX.address
QMOPX.manager
QMOPX.config
QMOPX.is_connected
QMOPX.time_of_flight
QMOPX.smearing
QMOPX.script_file_name
QMOPX.connect()
QMOPX.setup()
QMOPX.start()
QMOPX.stop()
QMOPX.disconnect()
QMOPX.execute_program()
QMOPX.fetch_results()
QMOPX.play()
QMOPX.sweep()
QMOPX.play_sequences()
- qibolab.instruments.qm.sequence module
- qibolab.instruments.qm.simulator module
- qibolab.instruments.qm.sweepers module
- qibolab.instruments.rfsoc package
- Submodules
- qibolab.instruments.rfsoc.convert module
- qibolab.instruments.rfsoc.driver module
RFSoCPort
RFSoC
RFSoC.cfg
RFSoC.PortType
RFSoC.connect()
RFSoC.start()
RFSoC.stop()
RFSoC.disconnect()
RFSoC.setup()
RFSoC.play()
RFSoC.play_sequences()
RFSoC.validate_input_command()
RFSoC.update_cfg()
RFSoC.classify_shots()
RFSoC.play_sequence_in_sweep_recursion()
RFSoC.recursive_python_sweep()
RFSoC.merge_sweep_results()
RFSoC.get_if_python_sweep()
RFSoC.convert_sweep_results()
RFSoC.sweep()
Submodules#
qibolab.instruments.abstract module#
- class qibolab.instruments.abstract.Instrument(name, address)[source]#
Bases:
ABC
Parent class for all the instruments connected via TCPIP.
- class qibolab.instruments.abstract.Controller(name, address)[source]#
Bases:
Instrument
Instrument that can play pulses (using waveform generator).
- ports(port_name)[source]#
Get ports associated to this controller.
- Parameters:
port_name – Identifier for the port. The type of the identifier depends on the specialized port defined for each instrument.
- Returns:
qibolab.instruments.port.Port
object providing the interface for setting instrument parameters.
- abstract play(*args, **kwargs)[source]#
Play a pulse sequence and retrieve feedback.
- Returns:
(Dict[ResultType]) mapping the serial of the readout pulses used to the acquired
qibolab.result.ExecutionResults
object.
- exception qibolab.instruments.abstract.InstrumentException(instrument: Instrument, message: str)[source]#
Bases:
Exception
qibolab.instruments.dummy module#
- class qibolab.instruments.dummy.DummyPort(name: str, offset: float = 0.0, lo_frequency: int = 0, lo_power: int = 0, gain: int = 0, attenuation: int = 0, power_range: int = 0, filters: dict | None = None)[source]#
Bases:
Port
- lo_frequency: int = 0#
Local oscillator frequency for the given port. Relevant only for controllers with internal local oscillators.
- lo_power: int = 0#
Local oscillator power for the given port. Relevant only for controllers with internal local oscillators.
- class qibolab.instruments.dummy.DummyInstrument(name, address)[source]#
Bases:
Controller
Dummy instrument that returns random voltage values.
Useful for testing code without requiring access to hardware.
- Parameters:
- sampling_rate = 1#
- play(qubits: Dict[str | int, Qubit], sequence: PulseSequence, options: ExecutionParameters)[source]#
Play a pulse sequence and retrieve feedback.
- Returns:
(Dict[ResultType]) mapping the serial of the readout pulses used to the acquired
qibolab.result.ExecutionResults
object.
- play_sequences(qubits: Dict[str | int, Qubit], sequences: List[PulseSequence], options: ExecutionParameters)[source]#
Play pulses sequences by unrolling and retrieve feedback.
- Returns:
(Dict[List[ResultType]) mapping the serial of the readout pulses used to a list of the acquired
qibolab.result.ExecutionResults
object.
- sweep(qubits: Dict[str | int, Qubit], sequence: PulseSequence, options: ExecutionParameters, *sweepers: List[Sweeper])[source]#
Play a pulse sequence while sweeping one or more parameters.
- Returns:
(dict) mapping the serial of the readout pulses used to the acquired
qibolab.result.ExecutionResults
object.
qibolab.instruments.erasynth module#
ERAsynth drivers.
Supports the ERAsynth ++.
- class qibolab.instruments.erasynth.ERA(name, address, ethernet=True, reference_clock_source='internal')[source]#
Bases:
LocalOscillator
- property frequency#
- property power#
- setup(frequency=None, power=None, **kwargs)[source]#
Configures the instrument.
A connection to the instrument needs to be established beforehand.
- Parameters:
**kwargs – dict = A dictionary of settings loaded from the runcard: kwargs[“power”] kwargs[“frequency”]
- Raises:
Exception = If attempting to set a parameter without a connection to the instrument. –
qibolab.instruments.icarusq module#
- class qibolab.instruments.icarusq.TektronixAWG5204(name, address)[source]#
Bases:
Instrument
- rw_property_wrapper()#
- generate_waveforms_from_pulse(pulse: Pulse, time_array: ndarray)[source]#
Generates a numpy array based on the pulse parameters
- Parameters:
pulse (qibolab.pulses.Pulse | qibolab.pulses.ReadoutPulse) – Pulse to be compiled
time_array (numpy.ndarray) – Array corresponding to the global time
- translate(sequence: List[Pulse], nshots=None)[source]#
Translates the pulse sequence into a numpy array.
- Parameters:
sequence (qibolab.pulses.Pulse[]) – Array containing pulses to be fired on this instrument.
nshots (int) – Number of repetitions.
- class qibolab.instruments.icarusq.MCAttenuator(name, address)[source]#
Bases:
Instrument
Driver for the MiniCircuit RCDAT-8000-30 variable attenuator.
- class qibolab.instruments.icarusq.QuicSyn(name, address)[source]#
Bases:
Instrument
Driver for the National Instrument QuicSyn Lite local oscillator.
- class qibolab.instruments.icarusq.AlazarADC(name, address)[source]#
Bases:
Instrument
Driver for the AlazarTech ATS9371 ADC.
- play_sequence_and_acquire()[source]#
this method performs an acquisition, which is the get_cmd for the acquisiion parameter of this instrument :return:
- process_result(readout_frequency=100000000.0, readout_channels=[0, 1])[source]#
Returns the processed signal result from the ADC.
- Parameters:
- Returns:
Amplitude of the processed signal. phase (float): Phase shift of the processed signal in degrees. it (float): I component of the processed signal. qt (float): Q component of the processed signal.
- Return type:
ampl (float)
qibolab.instruments.icarusqfpga module#
- class qibolab.instruments.icarusqfpga.PulseBlaster(name, address, port=5000)[source]#
Bases:
Instrument
Driver for the 24-pin PulseBlaster TTL signal generator.
- class qibolab.instruments.icarusqfpga.IcarusQFPGA(name, address, port=8080)[source]#
Bases:
Instrument
Driver for the IcarusQ RFSoC socket-based implementation.
- setup(dac_sampling_rate, adcs_to_read, **kwargs)[source]#
Sets the sampling rate of the RFSoC. May need to be repeated several times due to multi-tile sync error.
- upload(waveform)[source]#
Uploads a numpy array of size DAC_CHANNELS X DAC_SAMPLE_SIZE to the PL memory.
- Parameters:
waveform (numpy.ndarray) – Numpy array of size DAC_CHANNELS X DAC_SAMPLE_SIZE with type signed short.
- play_sequence()[source]#
DACs are automatically armed for playbacked when waveforms are loaded, no need to signal
- play_sequence_and_acquire()[source]#
Signal the RFSoC to arm the ADC and start data transfer into PS memory. Starts a thread to listen for ADC data from the RFSoC.
- Parameters:
nshots (int) – Number of shots.
- result(readout_frequency, readout_channel)[source]#
Returns the processed signal result from the ADC.
- Parameters:
- Returns:
Amplitude of the processed signal. phase (float): Phase shift of the processed signal in degrees. it (float): I component of the processed signal. qt (float): Q component of the processed signal.
- Return type:
ampl (float)
qibolab.instruments.oscillator module#
- class qibolab.instruments.oscillator.LocalOscillator(name, address)[source]#
Bases:
Instrument
Abstraction for local oscillator instruments.
Local oscillators are used to upconvert signals, when the controllers cannot send sufficiently high frequencies to address the qubits and resonators. They cannot be used to play or sweep pulses.
- property frequency#
- property power#
qibolab.instruments.port module#
- class qibolab.instruments.port.Port[source]#
Bases:
object
Abstract interface for instrument parameters.
These parameters are exposed to the user through
qibolab.channels.Channel
.Drivers should subclass this interface and implement the getters and setters for all the parameters that are available for the corresponding instruments.
Each port is identified by the
name
attribute. Note that the type of the identifier can be different of each port implementation.- lo_frequency: float#
Local oscillator frequency for the given port. Relevant only for controllers with internal local oscillators.
qibolab.instruments.qutech module#
Class to interface with the SPI Rack Qutech Delft.
- class qibolab.instruments.qutech.SPI(name, address)[source]#
Bases:
Instrument
- property_wrapper(device, *parameter)#
qibolab.instruments.rohde_schwarz module#
RohdeSchwarz driver.
- Supports the following Instruments:
SGS100A
- class qibolab.instruments.rohde_schwarz.SGS100A(name, address, ref_osc_source='EXT')[source]#
Bases:
LocalOscillator
- property frequency#
- property power#
- property ref_osc_source#
- setup(frequency=None, power=None, ref_osc_source=None, **kwargs)[source]#
Configures the instrument.
A connection to the instrument needs to be established beforehand.
- Parameters:
**kwargs – dict = A dictionary of settings loaded from the runcard: kwargs[“power”] kwargs[“frequency”]
- Raises:
Exception = If attempting to set a parameter without a connection to the instrument. –
qibolab.instruments.zhinst module#
Instrument for using the Zurich Instruments (Zhinst) devices.
- qibolab.instruments.zhinst.COMPILER_SETTINGS = {'SHFSG_FORCE_COMMAND_TABLE': True, 'SHFSG_MIN_PLAYWAVE_HINT': 32, 'SHFSG_MIN_PLAYZERO_HINT': 32}#
Translating to Zurich ExecutionParameters
- class qibolab.instruments.zhinst.ZhPort(name: Tuple[str, str], offset: float = 0.0, power_range: int = 0)[source]#
Bases:
Port
- class qibolab.instruments.zhinst.ZhPulse(pulse)[source]#
Bases:
object
Zurich pulse from qibolab pulse translation.
- pulse#
Qibolab pulse
- signal#
Line associated with the pulse
- zhpulse#
Zurich pulse
- class qibolab.instruments.zhinst.ZhSweeper(pulse, sweeper, qubit)[source]#
Bases:
object
Zurich sweeper from qibolab sweeper for pulse parameters Amplitude, Duration, Frequency (and maybe Phase)
- sweeper#
Qibolab sweeper
- pulse#
Qibolab pulse associated to the sweeper
- signal#
Line associated with the pulse
- zhpulse#
Zurich pulse associated to the sweeper
- zhsweeper#
Zurich sweeper
- zhsweepers#
Zurich sweepers, Need something better to store multiple sweeps on the same pulse
Not properly implemented as it was only used on Rabi amplitude vs lenght and it was an unused routine.
- class qibolab.instruments.zhinst.ZhSweeperLine(sweeper, qubit=None, sequence=None)[source]#
Bases:
object
Zurich sweeper from qibolab sweeper for non pulse parameters Bias, Delay (, power_range, local_oscillator frequency, offset ???)
For now Parameter.bias sweepers are implemented as Parameter.Amplitude on a flux pulse. We may want to keep this class separate for future Near Time sweeps
- sweeper#
Qibolab sweeper
- class qibolab.instruments.zhinst.Zurich(name, descriptor, use_emulation=False, time_of_flight=0.0, smearing=0.0)[source]#
Bases:
Controller
Zurich driver main class
- name: InstrumentId#
Setup name (str)
- descriptor#
Port and device mapping in yaml text (str)
It should be used as a template by adding extra lines for each of the different frequency pulses played thought the same port after parsing the sequence.
- emulation#
Enable emulation mode (bool)
- signal_map#
Signals to lines mapping
- calibration#
Zurich calibration object)
- device#
Zurich device parameters for connection
- chip#
Parameters read from the runcard not part of ExecutionParameters
- results#
Zurich experiment definitions
- acquisition_type#
To store if the AcquisitionType.SPECTROSCOPY needs to be enabled by parsing the sequence
- sequence#
Zurich pulse sequence
- nt_sweeps#
Storing sweepers
- calibration_step(qubits, options)[source]#
Zurich general pre experiment calibration definitions
Change to get frequencies from sequence
- register_readout_line(qubit, intermediate_frequency)[source]#
Registers qubit measure and acquire lines to calibration and signal map.
Note
To allow debugging with and oscilloscope, just set the following:
self.calibration[f"/logical_signal_groups/q{q}/measure_line"] = lo.SignalCalibration( ..., local_oscillator=lo.Oscillator( ... frequency=0.0, ), ..., port_mode=lo.PortMode.LF, ..., )
- register_drive_line(qubit, intermediate_frequency)[source]#
Registers qubit drive line to calibration and signal map.
- static frequency_from_pulses(qubits, sequence)[source]#
Gets the frequencies from the pulses to the qubits
- experiment_flow(qubits, sequence, options, sweepers=[])[source]#
Create the experiment object for the devices, following the steps separated one on each method: Translation, Calibration, Experiment Definition.
- select_exp(exp, qubits, exp_options)[source]#
Build Zurich Experiment selecting the relevant sections
- static play_sweep_select_single(exp, qubit, pulse, section, parameters, partial_sweep)[source]#
Play Zurich pulse when a single sweeper is involved
- static play_sweep_select_dual(exp, qubit, pulse, section, parameters)[source]#
Play Zurich pulse when a two sweepers are involved on the same pulse
- play_sweep(exp, qubit, pulse, section)[source]#
Takes care of playing the sweepers and involved pulses for different options
- measure_relax(exp, qubits, relaxation_time, acquisition_type)[source]#
qubit readout pulse, data acquisition and qubit relaxation
- fast_reset(exp, qubits, fast_reset)[source]#
Conditional fast reset after readout - small delay for signal processing This is a very naive approach that can be improved by repeating this step until we reach non fast reset fidelity https://quantum-computing.ibm.com/lab/docs/iql/manage/systems/reset/backend_reset
- static rearrange_sweepers(sweepers)[source]#
Rearranges sweepers from qibocal based on device hardware limitations
- sweep(qubits, sequence: PulseSequence, options, *sweepers)[source]#
Play pulse and sweepers sequence
- sweep_recursion(qubits, exp, exp_calib, exp_options)[source]#
Sweepers recursion for multiple nested Real Time sweepers
- sweep_recursion_nt(qubits, options, exp, exp_calib)[source]#
Sweepers recursion for Near Time sweepers. Faster than regular software sweepers as they are executed on the actual device by (software ? or slower hardware ones)
You want to avoid them so for now they are implement for a specific sweep.