Temperature Behavior¶
Header: fiction/technology/sidb/simulation/analysis/critical_temperature.hpp
-
struct critical_temperature_stats¶
This struct stores the result of the temperature simulation.
Public Functions
-
inline void report(std::ostream &out = std::cout) const¶
Prints the simulation results to the given output stream.
- Parameters:
out – Output stream.
Public Members
-
mockturtle::stopwatch::duration time_total = {0}¶
The total runtime of the critical temperature computation.
-
sidb::model::simulation_parameters sim_params = {}¶
All parameters for physical SiDB simulations.
-
std::string algorithm_name = {}¶
Name of the algorithm used to compute the physically valid charge distributions.
-
uint64_t num_valid_lyt = {}¶
Number of physically valid charge configurations.
-
double energy_between_ground_state_and_first_erroneous = std::numeric_limits<double>::infinity()¶
Energy difference between the ground state and the first (erroneous) excited state (unit: meV).
-
inline void report(std::ostream &out = std::cout) const¶
-
struct critical_temperature_params¶
This struct stores the parameters for the Critical Temperature algorithm.
Public Members
-
sidb::simulation::logic::is_operational_params operational_params = {}¶
Operational parameters. Their timeout bounds the entire temperature calculation, including every input pattern and temperature step. Finite budgets reject ClusterComplete and throw
utils::timeout_erroron expiration.
-
double confidence_level = {0.99}¶
Probability threshold for ground state population. The temperature at which the simulation finds the ground state to be populated with a probability of less than the given percentage, is determined to be the critical temperature. For gate-based simulation, this is the probability of erroneous calculations of the gate.
-
double max_temperature = {400}¶
Maximum simulation temperature beyond which no simulation will be conducted (~ 126 °C by default) (unit: K).
-
uint64_t iteration_steps = {80}¶
Number of iteration steps for the QuickSim algorithm (only applicable if engine == QUICKSIM).
-
double alpha = {0.7}¶
Alpha parameter for the QuickSim algorithm (only applicable if engine == QUICKSIM).
-
utils::progress_callback on_progress = {}¶
Callback that receives the number of simulated input patterns (gate-based) or the progress of the physical simulation (non-gate-based).
-
utils::worker_progress_callback on_worker_progress = {}¶
Reports logical worker activity with a fixed worker count for each invocation.
-
sidb::simulation::logic::is_operational_params operational_params = {}¶
-
inline double fiction::sidb::simulation::analysis::critical_temperature_gate_based(const layout &lyt, const std::vector<kitty::dynamic_truth_table> &spec, const critical_temperature_params ¶ms = {}, critical_temperature_stats *pst = nullptr)¶
This algorithm performs temperature-aware SiDB simulation as proposed in “Temperature Behavior of Silicon Dangling Bond Logic” by J. Drewniok, M. Walter, and R. Wille in IEEE NANO 2023 (https://ieeexplore.ieee.org/document/10231259). It comes in two flavors: gate-based and non-gate based.
For Gate-based Critical Temperature Simulation, the Critical Temperature is defined as follows: The temperature at which the erroneous charge distributions are populated by more than \(1 - \eta\), where \(\eta \in [0,1]\).
- Parameters:
lyt – The layout to simulate.
spec – Expected Boolean function of the layout given as a multi-output truth table.
params – Simulation and physical parameters.
pst – Statistics.
- Returns:
The critical temperature (unit: K).
-
inline double fiction::sidb::simulation::analysis::critical_temperature_gate_based(const std::vector<layout> &input_pattern_layouts, const std::vector<kitty::dynamic_truth_table> &spec, const critical_temperature_params ¶ms, const std::vector<logic::bdl_pair> &output_bdl_pairs, const std::vector<logic::bdl_wire> &input_bdl_wires, const std::vector<logic::bdl_wire> &output_bdl_wires, critical_temperature_stats *pst = nullptr)¶
Gate-based Critical Temperature simulation of an SiDB layout from its pre-generated input pattern layouts.
This overload takes one layout per input pattern together with the BDL detection results, instead of deriving all of them from the layout. Since neither the input configuration nor the BDL pairs and wires depend on the simulation parameters, a caller that simulates the same layout under many parameter settings can determine them once with
generate_bdl_input_pattern_layouts,detect_bdl_pairsanddetect_bdl_wiresand pass them to every call, instead of re-deriving them each time.The layouts and the detection results are only read and may be shared by concurrent calls.
- Parameters:
input_pattern_layouts – One layout per input pattern, indexed by input pattern, as generated by
generate_bdl_input_pattern_layouts.spec – Expected Boolean function of the layout given as a multi-output truth table.
params – Simulation and physical parameters.
output_bdl_pairs – Output BDL pairs of the layout.
input_bdl_wires – BDL input wires of the layout.
output_bdl_wires – BDL output wires of the layout.
pst – Statistics.
- Throws:
std::invalid_argument – if
specis empty, if the number of input pattern layouts does not match the number of input combinations ofspec, or if the number of output BDL pairs does not match the number of truth tables.- Returns:
The critical temperature (unit: K).
-
inline double fiction::sidb::simulation::analysis::critical_temperature_non_gate_based(const layout &lyt, const critical_temperature_params ¶ms = {}, critical_temperature_stats *pst = nullptr)¶
For Non-gate-based Critical Temperature simulation, the Critical Temperature is defined as follows: The temperature at which the excited charge distributions are populated by more than \(1 - \eta\), where \(\eta \in [0,1]\) is the confidence level for the presence of a working gate.
- Parameters:
lyt – The layout to simulate.
params – Simulation and physical parameters.
pst – Statistics.
- Returns:
The critical temperature (unit: K)
Header: fiction/technology/sidb/simulation/analysis/occupation_probability_of_excited_states.hpp
-
inline double fiction::sidb::simulation::analysis::calculate_boltzmann_factor(const double energy, const double min_energy, const double temperature) noexcept¶
This function computes the Boltzmann factor for a given energy, the minimal energy, and the temperature.
- Parameters:
energy – Boltzmann factor for the given energy is calculated.
min_energy – Minimum energy of the system.
temperature – Temperature of the system (unit: K).
- Returns:
Boltzmann factor.
-
inline double fiction::sidb::simulation::analysis::occupation_probability_gate_based(const energy_and_state_type &est, const double temperature) noexcept¶
This function computes the occupation probability of erroneous charge distributions (output charge does not match the expected output according the truth table) at a given temperature.
- Parameters:
est – This contains the energies of all possible charge distributions together with the information if the charge distribution (state) is transparent or erroneous.
temperature – System temperature to assume (unit: K).
- Returns:
The occupation probability of all erroneous states is returned.
-
inline double fiction::sidb::simulation::analysis::occupation_probability_non_gate_based(const energy_distribution &energy_dist, const double temperature) noexcept¶
This function computes the occupation probability of excited states (charge distributions with energy higher than the ground state) at a given temperature.
- Parameters:
energy_dist – This contains the energies in eV of all possible charge distributions with the degeneracy.
temperature – System temperature to assume (unit: K).
- Returns:
The total occupation probability of all excited states is returned.
Header: fiction/technology/sidb/simulation/analysis/calculate_energy_and_state_type.hpp
-
enum class fiction::sidb::simulation::analysis::state_type : uint8_t¶
Label to categorize ground and excited states of an SiDB layout.
Values:
-
enumerator ACCEPTED¶
A state is accepted if the charge distribution encodes the desired logic.
-
enumerator REJECTED¶
A state is rejected if the charge distribution does not encode the desired logic. Moreover, if kinks are rejected, a charge distribution that encodes the logic, but does show kinks, is rejected.
-
enumerator ACCEPTED¶
-
using fiction::sidb::simulation::analysis::energy_and_state_type = std::vector<std::pair<double, state_type>>¶
Electrostatic potential energies (in eV) paired with their accepted or rejected state types.
-
inline energy_and_state_type fiction::sidb::simulation::analysis::calculate_energy_and_state_type_with_kinks_accepted(const energy_distribution &energy_dist, const std::vector<charge_distribution> &valid_charge_distributions, const std::vector<logic::bdl_pair> &output_bdl_pairs, const std::vector<kitty::dynamic_truth_table> &spec, const uint64_t input_index)¶
Labels every energy level of an energy distribution by whether the physically valid charge distributions at that level encode the expected output for the given input pattern (
ACCEPTED) or not (REJECTED). Kinks in the wires are tolerated: only the output BDL pairs are inspected.- Parameters:
energy_dist – The energy distribution of the charge distributions.
valid_charge_distributions – The physically valid charge distributions.
output_bdl_pairs – The output BDL pairs of the layout.
spec – The Boolean function(s) to implement.
input_index – The input pattern the charge distributions were simulated for.
- Returns:
The energies with their state types, ascending by energy.
-
inline energy_and_state_type fiction::sidb::simulation::analysis::calculate_energy_and_state_type_with_kinks_rejected(const layout &lyt, const energy_distribution &energy_dist, const std::vector<charge_distribution> &valid_charge_distributions, const std::vector<kitty::dynamic_truth_table> &spec, const uint64_t input_index, const std::vector<logic::bdl_wire> &input_bdl_wires, const std::vector<logic::bdl_wire> &output_bdl_wires)¶
Like
calculate_energy_and_state_type_with_kinks_accepted, but a charge distribution with kinks in its wires isREJECTEDas well: every energy level isACCEPTED, and additionallyREJECTEDif any of its charge distributions fails the logic match with kinks rejected.- Parameters:
lyt – The layout the charge distributions belong to.
energy_dist – The energy distribution of the charge distributions.
valid_charge_distributions – The physically valid charge distributions.
spec – The Boolean function(s) to implement.
input_index – The input pattern the charge distributions were simulated for.
input_bdl_wires – The input BDL wires of
lyt.output_bdl_wires – The output BDL wires of
lyt.
- Throws:
std::out_of_range – if logic validation encounters an invalid lattice basis index.
- Returns:
The energies with their state types.
- class critical_temperature_stats¶
This struct stores the result of the temperature simulation.
- property algorithm_name¶
Name of the algorithm used to compute the physically valid charge distributions.
- property energy_between_ground_state_and_first_erroneous¶
Energy difference between the ground state and the first (erroneous) excited state (unit: meV).
- property num_valid_lyt¶
Number of physically valid charge configurations.
- critical_temperature_gate_based(lyt: sidb_layout, spec: Sequence[dynamic_truth_table], *, timeout: int = 18446744073709551615, base: int = 3, mu_minus: float = -0.32, epsilon_r: float = 5.6, lambda_tf: float = 5.0, sim_engine: sidb_simulation_engine = sidb_simulation_engine.QUICKEXACT, threshold_bdl_interdistance: float = 2.0, minimum_distance: float = 0.75, maximum_distance: float = 1.5, input_bdl_config: input_bdl_configuration = input_bdl_configuration.PERTURBER_DISTANCE_ENCODED, op_condition: operational_condition = operational_condition.TOLERATE_KINKS, strategy_to_analyze_operational_status: operational_analysis_strategy = operational_analysis_strategy.SIMULATION_ONLY, confidence_level: float = 0.99, max_temperature: float = 400.0, on_progress: Callable[[str, int, int], None] | None = None, on_worker_progress: Callable[[int, int, str, int, int, bool], None] | None = None, stats: critical_temperature_stats | None = None) float¶
- critical_temperature_gate_based(input_pattern_layouts: Sequence[sidb_layout], spec: Sequence[dynamic_truth_table], output_bdl_pairs: Sequence[bdl_pair], input_bdl_wires: Sequence[bdl_wire], output_bdl_wires: Sequence[bdl_wire], *, timeout: int = 18446744073709551615, base: int = 3, mu_minus: float = -0.32, epsilon_r: float = 5.6, lambda_tf: float = 5.0, sim_engine: sidb_simulation_engine = sidb_simulation_engine.QUICKEXACT, minimum_distance: float = 0.75, maximum_distance: float = 1.5, input_bdl_config: input_bdl_configuration = input_bdl_configuration.PERTURBER_DISTANCE_ENCODED, op_condition: operational_condition = operational_condition.TOLERATE_KINKS, strategy_to_analyze_operational_status: operational_analysis_strategy = operational_analysis_strategy.SIMULATION_ONLY, confidence_level: float = 0.99, max_temperature: float = 400.0, on_progress: Callable[[str, int, int], None] | None = None, on_worker_progress: Callable[[int, int, str, int, int, bool], None] | None = None, stats: critical_temperature_stats | None = None) float
Overloaded function.
Overload 1
Determine the critical temperature of an SiDB gate implementing the truth tables. The keyword options select physical values, operational analysis, confidence, and temperature bounds. Raises ValueError for confidence outside (0, 1) or a temperature outside the centikelvin iteration range. The overload with input and output wires bypasses automatic wire detection.
- Parameters:
timeout – Execution budget in milliseconds.
base – Number of charge states: 2 for negative and neutral, or 3 to include positive charges.
mu_minus – Negative-charge transition energy in eV.
epsilon_r – Relative permittivity (dimensionless).
lambda_tf – Thomas-Fermi screening distance in nm.
threshold_bdl_interdistance – Maximum separation between BDL pairs in one wire in nm.
minimum_distance – Minimum SiDB separation for a BDL pair in nm.
maximum_distance – Maximum SiDB separation for a BDL pair in nm.
input_bdl_config – Input encoding: perturber absence or perturber distance.
confidence_level – Required probability of a correct gate output, between 0 and 1.
max_temperature – Maximum temperature examined in K.
on_progress – Callback receiving (task, completed, total); None disables progress reporting.
on_worker_progress – Callback receiving (worker, count, description, completed, total, active); None disables worker reports.
stats – Statistics object filled by the algorithm; None discards statistics.
sim_engine – SiDB simulation engine used for charge simulation.
op_condition – Require the selected operational condition for every input pattern.
strategy_to_analyze_operational_status – Operational-status analysis strategy.
Overload 2
Determine the critical temperature of an SiDB gate implementing the truth tables. The keyword options select physical values, operational analysis, confidence, and temperature bounds. Raises ValueError for confidence outside (0, 1) or a temperature outside the centikelvin iteration range. The overload with input and output wires bypasses automatic wire detection.
- Parameters:
timeout – Execution budget in milliseconds.
base – Number of charge states: 2 for negative and neutral, or 3 to include positive charges.
mu_minus – Negative-charge transition energy in eV.
epsilon_r – Relative permittivity (dimensionless).
lambda_tf – Thomas-Fermi screening distance in nm.
minimum_distance – Minimum SiDB separation for a BDL pair in nm.
maximum_distance – Maximum SiDB separation for a BDL pair in nm.
input_bdl_config – Input encoding: perturber absence or perturber distance.
confidence_level – Required probability of a correct gate output, between 0 and 1.
max_temperature – Maximum temperature examined in K.
on_progress – Callback receiving (task, completed, total); None disables progress reporting.
on_worker_progress – Callback receiving (worker, count, description, completed, total, active); None disables worker reports.
stats – Statistics object filled by the algorithm; None discards statistics.
sim_engine – SiDB simulation engine used for charge simulation.
op_condition – Require the selected operational condition for every input pattern.
strategy_to_analyze_operational_status – Operational-status analysis strategy.
- critical_temperature_non_gate_based(lyt: sidb_layout, *, timeout: int = 18446744073709551615, base: int = 3, mu_minus: float = -0.32, epsilon_r: float = 5.6, lambda_tf: float = 5.0, sim_engine: sidb_simulation_engine = sidb_simulation_engine.QUICKEXACT, confidence_level: float = 0.99, max_temperature: float = 400.0, on_progress: Callable[[str, int, int], None] | None = None, on_worker_progress: Callable[[int, int, str, int, int, bool], None] | None = None, stats: critical_temperature_stats | None = None) float¶
Determine the critical temperature from the population of excited charge distributions. The keyword options select physical values, confidence, and temperature bounds. Raises ValueError for confidence outside (0, 1) or a temperature outside the centikelvin iteration range.
- Parameters:
timeout – Execution budget in milliseconds.
base – Number of charge states: 2 for negative and neutral, or 3 to include positive charges.
mu_minus – Negative-charge transition energy in eV.
epsilon_r – Relative permittivity (dimensionless).
lambda_tf – Thomas-Fermi screening distance in nm.
confidence_level – Required ground-state population probability between 0 and 1.
max_temperature – Maximum temperature examined in K.
on_progress – Callback receiving (task, completed, total); None disables progress reporting.
on_worker_progress – Callback receiving (worker, count, description, completed, total, active); None disables worker reports.
stats – Statistics object filled by the algorithm; None discards statistics.
sim_engine – SiDB simulation engine used for charge simulation.
- occupation_probability_gate_based(energy_and_state_type: Sequence[tuple[float, state_type]], temperature: float) float¶
This function computes the occupation probability of erroneous charge distributions (output charge does not match the expected output according the truth table) at a given temperature.
- Parameters:
energy_and_state_type – This contains the energies of all possible charge distributions together with the information if the charge distribution (state) is transparent or erroneous.
temperature – System temperature to assume (unit: K).
- Returns:
The occupation probability of all erroneous states is returned.
- occupation_probability_non_gate_based(calculate_energy_distribution: energy_distribution, temperature: float) float¶
- class state_type(*values)¶
Label to categorize ground and excited states of an SiDB layout.
- ACCEPTED = 0¶
- REJECTED = 1¶
- calculate_energy_and_state_type_with_kinks_accepted(energy_distribution: energy_distribution, valid_charge_distributions: Sequence[charge_distribution], output_bdl_pairs: Sequence[bdl_pair], spec: Sequence[dynamic_truth_table], input_index: int) list[tuple[float, state_type]]¶
Labels every energy level of an energy distribution by whether the physically valid charge distributions at that level encode the expected output for the given input pattern (
ACCEPTED) or not (REJECTED). Kinks in the wires are tolerated: only the output BDL pairs are inspected.- Parameters:
energy_distribution – The energy distribution of the charge distributions.
valid_charge_distributions – The physically valid charge distributions.
output_bdl_pairs – The output BDL pairs of the layout.
spec – The Boolean function(s) to implement.
input_index – The input pattern the charge distributions were simulated for.
- Returns:
The energies with their state types, ascending by energy.
- calculate_energy_and_state_type_with_kinks_rejected(lyt: sidb_layout, energy_distribution: energy_distribution, valid_charge_distributions: Sequence[charge_distribution], spec: Sequence[dynamic_truth_table], input_index: int, input_bdl_wires: Sequence[bdl_wire], output_bdl_wires: Sequence[bdl_wire]) list[tuple[float, state_type]]¶
Like
calculate_energy_and_state_type_with_kinks_accepted, but a charge distribution with kinks in its wires isREJECTEDas well: every energy level isACCEPTED, and additionallyREJECTEDif any of its charge distributions fails the logic match with kinks rejected.- Parameters:
lyt – The layout the charge distributions belong to.
energy_distribution – The energy distribution of the charge distributions.
valid_charge_distributions – The physically valid charge distributions.
spec – The Boolean function(s) to implement.
input_index – The input pattern the charge distributions were simulated for.
input_bdl_wires – The input BDL wires of
lyt.output_bdl_wires – The output BDL wires of
lyt.
- Returns:
The energies with their state types.
- Raises:
IndexError – if logic validation encounters an invalid lattice basis index.