nanotune.tuningstages.gatecharacterization1d

class nanotune.tuningstages.gatecharacterization1d.GateCharacterization1D(data_settings: DataSettings, setpoint_settings: SetpointSettings, readout: Readout, classifier: Classifier, noise_level: float = 0.001, main_readout_method: ReadoutMethods = ReadoutMethods.transport, voltage_interval_to_track=0.3)[source]

Bases: TuningStage

Tuning stage performing individual gate characterizations.

Parameters
  • stage – String indicating which stage it implements, e.g. gatecharacterization.

  • data_settings – Dictionary with information about data, e.g. where it should be saved and how it should be normalized. Required fields are ‘db_name’, ‘db_folder’ and ‘normalization_constants’.

  • setpoint_settings – Dictionary with information required to compute setpoints. Necessary keys are ‘current_valid_ranges’, ‘safety_voltage_ranges’, ‘parameters_to_sweep’ and ‘voltage_precision’.

  • readout – Dictionary mapping string identifiers such as ‘transport’ to QCoDeS parameters measuring/returning the desired quantity (e.g. current throught the device).

  • current_valid_ranges – List of voltages ranges (tuples of floats) to measure.

  • safety_voltage_ranges – List of satefy voltages ranges, i.e. safety limits within which gates don’t blow up.

  • classifier – Pre-trained nt.Classifier predicting the quality of a pinchoff curve.

  • noise_level – Relative level above which a measured output is considered being above the noise floor. Is compared to a normalized signal.

  • main_readout_method – Readout method to use for early finish check.

  • voltage_interval_to_track – Voltage interval over which the measured output is checked

  • fit_class – Returns the class used to perform data fitting, i.e. PinchoffFit.

property fit_class

Data fitting class to extract pinchoff features.

machine_learning_task(run_id: int) Dict[str, Any][source]

Executes the post-measurement machine learning task, a binary classification predicting the quality of the measurement. The result is saved in a dictionary with ‘quality’ and ‘regime’ keys, the latter for completeness and compatibility with general tuning stage methods.

Parameters

run_id – QCoDeS data run ID.

Returns

dict – The classification outcome, saved under the ‘quality’ key. For completeness, the ‘regime’ key maps onto ‘pinchoff’.

verify_machine_learning_result(ml_result: Dict[str, int]) bool[source]

Verifies whether a good pinchoff curve has been predicted.

Parameters

ml_result – Result returned by machine_learning_task, a dictionary with ‘quality’ and ‘regime’ keys.

Returns

bool – Whether the desired outcome has been found.

conclude_iteration(tuning_result: TuningResult, current_valid_ranges: Sequence[Sequence[float]], safety_voltage_ranges: Sequence[Sequence[float]], current_iteration: int, max_n_iterations: int) Tuple[bool, Sequence[Sequence[float]], List[str]][source]

Method checking if one iteration of a run_stage measurement cycle has been successful. An iteration of such a measurement cycle takes data, performs a machine learning task, verifies and saves the machine learning result. If a repetition of this cycle is supported, then conclude_iteration determines whether another iteration should take place and which voltage ranges need to be measured. It wraps conclude_iteration_with_range_update in .base_tasks.py and resets self._recent_readout_output. self._recent_readout_output is used in self.finish_early to detect a pinched-off regime.

Parameters
  • tuning_result – Result of the last run_stage measurement cycle.

  • current_valid_ranges – Voltage ranges last swept.

  • safety_voltage_ranges – Safety voltage ranges, i.e. largest possible range that could be swept.

  • current_iteration – Number of current iteration.

  • max_n_iterations – Maximum number of iterations to perform before abandoning.

Returns
  • bool – Whether this is the last iteration and the stage is done/to be stopped.

  • list – New voltage ranges to sweep if the stage is not done.

  • list – List of strings indicating failure modes.

get_range_update_directives(run_id: int, current_valid_ranges: Sequence[Sequence[float]], safety_voltage_ranges: Sequence[Sequence[float]]) Tuple[List[str], List[str]][source]

Determines directives indicating if the current voltage ranges need to be extended or shifted. It first gets these directives from the data fit using get_fit_range_update_directives defined in .base_tasks.py and then checks if they can be put into action using get_range_directives_gatecharacterization defined in gatecharacterization_tasks.py. The check looks at whether safety ranges have been reached already, or whether a voltage range extension is possible.

Parameters
  • run_id – QCoDeS data run ID.

  • current_valid_ranges – Last voltage range swept.

  • safety_voltage_ranges – Safety range of gate swept.

Returns
  • list – List with range update directives.

  • list – List with issues encountered.

finish_early(current_output_dict: Dict[str, float]) bool[source]

Checks the average strength of measured signal over a given voltage interval is below the noise floor. If this is the case, the boolean returned indicates that the measurement can be stopped. It wraps finish_early_pinched_off defined in .gatecharacterization_tasks.py.

Parameters

current_output_dict – Dictionary mapping strings indicating the readout method to QCoDeS parameters.

Returns

bool – Whether the measurement can be stopped early.