stanza.routines.builtins.dqd_search.utils
Module Contents
Classes
Functions
API
Random sweep configuration in 2D voltage space.
Value: None
Value: None
Value: None
Value: None
Value: None
Indices for different gate types in the voltage array.
Value: None
Value: None
Value: None
Extract indices for each gate type from the gate list.
Parameters:
List of gate electrode names.
Device instance with get_gate_by_type method.
Returns:
GateIndices with plunger, reservoir, and barrier indices.
Generate evenly-spaced points along a line segment.
Parameters:
(d,) array with starting coordinates.
(d,) array with normalized direction vector.
Total sweep distance.
Number of points in the trace.
Returns:
(n_points, d) array of coordinates along the line.
Generate random sweep that stays within bounds.
Parameters:
(min, max) voltage bounds for X axis.
(min, max) voltage bounds for Y axis.
Voltage spacing per step.
Number of points in sweep.
Returns:
SweepGeometry if sweep stays in bounds, None otherwise.
Construct full voltage array from plunger sweep voltages.
Works with arbitrary-dimensional sweep arrays (1D, 2D, 3D, etc). Applies fixed voltages to reservoir and barrier gates based on characterization data.
Parameters:
(…, 2) array of plunger voltages.
List of all gate names.
Indices for each gate type.
Transition voltages for all gates.
Saturation voltages for all gates.
Optional explicit barrier voltages (overrides defaults).
Returns:
(…, num_gates) array of voltages.
Calculate inter-peak spacings in voltage space.
Parameters:
Indices of detected peaks.
(num_points, 2) array of voltage coordinates.
Returns:
Array of inter-peak spacings, or None if fewer than 3 peaks.
Get global turn-on voltage from results.
Parameters:
ResultsRegistry instance.
Returns:
Global turn-on voltage.
Raises:
ValueError: If global accumulation results not found.
Get combined gate characterization results.
Parameters:
ResultsRegistry instance.
Returns:
Combined dict of reservoir and finger gate characterization.
Raises:
ValueError: If characterization results not found.
Get voltages for all gates.
Parameters:
List of gate names.
Key to extract (“saturation_voltage”, “cutoff_voltage”, or “transition_voltage”).
ResultsRegistry instance.
Returns:
Dict mapping gate names to voltages.
Get plunger bounds for all plunger gates.
Parameters:
List of plunger gate names.
ResultsRegistry instance.
Returns:
Dict mapping plunger gate names to (min, max) voltage bounds.
Get safe voltage bounds.
Parameters:
ResultsRegistry instance.
Returns:
(min, max) safe voltage bounds.
Raises:
ValueError: If leakage test results not found.
Measure current and classify result.
Performs device measurement sweep and classifies the resulting current data using a specified ML model.
Parameters:
Device instance.
Models client.
Gate electrode names.
Voltage array.
Current measurement electrode.
Classification model name.
Optional reshape dimensions for output.
Returns:
Tuple of (currents, classification, score).
Log measurement data to session.
Parameters:
Logger session instance (optional).
Measurement name.
Unique measurement identifier.
Measurement data dict.
Measurement metadata dict.
Name of the routine performing the measurement.
Log classification result to session.
Parameters:
Logger session instance (optional).
Unique measurement identifier.
Type of measurement being classified.
Classification result (True/False).
Classification confidence score.
Classification metadata dict.
Name of the routine performing the classification.

