silq.instrument_interfaces.keysight package¶
Subpackages¶
Submodules¶
silq.instrument_interfaces.keysight.E8267D_interface module¶
-
class
silq.instrument_interfaces.keysight.E8267D_interface.
E8267DInterface
(instrument_name, **kwargs)[source]¶ Bases:
silq.instrument_interfaces.interface.InstrumentInterface
Interface for the Keysight E8267D
When a
PulseSequence
is targeted in theLayout
, the pulses are directed to the appropriate interface. Each interface is responsible for translating all pulses directed to it into instrument commands. During the actual measurement, the instrument’s operations will correspond to that required by the pulse sequence.- Parameters
instrument_name – name of instrument for which this is an interface
Note
- For a given instrument, its associated interface can be found using
-
get_additional_pulses
(connections)[source]¶ Additional pulses needed by instrument after targeting of main pulses
-
class
silq.instrument_interfaces.keysight.E8267D_interface.
FrequencyRampPulseImplementation
(pulse_requirements=[])[source]¶ Bases:
silq.pulses.pulse_modules.PulseImplementation
-
get_additional_pulses
(interface)[source]¶ Provide any additional pulses needed such as triggering pulses
The additional pulses can be requested should usually have
Pulse
.connection_conditions specified to ensure that the pulse is sent to the right connection.- Parameters
interface (InstrumentInterface) – Interface to which this PulseImplementation belongs
- Returns
List of additional pulses needed.
- Return type
List[Pulse]
-
pulse_class
¶
-
target_pulse
(pulse, interface, **kwargs)[source]¶ Tailors a PulseImplementation to a specific pulse.
Targeting happens in three stages:
Both the pulse and pulse implementation are copied.
PulseImplementation
of the copied pulse is set to the copied pulse implementation, andPulseImplementation
.pulse is set to the copied pulse. This way, they can both reference each other.The targeted pulse is returned
- Parameters
pulse (Pulse) – Pulse to be targeted.
interface (InstrumentInterface) – PulseImplementation belongs.
connections (List[Connection]) – All connections in
Layout
.**kwargs – Additional unused kwargs
- Raises
TypeError – Pulse class does not match
PulseImplementation
.pulse_class
-
-
class
silq.instrument_interfaces.keysight.E8267D_interface.
SinePulseImplementation
(pulse_requirements=[])[source]¶ Bases:
silq.pulses.pulse_modules.PulseImplementation
-
get_additional_pulses
(interface)[source]¶ Provide any additional pulses needed such as triggering pulses
The additional pulses can be requested should usually have
Pulse
.connection_conditions specified to ensure that the pulse is sent to the right connection.- Parameters
interface (InstrumentInterface) – Interface to which this PulseImplementation belongs
- Returns
List of additional pulses needed.
- Return type
List[Pulse]
-
pulse_class
¶ alias of
silq.pulses.pulse_types.SinePulse
-
target_pulse
(pulse, interface, **kwargs)[source]¶ Tailors a PulseImplementation to a specific pulse.
Targeting happens in three stages:
Both the pulse and pulse implementation are copied.
PulseImplementation
of the copied pulse is set to the copied pulse implementation, andPulseImplementation
.pulse is set to the copied pulse. This way, they can both reference each other.The targeted pulse is returned
- Parameters
pulse (Pulse) – Pulse to be targeted.
interface (InstrumentInterface) – PulseImplementation belongs.
connections (List[Connection]) – All connections in
Layout
.**kwargs – Additional unused kwargs
- Raises
TypeError – Pulse class does not match
PulseImplementation
.pulse_class
-
silq.instrument_interfaces.keysight.Keysight_81180A_interface module¶
-
class
silq.instrument_interfaces.keysight.Keysight_81180A_interface.
DCPulseImplementation
(pulse_requirements=[])[source]¶ Bases:
silq.pulses.pulse_modules.PulseImplementation
-
static
implement
(pulse, sample_rate, max_points=6000)[source]¶ Implements a targeted pulse for an InstrumentInterface.
This method is called during
InstrumentInterface.setup
.Implementation of a targeted pulse is very dependent on the interface. For an AWG, this method may return a list of waveform points. For a triggering source, this method may return the triggering time. In very simple cases, this method may not even be necessary.
- Parameters
*args – Interface-specific args to use
**kwargs – Interface-specific kwargs to use
- Return type
- Returns
Instrument-specific return values.
See also
Other interface source codes may serve as a guide for this method.
-
pulse_class
¶ alias of
silq.pulses.pulse_types.DCPulse
-
static
-
class
silq.instrument_interfaces.keysight.Keysight_81180A_interface.
FrequencyRampPulseImplementation
(pulse_requirements=[])[source]¶ Bases:
silq.pulses.pulse_modules.PulseImplementation
-
implement
(sample_rate, plot=False, **kwargs)[source]¶ Implements a targeted pulse for an InstrumentInterface.
This method is called during
InstrumentInterface.setup
.Implementation of a targeted pulse is very dependent on the interface. For an AWG, this method may return a list of waveform points. For a triggering source, this method may return the triggering time. In very simple cases, this method may not even be necessary.
- Parameters
*args – Interface-specific args to use
**kwargs – Interface-specific kwargs to use
- Returns
Instrument-specific return values.
See also
Other interface source codes may serve as a guide for this method.
-
pulse_class
¶
-
-
class
silq.instrument_interfaces.keysight.Keysight_81180A_interface.
Keysight81180AInterface
(instrument_name, max_amplitude=1.5, **kwargs)[source]¶ Bases:
silq.instrument_interfaces.interface.InstrumentInterface
Notes
When the output is turned on, there is a certain ramping time of a few milliseconds. This negatively impacts the first repetition of a pulse sequence
To ensure voltage is fixed at final voltage of the pulse sequence during any pulse_sequence.final_delay, the first point of the first waveform of the sequence is set to that final voltage.
see
interface.additional_settings
for instrument settings that should be set manuallyWhen the last waveform of the sequence is finished, the time until the next trigger is spent at the voltages of the first point of the first waveform in the sequence. This includes any PulseSequence.final_delay. However, the behaviour should be that during this final_delay, the voltage is kept at the last point of the last waveform. To ensure this, the first point of the first waveform is modified to that of the last point of the last waveform.
Creation of a sine waveform needs certain settings. Defaults are given in the SinePulseImplementation, but they can be overridden by setting the corresponding property in
silq.config.properties.sine_waveform_settings
-
add_pulse_waveforms
(channel_name, waveform, loops, waveform_initial, waveform_tail, t_stop, sample_rate, pulse_name=None)[source]¶
-
add_single_waveform
(channel_name, waveform_array, allow_existing=True)[source]¶ Add waveform to instrument, uploading if necessary
If the waveform already exists on the instrument and allow_existing=True, the existing waveform is used and no new waveform is uploaded.
-
get_additional_pulses
(**kwargs)[source]¶ Additional pulses needed by instrument after targeting of main pulses
- Parameters
connections – List of all connections in the layout
- Returns
List of additional pulses, empty by default.
-
setup
(**kwargs)[source]¶ Set up instrument after layout has been targeted by pulse sequence.
Needs to be implemented in subclass.
- Parameters
samples – Number of acquisition samples. If None, it will use the previously set value.
input_connections – Input
Connection
list of instrument, needed by some interfaces to setup the instrument.output_connections – Output
Connection
list of instrument, needed by some interfaces to setup the instrument.repeat – Repeat the pulse sequence indefinitely. If False, calling
Layout.start()
will only run the pulse sequence once.**kwargs – Additional interface-specific kwarg.
- Returns
setup flags (see
Layout.flags
)
-
class
silq.instrument_interfaces.keysight.Keysight_81180A_interface.
SinePulseImplementation
(pulse_requirements=[])[source]¶ Bases:
silq.pulses.pulse_modules.PulseImplementation
-
implement
(sample_rate, plot=False, **kwargs)[source]¶ Implements a targeted pulse for an InstrumentInterface.
This method is called during
InstrumentInterface.setup
.Implementation of a targeted pulse is very dependent on the interface. For an AWG, this method may return a list of waveform points. For a triggering source, this method may return the triggering time. In very simple cases, this method may not even be necessary.
- Parameters
*args – Interface-specific args to use
**kwargs – Interface-specific kwargs to use
- Returns
Instrument-specific return values.
See also
Other interface source codes may serve as a guide for this method.
-
pulse_class
¶ alias of
silq.pulses.pulse_types.SinePulse
-
settings
= {'frequency_threshold': 30, 'max_points': 50000.0}¶
-
silq.instrument_interfaces.keysight.Keysight_SD_AWG_interface module¶
-
class
silq.instrument_interfaces.keysight.Keysight_SD_AWG_interface.
AWGPulseImplementation
(pulse_requirements=[])[source]¶ Bases:
silq.pulses.pulse_modules.PulseImplementation
-
implement
(interface, instrument, default_sampling_rate, threshold)[source]¶ Implements a targeted pulse for an InstrumentInterface.
This method is called during
InstrumentInterface.setup
.Implementation of a targeted pulse is very dependent on the interface. For an AWG, this method may return a list of waveform points. For a triggering source, this method may return the triggering time. In very simple cases, this method may not even be necessary.
- Parameters
*args – Interface-specific args to use
**kwargs – Interface-specific kwargs to use
- Returns
Instrument-specific return values.
See also
Other interface source codes may serve as a guide for this method.
-
pulse_class
¶ alias of
silq.pulses.pulse_types.AWGPulse
-
-
class
silq.instrument_interfaces.keysight.Keysight_SD_AWG_interface.
CombinationPulseImplementation
(pulse_requirements=[])[source]¶ Bases:
silq.pulses.pulse_modules.PulseImplementation
-
implement
(interface, instrument, default_sampling_rate)[source]¶ Implements a targeted pulse for an InstrumentInterface.
This method is called during
InstrumentInterface.setup
.Implementation of a targeted pulse is very dependent on the interface. For an AWG, this method may return a list of waveform points. For a triggering source, this method may return the triggering time. In very simple cases, this method may not even be necessary.
- Parameters
*args – Interface-specific args to use
**kwargs – Interface-specific kwargs to use
- Returns
Instrument-specific return values.
See also
Other interface source codes may serve as a guide for this method.
-
pulse_class
¶
-
-
class
silq.instrument_interfaces.keysight.Keysight_SD_AWG_interface.
DCPulseImplementation
(pulse_requirements=[])[source]¶ Bases:
silq.pulses.pulse_modules.PulseImplementation
-
implement
(interface, instrument, default_sampling_rate, threshold)[source]¶ Implements a targeted pulse for an InstrumentInterface.
This method is called during
InstrumentInterface.setup
.Implementation of a targeted pulse is very dependent on the interface. For an AWG, this method may return a list of waveform points. For a triggering source, this method may return the triggering time. In very simple cases, this method may not even be necessary.
- Parameters
*args – Interface-specific args to use
**kwargs – Interface-specific kwargs to use
- Returns
Instrument-specific return values.
See also
Other interface source codes may serve as a guide for this method.
-
pulse_class
¶ alias of
silq.pulses.pulse_types.DCPulse
-
-
class
silq.instrument_interfaces.keysight.Keysight_SD_AWG_interface.
DCRampPulseImplementation
(pulse_requirements=[])[source]¶ Bases:
silq.pulses.pulse_modules.PulseImplementation
-
implement
(interface, instrument, default_sampling_rate, threshold)[source]¶ Implements a targeted pulse for an InstrumentInterface.
This method is called during
InstrumentInterface.setup
.Implementation of a targeted pulse is very dependent on the interface. For an AWG, this method may return a list of waveform points. For a triggering source, this method may return the triggering time. In very simple cases, this method may not even be necessary.
- Parameters
*args – Interface-specific args to use
**kwargs – Interface-specific kwargs to use
- Returns
Instrument-specific return values.
See also
Other interface source codes may serve as a guide for this method.
-
pulse_class
¶ alias of
silq.pulses.pulse_types.DCRampPulse
-
-
class
silq.instrument_interfaces.keysight.Keysight_SD_AWG_interface.
Keysight_SD_AWG_Interface
(instrument_name, **kwargs)[source]¶ Bases:
silq.instrument_interfaces.interface.InstrumentInterface
-
property
active_channel_ids
¶ Sorted list of active channel id’s
-
property
active_instrument_channels
¶
-
create_DC_waveform
(voltage, samples, prescaler, t_start, max_cycles=65536, final_voltage=None)[source]¶
-
get_additional_pulses
(connections)[source]¶ Additional pulses needed by instrument after targeting of main pulses
Trigger pulses are requested if trigger mode is hardware. Trigger at t_start is requested if there is a connection.trigger. Trigger at t=0 is requested if there is a connection.trigger_start/
-
setup
(error_threshold=1e-06, **kwargs)[source]¶ Set up instrument after layout has been targeted by pulse sequence.
Needs to be implemented in subclass.
- Parameters
samples – Number of acquisition samples. If None, it will use the previously set value.
input_connections – Input
Connection
list of instrument, needed by some interfaces to setup the instrument.output_connections – Output
Connection
list of instrument, needed by some interfaces to setup the instrument.repeat – Repeat the pulse sequence indefinitely. If False, calling
Layout.start()
will only run the pulse sequence once.**kwargs – Additional interface-specific kwarg.
- Returns
setup flags (see
Layout.flags
)
-
setup_trigger
()[source]¶ Sets up triggering of the AWG.
Triggering setup is only necessary if trigger_mode == ‘hardware’. If the AWG is setup as the primary instrument, the trigger_mode cannot be hardware, and so will be reset to ‘software’ here. Similarly, if the AWG is not the primary instrument, the trigger_mode will be reset to hardware.
-
start
()[source]¶ Start selected channels, and auto-triggering if primary instrument
Auto-triggering is performed by creating a triggering thread
-
start_auto_trigger
(trigger_period)[source]¶ Starts auto-triggering of AWG, used if trigger_mode == ‘software’
This method first restarts and triggers the AWG, and then starts a thread that calls this method again after trigger_period.
If self.started == False, this method will not do anything, and so no thread is started
- Parameters
trigger_period (
float
) – Period before calling this method again
-
property
-
class
silq.instrument_interfaces.keysight.Keysight_SD_AWG_interface.
MarkerPulseImplementation
(pulse_requirements=[])[source]¶ Bases:
silq.pulses.pulse_modules.PulseImplementation
-
implement
(interface, instrument, default_sampling_rate, **kwargs)[source]¶ Implements a targeted pulse for an InstrumentInterface.
This method is called during
InstrumentInterface.setup
.Implementation of a targeted pulse is very dependent on the interface. For an AWG, this method may return a list of waveform points. For a triggering source, this method may return the triggering time. In very simple cases, this method may not even be necessary.
- Parameters
*args – Interface-specific args to use
**kwargs – Interface-specific kwargs to use
- Returns
Instrument-specific return values.
See also
Other interface source codes may serve as a guide for this method.
-
pulse_class
¶ alias of
silq.pulses.pulse_types.MarkerPulse
-
-
class
silq.instrument_interfaces.keysight.Keysight_SD_AWG_interface.
SinePulseImplementation
(pulse_requirements=[])[source]¶ Bases:
silq.pulses.pulse_modules.PulseImplementation
-
implement
(interface, instrument, default_sampling_rate, threshold)[source]¶ This function takes the targeted pulse (i.e. an interface specific pulseimplementation) and converts it to a set of pulse-independent instructions/information that can be handled by interface.setup().
For example:
SinePulseImplementation() initializes a generic (interface independent) pulseimplementation for the sinepulse SinePulseImplementation.implement() takes the targeted pulse and returns information/instructions that are independent of the pulse type (DCPulse, SinePulse, ...) and can be handled by interface.setup() to send instructions to the driver.
- Parameters
- Returns
dictionary containing waveform objects for each channel
- Return type
waveforms (dict)
example return value:
waveforms = { 'ch_1': [ { 'waveform': waveform1, 'cycles': 10, 'delay': 0.0 }, { 'waveform': waveform2, 'cycles': 1, 'delay': 0.0 } ] }
-
pulse_class
¶ alias of
silq.pulses.pulse_types.SinePulse
-
-
class
silq.instrument_interfaces.keysight.Keysight_SD_AWG_interface.
TriggerPulseImplementation
(pulse_requirements=[])[source]¶ Bases:
silq.pulses.pulse_modules.PulseImplementation
-
implement
(interface, instrument, default_sampling_rate, **kwargs)[source]¶ Implements a targeted pulse for an InstrumentInterface.
This method is called during
InstrumentInterface.setup
.Implementation of a targeted pulse is very dependent on the interface. For an AWG, this method may return a list of waveform points. For a triggering source, this method may return the triggering time. In very simple cases, this method may not even be necessary.
- Parameters
*args – Interface-specific args to use
**kwargs – Interface-specific kwargs to use
- Returns
Instrument-specific return values.
See also
Other interface source codes may serve as a guide for this method.
-
pulse_class
¶ alias of
silq.pulses.pulse_types.TriggerPulse
-
silq.instrument_interfaces.keysight.Keysight_SD_DIG_interface module¶
-
class
silq.instrument_interfaces.keysight.Keysight_SD_DIG_interface.
Keysight_SD_DIG_Interface
(instrument_name, **kwargs)[source]¶ Bases:
silq.instrument_interfaces.interface.InstrumentInterface
-
get_additional_pulses
(connections)[source]¶ Additional pulses needed by instrument after targeting of main pulses
-
initialize_driver
()[source]¶ Puts driver into a known initial state. Further configuration will be done in the configure_driver and get_additional_pulses functions.
-
setup
(samples=1, input_connections=(), **kwargs)[source]¶ Set up instrument after layout has been targeted by pulse sequence.
Needs to be implemented in subclass.
- Parameters
samples – Number of acquisition samples. If None, it will use the previously set value.
input_connections – Input
Connection
list of instrument, needed by some interfaces to setup the instrument.output_connections – Output
Connection
list of instrument, needed by some interfaces to setup the instrument.repeat – Repeat the pulse sequence indefinitely. If False, calling
Layout.start()
will only run the pulse sequence once.**kwargs – Additional interface-specific kwarg.
- Returns
setup flags (see
Layout.flags
)
-