:py:mod:`simcats` ================= .. py:module:: simcats .. autoapi-nested-parse:: SimCATS is a python framework for simulating charge stability diagrams (CSDs) typically measured during the tuning process of qubits. Subpackages ----------- .. toctree:: :titlesonly: :maxdepth: 3 config_samplers/index.rst distortions/index.rst ideal_csd/index.rst sensor/index.rst support_functions/index.rst Package Contents ---------------- Classes ~~~~~~~ .. autoapisummary:: simcats.Simulation Attributes ~~~~~~~~~~ .. autoapisummary:: simcats.default_configs Package Implementation Details ------------------------------ .. py:class:: Simulation(volt_limits_g1 = None, volt_limits_g2 = None, volt_limits_sensor_g1 = None, volt_limits_sensor_g2 = None, ideal_csd_config = None, sensor = SensorGeneric(), occupation_distortions = None, sensor_potential_distortions = None, sensor_response_distortions = None) Class for simulating a double dot tuning run using charge stability diagrams (CSDs). The objects of the class are initialized with an ideal CSD configuration, a sensor configuration and the desired types of distortions. It is then possible to record individual CSDs in the selected voltage range of the (plunger) gates g1 and g2. g1 and g2 represent the (plunger) gates of the double dot, used to mainly adjust the dot potentials. After the analysis of a CSD by means of a tuning algorithm to be tested, this algorithm should then suggest voltages for the next measurement until the desired configuration has been reached. Initializes an object of the class to perform the simulation of charge stability diagrams (CSDs) for a double dot experiment. It is assumed, that the sweeps are performed linewise. For 2D scans this means, that (plunger) gate 1 is swept while (plunger) gate 2 is kept at a fixed voltage (and stepped between g1 sweeps). For 1D scans this means, that both gates are swept simultaneously. Noise is always applied along the measurement direction (to take into account time dependencies and correlations). If f.e. in a 2D scan g1 is swept from larger to smaller voltages, the distortions is also applied in this direction. :param volt_limits_g1: Voltage limits of (plunger) gate 1 (second-/x-axis). Defines the range in which data can be queried during the simulation. If set to None, all voltage values are allowed. This can potentially lead to problems, if the structures are not available for some regions and no restriction is applied. Default is None. Example: [min_V1, max_V1] :type volt_limits_g1: Optional[np.ndarray] :param volt_limits_g2: Voltage limits of (plunger) gate 2 (first-/y-axis). Defines the range in which data can be queried during the simulation. If set to None, all voltage values are allowed. This can potentially lead to problems, if the structures are not available for some regions and no restriction is applied. Default is None. Example: [min_V2, max_V2] :type volt_limits_g2: Optional[np.ndarray] :param volt_limits_sensor_g1: Voltage limits of sensor gate 1 (second-/x-axis). Defines the range in which data can be queried during the simulation. If set to None, all voltage values are allowed. This can potentially lead to problems, if the structures are not available for some regions and no restriction is applied. Default is None. Example: [min_V1, max_V1] :type volt_limits_sensor_g1: Optional[np.ndarray] :param volt_limits_sensor_g2: Voltage limits of sensor gate 2 (first-/y-axis). Defines the range in which data can be queried during the simulation. If set to None, all voltage values are allowed. This can potentially lead to problems, if the structures are not available for some regions and no restriction is applied. Default is None. Example: [min_V2, max_V2] :type volt_limits_sensor_g2: Optional[np.ndarray] :param ideal_csd_config: Implementation of the IdealCSDInterface (from the ideal_csd module). Used to generate the ideal CSD data during the simulation. Default is None. :type ideal_csd_config: Optional[IdealCSDInterface] :param sensor: Implementation of the SensorInterface (from the sensor module). Used to calculate the sensor potential & response based on ideal CSD data. Default is SensorGeneric(). :type sensor: SensorInterface :param occupation_distortions: List of implementations of the OccupationDistortionInterface. This distortion type affects the occupations and lead transitions of the CSD (the "structure"). The supplied implementations are applied in the order they appear in the list. Default is None. :type occupation_distortions: Optional[List[OccupationDistortionInterface]] :param sensor_potential_distortions: List of implementations of the SensorPotentialDistortionInterface. This distortion type affects the sensor potential, which is calculated based on the occupations and (plunger) gate voltages. The supplied implementations are applied in the order they appear in the list. Default is None. :type sensor_potential_distortions: Optional[List[SensorPotentialDistortionInterface]] :param sensor_response_distortions: List of implementations of the SensorResponseDistortionInterface. This distortions type affects the sensor response, which is calculated based on the sensor potential. The supplied implementations are applied in the order they appear in the list. Default is None. :type sensor_response_distortions: Optional[List[SensorResponseDistortionInterface]] .. py:property:: volt_limits_g1 :type: Optional[numpy.ndarray] Returns the current plunger 1 voltage limit configuration of the system. This configuration can then be adjusted and is directly used as new configuration, as the object is returned as call by reference :returns: The allowed voltage range for (plunger) gate 1. :rtype: np.ndarray .. py:property:: volt_limits_g2 :type: Optional[numpy.ndarray] Returns the current (plunger) gate 2 voltage limit configuration of the system. This configuration can then be adjusted and is directly used as new configuration, as the object is returned as call by reference :returns: The allowed voltage range for (plunger) gate 2. :rtype: np.ndarray .. py:property:: volt_limits_sensor_g1 :type: Optional[numpy.ndarray] Returns the current sensor gate 1 voltage limit configuration of the system. This configuration can then be adjusted and is directly used as new configuration, as the object is returned as call by reference :returns: The allowed voltage range for sensor gate 1. :rtype: np.ndarray .. py:property:: volt_limits_sensor_g2 :type: Optional[numpy.ndarray] Returns the current sensor gate 2 voltage limit configuration of the system. This configuration can then be adjusted and is directly used as new configuration, as the object is returned as call by reference :returns: The allowed voltage range for sensor gate 2. :rtype: np.ndarray .. py:property:: ideal_csd_config :type: Optional[simcats.ideal_csd.IdealCSDInterface] Returns the current ideal CSD configuration of the system. This configuration can then be adjusted and is directly used as new configuration, as the object is returned as call by reference. :returns: Implementation of the IdealCSDInterface (part of module ideal_csd) :rtype: IdealCSDInterface .. py:property:: sensor :type: simcats.sensor.SensorInterface Returns the current sensor configuration of the system. This configuration can then be adjusted and is directly used as new configuration, as the object is returned as call by reference :returns: Implementation of the SensorInterface (from the sensor module). Used to calculate the sensor potential & response based on ideal CSD data. :rtype: SensorInterface .. py:property:: occupation_distortions :type: Union[List[simcats.distortions.OccupationDistortionInterface], None] Returns the current occupation distortion configuration of the system. This configuration can then be adjusted and is directly used as new configuration, as the object is returned as call by reference :returns: List with all occupation distortion implementations. :rtype: list .. py:property:: sensor_potential_distortions :type: Union[List[simcats.distortions.SensorPotentialDistortionInterface], None] Returns the current sensor potential distortion configuration of the system. This configuration can then be adjusted and is directly used as new configuration, as the object is returned as call by reference :returns: List with all sensor potential distortion implementations. :rtype: list .. py:property:: sensor_response_distortions :type: Union[List[simcats.distortions.SensorResponseDistortionInterface], None] Returns the current sensor response distortion configuration of the system. This configuration can then be adjusted and is directly used as new configuration, as the object is returned as call by reference :returns: List with all sensor response distortion implementations. :rtype: list .. py:method:: measure(sweep_range_g1, sweep_range_g2, volt_sensor_g1 = None, volt_sensor_g2 = None, resolution = np.array([100, 100])) Simulates CSD measurement for the specified voltage sweep(s) at the desired resolution. If two resolutions are supplied, a 2D scan is performed, and if only one resolution is supplied, a 1D scan is performed. :param sweep_range_g1: Voltage sweep range of (plunger) gate 1 (second-/x-axis). Example: [min_V1, max_V1] :type sweep_range_g1: np.ndarray :param sweep_range_g2: Voltage sweep range of (plunger) gate 2 (first-/y-axis). Example: [min_V2, max_V2] :type sweep_range_g2: np.ndarray :param volt_sensor_g1: Voltage applied at sensor gate 1 (second-/x-axis). Example: [min_V1, max_V1] :type volt_sensor_g1: Optional[float] :param volt_sensor_g2: Voltage applied at sensor gate 2 (first-/y-axis). Example: [min_V2, max_V2] :type volt_sensor_g2: Optional[float] :param resolution: The desired resolution (in pixels) for the two gates. If only one value is supplied, a 1D sweep is performed. Then, both gates are swept simultaneously. Default is np.array([100, 100]). Example: [res_g1, res_g2] :type resolution: Union[int, np.ndarray] :returns: Numpy array of the measured sensor signal (aka the CSD), 3-dimensional numpy array containing the electron occupations. The first two dimensions map to the axis of the CSD, while the third dimension indicates the dot of the corresponding occupation value. Numpy array containing a label mask for the lead-to-dot transitions. Dictionary with metadata (all parameters of the system & the measurement). The axes of the three arrays match to the supplied sweep range. If the sweep is f.e. performed from high to low voltage, the values in the array are also arranged in that way (lowest index would then map to the highest voltage). In general: axis 0 = y-axis = g2 = V2 and axis 1 = x-axis = g1 = V1. :rtype: Tuple[np.ndarray, np.ndarray, np.ndarray, Dict] .. py:method:: measure_sensor_scan(sweep_range_sensor_g1, sweep_range_sensor_g2, volt_g1 = None, volt_g2 = None, resolution = np.array([100, 100])) Simulates the measurement of a sensor scan under the specified voltage sweep(s) at the desired resolution. If two resolutions are supplied, a 2D scan is performed, and if only one resolution is supplied, a 1D scan is performed. :param sweep_range_sensor_g1: Voltage sweep range of sensor gate 1 (second-/x-axis). Example: [min_V1, max_V1] :type sweep_range_sensor_g1: np.ndarray :param sweep_range_sensor_g2: Voltage sweep range of sensor gate 2 (first-/y-axis). Example: [min_V2, max_V2] :type sweep_range_sensor_g2: np.ndarray :param volt_g1: Voltage applied at (plunger) gate 1 (second-/x-axis). :type volt_g1: Optional[float] :param volt_g2: Voltage applied at (plunger) gate 2 (first-/y-axis). :type volt_g2: Optional[float] :param resolution: The desired resolution (in pixels) for the two gates. If only one value is supplied, a 1D sweep is performed. Then, both gates are swept simultaneously. Default is np.array([100, 100]). Example: [res_g1, res_g2] :type resolution: Union[int, np.ndarray] :returns: Numpy array of the measured sensor signal, that is called sensor scan. Numpy array, the conductive area mask as a label mask that indicates the non-conductive area, sensor oscillation regime and fully conductive area. Numpy array as a second label mask, that marks the peaks of the Coulomb peaks as integers. Dictionary with metadata (all parameters of the system & the measurement). The axes of the three arrays match to the supplied sweep range. If the sweep is f.e. performed from high to low voltage, the values in the array are also arranged in that way (lowest index would then map to the highest voltage). In general: axis 0 = y-axis = sensor_g2 = sensor_V2 and axis 1 = x-axis = sensor_g1 = sensor_V1. :rtype: Tuple[np.ndarray, np.ndarray, np.ndarray, Dict] .. py:data:: default_configs Default configurations for the Simulation class. Includes the default configurations "GaAs_v1" and "GaAs_v2_extended_sensor", which can be used to instantiate an object of the Simulation class (have a look at the jupyter notebook `example_SimCATS_Simulation_class.ipynb` for an example). **Information for contributors / developers**: The dictionary itself is stored in the file _default_configs.py to ensure a clean separation between the Simulation class and the configurations. :type: Dict