nanotune.device_tuner.tuner

nanotune.device_tuner.tuner.set_back_voltages(gates: List[DeviceChannel]) Generator[None, None, None][source]

Context manager setting back gate voltages to their initial values. If gates need to be set in a specific order, then this order needs to be respected on the list ‘gates’.

Parameters

gates – List of DeviceChannels, i.e. gates of a Device.

Returns

generator returning None

class nanotune.device_tuner.tuner.TuningHistory(results: ~typing.Dict[str, ~nanotune.device_tuner.tuningresult.MeasurementHistory] = <factory>)[source]

Bases: object

Container holding tuning results of several devices.

Parameters

results – Mapping device name to an instance of MeasurementHistory.

results: Dict[str, MeasurementHistory]
update(device_name: str, new_result: Union[TuningResult, MeasurementHistory])[source]

Adds a tuning result - either an instance of TuningResult or MeasurementHistory.

Parameters
  • device_name – name of Device instance.

  • new_result – Either instance of TuningResult or MeasurementHistory.

class nanotune.device_tuner.tuner.Tuner(name: str, data_settings: DataSettings, classifiers: Classifiers, setpoint_settings: SetpointSettings)[source]

Bases: Instrument

Tuner base class. It implements common methods used in both device characterization and dot tuning.

Parameters
  • classifiers – a setting.Classifiers instance holding all required classifiers. Eg. pinchoff.

  • data_settings – A settings.DataSettings instance with data related information such as db_name and normalization_constants.

  • setpoint_settings – A settings.SetpointSettings instance with setpoint related information such as voltage_precision.

  • tuning_history – A TuningHistory instance holding all tuning results.

property setpoint_settings: SetpointSettings

Setpoint settings property.

property data_settings: DataSettings

Data settings property.

update_normalization_constants(device: Device)[source]

Measures and sets normalization constants of a given device It gets the maximum and minimum signal for all readout methods in device.readout. It will first set all gate voltages to their most negative allowed values to record the minimal signal and then to their most positive allowed ones, measuring the maximum signal. The device is put back into state where it was before, with gates being set in the order they are listed in device.gates.

Parameters

device – the device to measure, an instance of nt.Device

characterize_gate(device: Device, gate: DeviceChannel, use_safety_voltage_ranges: bool = False, iterate: bool = False, voltage_precision: Optional[float] = None, comment: Optional[str] = None) TuningResult[source]

Characterizes a single DeviceChannel/gate of a device. Other than the gate swept, it does not set any voltages.

Parameters
  • device – device to tune.

  • gate – DeviceChannel instance/the gate to characterize.

  • use_safety_voltage_ranges – whether or not the entire safe voltage range should be swept. If False, the gate’s current_valid_range will be used.

  • iterate – whether the gate should be characterized again over an extended voltage if a poor result is measured. Only makes sense if use_safety_voltage_ranges=False. The new ranges are determined based on the range update directives returned by PinchoffFit.

  • voltage_precision – optional voltage precision, i.e. the voltage difference between subsequent setpoints. If none given, the value in self.data_settings is taken. The optional input here can be used to temporarily overwrite the default value.

  • comment – optional string added to the tuning result.

Returns

TuningResult

measure_initial_ranges_2D(device: Device, gate_to_set: DeviceChannel, gates_to_sweep: Sequence[DeviceChannel], voltage_step: float = 0.2) Tuple[Tuple[float, float], MeasurementHistory][source]

Estimates the initial valid voltage range of capacitively coupled gates - the range in which gate_to_set in combination with gates_to_sweep is able to deplete the electron gas nearby. Example: a 2DEG device with a top barrier, for which we wish to determine the range within which all relevant gates, here left, central and right barrier, pinch off. It can also be used to determine the range of a bottom gate beneath a 1D system. It executes get_pairwise_pinchoff twice: First it determines the least negative voltage of gate_to_set for which all gates_to_sweep pinch off by decreasing gate_to_set by voltage_step and characterizing all gates_to_sweep. It retains the gate which pinched off last and gets a pairwise pinchoff by setting this last gate to descresing voltages, characterizing gate_to_set at each value. The first time gate_to_set pinches off the low_voltage, or L, is retained as the upper range limit.

Parameters
  • device – device to tune.

  • gate_to_set – DeviceChannel instance of the gate for which an initial valid range should be determined.

  • gates_to_sweep – DeviceChannel instances of the gates which couple to gate_to_set and thus affect its valid range.

  • voltage_step – Voltage difference between consecutive gate voltage sets, i.e. by how much e.g. gate_to_set will be decreased at each iteration.

Returns
  • Tuple[float, float] – Valid range of gate_to_set.

  • MeasurementHistory – Collection of tuning results.

get_pairwise_pinchoff(device: Device, gate_to_set: DeviceChannel, gates_to_sweep: Sequence[DeviceChannel], voltages_to_set: Iterable[float]) Tuple[MeasurementHistory, DeviceChannel, float][source]

Determines voltage of gate_to_set at which all gates_to_sweep pinch off. Decreased gate_to_set’s voltage and characterizes those gates_to_sweep which have not pinched off at previous iterations.

Parameters
  • device – device to tune.

  • gate_to_set – DeviceChannel instance of the gate for which an initial valid range should be determined.

  • gates_to_sweep – DeviceChannel instances of the gates which couple to gate_to_set and thus affect its valid range.

  • voltages_to_set – sequence of voltages which gate_to_set is set and for which gates_to_sweep are characterized.

Returns
  • MeasurementHistory

  • DeviceChannel – Gate to pinch off last (as voltage of gate_to_set is decreased).

  • float – voltage gate_to_set at which all gates_to_sweep pinched off.

measurement_data_settings(device: Device) DataSettings[source]

Returns data settings with device specific information, e.g. normalization constants added.

Parameters

device – device to tune.

Returns

DataSettings – new data settings including normalization constants.

measurement_setpoint_settings(parameters_to_sweep: Sequence[Parameter], ranges_to_sweep: Sequence[Sequence[float]], safety_voltage_ranges: Sequence[Sequence[float]], voltage_precision: Optional[float] = None) SetpointSettings[source]

Returns setpoint settings with updated parameters_to_sweep, ranges_to_sweep, safety_voltage_ranges and voltage_precision.

Parameters
  • parameters_to_sweep – List of QCoDeS parameters which will be swept.

  • ranges_to_sweep – List of voltage ranges, in the same order as parameters_to_sweep.

  • safety_voltage_ranges – List of safe voltage ranges, in the same order as parameters_to_sweep.

  • voltage_precision – optional float, voltage difference between setpoints.

Returns

SetpointSettings – updated setpoint settings.

get_charge_diagram(device: Device, gates_to_sweep: Sequence[DeviceChannel], use_safety_voltage_ranges: bool = False, iterate: bool = False, voltage_precision: Optional[float] = None, comment: Optional[str] = None) TuningResult[source]

Measures a charge diagram by sweeping gates_to_sweep. The returned TuningResult instance also contains information about dot segments, such as their voltage sub-ranges and classification outcome (tuningresult.ml_result[‘dot_segments’]). The tuning results is added to tuner’s tuning_history.

Parameters
  • device – device to tune.

  • gates_to_sweep – DeviceChannel instances of gates to sweep.

  • use_safety_voltage_ranges – whether entire safety voltage range should be swept. Current valid range is taken if not. Default is False.

  • iterate – whether subsequent diagrams with over extended ranges should be taken if the measurement is classified as poor/ not the desired regime.

  • voltage_precision – optional float, voltage difference between setpoints. If none given, the value in self.data_settings is taken. The optional input here can be used to temporarily overwrite the default value.

  • comment – optional comment added to the tuning result.

Returns

TuningResult – tuning result including classification result and dot segment info (tuningresult.ml_result[‘dot_segments’]).

nanotune.device_tuner.tuner.linear_voltage_steps(voltage_range: Sequence[float], voltage_step: float) List[float][source]

Returns linearly spaced setpoints.

Parameters
  • voltage_range – interval within which setpoints should be computed.

  • voltage_step – voltage difference between setpoints.

Returns

Sequence[float] – linearly spaced setpoints.