semi_cr.core.station.instruments package

Static station instrument blueprints.

class semi_cr.core.station.instruments.LabInstrument[source]

Bases: ABC

Base class for instruments represented by an NQCP station.

name: str
connect() → None[source]

Connect this instrument when entering a measurement context.

disconnect() → None[source]

Disconnect this instrument when leaving a measurement context.

is_connected() → bool | None[source]

Return whether this instrument is connected or not. If the instrument is not connectable it returns None.

abstractmethod graph_nodes() → Iterable[GraphNode][source]

Return nodes contributed to the station graph.

abstractmethod graph_edges() → Iterable[GraphEdge][source]

Return edges contributed to the station graph.

Submodules

semi_cr.core.station.instruments.base module

class semi_cr.core.station.instruments.base.LabInstrument[source]

Bases: ABC

Base class for instruments represented by an NQCP station.

name: str
connect() → None[source]

Connect this instrument when entering a measurement context.

disconnect() → None[source]

Disconnect this instrument when leaving a measurement context.

is_connected() → bool | None[source]

Return whether this instrument is connected or not. If the instrument is not connectable it returns None.

abstractmethod graph_nodes() → Iterable[GraphNode][source]

Return nodes contributed to the station graph.

abstractmethod graph_edges() → Iterable[GraphEdge][source]

Return edges contributed to the station graph.

semi_cr.core.station.instruments.dmm module

class semi_cr.core.station.instruments.dmm.DMMVoltageTerminal(parent_ref: DMMBlueprint, name: str, role: str | None = None)[source]

Bases: object

A station-level, read-only voltage input exposed by a QCoDeS DMM.

parent_ref: DMMBlueprint
name: str
role: str | None = None
property dmm: DMMBlueprint
property node_id: str
graph_nodes() → Iterable[GraphNode][source]
graph_edges() → Iterable[GraphEdge][source]
read_voltage() → float[source]

Read the selected terminal through the connected live QCoDeS DMM.

class semi_cr.core.station.instruments.dmm.DMMBlueprint(qcodes_config: QCoDeSInstrumentSpec, name: str, inputs: list[DMMVoltageTerminal], connections: dict[str, list[str]])[source]

Bases: QCoDeSInstrumentProxy

Static station blueprint for a routable voltage-measuring DMM.

name: str
inputs: list[DMMVoltageTerminal]
connections: dict[str, list[str]]
property address: str
read_voltage() → float[source]

Read the selected physical DMM through its live QCoDeS instrument.

classmethod from_instrument_spec(spec: QCoDeSInstrumentSpec) → DMMBlueprint[source]
graph_nodes() → Iterable[GraphNode][source]

Return nodes contributed to the station graph.

graph_edges() → Iterable[GraphEdge][source]

Return edges contributed to the station graph.

connect() → None

In QCoDeS, connection means instantiating the driver with the configured instrument.

disconnect()

Disconnect this instrument when leaving a measurement context.

is_connected()

Return whether this instrument is connected or not. If the instrument is not connectable it returns None.

qcodes_config: QCoDeSInstrumentSpec

semi_cr.core.station.instruments.opx1000 module

class semi_cr.core.station.instruments.opx1000.OPX1000LFTerminal(parent_ref: 'OPX1000LFFEM', name: 'str', role: 'Role')[source]

Bases: object

class Role(*values)[source]

Bases: Enum

Source = 1
Receiver = 2
classmethod __contains__(value)

Return True if value is in cls.

value is in cls if: 1) value is a member of cls, or 2) value is the value of one of the cls’s members.

classmethod __getitem__(name)

Return the member matching name.

classmethod __iter__()

Return members in definition order.

classmethod __len__()

Return the number of members (no aliases)

parent_ref: OPX1000LFFEM
name: str
role: Role
property fem: OPX1000LFFEM
property node_id: str
property opx1000: OPX1000Blueprint
graph_nodes() → Iterable[GraphNode][source]
graph_edges() → Iterable[GraphEdge][source]
to_opx_output_ref(upsampling_mode: str = 'pulse', output_mode: OPXOutputMode = 'direct') → OPXOutputRef[source]
to_opx_input_ref() → OPXInputRef[source]
class semi_cr.core.station.instruments.opx1000.OPX1000LFFEM(parent_ref: 'OPX1000Blueprint', name: 'str', controller: 'str', slot: 'int', connections: 'list[OPX1000LFTerminal]')[source]

Bases: object

parent_ref: OPX1000Blueprint
name: str
controller: str
slot: int
connections: list[OPX1000LFTerminal]
classmethod from_instrument_spec(spec: QCoDeSInstrumentSpec, parent_ref: OPX1000Blueprint) → OPX1000LFFEM[source]
graph_nodes() → Iterable[GraphNode][source]
graph_edges() → Iterable[GraphEdge][source]
class semi_cr.core.station.instruments.opx1000.OPX1000Blueprint(name: str, ip_address: str, port: str, modules: list[OPX1000LFFEM])[source]

Bases: LabInstrument

Static OPX1000 blueprint for station graph routing.

This class does not instantiate the live QCoDeS/QUA driver. It only turns configured module connections into terminal nodes.

name: str
ip_address: str
port: str
modules: list[OPX1000LFFEM]
classmethod from_instrument_spec(spec: QCoDeSInstrumentSpec) → OPX1000Blueprint[source]
graph_nodes() → Iterable[GraphNode][source]

Returns terminal nodes for configured OPX module connections.

graph_edges() → Iterable[GraphEdge][source]

Returns graph edges for this OPX blueprint.

connect() → None

Connect this instrument when entering a measurement context.

disconnect() → None

Disconnect this instrument when leaving a measurement context.

is_connected() → bool | None

Return whether this instrument is connected or not. If the instrument is not connectable it returns None.

semi_cr.core.station.instruments.qcodes_proxy module

type semi_cr.core.station.instruments.qcodes_proxy.QCoDeSInstrumentSpec = tuple[str, Mapping[str, Any]]
class semi_cr.core.station.instruments.qcodes_proxy.QCoDeSStationSingleton[source]

Bases: object

We need a Station temporarily in order to construct the QCoDeS instruments from config. Maybe we could benefit from having an actual persistent QCoDeS station on NQCPStation and using that. I’m concerned about separation of concerns, so I’m opting for the smallest thing for now.

classmethod get_instance() → Station[source]
class semi_cr.core.station.instruments.qcodes_proxy.QCoDeSInstrumentProxy(qcodes_config: QCoDeSInstrumentSpec)[source]

Bases: LabInstrument, ABC

Base class for static instruments backed by a live QCoDeS instrument. QCoDeS represents a connection to an instrument as the _presence_ of a driver object. I.e. if the object exists, we may expect there to be a connection (more or less)… We wrap that behavior by maintaining a copy of the specification from the config files, and only inflating the actual QCoDeS instrument when it’s actually needed.

qcodes_config: QCoDeSInstrumentSpec
connect() → None[source]

In QCoDeS, connection means instantiating the driver with the configured instrument.

is_connected()[source]

Return whether this instrument is connected or not. If the instrument is not connectable it returns None.

disconnect()[source]

Disconnect this instrument when leaving a measurement context.

abstractmethod graph_edges() → Iterable[GraphEdge]

Return edges contributed to the station graph.

abstractmethod graph_nodes() → Iterable[GraphNode]

Return nodes contributed to the station graph.

name: str

semi_cr.core.station.instruments.spirack module

class semi_cr.core.station.instruments.spirack.SPIRackD5aTerminal(parent_ref: 'SPIRackD5aModule', name: 'str', channel: 'int', role: 'str | None')[source]

Bases: DCDriver

parent_ref: SPIRackD5aModule
name: str
channel: int
role: str | None
property module: SPIRackD5aModule
property spirack: SPIRackBlueprint
property node_id: str
graph_nodes() → Iterable[GraphNode][source]
graph_edges() → Iterable[GraphEdge][source]
set_voltage(voltage: VoltageLike) → None[source]

Set the voltage of the terminal. We delegate that logic to the D5a device.

get_voltage() → float[source]

Get the voltage of the terminal.

get_voltage_parameter(name: str = 'voltage') → qcodes.Parameter

Convenience method to allow QCoDeS control of the voltage on this terminal.

Parameters:

name – QCoDeS parameter name; must be a valid identifier.

class semi_cr.core.station.instruments.spirack.SPIRackD5aModule(parent_ref: 'SPIRackBlueprint', name: 'str', module_type: 'str', slot: 'int', channels: 'list[SPIRackD5aTerminal]')[source]

Bases: object

parent_ref: SPIRackBlueprint
name: str
module_type: str
slot: int
channels: list[SPIRackD5aTerminal]
classmethod from_instrument_spec(spec: QCoDeSInstrumentSpec, parent_ref: SPIRackBlueprint) → SPIRackD5aModule[source]
graph_nodes() → Iterable[GraphNode][source]
graph_edges() → Iterable[GraphEdge][source]
get_voltage(channel: int) → float[source]
set_voltage(channel: int, voltage: float) → None[source]
class semi_cr.core.station.instruments.spirack.SPIRackStaticTerminal(parent_ref: 'SPIRackStaticModule', name: 'str')[source]

Bases: object

parent_ref: SPIRackStaticModule
name: str
property module: SPIRackStaticModule
property node_id: str
graph_nodes() → Iterable[GraphNode][source]
graph_edges() → Iterable[GraphEdge][source]
class semi_cr.core.station.instruments.spirack.SPIRackStaticModule(parent_ref: 'SPIRackBlueprint', name: 'str', module_type: 'str', slot: 'int', connections: 'list[SPIRackStaticTerminal]', voltage_conversion_factor: 'float | None' = None, gain_v_per_a: 'float | None' = None, attributes: 'dict[str, Any]'=<factory>)[source]

Bases: object

parent_ref: SPIRackBlueprint
name: str
module_type: str
slot: int
connections: list[SPIRackStaticTerminal]
voltage_conversion_factor: float | None = None
gain_v_per_a: float | None = None
attributes: dict[str, Any]
classmethod from_instrument_spec(spec: QCoDeSInstrumentSpec, parent_ref: SPIRackBlueprint) → SPIRackStaticModule[source]
graph_nodes() → Iterable[GraphNode][source]
graph_edges() → Iterable[GraphEdge][source]
class semi_cr.core.station.instruments.spirack.SPIRackBlueprint(qcodes_config: QCoDeSInstrumentSpec, name: str, d5a_modules: list[SPIRackD5aModule], static_modules: list[SPIRackStaticModule])[source]

Bases: QCoDeSInstrumentProxy

Static SPIRack blueprint for station graph routing.

This class does not instantiate the live QCoDeS driver. It only turns configured module channels and connections into terminal nodes and edges.

name: str
d5a_modules: list[SPIRackD5aModule]
static_modules: list[SPIRackStaticModule]
classmethod from_instrument_spec(spec: QCoDeSInstrumentSpec) → SPIRackBlueprint[source]
graph_nodes() → Iterable[GraphNode][source]

Returns terminal nodes for configured SPIRack module terminals.

graph_edges() → Iterable[GraphEdge][source]

Returns graph edges for configured SPIRack module connections.

connect() → None

In QCoDeS, connection means instantiating the driver with the configured instrument.

disconnect()

Disconnect this instrument when leaving a measurement context.

is_connected()

Return whether this instrument is connected or not. If the instrument is not connectable it returns None.

qcodes_config: QCoDeSInstrumentSpec