6.3.2. qumada.measurement.measurement

class qumada.measurement.measurement.CustomSweep(param, setpoints, delay=0, post_actions=())[source]

Bases: AbstractSweep

Custom sweep from array of setpoints.

Parameters:
  • param (ParameterBase) – Qcodes parameter to sweep.

  • setpoints (ndarray) – Array of setpoints.

  • delay (float) – Time in seconds between two consequtive sweep points

property delay: float

Delay between two consecutive sweep points.

get_setpoints()[source]

1D array of setpoints

Return type:

ndarray

property num_points: int

Number of sweep points.

property param: ParameterBase

Returns the Qcodes sweep parameter.

property post_actions: Sequence[Callable[[], None]]

actions to be performed after setting param to its setpoint.

class qumada.measurement.measurement.MeasurementScript[source]

Bases: ABC

Base class for measurement scripts.

The abstract function “run” has to be implemented.

PARAMETER_NAMES: set[str] = {'amplitude', 'aux_voltage_1', 'aux_voltage_2', 'count', 'current', 'current_compliance', 'current_x_component', 'current_y_component', 'frequency', 'output_enabled', 'phase', 'temperature', 'test_parameter', 'time_constant', 'voltage', 'voltage_offset', 'voltage_x_component', 'voltage_y_component'}
add_gate_parameter(parameter_name, gate_name=None, parameter=None)[source]

Adds a gate parameter to self.gate_parameters.

Parameters:
  • parameter_name (str) – Name of the parameter. Has to be in MeasurementScript.PARAMETER_NAMES.

  • gate_name (str) – Name of the parameter’s gate. Set this, if you want to define the parameter under a specific gate. Defaults to None.

  • parameter (Parameter) – Custom parameter. Set this, if you want to set a custom parameter. Defaults to None.

Return type:

None

clean_up(additional_actions=None, **kwargs)[source]

Things to do after the measurement is complete.

Parameters:

additional_actions (list[Callable], optional) – List of functions to be called after the measurement is complete. Defaults to None.

Return type:

None

generate_lists()[source]

Creates lists containing the corresponding parameters for further use.

The .channels list always contain the QCoDes parameters that can for example directly be called to get the corresponding values.

E.g. [param() for param in self.gettable_channels] will return a list of the current values of all gettable parameters.

The .parameters lists contain dictionaries with the keywords “gate” for the corresponding terminal name and “parameter” for the parameter name. This is usefull to get the keys for specific parameters from the gate_parameters.

gettable and static lists both include static gettable parameters, the static_gettable lists only the ones that are both, static and gettable. This is e.g. useful for logging static parameters that cannot be buffered and thus cause errors in buffered measurements.

Return type:

None

initialize(dyn_ramp_to_val=False, inactive_dyn_channels=None)[source]

Sets all static/sweepable parameters to their value/start value. If parameters are both, static and dynamic, they will be set to the “value” property and not to the “start” property. Parameters that are marked “dynamic” and “gettable” will not be added to the “self.gettable_parameters” as they are recorded anyway and will cause issues with dond functions. Provides gettable_parameters, static_parameters and dynamic parameters to measurement class and generates AbstractSweeps from the measurement :rtype: None

properties. Sweeps form a list that can be found in “dynamic_sweeps” Relevant kwargs:

dyn_ramp_to_val: Bool [False]: If true, dynamic parameters are

ramped to their value, before their sweep, else they are ramped to their first setpoint

inactive_dyn_channels: List of dynamic channels that are to be

treated as static for this initialization. They are always ramped to their value instead of their sweeps starting point.)

readout_buffers(**kwargs)[source]

Readout all buffer and return the results as list of tuples (parameters, values) as required by qcodes measurement context manager.

Parameters:

**kwargs (dict) –

timestamps (bool): Set True if timestamp data is to be included

in the results. Not implemented yet.

Returns:

Results, list with one tuple for each subscribed parameter. Tuple contains (parameter, measurement_data).

Return type:

dict

ready_buffers(**kwargs)[source]

Setup all buffers registered in the measurement and start them.

Return type:

None

reset()[source]

Resets all static/dynamic parameters to their value/start value.

Return type:

None

abstract run()[source]

Runs the already setup measurement. you can call self.initialize in here. Abstract method.

Return type:

list

setup(parameters, metadata, *, add_script_to_metadata=True, add_parameters_to_metadata=True, buffer_settings={}, measurement_name=None, **settings)[source]

Adds all gate_parameters that are defined in the parameters argument to the measurement. Allows to pass metadata to measurement and update the metadata with the script.

Parameters:
  • parameters (dict) – Dictionary containing parameters and their settings

  • metadata (Metadata) – Object containing/handling metadata that should be available for the measurement.

  • add_script_to_metadata (bool) – If True (default), adds this object’s content to the metadata.

  • add_parameters_to_metadata (bool) – If True (default), add the parameters to the metadata.

  • settings (dict) – Settings regarding the measurement script. Kwargs: ramp_rate: Defines how fast parameters are ramped during initialization and reset. setpoint_intervalle: Defines how smooth parameters are ramped during initialization and reset.

Return type:

None

class qumada.measurement.measurement.QtoolsStation(*components, config_file=None, use_monitor=None, default=True, update_snapshot=True, **kwargs)[source]

Bases: Station

Station object, inherits from qcodes Station.

class qumada.measurement.measurement.VirtualGate[source]

Bases: object

Virtual Gate

property functions

List of equipment Functions, the virtual gate shall have.

qumada.measurement.measurement.create_hook(func, hook)[source]

Decorator to hook a function onto an existing function. The hook function can use keyword-only arguments, which are omitted prior to execution of the main function.

qumada.measurement.measurement.is_measurement_script(o)[source]