qcodespp.instrument_drivers.QDevil.QSwitch_elab
Attributes
Classes
Functions
Module Contents
- qcodespp.instrument_drivers.QDevil.QSwitch_elab.State
- qcodespp.instrument_drivers.QDevil.QSwitch_elab.channel_list_to_state(channel_list: str) State
- qcodespp.instrument_drivers.QDevil.QSwitch_elab.state_to_expanded_list(state: State) str
- qcodespp.instrument_drivers.QDevil.QSwitch_elab.state_to_compressed_list(state: State) str
- qcodespp.instrument_drivers.QDevil.QSwitch_elab.expand_channel_list(channel_list: str) str
- qcodespp.instrument_drivers.QDevil.QSwitch_elab.compress_channel_list(channel_list: str) str
- qcodespp.instrument_drivers.QDevil.QSwitch_elab.relay_lines = 24
- qcodespp.instrument_drivers.QDevil.QSwitch_elab.relays_per_line = 9
- class qcodespp.instrument_drivers.QDevil.QSwitch_elab.QSwitch(name: str, address: str, **kwargs: Unpack[InstrumentBaseKWArgs])
Bases:
qcodes.instrument.visa.Instrument
Base class for all QCodes instruments.
- Args:
- name: an identifier for this instrument, particularly for
attaching it to a Station.
- metadata: additional static metadata to add to this
instrument’s JSON snapshot.
- label: nicely formatted name of the instrument; if None, the
name
is used.
- locked_relays = []
- reset() None
- soft_reset(force=False) None
- Resets the relays to the default state excluding the relays in self.lokced_relays
The check for locked relays prevents accidentally reseting e.g. a gate in the case that the kernel is restarted but the locked_relays parameter is not updated.
- Args:
force (bool): If True, all relays are reset to the default state. Bypasses the check for locked relays.
- errors() str
Retrieve and clear all previous errors
- Returns:
str: Comma separated list of errors or ‘0, “No error”’
- error() str
Retrieve next error
- Returns:
str: The next error or ‘0, “No error”’
- state_force_update() None
- save_state(name: str, unique=False) None
Save the current state of the relays
- Args:
name (str): Name of the saved state unique (bool): If True, save the state in a file with the serial number of the qswitch as an identifier
- load_state(name: str, unique=False) None
Load a saved state of the relays
- Args:
name (str): Name of the saved state unique (bool): If True, load the state from a file with the serial number of the qswitch as an identifier
- saved_states(unique=False) Dict[str, str]
Get a dictionary of saved states
- Args:
unique (bool): If True, load the state from a file with the serial number of the qswitch as an identifier
- Returns:
Dict[str, str]: Dictionary of saved states
- close_relays(relays: State) None
- close_relay(line: int, tap: int) None
- open_relays(relays: State) None
- open_relay(line: int, tap: int) None
- OneOrMore
- ground(lines: OneOrMore) None
- connect(lines: OneOrMore) None
- breakout(line: str, tap: str) None
- lineFloat(lines: OneOrMore) None
- arrange(breakouts: Dict[str, int] | None = None, lines: Dict[str, int] | None = None) None
An arrangement of names for lines and breakouts
- Args:
breakouts (Dict[str, int]): Name/breakout pairs lines (Dict[str, int]): Name/line pairs
- start_recording_scpi() None
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().
- get_recorded_scpi_commands() List[str]
- Returns:
Sequence[str]: SCPI commands sent to the instrument
- clear_read_queue() Sequence[str]
Flush the VISA message queue of the instrument
Takes at least _message_flush_timeout_ms to carry out.
- Returns:
Sequence[str]: Messages lingering in queue
- write(cmd: str) None
Send SCPI command to instrument
- Args:
cmd (str): SCPI command
- ask(cmd: str) str
Send SCPI query to instrument
- Args:
cmd (str): SCPI query
- Returns:
str: SCPI answer