qcodes_contrib_drivers.drivers.QDevil package¶
Submodules¶
qcodes_contrib_drivers.drivers.QDevil.QDAC1 module¶
- class qcodes_contrib_drivers.drivers.QDevil.QDAC1.Generator(generator_number: int)[source]¶
Bases:
object
- class qcodes_contrib_drivers.drivers.QDevil.QDAC1.Mode(value)[source]¶
Bases:
Enum
Enum type use as the mode parameter for channels defining the combined voltage and current range.
get_label() returns a text representation of the mode.
- vhigh_ihigh = (0, 1)¶
- vhigh_ilow = (0, 0)¶
- vlow_ilow = (1, 0)¶
- class qcodes_contrib_drivers.drivers.QDevil.QDAC1.QDac(*args: Any, **kwargs: Any)[source]¶
Bases:
VisaInstrument
Channelised driver for the QDevil QDAC voltage source.
Exposes channels, temperature sensors and calibration output, and ‘ramp_voltages’ + ‘ramp_voltages_2d’ for multi channel ramping.
In addition a ‘mode_force’ flag (default False) is exposed. ‘mode_force’ (=True) is used to enable voltage range switching, via the channel ‘mode’ parameter, even at non-zero output voltages.
Tested with Firmware Version: 1.07
The driver assumes that the instrument is ALWAYS in verbose mode OFF and sets this as part of the initialization, so please do not change this.
- __init__(name: str, address: str, update_currents: bool = False, **kwargs: Any)[source]¶
Instantiates the instrument.
- Parameters:
name – The instrument name used by qcodes
address – The VISA name of the resource
update_currents – Whether to query all channels for their current sensor value on startup, which takes about 0.5 sec per channel. Default: False.
- Returns:
QDac object
- clear_read_queue() Sequence[str] [source]¶
Flush the VISA message queue of the instrument
Waits 1 ms between each read.
- Returns:
Messages lingering in queue
- Return type:
Sequence[str]
- connect_message(idn_param: str = 'IDN', begin_time: float | None = None) None [source]¶
Override of the standard Instrument class connect_message. Usually, the response to *IDN? is printed. Here, the software version is printed.
- print_slopes() None [source]¶
Print the finite slopes assigned to channels, sorted by channel number
- ramp_voltages(channellist: Sequence[int], v_startlist: Sequence[float], v_endlist: Sequence[float], ramptime: float) float [source]¶
Function for smoothly ramping one channel or more channels simultaneously (max. 8). This is a shallow interface to ramp_voltages_2d. Function generators and triggers are are assigned automatically.
- Parameters:
channellist – List (int) of channels to be ramped (1 indexed)
v_startlist – List (int) of voltages to ramp from. MAY BE EMPTY. But if provided, time is saved by NOT reading the present values from the instrument.
v_endlist – List (int) of voltages to ramp to.
ramptime – Total ramp time in seconds (min. 0.002). Has to be an integer number of 0.001 secs).
- Returns:
Estimated time of the excecution of the 2D scan.
NOTE: This function returns as the ramps are started. So you need to wait for ‘ramptime’ until measuring….
- ramp_voltages_2d(slow_chans: Sequence[int], slow_vstart: Sequence[float], slow_vend: Sequence[float], fast_chans: Sequence[int], fast_vstart: Sequence[float], fast_vend: Sequence[float], step_length: float, slow_steps: int, fast_steps: int) float [source]¶
Function for smoothly ramping two channel groups simultaneously with one slow (x) and one fast (y) group. used by ‘ramp_voltages’ where x is empty. Function generators and triggers are assigned automatically.
- Parameters:
slow_chans – List of channels to be ramped (1 indexed) in the slow-group
slow_vstart – List of voltages to ramp from in the slow-group. MAY BE EMPTY. But if provided, time is saved by NOT reading the present values from the instrument.
slow_vend – list of voltages to ramp to in the slow-group.
fast_chans – List of channels to be ramped (1 indexed) in the fast-group.
fast_vstart – List of voltages to ramp from in the fast-group. MAY BE EMPTY. But if provided, time is saved by NOT reading the present values from the instrument.
fast_vend – list of voltages to ramp to in the fast-group.
step_length – Time spent at each step in seconds (min. 0.001) multiple of 1 ms.
slow_steps – number of steps in the slow direction.
fast_steps – number of steps in the fast direction.
- Returns:
Estimated time of the excecution of the 2D scan.
NOTE: This function returns as the ramps are started.
- reset(update_currents: bool = False) None [source]¶
Resets the instrument setting all channels to zero output voltage and all parameters to their default values, including removing any assigned sync putputs, function generators, triggers etc.
- snapshot_base(update: bool | None = False, params_to_skip_update: Sequence[str] | None = None) Dict[Any, Any] [source]¶
State of the instrument as a JSON-compatible dict (everything that the custom JSON encoder class
NumpyJSONEncoder
supports).- Parameters:
update – If True, update the state by querying the instrument. If None only update if the state is known to be invalid. If False, just use the latest values in memory and never update.
params_to_skip_update – List of parameter names that will be skipped in update even if update is True. This is useful if you have parameters that are slow to update but can be updated in a different way (as in the qdac). If you want to skip the update of certain parameters in all snapshots, use the
snapshot_get
attribute of those parameters instead.
- Returns:
base snapshot
- Return type:
- write(cmd: str) None [source]¶
QDac always returns something even from set commands, even when verbose mode is off, so we’ll override write to take this out if you want to use this response, we put it in self._write_response (but only for the very last write call)
In this method we expect to read one termination char per command. As commands are concatenated by ; we count the number of concatenated commands as count(‘;’) + 1 e.g. ‘wav 1 1 1 0;fun 2 1 100 1 1’ is two commands. Note that only the response of the last command will be available in _write_response
- max_status_age = 1¶
- class qcodes_contrib_drivers.drivers.QDevil.QDAC1.QDacChannel(parent: QDac, name: str, channum: int)[source]¶
Bases:
InstrumentChannel
A single output channel of the QDac.
Exposes chan.v, chan.i, chan.mode, chan.slope, chan.sync, chan.sync_delay, chan.sync_duration.
NB: Set v to zero before changing mode if the mode_force lfag is False (default).
- __init__(parent: QDac, name: str, channum: int)[source]¶
- Parameters:
parent – The instrument to which the channel belongs.
name – The name of the channel
channum – The number of the channel (1-24 or 1-48)
- snapshot_base(update: bool | None = False, params_to_skip_update: Sequence[str] | None = None) Dict[Any, Any] [source]¶
State of the instrument as a JSON-compatible dict (everything that the custom JSON encoder class
NumpyJSONEncoder
supports).- Parameters:
update – If
True
, update the state by querying the instrument. If None update the state if known to be invalid. IfFalse
, just use the latest values in memory and never update state.params_to_skip_update – List of parameter names that will be skipped in update even if update is True. This is useful if you have parameters that are slow to update but can be updated in a different way (as in the qdac). If you want to skip the update of certain parameters in all snapshots, use the
snapshot_get
attribute of those parameters instead.
- Returns:
base snapshot
- Return type:
- class qcodes_contrib_drivers.drivers.QDevil.QDAC1.QDacMultiChannelParameter(channels: Sequence[InstrumentChannel], param_name: str, *args: Any, **kwargs: Any)[source]¶
Bases:
MultiChannelInstrumentParameter
The class to be returned by __getattr__ of the ChannelList. Here customised for fast multi-readout of voltages.
qcodes_contrib_drivers.drivers.QDevil.QDAC2 module¶
- class qcodes_contrib_drivers.drivers.QDevil.QDAC2.Arrangement_Context(qdac: QDac2, contacts: Dict[str, int], output_triggers: Dict[str, int] | None, internal_triggers: Sequence[str] | None, outer_trigger_channel: int | None)[source]¶
Bases:
object
- actual_voltages() Sequence[float] [source]¶
- Returns:
Corrected voltages for all contacts
- Return type:
Sequence[float]
- add_correction(contact: str, factors: Sequence[float]) None [source]¶
Update how much a particular contact influences the other contacts
This is mostly useful in arrangements where each contact has significant effect only on nearby contacts, and thus can be added incrementally.
The factors are extended by the identity matrix and multiplied to the correction matrix.
- channel(name: str) QDac2Channel [source]¶
- currents_A(nplc: int = 1, current_range: str = 'low') Sequence[float] [source]¶
Measure currents on all contacts
- get_trigger_by_name(name: str) QDac2Trigger_Context [source]¶
- Parameters:
name (str) – Name of trigger
- Returns:
Trigger context manager
- Return type:
- initiate_correction(contact: str, factors: Sequence[float]) None [source]¶
Override how much a particular contact influences the other contacts
- leakage(modulation_V: float, nplc: int = 2) ndarray [source]¶
Run a simple leakage test between the contacts
Each contact is changed in turn and the resulting change in current from steady-state is recorded. The resulting resistance matrix is calculated as modulation_voltage divided by current_change.
- set_virtual_voltage(contact: str, voltage: float) None [source]¶
Set virtual voltage on specific contact
The actual voltage that the contact will receive depends on the correction matrix.
- set_virtual_voltages(contacts_to_voltages: Dict[str, float]) None [source]¶
Set virtual voltages on specific contacts in one go
The actual voltage that each contact will receive depends on the correction matrix.
- virtual_detune(contacts: Sequence[str], start_V: Sequence[float], end_V: Sequence[float], steps: int, start_trigger: str | None = None, step_time_s: float = 1e-05, step_trigger: str | None = None, repetitions: int = 1) Virtual_Sweep_Context [source]¶
Sweep any number of contacts linearly from one set of values to another set of values
- Parameters:
contacts (Sequence[str]) – contacts involved in sweep
start_V (Sequence[float]) – First-extreme values
end_V (Sequence[float]) – Second-extreme values
steps (int) – Number of steps between extremes
start_trigger (None, optional) – Trigger that starts sweep
step_time_s (float, Optional) – Seconds between each step
step_trigger (None, optional) – Trigger that marks each step
repetitions (int, Optional) – Number of back-and-forth sweeps, or -1 for infinite
- virtual_sweep(contact: str, voltages: Sequence[float], start_sweep_trigger: str | None = None, step_time_s: float = 1e-05, step_trigger: str | None = None, repetitions: int = 1) Virtual_Sweep_Context [source]¶
Sweep a contact to create a 1D sweep
- Parameters:
contact (str) – Name of sweeping contact
voltages (Sequence[float]) – Virtual sweep voltages
outer_contact (str) – Name of slow-changing (outer) contact
start_sweep_trigger (None, optional) – Trigger that starts sweep
step_time_s (float, optional) – Delay between voltage changes
step_trigger (None, optional) – Trigger that marks each step
repetitions (int, Optional) – Number of back-and-forth sweeps, or -1 for infinite
- Returns:
context manager
- Return type:
- virtual_sweep2d(inner_contact: str, inner_voltages: Sequence[float], outer_contact: str, outer_voltages: Sequence[float], start_sweep_trigger: str | None = None, inner_step_time_s: float = 1e-05, inner_step_trigger: str | None = None, outer_step_trigger: str | None = None, repetitions: int = 1) Virtual_Sweep_Context [source]¶
Sweep two contacts to create a 2D sweep
- Parameters:
inner_contact (str) – Name of fast-changing (inner) contact
inner_voltages (Sequence[float]) – Inner contact virtual voltages
outer_contact (str) – Name of slow-changing (outer) contact
outer_voltages (Sequence[float]) – Outer contact virtual voltages
start_sweep_trigger (None, optional) – Trigger that starts sweep
inner_step_time_s (float, optional) – Delay between voltage changes
inner_step_trigger (None, optional) – Trigger that marks each step
outer_step_trigger (None, optional) – Name of trigger that marks outer step
repetitions (int, Optional) – Number of back-and-forth sweeps, or -1 for infinite
- Returns:
context manager
- Return type:
- property channel_numbers: Sequence[int]¶
Returns: Sequence[int]: Channels numbers in the same order as contact_names
- class qcodes_contrib_drivers.drivers.QDevil.QDAC2.Awg_Context(channel: QDac2Channel, trace_name: str, repetitions: int, scale: float, offset_V: float, slew_V_s: float | None)[source]¶
Bases:
_Waveform_Context
- end_marker() QDac2Trigger_Context [source]¶
Internal trigger that will mark the end of the AWG
A new internal trigger is allocated if necessary.
- Returns:
trigger that will mark the end
- Return type:
- period_end_marker() QDac2Trigger_Context [source]¶
Internal trigger that will mark the end of each period
A new internal trigger is allocated if necessary.
- Returns:
trigger that will mark the end of each period
- Return type:
- period_start_marker() QDac2Trigger_Context [source]¶
Internal trigger that will mark the beginning of each period
A new internal trigger is allocated if necessary.
- Returns:
trigger that will mark the beginning of each period
- Return type:
- start_marker() QDac2Trigger_Context [source]¶
Internal trigger that will mark the beginning of the AWG
A new internal trigger is allocated if necessary.
- Returns:
trigger that will mark the beginning
- Return type:
- start_on(trigger: QDac2Trigger_Context) None [source]¶
Attach internal trigger to start the AWG
- Parameters:
trigger (QDac2Trigger_Context) – trigger that will start AWG
- start_on_external(trigger: ExternalInput) None [source]¶
Attach external trigger to start the AWG
- Parameters:
trigger (ExternalInput) – external trigger that will start AWG
- start_once_on(trigger: QDac2Trigger_Context) None [source]¶
Attach internal one-shot trigger to start the AWG
- Parameters:
trigger (QDac2Trigger_Context) – trigger that will start AWG
- class qcodes_contrib_drivers.drivers.QDevil.QDAC2.List_Context(channel: QDac2Channel, voltages: Sequence[float], repetitions: int, dwell_s: float, delay_s: float, backwards: bool, stepped: bool)[source]¶
Bases:
_Dc_Context
- append(voltages: Sequence[float]) None [source]¶
Append voltages to the existing list
- Parameters:
voltages (Sequence[float]) – Sequence of voltages
- class qcodes_contrib_drivers.drivers.QDevil.QDAC2.Measurement_Context(channel: QDac2Channel, delay_s: float, repetitions: int, current_range: str, aperture_s: float | None, nplc: int | None)[source]¶
Bases:
_Channel_Context
- available_A() Sequence[float] [source]¶
Retrieve current measurements
The available measurements will be removed from measurement queue.
- Returns:
list of available current measurements
- Return type:
Sequence[float]
- peek_A() float [source]¶
Peek at the first available current measurement
- Returns:
current in Amperes
- Return type:
- start_on(trigger: QDac2Trigger_Context) None [source]¶
Attach internal trigger to start the current measurement
- Parameters:
trigger (QDac2Trigger_Context) – trigger that will start measurement
- start_on_external(trigger: ExternalInput) None [source]¶
Attach external trigger to start the current measurement
- Parameters:
trigger (ExternalInput) – trigger that will start measurement
- start_once_on(trigger: QDac2Trigger_Context) None [source]¶
Attach internal once-shot trigger to start the current measurement
- Parameters:
trigger (QDac2Trigger_Context) – trigger that will start measurement
- class qcodes_contrib_drivers.drivers.QDevil.QDAC2.QDac2(*args: Any, **kwargs: Any)[source]¶
Bases:
VisaInstrument
- allocate_trace(name: str, size: int) Trace_Context [source]¶
Reserve memory for a new trace
- Parameters:
- Returns:
context manager
- Return type:
- allocate_trigger() QDac2Trigger_Context [source]¶
Allocate an internal trigger
Does not have any effect on the instrument, only the driver.
- Returns:
Context manager
- Return type:
- Raises:
ValueError – no free triggers
- arrange(contacts: Dict[str, int], output_triggers: Dict[str, int] | None = None, internal_triggers: Sequence[str] | None = None, outer_trigger_channel: int | None = None) Arrangement_Context [source]¶
An arrangement of contacts and triggers for virtual gates
Each contact corresponds to a particular output channel. Each output_trigger corresponds to a particular external output trigger. Each internal_trigger will be allocated from the pool of internal triggers, and can later be used for synchronisation. After initialisation of the arrangement, contacts and triggers can only be referred to by name.
The voltages that will appear on each contact depends not only on the specified virtual voltage, but also on a correction matrix. Initially, the contacts are assumed to not influence each other, which means that the correction matrix is the identity matrix, ie. the row for each contact has a value of [0, …, 0, 1, 0, …, 0].
- Parameters:
- Returns:
context manager
- Return type:
- channel(ch: int) QDac2Channel [source]¶
- Parameters:
ch (int) – Channel number
- Returns:
Visa representation of the channel
- Return type:
- clear_read_queue() Sequence[str] [source]¶
Flush the VISA message queue of the instrument
Takes at least _message_flush_timeout_ms to carry out.
- Returns:
Messages lingering in queue
- Return type:
Sequence[str]
- connect_external_trigger(port: int, trigger: QDac2Trigger_Context, width_s: float = 1e-06) None [source]¶
Route internal trigger to external trigger
- Parameters:
port (int) – External output trigger number
trigger (QDac2Trigger_Context) – Internal trigger
width_s (float, optional) – Output trigger width in seconds (default 1ms)
- errors() str [source]¶
Retrieve and clear all previous errors
- Returns:
Comma separated list of errors or ‘0, “No error”’
- Return type:
- free_all_triggers() None [source]¶
Free all an internal triggers
Does not have any effect on the instrument, only the driver.
- free_trigger(trigger: QDac2Trigger_Context) None [source]¶
Free an internal trigger
Does not have any effect on the instrument, only the driver.
- Parameters:
trigger (QDac2Trigger_Context) – trigger to free
- get_recorded_scpi_commands() List[str] [source]¶
- Returns:
SCPI commands sent to the instrument
- Return type:
Sequence[str]
- remove_traces() None [source]¶
Delete all trace definitions from the instrument
This means that all AWGs loose their data.
- start_all() None [source]¶
Trigger the global SCPI bus (
*TRG
)All generators, that have not been explicitly set to trigger on an internal or external trigger, will be started.
- start_recording_scpi() None [source]¶
Record all SCPI commands sent to the instrument
Any previous recordings are removed. To inspect the SCPI commands sent to the instrument, call get_recorded_scpi_commands().
- class qcodes_contrib_drivers.drivers.QDevil.QDAC2.QDac2Channel(parent: QDac2, name: str, channum: int)[source]¶
Bases:
InstrumentChannel
- arbitrary_wave(trace_name: str, repetitions: int = 1, scale: float = 1.0, offset_V: float = 0.0, slew_V_s: float | None = None) Awg_Context [source]¶
Set up an arbitrary-wave generator
- Parameters:
- Returns:
context manager
- Return type:
- clear_measurements() Sequence[float] [source]¶
Retrieve current measurements
The available measurements will be removed from measurement queue.
- Returns:
list of available current measurements
- Return type:
Sequence[float]
- dc_list(voltages: Sequence[float], repetitions: int = 1, dwell_s: float = 0.001, delay_s: float = 0, backwards: bool = False, stepped: bool = False) List_Context [source]¶
Set up a DC-list generator
- Parameters:
voltages (Sequence[float]) – Voltages in list
repetitions (int, optional) – Number of repetitions of the list (default 1)
dwell_s (float, optional) – Seconds between each voltage (default 1ms)
delay_s (float, optional) – Seconds of delay after receiving a trigger (default 0)
backwards (bool, optional) – Use list in reverse (default is forward)
stepped (bool, optional) – True means that each step needs to be triggered (default False)
- Returns:
context manager
- Return type:
- dc_sweep(start_V: float, stop_V: float, points: int, repetitions: int = 1, dwell_s: float = 0.001, delay_s: float = 0, backwards=False, stepped=True) Sweep_Context [source]¶
Set up a DC sweep
- Parameters:
start_V (float) – Start voltage
stop_V (float) – Send voltage
points (int) – Number of steps
repetitions (int, optional) – Number of repetition (default 1)
dwell_s (float, optional) – Seconds between each voltage (default 1ms)
delay_s (float, optional) – Seconds of delay after receiving a trigger (default 0)
backwards (bool, optional) – Sweep in reverse (default is forward)
stepped (bool, optional) – True means discrete steps (default True)
- Returns:
context manager
- Return type:
- measurement(delay_s: float = 0.0, repetitions: int = 1, current_range: str = 'high', aperture_s: float | None = None, nplc: int | None = None) Measurement_Context [source]¶
Set up a sequence of current measurements
- Parameters:
delay_s (float, optional) – Seconds to delay the actual measurement after trigger (default 0)
repetitions (int, optional) – Number of consecutive measurements (default 1)
current_range (str, optional) – high (10mA, default) or low (200nA)
nplc (None, optional) – Integration time in power-line cycles (default 1)
aperture_s (None, optional) – Seconds of integration time instead of NPLC
- Returns:
context manager
- Return type:
- Raises:
ValueError – configuration error
- sine_wave(frequency_Hz: float | None = None, period_s: float | None = None, repetitions: int = -1, inverted: bool = False, span_V: float = 0.2, offset_V: float = 0.0, delay_s: float = 0, slew_V_s: float | None = None) Sine_Context [source]¶
Set up a sine-wave generator
- Parameters:
frequency_Hz (float, optional) – Frequency
period_s (float, optional) – Period length (instead of frequency)
repetitions (int, optional) – Number of repetition (default infinite)
inverted (bool, optional) – True means flipped (default False)
span_V (float, optional) – Voltage span (default 200mV)
offset_V (float, optional) – Offset (default 0V)
delay_s (float, optional) – Seconds of delay after receiving a trigger (default 0)
slew_V_s (None, optional) – Max slew rate in V/s (default None)
- Returns:
context manager
- Return type:
- Raises:
ValueError – configuration error
- square_wave(frequency_Hz: float | None = None, period_s: float | None = None, repetitions: int = -1, duty_cycle_percent: float = 50.0, kind: str = 'symmetric', inverted: bool = False, span_V: float = 0.2, offset_V: float = 0.0, delay_s: float = 0, slew_V_s: float | None = None) Square_Context [source]¶
Set up a square-wave generator
- Parameters:
frequency_Hz (float, optional) – Frequency
period_s (float, optional) – Period length (instead of frequency)
repetitions (int, optional) – Number of repetition (default infinite)
duty_cycle_percent (float, optional) – Percentage on-time (default 50%)
kind (str, optional) – Positive, negative or symmetric (default) around the offset
inverted (bool, optional) – True means flipped (default False)
span_V (float, optional) – Voltage span (default 200mV)
offset_V (float, optional) – Offset (default 0V)
delay_s (float, optional) – Seconds of delay after receiving a trigger (default 0)
slew_V_s (float, optional) – Max slew rate in V/s (default None)
- Returns:
context manager
- Return type:
- Raises:
ValueError – configuration error
- triangle_wave(frequency_Hz: float | None = None, period_s: float | None = None, repetitions: int = -1, duty_cycle_percent: float = 50.0, inverted: bool = False, span_V: float = 0.2, offset_V: float = 0.0, delay_s: float = 0, slew_V_s: float | None = None) Triangle_Context [source]¶
Set up a triangle-wave generator
- Parameters:
frequency_Hz (float, optional) – Frequency
period_s (float, optional) – Period length (instead of frequency)
repetitions (int, optional) – Number of repetition (default infinite)
duty_cycle_percent (float, optional) – Percentage on-time (default 50%)
inverted (bool, optional) – True means flipped (default False)
span_V (float, optional) – Voltage span (default 200mV)
offset_V (float, optional) – Offset (default 0V)
delay_s (float, optional) – Seconds of delay after receiving a trigger (default 0)
slew_V_s (float, optional) – Max slew rate in V/s (default None)
- Returns:
context manager
- Return type:
- Raises:
ValueError – configuration error
- write_channel(cmd: str) None [source]¶
Inject channel number into SCPI command
- Parameters:
cmd (str) – Must contain a ‘{0}’ placeholder for the channel number
- class qcodes_contrib_drivers.drivers.QDevil.QDAC2.QDac2ExternalTrigger(parent: QDac2, name: str, external: int)[source]¶
Bases:
InstrumentChannel
External output trigger
There are three 5V isolated triggers on the front (1, 2, 3) and two non-isolated 3V3 on the back (4, 5).
- class qcodes_contrib_drivers.drivers.QDevil.QDAC2.QDac2Trigger_Context(parent: QDac2, value: int)[source]¶
Bases:
object
Internal Triggers with automatic deallocation
This context manager wraps an already-allocated internal trigger number so that the trigger can be automatically reclaimed when the context exits.
- class qcodes_contrib_drivers.drivers.QDevil.QDAC2.Sine_Context(channel: QDac2Channel, frequency_Hz: float | None, repetitions: int, period_s: float | None, inverted: bool, span_V: float, offset_V: float, delay_s: float, slew_V_s: float | None)[source]¶
Bases:
_Waveform_Context
- end_marker() QDac2Trigger_Context [source]¶
Internal trigger that will mark the end of the sine wave
A new internal trigger is allocated if necessary.
- Returns:
trigger that will mark the end
- Return type:
- period_end_marker() QDac2Trigger_Context [source]¶
Internal trigger that will mark the end of each period
A new internal trigger is allocated if necessary.
- Returns:
trigger that will mark the end of each period
- Return type:
- period_start_marker() QDac2Trigger_Context [source]¶
Internal trigger that will mark the beginning of each period
A new internal trigger is allocated if necessary.
- Returns:
trigger that will mark the beginning of each period
- Return type:
- start_marker() QDac2Trigger_Context [source]¶
Internal trigger that will mark the beginning of the sine wave
A new internal trigger is allocated if necessary.
- Returns:
trigger that will mark the beginning
- Return type:
- start_on(trigger: QDac2Trigger_Context) None [source]¶
Attach internal trigger to start the sine wave generator
- Parameters:
trigger (QDac2Trigger_Context) – trigger that will start sine wave
- start_on_external(trigger: ExternalInput) None [source]¶
Attach external trigger to start the sine wave generator
- Parameters:
trigger (ExternalInput) – external trigger that will start sine wave
- start_once_on(trigger: QDac2Trigger_Context) None [source]¶
Attach internal one-shot trigger to start the sine wave generator
- Parameters:
trigger (QDac2Trigger_Context) – trigger that will start sine wave
- class qcodes_contrib_drivers.drivers.QDevil.QDAC2.Square_Context(channel: QDac2Channel, frequency_Hz: float | None, repetitions: int, period_s: float | None, duty_cycle_percent: float, kind: str, inverted: bool, span_V: float, offset_V: float, delay_s: float, slew_V_s: float | None)[source]¶
Bases:
_Waveform_Context
- cycles_remaining() int [source]¶
- Returns:
Number of cycles remaining in the square wave
- Return type:
- end_marker() QDac2Trigger_Context [source]¶
Internal trigger that will mark the end of the square wave
A new internal trigger is allocated if necessary.
- Returns:
trigger that will mark the end
- Return type:
- period_end_marker() QDac2Trigger_Context [source]¶
Internal trigger that will mark the end of each period
A new internal trigger is allocated if necessary.
- Returns:
trigger that will mark the end of each period
- Return type:
- period_start_marker() QDac2Trigger_Context [source]¶
Internal trigger that will mark the beginning of each period
A new internal trigger is allocated if necessary.
- Returns:
trigger that will mark the beginning of each period
- Return type:
- start_marker() QDac2Trigger_Context [source]¶
Internal trigger that will mark the beginning of the square wave
A new internal trigger is allocated if necessary.
- Returns:
trigger that will mark the beginning
- Return type:
- start_on(trigger: QDac2Trigger_Context) None [source]¶
Attach internal trigger to start the square wave generator
- Parameters:
trigger (QDac2Trigger_Context) – trigger that will start square wave
- start_on_external(trigger: ExternalInput) None [source]¶
Attach external trigger to start the square wave generator
- Parameters:
trigger (ExternalInput) – external trigger that will start square wave
- start_once_on(trigger: QDac2Trigger_Context) None [source]¶
Attach internal one-shot trigger to start the square wave generator
- Parameters:
trigger (QDac2Trigger_Context) – trigger that will start square wave
- class qcodes_contrib_drivers.drivers.QDevil.QDAC2.Sweep_Context(channel: QDac2Channel, start_V: float, stop_V: float, points: int, repetitions: int, dwell_s: float, delay_s: float, backwards: bool, stepped: bool)[source]¶
Bases:
_Dc_Context
- class qcodes_contrib_drivers.drivers.QDevil.QDAC2.Trace_Context(parent, name: str, size: int)[source]¶
Bases:
object
- class qcodes_contrib_drivers.drivers.QDevil.QDAC2.Triangle_Context(channel: QDac2Channel, frequency_Hz: float | None, repetitions: int, period_s: float | None, duty_cycle_percent: float, inverted: bool, span_V: float, offset_V: float, delay_s: float, slew_V_s: float | None)[source]¶
Bases:
_Waveform_Context
- cycles_remaining() int [source]¶
- Returns:
Number of cycles remaining in the triangle wave
- Return type:
- end_marker() QDac2Trigger_Context [source]¶
Internal trigger that will mark the end of the triangle wave
A new internal trigger is allocated if necessary.
- Returns:
trigger that will mark the end
- Return type:
- period_end_marker() QDac2Trigger_Context [source]¶
Internal trigger that will mark the end of each period
A new internal trigger is allocated if necessary.
- Returns:
trigger that will mark the end of each period
- Return type:
- period_start_marker() QDac2Trigger_Context [source]¶
Internal trigger that will mark the beginning of each period
A new internal trigger is allocated if necessary.
- Returns:
trigger that will mark the beginning of each period
- Return type:
- start_marker() QDac2Trigger_Context [source]¶
Internal trigger that will mark the beginning of the triangle wave
A new internal trigger is allocated if necessary.
- Returns:
trigger that will mark the beginning
- Return type:
- start_on(trigger: QDac2Trigger_Context) None [source]¶
Attach internal trigger to start the triangle wave generator
- Parameters:
trigger (QDac2Trigger_Context) – trigger that will start triangle
- start_on_external(trigger: ExternalInput) None [source]¶
Attach external trigger to start the triangle wave generator
- Parameters:
trigger (ExternalInput) – external trigger that will start triangle
- start_once_on(trigger: QDac2Trigger_Context) None [source]¶
Attach internal one-shot trigger to start the triangle wave generator
- Parameters:
trigger (QDac2Trigger_Context) – trigger that will start triangle wave
- class qcodes_contrib_drivers.drivers.QDevil.QDAC2.Virtual_Sweep_Context(arrangement: Arrangement_Context, sweep: ndarray, start_trigger: str | None, step_time_s: float, step_trigger: str | None, repetitions: int | None)[source]¶
Bases:
object
- qcodes_contrib_drivers.drivers.QDevil.QDAC2.comma_sequence_to_list(sequence: str) Sequence[str] [source]¶
- qcodes_contrib_drivers.drivers.QDevil.QDAC2.comma_sequence_to_list_of_floats(sequence: str) Sequence[float] [source]¶
- qcodes_contrib_drivers.drivers.QDevil.QDAC2.diff_matrix(initial: Sequence[float], measurements: Sequence[Sequence[float]]) ndarray [source]¶
Subtract an array of measurements by an initial measurement
- qcodes_contrib_drivers.drivers.QDevil.QDAC2.floats_to_comma_separated_list(array: Sequence[float]) str [source]¶
- qcodes_contrib_drivers.drivers.QDevil.QDAC2.forward_and_back(start: float, end: float, steps: int)[source]¶
qcodes_contrib_drivers.drivers.QDevil.QDAC2_Array module¶
- class qcodes_contrib_drivers.drivers.QDevil.QDAC2_Array.Array_Arrangement_Context(qdacs: QDac2_Array, contacts: Dict[str, Dict[str, int]], output_triggers: Dict[str, Dict[str, int]] | None = None, internal_triggers: Sequence[str] | None = None)[source]¶
Bases:
object
- channel(contact: str) QDac2Channel [source]¶
- Parameters:
contact (str) – Name
- Returns:
Instrument channel
- Return type:
- currents_A(nplc: int = 1, current_range: str = 'low') Sequence[float] [source]¶
Measure currents on all contacts
The order is that of contacts()
- leakage(modulation_V: float, nplc: int = 2) ndarray [source]¶
Run a simple leakage test between the contacts
Each contact is changed in turn and the resulting change in current from steady-state is recorded. The resulting resistance matrix is calculated as modulation_voltage divided by current_change.
- class qcodes_contrib_drivers.drivers.QDevil.QDAC2_Array.QDac2_Array(controller: QDac2, listeners: Sequence[QDac2])[source]¶
Bases:
object
A collection of interconnected QDAC-IIs
The instruments are required to be connected as described in section 5.5 ‘Synchronization of multiple QDAC-II units’ in the manual. The sync cables must be left in place after sync, so that the clock is continuously distributed, and the Controller can trigger all Listerners by sending pulses from Ext Out 4 to all Ext In 3 simultaneously.
- allocate_trigger() QDac2Trigger_Context [source]¶
Allocate internal trigger on the Controller
- Returns:
context manager
- Return type:
- arrange(contacts: Dict[str, Dict[str, int]], output_triggers: Dict[str, Dict[str, int]] | None = None, internal_triggers: Sequence[str] | None = None) Array_Arrangement_Context [source]¶
An arrangement of contacts across several QDAC-II instruments
The arrangement is a collection of QDac2.arrangement, one for each instrument but with a dedicated controller.
See QDac2.arrangement() for further documentation. Note that an array arrangement does not (yet) support corrections between contacts (which the indiviual arrangements on each instrument does).
- Parameters:
- Returns:
context manager
- Return type:
- connect_external_trigger(port: int, trigger: QDac2Trigger_Context, width_s: float = 1e-06) None [source]¶
Route internal trigger to external trigger
- Parameters:
port (int) – External output trigger number
trigger (QDac2Trigger_Context) – Internal trigger
width_s (float, optional) – Output trigger width in seconds (default 1ms)
- sync() None [source]¶
Synchronizes the array of QDAC-IIs
The Listeners will stop using their own clock and start using the Controller’s clock.
- trigger(internal_trigger: QDac2Trigger_Context)[source]¶
Fire an internal trigger on the Controller
- Parameters:
QDac2Trigger_Context – internal trigger
- property common_trigger_in: ExternalInput¶
qcodes_contrib_drivers.drivers.QDevil.QSwitch module¶
- class qcodes_contrib_drivers.drivers.QDevil.QSwitch.QSwitch(*args: Any, **kwargs: Any)[source]¶
Bases:
VisaInstrument
- arrange(breakouts: Dict[str, int] | None = None, lines: Dict[str, int] | None = None) None [source]¶
An arrangement of names for lines and breakouts
- clear_read_queue() Sequence[str] [source]¶
Flush the VISA message queue of the instrument
Takes at least _message_flush_timeout_ms to carry out.
- Returns:
Messages lingering in queue
- Return type:
Sequence[str]
- errors() str [source]¶
Retrieve and clear all previous errors
- Returns:
Comma separated list of errors or ‘0, “No error”’
- Return type:
- get_recorded_scpi_commands() List[str] [source]¶
- Returns:
SCPI commands sent to the instrument
- Return type:
Sequence[str]
- qcodes_contrib_drivers.drivers.QDevil.QSwitch.channel_list_to_state(channel_list: str) Sequence[Tuple[int, int]] [source]¶
- qcodes_contrib_drivers.drivers.QDevil.QSwitch.compress_channel_list(channel_list: str) str [source]¶