Logic Simulation¶
BDL Input Iterator¶
Header: fiction/technology/sidb/simulation/logic/bdl_input_iterator.hpp
-
struct bdl_input_iterator_params¶
Parameters for the BDL input iterator.
Public Types
-
enum class input_bdl_configuration : uint8_t¶
This enum defines how BDL inputs are manipulated within the algorithm. According to existing literature, there are two main approaches for handling BDL inputs:
Distance Encoding, in which an input of
1is generated by placing a perturber closer to the target, whereas a0is produced by positioning the perturber farther away (as described in https://dl.acm.org/doi/10.1145/3489517.3530525).Absence Encoding, in which a perturber is used to set the input to
1, while the absence of a perturber represents a0(as described in https://ieeexplore.ieee.org/abstract/document/8963859).
Values:
-
enumerator PERTURBER_DISTANCE_ENCODED¶
An input of
1is generated by placing a perturber closer to the BDL wire, whereas a0is produced by positioning the perturber farther away (as described in https://dl.acm.org/doi/10.1145/3489517.3530525).
-
enumerator PERTURBER_ABSENCE_ENCODED¶
A perturber is used to set the input to
1, while the absence of a perturber represents a0(as described in https://ieeexplore.ieee.org/abstract/document/8963859).
Public Members
-
detect_bdl_wires_params bdl_wire_params = {}¶
Parameters to detect BDL wires.
-
input_bdl_configuration input_bdl_config = {input_bdl_configuration::PERTURBER_DISTANCE_ENCODED}¶
The
input_bdl_configmember allows selection between different modes for handling input BDLs.
-
enum class input_bdl_configuration : uint8_t¶
-
class bdl_input_iterator¶
Iterator that assigns the input patterns to the input BDL pairs of an SiDB layout. Incrementing the iterator advances the input pattern; dereferencing it yields the layout with that pattern applied. Every input BDL pair encodes one bit: a
1keeps the SiDB closer to the wire’s end, a0keeps the other one (perturber-distance encoding) or none (perturber-absence encoding). Bitiof the pattern belongs to thei-th input pair in layout order, with the first pair as the most significant bit.Public Functions
-
inline explicit bdl_input_iterator(const layout &source_layout, const bdl_input_iterator_params &ps = {})¶
Detects the input BDL pairs and wires of
source_layoutand applies input pattern0.- Parameters:
source_layout – The layout to iterate over.
ps – Parameters for the BDL pair and wire detection and the input encoding.
- Throws:
std::invalid_argument – if the layout has more than 63 input BDL pairs.
-
inline bdl_input_iterator(const layout &source_layout, const bdl_input_iterator_params &ps, const std::vector<bdl_wire> &source_input_wires)¶
Like the constructor above but with input wires that are already known.
- Parameters:
source_layout – The layout to iterate over.
ps – Parameters for the BDL pair detection and the input encoding.
source_input_wires – The input wires of
source_layout.
- Throws:
std::invalid_argument – if the layout has more than 63 input BDL pairs.
-
inline const layout &operator*() const noexcept¶
The layout with the current input pattern applied.
- Returns:
The layout.
-
inline bdl_input_iterator &operator++() noexcept¶
Advances to the next input pattern.
- Returns:
Reference to
this.
-
inline bdl_input_iterator operator++(int) noexcept¶
Advances to the next input pattern.
- Returns:
Copy of
thisbefore the increment.
-
inline bdl_input_iterator operator+(const int m) const noexcept¶
Returns an iterator
mpatterns ahead.- Parameters:
m – The number of patterns to advance.
- Returns:
The advanced iterator.
-
inline bdl_input_iterator &operator+=(const int m) noexcept¶
Advances by
mpatterns.- Parameters:
m – The number of patterns to advance.
- Returns:
Reference to
this.
-
inline bdl_input_iterator operator-(const int m) const noexcept¶
Returns an iterator
mpatterns behind.- Parameters:
m – The number of patterns to go back.
- Returns:
The iterator.
-
inline bdl_input_iterator &operator--() noexcept¶
Goes back to the previous input pattern.
- Returns:
Reference to
this.
-
inline bdl_input_iterator operator--(int) noexcept¶
Goes back to the previous input pattern.
- Returns:
Copy of
thisbefore the decrement.
-
inline bdl_input_iterator &operator-=(const int m) noexcept¶
Goes back by
mpatterns.- Parameters:
m – The number of patterns to go back.
- Returns:
Reference to
this.
-
inline bdl_input_iterator &operator=(const uint64_t m) noexcept¶
Jumps to input pattern
m.- Parameters:
m – The input pattern.
- Returns:
Reference to
this.
-
inline bdl_input_iterator operator[](const int m) const noexcept¶
Returns an iterator
mpatterns ahead.- Parameters:
m – The number of patterns to advance.
- Returns:
The advanced iterator.
-
inline int64_t operator-(const bdl_input_iterator &other) const noexcept¶
Distance between two iterators in input patterns.
- Parameters:
other – The other iterator.
- Returns:
thispattern minusother’s pattern.
-
inline auto operator<=>(const uint64_t m) const noexcept¶
Compares the current input pattern with
m.- Parameters:
m – The pattern to compare with.
- Returns:
The three-way comparison result.
-
inline bool operator==(const uint64_t m) const noexcept¶
Whether the current input pattern is
m.- Parameters:
m – The pattern to compare with.
- Returns:
trueif the patterns are equal.
-
inline uint64_t num_input_pairs() const noexcept¶
Number of input BDL pairs.
- Returns:
The number of input pairs.
-
inline bool is_valid() const noexcept¶
Whether every input BDL pair belongs to a complete detected wire.
- Returns:
trueif input patterns can be applied.
-
inline uint64_t get_current_input_index() const noexcept¶
The current input pattern.
- Returns:
The pattern.
-
inline explicit bdl_input_iterator(const layout &source_layout, const bdl_input_iterator_params &ps = {})¶
-
inline std::vector<layout> fiction::sidb::simulation::logic::generate_bdl_input_pattern_layouts(const layout &lyt, const bdl_input_iterator_params &ps = {})¶
Applies every input pattern to the input BDL pairs of a layout and returns the resulting layouts, pattern
0first; the input wires are detected first.- Parameters:
lyt – The layout.
ps – Parameters for the BDL detection and the input encoding.
- Throws:
std::invalid_argument – if the layout has more than 63 input BDL pairs.
- Returns:
One layout per input pattern.
-
inline std::vector<layout> fiction::sidb::simulation::logic::generate_bdl_input_pattern_layouts(const layout &lyt, const bdl_input_iterator_params &ps, const std::vector<bdl_wire> &input_wires)¶
Applies every input pattern to the input BDL pairs of a layout and returns the resulting layouts, pattern
0first, with the input wires given by the caller.- Parameters:
lyt – The layout.
ps – Parameters for the BDL pair detection and the input encoding.
input_wires – The input wires of
lyt.
- Throws:
std::invalid_argument – if the layout has more than 63 input BDL pairs.
- Returns:
One layout per input pattern.
- class input_bdl_configuration(*values)¶
- PERTURBER_ABSENCE_ENCODED = 1¶
- PERTURBER_DISTANCE_ENCODED = 0¶
- class bdl_input_iterator_params¶
Parameters for the BDL input iterator.
- property bdl_wire_params¶
Parameters to detect BDL wires.
- property input_bdl_config¶
The
input_bdl_configmember allows selection between different modes for handling input BDLs.
- class bdl_input_iterator(lyt: sidb_layout, params: bdl_input_iterator_params = <mnt.pyfiction.sidb.simulation.logic.bdl_input_iterator_params object at 0x579c35bd10d0>)¶
- class bdl_input_iterator(lyt: sidb_layout, params: bdl_input_iterator_params, input_wires: Sequence[bdl_wire])
Iterator that assigns the input patterns to the input BDL pairs of an SiDB layout. Incrementing the iterator advances the input pattern; dereferencing it yields the layout with that pattern applied. Every input BDL pair encodes one bit: a
1keeps the SiDB closer to the wire’s end, a0keeps the other one (perturber-distance encoding) or none (perturber-absence encoding). Bitiof the pattern belongs to thei-th input pair in layout order, with the first pair as the most significant bit.- get_layout() sidb_layout¶
Returns the layout that represents the current input state, equivalent to dereferencing the iterator.
- generate_bdl_input_pattern_layouts(lyt: sidb_layout, params: bdl_input_iterator_params = <mnt.pyfiction.sidb.simulation.logic.bdl_input_iterator_params object at 0x579c34c634f0>) list[sidb_layout]¶
- generate_bdl_input_pattern_layouts(lyt: sidb_layout, params: bdl_input_iterator_params, input_wires: Sequence[bdl_wire]) list[sidb_layout]
Overloaded function.
generate_bdl_input_pattern_layouts(lyt: mnt.pyfiction.sidb.sidb_layout, params: mnt.pyfiction.sidb.simulation.logic.bdl_input_iterator_params = <mnt.pyfiction.sidb.simulation.logic.bdl_input_iterator_params object at 0x579c34c634f0>) -> list[mnt.pyfiction.sidb.sidb_layout]
Applies every input pattern to the input BDL pairs of a layout and returns the resulting layouts, pattern
0first; the input wires are detected first.- Parameters:
lyt – The layout.
ps – Parameters for the BDL detection and the input encoding.
- Returns:
One layout per input pattern.
- Raises:
std::invalid_argument – if the layout has more than 63 input BDL pairs.
generate_bdl_input_pattern_layouts(lyt: mnt.pyfiction.sidb.sidb_layout, params: mnt.pyfiction.sidb.simulation.logic.bdl_input_iterator_params, input_wires: collections.abc.Sequence[mnt.pyfiction.sidb.simulation.logic.bdl_wire]) -> list[mnt.pyfiction.sidb.sidb_layout]
Applies every input pattern to the input BDL pairs of a layout and returns the resulting layouts, pattern
0first, with the input wires given by the caller.- Parameters:
lyt – The layout.
ps – Parameters for the BDL pair detection and the input encoding.
input_wires – The input wires of
lyt.
- Returns:
One layout per input pattern.
- Raises:
std::invalid_argument – if the layout has more than 63 input BDL pairs.
Operational Domain Computation¶
Header: fiction/technology/sidb/simulation/logic/is_operational.hpp
-
enum class fiction::sidb::simulation::logic::operational_status : uint8_t¶
Possible operational status of a layout.
Values:
-
enumerator OPERATIONAL¶
The layout is operational.
-
enumerator NON_OPERATIONAL¶
The layout is non-operational.
-
enumerator OPERATIONAL¶
-
struct is_operational_params¶
Parameters for the
is_operationalalgorithm.Public Types
-
enum class operational_condition : uint8_t¶
Condition to decide whether a layout is operational or non-operational.
Values:
-
enumerator TOLERATE_KINKS¶
Even if the I/O pins show kinks, the layout is still considered as operational.
-
enumerator REJECT_KINKS¶
The I/O pins are not allowed to show kinks. If kinks exist, the layout is considered non-operational.
-
enumerator TOLERATE_KINKS¶
-
enum class operational_analysis_strategy : uint8_t¶
Simulation method to determine if the layout is operational or non-operational. There are three possible strategies:
SIMULATION_ONLY: This setting does not apply any filtering strategies to determine if the layout is operational. Instead, it relies solely on physical simulation to make this determination.FILTER_ONLY: This setting does only apply filtering strategies to determine if the layout is non-operational. If the layout passes all filtering strategies, it is considered operational. This is only an approximation. It may be possible that the layout is non-operational, but the filtering strategies do not detect it. Sweeping a parameter space this way is called the operational domain sketch. The filtering steps are only defined when kinks are rejected, and they enumerate the charge configurations of the canvas that the layout’sLOGICdots define, so this setting is only effective withREJECT_KINKSon a layout that has such dots.FILTER_THEN_SIMULATION: Before a physical simulation is conducted, the algorithm checks if filtering strategies have detected whether the layout is non-operational. This only provides any runtime benefits if kinks are rejected.
Values:
-
enumerator SIMULATION_ONLY¶
Do not apply filter strategies to determine whether the layout is operational. Instead, rely solely on physical simulation.
-
enumerator FILTER_ONLY¶
Apply filtering exclusively to determine whether the layout is non-operational. If the layout passes all filter steps, it is considered operational. Sweeping a parameter space this way is called the operational domain sketch.
Note
This is an extremely fast approximation that may sometimes lead to false positives. It requires
REJECT_KINKSand a layout withLOGICdots; without either, no filter step runs.
-
enumerator FILTER_THEN_SIMULATION¶
Before a physical simulation is conducted, the algorithm checks if filter strategies can determine that the layout is non-operational. This only provides any runtime benefits if kinks are rejected.
Public Members
-
sidb::model::simulation_parameters sim_params = {}¶
The simulation parameters for the physical simulation of the ground state.
-
sidb::simulation::engine sim_engine = {engine::QUICKEXACT}¶
The simulation engine to be used for the operational domain computation.
-
bdl_input_iterator_params input_bdl_iterator_params = {}¶
Parameters for the BDL input iterator.
-
operational_condition op_condition = operational_condition::TOLERATE_KINKS¶
Condition to decide whether a layout is operational or non-operational.
-
operational_analysis_strategy strategy_to_analyze_operational_status = {operational_analysis_strategy::SIMULATION_ONLY}¶
Strategy to determine whether a layout is operational or non-operational.
-
std::chrono::steady_clock::time_point deadline = {std::chrono::steady_clock::time_point::max()}¶
Shared caller deadline for pruning and simulation.
time_point::max()leaves the check unlimited. Finite deadlines support QuickExact, ExGS, and QuickSim; ClusterComplete is unsupported.
-
uint64_t timeout = {std::numeric_limits<uint64_t>::max()}¶
Millisecond budget for the complete operation. Gate design, domains, and critical-temperature calculations share this budget across all nested checks. The maximum value means unlimited; zero expires immediately. Expiration throws
utils::timeout_errorwithout returning a partial result.
-
enum class operational_condition : uint8_t¶
-
inline std::pair<operational_status, std::size_t> fiction::sidb::simulation::logic::is_operational(const layout &lyt, const std::vector<kitty::dynamic_truth_table> &spec, const is_operational_params ¶ms = {})¶
Determines whether an SiDB layout implements the given Boolean function(s). Every input pattern is applied to the input BDL pairs, the ground states are simulated with the configured engine, and the charge states of the output BDL pairs are compared with the expected truth-table entries. If the layout carries logic dots, they form the canvas of the pruning filters that run before any simulation whenever the parameters ask for filtering and reject kinks.
- Parameters:
lyt – The layout to check.
spec – The Boolean function(s) it has to implement.
params – Parameters.
- Returns:
The operational status and the number of simulator invocations.
-
inline std::pair<operational_status, std::size_t> fiction::sidb::simulation::logic::is_operational(const layout &lyt, const std::vector<kitty::dynamic_truth_table> &spec, const is_operational_params ¶ms, const std::vector<bdl_wire> &input_bdl_wire, const std::vector<bdl_wire> &output_bdl_wire, const std::optional<layout> &canvas_lyt = std::nullopt)¶
Like the overload above, with the BDL wires and, optionally, the canvas given by the caller.
- Parameters:
lyt – The layout to check.
spec – The Boolean function(s) it has to implement.
params – Parameters.
input_bdl_wire – The input BDL wires of
lyt.output_bdl_wire – The output BDL wires of
lyt.canvas_lyt – The canvas; defaults to the logic dots of
lyt.
- Returns:
The operational status and the number of simulator invocations.
-
inline std::pair<operational_status, std::size_t> fiction::sidb::simulation::logic::is_operational(const std::vector<layout> &input_pattern_layouts, const std::vector<kitty::dynamic_truth_table> &spec, const is_operational_params ¶ms, const std::vector<bdl_wire> &input_bdl_wire, const std::vector<bdl_wire> &output_bdl_wire, const std::optional<layout> &canvas_lyt = std::nullopt)¶
Like the overloads above, but with one layout per input pattern given by the caller instead of applying the patterns to the input BDL pairs.
- Parameters:
input_pattern_layouts – One layout per input pattern, pattern
0first.spec – The Boolean function(s) to implement.
params – Parameters.
input_bdl_wire – The input BDL wires.
output_bdl_wire – The output BDL wires.
canvas_lyt – The canvas; defaults to the logic dots of the first layout.
- Throws:
std::invalid_argument – if
specis empty or the number of layouts does not match the number of patterns.- Returns:
The operational status and the number of simulator invocations.
-
inline std::set<uint64_t> fiction::sidb::simulation::logic::operational_input_patterns(const layout &lyt, const std::vector<kitty::dynamic_truth_table> &spec, const is_operational_params ¶ms = {})¶
Determines the input patterns for which the layout is operational.
- Parameters:
lyt – The layout to check.
spec – The Boolean function(s) it has to implement.
params – Parameters.
- Returns:
The operational input patterns.
-
inline std::set<uint64_t> fiction::sidb::simulation::logic::operational_input_patterns(const layout &lyt, const std::vector<kitty::dynamic_truth_table> &spec, const is_operational_params ¶ms, const std::vector<bdl_wire> &input_bdl_wire, const std::vector<bdl_wire> &output_bdl_wire, const std::optional<layout> &canvas_lyt = std::nullopt)¶
Like the overload above, with the BDL wires and, optionally, the canvas given by the caller.
- Parameters:
lyt – The layout to check.
spec – The Boolean function(s) it has to implement.
params – Parameters.
input_bdl_wire – The input BDL wires of
lyt.output_bdl_wire – The output BDL wires of
lyt.canvas_lyt – The canvas; defaults to none.
- Returns:
The operational input patterns.
-
inline bool fiction::sidb::simulation::logic::is_kink_induced_non_operational(const layout &lyt, const std::vector<kitty::dynamic_truth_table> &spec, const is_operational_params ¶ms = {})¶
Determines whether kinks are the reason the layout is non-operational.
- Parameters:
lyt – The layout to check.
spec – The Boolean function(s) it has to implement.
params – Parameters; kinks are rejected regardless of
params.op_condition.
- Returns:
trueif the layout is non-operational because of kinks.
-
inline bool fiction::sidb::simulation::logic::is_kink_induced_non_operational(const layout &lyt, const std::vector<kitty::dynamic_truth_table> &spec, const is_operational_params ¶ms, const std::vector<bdl_wire> &input_bdl_wire, const std::vector<bdl_wire> &output_bdl_wire, const std::optional<layout> &canvas_lyt = std::nullopt)¶
Like the overload above, with the BDL wires and, optionally, the canvas given by the caller.
- Parameters:
lyt – The layout to check.
spec – The Boolean function(s) it has to implement.
params – Parameters; kinks are rejected regardless of
params.op_condition.input_bdl_wire – The input BDL wires of
lyt.output_bdl_wire – The output BDL wires of
lyt.canvas_lyt – The canvas; defaults to none.
- Returns:
trueif the layout is non-operational because of kinks.
-
inline std::set<uint64_t> fiction::sidb::simulation::logic::kink_induced_non_operational_input_patterns(const layout &lyt, const std::vector<kitty::dynamic_truth_table> &spec, const is_operational_params ¶ms = {})¶
Determines the input patterns for which kinks render the layout non-operational.
- Parameters:
lyt – The layout to check.
spec – The Boolean function(s) it has to implement.
params – Parameters; kinks are rejected regardless of
params.op_condition.
- Returns:
The kink-induced non-operational input patterns.
-
inline std::set<uint64_t> fiction::sidb::simulation::logic::kink_induced_non_operational_input_patterns(const layout &lyt, const std::vector<kitty::dynamic_truth_table> &spec, const is_operational_params ¶ms, const std::vector<bdl_wire> &input_bdl_wire, const std::vector<bdl_wire> &output_bdl_wire, const std::optional<layout> &canvas_lyt = std::nullopt)¶
Like the overload above, with the BDL wires and, optionally, the canvas given by the caller.
- Parameters:
lyt – The layout to check.
spec – The Boolean function(s) it has to implement.
params – Parameters; kinks are rejected regardless of
params.op_condition.input_bdl_wire – The input BDL wires of
lyt.output_bdl_wire – The output BDL wires of
lyt.canvas_lyt – The canvas; defaults to none.
- Returns:
The kink-induced non-operational input patterns.
Header: fiction/technology/sidb/simulation/logic/operational_domain.hpp
-
struct parameter_point¶
The parameter point holds one parameter value per sweep dimension.
Public Functions
-
parameter_point() = default¶
Default constructor.
-
inline explicit parameter_point(std::vector<double> values)¶
Standard constructor.
- Parameters:
values – Parameter values for each dimension.
-
inline bool operator==(const parameter_point &other) const noexcept¶
Equality operator. Checks if this parameter point is equal to another point within a specified tolerance. The tolerance is defined by
constants::ERROR_MARGIN.- Parameters:
other – Other parameter point to compare with.
- Returns:
trueiff the parameter points are equal.
-
inline const std::vector<double> &get_parameters() const noexcept¶
Returns the parameter values for each dimension.
- Returns:
The parameter values for each dimension.
Public Static Functions
-
static inline int64_t quantize(const double value) noexcept¶
Maps a parameter value onto the grid of
constants::ERROR_MARGIN-wide cells that both this type’s equality and itsstd::hashspecialization are defined on.Comparing parameter values with a tolerance, as in
std::fabs(lhs - rhs) < constants::ERROR_MARGIN, does not yield an equivalence relation: it is not transitive, and two values that compare equal can still fall on opposite sides of a cell boundary and therefore hash differently. That breaks the invariant every hash-based container relies on, namely that equal keys hash equally. Deciding both on the same quantized value restores it.- Parameters:
value – Parameter value to quantize.
- Returns:
The index of the cell
valuefalls into.
-
parameter_point() = default¶
-
enum class fiction::sidb::simulation::logic::sweep_parameter : uint8_t¶
Possible sweep parameters for the operational domain computation.
Values:
-
enumerator EPSILON_R¶
The relative permittivity of the dielectric material.
-
enumerator LAMBDA_TF¶
The Thomas-Fermi screening length.
-
enumerator MU_MINUS¶
The energy transition level.
-
enumerator EPSILON_R¶
-
class operational_domain : public fiction::sidb::simulation::domain<parameter_point, operational_status>¶
An operational domain is a set of simulation parameter values for which a given SiDB layout is logically operational. This means that a layout is deemed operational if the layout’s ground state corresponds with a given Boolean function at the layout’s outputs for all possible input combinations. In this implementation, \(n\) BDL input wires and a single BDL output wire are assumed for a given layout. Any operational domain computation algorithm toggles through all \(2^n\) input combinations and evaluates the layout’s output behavior in accordance with the given Boolean function. The layout is only considered operational for a certain parameter combination, if the output behavior is correct for all input combinations. The operational domain can be computed by sweeping over specified simulation parameters and checking the operational status of the layout for each parameter combination. The operational domain is then defined as the set of all parameter combinations for which the layout is operational. Different techniques for performing these sweep are implemented.
Public Functions
-
operational_domain() = default¶
Default constructor.
-
inline explicit operational_domain(const std::vector<sweep_parameter> &dims)¶
Standard constructor.
- Parameters:
dims – Dimensions.
-
inline void add_dimension(const sweep_parameter &dim)¶
Adds a dimension to sweep over. The first dimension is the x dimension, the second dimension is the y dimension, etc.
- Parameters:
dim – The dimension to add.
-
inline const sweep_parameter &get_dimension(const std::size_t index) const¶
Returns a specific dimension by index.
- Parameters:
index – The index of the dimension to return.
- Throws:
std::out_of_range – if the index is out of range.
- Returns:
The dimension at the specified index.
-
inline std::size_t get_number_of_dimensions() const noexcept¶
Returns the number of dimensions to sweep over.
- Returns:
The number of dimensions to sweep over.
-
operational_domain() = default¶
-
class critical_temperature_domain : public fiction::sidb::simulation::domain<parameter_point, operational_status, double>¶
The
critical_temperature_domainclass collects the critical temperature and the operational status for a range of different physical parameters of a given SiDB layout. It allows for the evaluation of how the critical temperature depends on variations in the underlying parameter points. This enables simulations to explore the critical temperature’s behavior across different conditions and configurations.It was proposed in “The Operational Domain Explorer: A Comprehensive Framework to Unveil the Thermal Landscape of Silicon Dangling Bond Logic Beyond Conventional Operability” by M. Walter, J. Drewniok, and R. Wille in IEEE-NANO 2025 (https://ieeexplore.ieee.org/abstract/document/11113672).
Public Functions
-
critical_temperature_domain() = default¶
Default constructor.
-
inline explicit critical_temperature_domain(const std::vector<sweep_parameter> &dims)¶
Standard constructor.
- Parameters:
dims – Dimensions.
-
inline void add_dimension(const sweep_parameter ¶m)¶
Adds a dimension to sweep over. The first dimension is the x dimension, the second dimension is the y dimension, etc.
- Parameters:
param – The dimension to add.
-
inline const sweep_parameter &get_dimension(const std::size_t index) const¶
Returns a specific dimension by index.
- Parameters:
index – The index of the dimension to return.
- Throws:
std::out_of_range – if the index is out of range.
- Returns:
The dimension at the specified index.
-
inline std::size_t get_number_of_dimensions() const noexcept¶
Returns the number of dimensions to sweep over.
- Returns:
The number of dimensions to sweep over.
-
inline double minimum_ct() const¶
Finds the minimum critical temperature in the domain.
- Returns:
The minimum critical temperature.
-
inline double maximum_ct() const¶
Finds the maximum critical temperature in the domain.
- Returns:
The maximum critical temperature.
-
critical_temperature_domain() = default¶
-
struct operational_domain_value_range¶
A range of values for a dimension sweep. The range is defined by a minimum value, a maximum value and a step size.
Public Members
-
sweep_parameter dimension¶
The sweep parameter of the dimension.
-
double min = {1.0}¶
The minimum value of the dimension sweep.
-
double max = {10.0}¶
The maximum value of the dimension sweep.
-
double step = {0.1}¶
The step size of the dimension sweep.
-
sweep_parameter dimension¶
-
struct operational_domain_params¶
Parameters for the operational domain computation. The parameters are used across the different operational domain computation algorithms.
Public Members
-
is_operational_params operational_params = {}¶
Operational parameters. Their timeout bounds the entire domain calculation across all parameter points and workers. Finite budgets reject ClusterComplete and throw
utils::timeout_erroron expiration.
-
std::vector<operational_domain_value_range> sweep_dimensions¶
Dimensions to sweep over together with their value ranges, ordered by priority.
The first dimension is the x dimension, the second dimension is the y dimension, etc. The default sweeps relative permittivity and screening distance from 1.0 to 10.0 in steps of 0.1.
-
std::size_t number_of_threads = {std::max(std::size_t{std::thread::hardware_concurrency()}, std::size_t{1})}¶
Number of worker threads to distribute the parameter points over.
Defaults to the number of hardware threads, or
1when that count is unavailable. Values below1are treated as1.Pinning it makes wall-clock comparisons reproducible across runs and machines, and allows an operational domain computation to leave cores free for other work.
-
utils::progress_callback on_progress = {}¶
Callback that receives the number of evaluated parameter points. The total is known for grid search and random sampling only.
-
utils::worker_progress_callback on_worker_progress = {}¶
Reports logical worker activity with a fixed worker count for each invocation.
-
is_operational_params operational_params = {}¶
-
struct operational_domain_stats¶
Statistics for the operational domain computation. The statistics are used across the different operational domain computation algorithms.
Public Members
-
mockturtle::stopwatch::duration time_total = {0}¶
The total runtime of the operational domain computation.
-
std::size_t num_simulator_invocations = {0}¶
Number of simulator invocations.
-
std::size_t num_evaluated_parameter_combinations = {0}¶
Number of evaluated parameter combinations.
-
std::size_t num_operational_parameter_combinations = {0}¶
Number of parameter combinations, for which the layout is operational.
-
std::size_t num_non_operational_parameter_combinations = {0}¶
Number of parameter combinations, for which the layout is non-operational.
-
std::size_t num_total_parameter_points = {0}¶
Total number of parameter points in the parameter space.
-
mockturtle::stopwatch::duration time_total = {0}¶
Four strategies sample the parameter space. Grid search and random sampling place their samples independently and accept any number of sweep dimensions. Flood fill and contour tracing follow the shape of the operational region and therefore need a neighborhood to expand over, which requires at least two dimensions. In two dimensions, contour tracing walks the boundary as a closed curve; in three or more, where the boundary is a surface, it collects the boundary instead.
Setting strategy_to_analyze_operational_status to FILTER_ONLY computes the operational
domain sketch: each parameter point is classified by filtering alone, without physical simulation.
This is dramatically faster and never rejects a point that is operational, but it does report some
non-operational points as operational. The sketch requires REJECT_KINKS and a layout with
LOGIC dots, since the filtering steps enumerate the charge configurations of the canvas those
dots define; without either, it is rejected with std::invalid_argument.
The sketch combines with any of the four strategies, but pairs best with the exhaustive ones. Grid search and random sampling place their samples independently of the result, so the sketch simply makes each of them cheaper. Flood fill and contour tracing instead follow the boundary of the sketch region rather than of the operational region. That is sound, since the former contains the latter, but it is only useful when the initial random sampling lands inside the region: over a three-dimensional range, a sample count that suffices in two dimensions frequently misses the region altogether and returns almost nothing. Where the sketch region does fill the swept range, the frontier never stops and the flood fill visits every point anyway, at a higher per-point cost than a grid search. Prefer grid search with the sketch, and raise the sample count substantially before combining the sketch with flood fill or contour tracing in three dimensions.
-
inline operational_domain fiction::sidb::simulation::logic::operational_domain_grid_search(const layout &lyt, const std::vector<kitty::dynamic_truth_table> &spec, const operational_domain_params ¶ms = {}, operational_domain_stats *stats = nullptr)¶
Computes the operational domain of the given SiDB layout. The operational domain is the set of all parameter combinations for which the layout is logically operational. Logical operation is defined as the layout implementing the given truth table. The input BDL pairs of the layout are assumed to be in the same order as the inputs of the truth table.
This algorithm uses a grid search to find the operational domain. The grid search is performed by exhaustively sweeping all sweep dimensions. Since grid search is exhaustive, the algorithm is guaranteed to find the operational domain, if it exists within the parameter range. However, the algorithm performs one operational check per parameter combination, i.e., the product of the step counts of all sweep dimensions, where each operational check consists of up to \(2^n\) exact ground state simulations, where \(n\) is the number of inputs of the layout. Each exact ground state simulation has exponential complexity in of itself. Therefore, the algorithm is only feasible for small layouts with few inputs.
- Parameters:
lyt – Layout to compute the operational domain for.
spec – Expected Boolean functions, one dynamic truth table per output.
params – Parameters for the operational domain computation.
stats – Statistics of the process.
- Throws:
std::invalid_argument – if the given sweep parameters are invalid, or if the operational domain sketch is requested without rejecting kinks or on a layout without
LOGICdots. Any number of sweep dimensions is accepted.- Returns:
The operational domain of the layout.
-
inline operational_domain fiction::sidb::simulation::logic::operational_domain_random_sampling(const layout &lyt, const std::vector<kitty::dynamic_truth_table> &spec, const std::size_t samples, const operational_domain_params ¶ms = {}, operational_domain_stats *stats = nullptr)¶
Computes the operational domain of the given SiDB layout. The operational domain is the set of all parameter combinations for which the layout is logically operational. Logical operation is defined as the layout implementing the given truth table. The input BDL pairs of the layout are assumed to be in the same order as the inputs of the truth table.
This algorithm uses random sampling to find a part of the operational domain that might not be complete. It performs a total of
samplesuniformly-distributed random samples within the parameter range. For each sample, the algorithm performs one operational check on the layout, where each operational check consists of up to \(2^n\) exact ground state simulations, where \(n\) is the number of inputs of the layout. Each exact ground state simulation has exponential complexity in of itself. Therefore, the algorithm is only feasible for small layouts with few inputs.- Parameters:
lyt – Layout to compute the operational domain for.
spec – Expected Boolean function of the layout given as a multi-output truth table.
samples – Number of samples to perform.
params – Operational domain computation parameters.
stats – Operational domain computation statistics.
- Throws:
std::invalid_argument – if the given sweep parameters are invalid, or if the operational domain sketch is requested without rejecting kinks or on a layout without
LOGICdots. Any number of sweep dimensions is accepted.- Returns:
The operational domain of the layout.
-
inline operational_domain fiction::sidb::simulation::logic::operational_domain_flood_fill(const layout &lyt, const std::vector<kitty::dynamic_truth_table> &spec, const std::size_t samples, const operational_domain_params ¶ms = {}, operational_domain_stats *stats = nullptr)¶
Computes the operational domain of the given SiDB layout. The operational domain is the set of all parameter combinations for which the layout is logically operational. Logical operation is defined as the layout implementing the given truth table. The input BDL pairs of the layout are assumed to be in the same order as the inputs of the truth table.
This algorithm first uses random sampling to find several operational points within the parameter range. From there, it employs the “flood fill” algorithm to explore the operational domain. The algorithm is guaranteed to determine all operational “islands” in their entirety if the initial random sampling found at least one operational point within them. Thereby, this algorithm works for disconnected operational domains.
It performs
samplesuniformly-distributed random samples within the parameter range. From there, it performs another number of samples equal to the number of points within the operational domain plus the first non-operational point in each direction. For each sample, the algorithm performs one operational check on the layout, where each operational check consists of up to \(2^n\) exact ground state simulations, where \(n\) is the number of inputs of the layout. Each exact ground state simulation has exponential complexity in of itself. Therefore, the algorithm is only feasible for small layouts with few inputs.This flavor of operational domain computation was proposed in “Reducing the Complexity of Operational Domain Computation in Silicon Dangling Bond Logic” by M. Walter, J. Drewniok, S. S. H. Ng, K. Walus, and R. Wille in NANOARCH 2023.
- Parameters:
lyt – Layout to compute the operational domain for.
spec – Expected Boolean function of the layout given as a multi-output truth table.
samples – Number of samples to perform.
params – Operational domain computation parameters.
stats – Operational domain computation statistics.
- Throws:
std::invalid_argument – if the given sweep parameters are invalid, or if the operational domain sketch is requested without rejecting kinks or on a layout without
LOGICdots. Flood fill and contour tracing additionally require at least two sweep dimensions; grid search and random sampling accept any number.- Returns:
The operational domain of the layout.
-
inline operational_domain fiction::sidb::simulation::logic::operational_domain_contour_tracing(const layout &lyt, const std::vector<kitty::dynamic_truth_table> &spec, const std::size_t samples, const operational_domain_params ¶ms = {}, operational_domain_stats *stats = nullptr)¶
Computes the operational domain of the given SiDB layout. The operational domain is the set of all parameter combinations for which the layout is logically operational. Logical operation is defined as the layout implementing the given truth table. The input BDL pairs of the layout are assumed to be in the same order as the inputs of the truth table.
This algorithm first uses random sampling to find a set of operational point within the parameter range. From there, it traverses outwards to find the edge of the operational area and performs Moore neighborhood contour tracing to explore the contour of the operational domain. This is repeated for all initially sampled points that do not lie within a contour. The algorithm is guaranteed to determine the contours of all operational “islands” if the initial random sampling found at least one operational point within them. Thereby, this algorithm works for disconnected operational domains.
It performs
samplesuniformly-distributed random samples within the parameter range. For each thusly discovered operational island, it performs another number of samples equal to the distance to an edge of each operational area. Finally, it performs up to 8 samples for each contour point (however, the actual number is usually lower). For each sample, the algorithm performs one operational check on the layout, where each operational check consists of up to \(2^n\) exact ground state simulations, where \(n\) is the number of inputs of the layout. Each exact ground state simulation has exponential complexity in of itself. Therefore, the algorithm is only feasible for small layouts with few inputs.- Parameters:
lyt – Layout to compute the operational domain for.
spec – Expected Boolean function of the layout given as a multi-output truth table.
samples – Number of samples to perform.
params – Operational domain computation parameters.
stats – Operational domain computation statistics.
- Throws:
std::invalid_argument – if the given sweep parameters are invalid, or if the operational domain sketch is requested without rejecting kinks or on a layout without
LOGICdots. Flood fill and contour tracing additionally require at least two sweep dimensions; grid search and random sampling accept any number.- Returns:
The operational domain of the layout.
-
inline critical_temperature_domain fiction::sidb::simulation::logic::critical_temperature_domain_grid_search(const layout &lyt, const std::vector<kitty::dynamic_truth_table> &spec, const operational_domain_params ¶ms = {}, operational_domain_stats *stats = nullptr)¶
Computes the critical temperature domain of the given SiDB layout. The critical temperature domain consists of all parameter combinations for which the layout is logically operational, along with the critical temperature for each specific parameter point.
This algorithm uses a grid search to find the operational domain. The grid search is performed by exhaustively sweeping all sweep dimensions. Since grid search is exhaustive, the algorithm is guaranteed to find the operational domain, if it exists within the parameter range. However, the algorithm performs one operational check per parameter combination, i.e., the product of the step counts of all sweep dimensions, where each operational check consists of up to \(2^n\) exact ground state simulations, where \(n\) is the number of inputs of the layout. Each exact ground state simulation has exponential complexity in of itself. Therefore, the algorithm is only feasible for small layouts with few inputs.
- Parameters:
lyt – Layout to compute the operational domain for.
spec – Expected vector of truth tables of the layout. Each truth table represents an output of the Boolean function.
params – Operational domain computation parameters.
stats – Operational domain computation statistics.
- Throws:
std::invalid_argument – if the given sweep parameters are invalid, or if the operational domain sketch is requested without rejecting kinks or on a layout without
LOGICdots. Any number of sweep dimensions is accepted.- Returns:
The critical temperature domain of the layout.
-
inline critical_temperature_domain fiction::sidb::simulation::logic::critical_temperature_domain_random_sampling(const layout &lyt, const std::vector<kitty::dynamic_truth_table> &spec, const std::size_t samples, const operational_domain_params ¶ms = {}, operational_domain_stats *stats = nullptr)¶
Computes the critical temperature domain of the given SiDB layout. The critical temperature domain consists of all parameter combinations for which the layout is logically operational, along with the critical temperature for each specific parameter point.
This algorithm uses random sampling to find a part of the operational domain that might not be complete. It performs a total of
samplesuniformly-distributed random samples within the parameter range. For each sample, the algorithm performs one operational check on the layout, where each operational check consists of up to \(2^n\) exact ground state simulations, where \(n\) is the number of inputs of the layout. Each exact ground state simulation has exponential complexity in of itself. Therefore, the algorithm is only feasible for small layouts with few inputs.- Parameters:
lyt – Layout to compute the operational domain for.
spec – Expected Boolean function of the layout given as a multi-output truth table.
samples – Number of samples to perform.
params – Operational domain computation parameters.
stats – Operational domain computation statistics.
- Throws:
std::invalid_argument – if the given sweep parameters are invalid, or if the operational domain sketch is requested without rejecting kinks or on a layout without
LOGICdots. Any number of sweep dimensions is accepted.- Returns:
The critical temperature domain of the layout.
-
inline critical_temperature_domain fiction::sidb::simulation::logic::critical_temperature_domain_flood_fill(const layout &lyt, const std::vector<kitty::dynamic_truth_table> &spec, const std::size_t samples, const operational_domain_params ¶ms = {}, operational_domain_stats *stats = nullptr)¶
Computes the critical temperature domain of the given SiDB layout. The critical temperature domain consists of all parameter combinations for which the layout is logically operational, along with the critical temperature for each specific parameter point.
This algorithm first uses random sampling to find several operational points within the parameter range. From there, it employs the “flood fill” algorithm to explore the operational domain. The algorithm is guaranteed to determine all operational “islands” in their entirety if the initial random sampling found at least one operational point within them. Thereby, this algorithm works for disconnected operational domains.
It performs
samplesuniformly-distributed random samples within the parameter range. From there, it performs another number of samples equal to the number of points within the operational domain plus the first non-operational point in each direction. For each sample, the algorithm performs one operational check on the layout, where each operational check consists of up to \(2^n\) exact ground state simulations, where \(n\) is the number of inputs of the layout. Each exact ground state simulation has exponential complexity in of itself. Therefore, the algorithm is only feasible for small layouts with few inputs.- Parameters:
lyt – Layout to compute the operational domain for.
spec – Expected Boolean function of the layout given as a multi-output truth table.
samples – Number of samples to perform.
params – Operational domain computation parameters.
stats – Operational domain computation statistics.
- Throws:
std::invalid_argument – if the given sweep parameters are invalid, or if the operational domain sketch is requested without rejecting kinks or on a layout without
LOGICdots. Flood fill and contour tracing additionally require at least two sweep dimensions; grid search and random sampling accept any number.- Returns:
The critical temperature domain of the layout.
-
inline critical_temperature_domain fiction::sidb::simulation::logic::critical_temperature_domain_contour_tracing(const layout &lyt, const std::vector<kitty::dynamic_truth_table> &spec, const std::size_t samples, const operational_domain_params ¶ms = {}, operational_domain_stats *stats = nullptr)¶
Computes the critical temperature domain of the given SiDB layout. The critical temperature domain consists of all parameter combinations for which the layout is logically operational, along with the critical temperature for each specific parameter point.
This algorithm first uses random sampling to find a set of operational point within the parameter range. From there, it traverses outwards to find the edge of the operational area and performs Moore neighborhood contour tracing to explore the contour of the operational domain. This is repeated for all initially sampled points that do not lie within a contour. The algorithm is guaranteed to determine the contours of all operational “islands” if the initial random sampling found at least one operational point within them. Thereby, this algorithm works for disconnected operational domains. The critical temperature is computed for each operational point.
It performs
samplesuniformly-distributed random samples within the parameter range. For each thusly discovered operational island, it performs another number of samples equal to the distance to an edge of each operational area. Finally, it performs up to 8 samples for each contour point (however, the actual number is usually lower). For each sample, the algorithm performs one operational check on the layout, where each operational check consists of up to \(2^n\) exact ground state simulations, where \(n\) is the number of inputs of the layout. Each exact ground state simulation has exponential complexity in of itself. Therefore, the algorithm is only feasible for small layouts with few inputs.- Parameters:
lyt – Layout to compute the operational domain for.
spec – Expected Boolean function of the layout given as a multi-output truth table.
samples – Number of samples to perform.
params – Operational domain computation parameters.
stats – Operational domain computation statistics.
- Throws:
std::invalid_argument – if the given sweep parameters are invalid, or if the operational domain sketch is requested without rejecting kinks or on a layout without
LOGICdots. Flood fill and contour tracing additionally require at least two sweep dimensions; grid search and random sampling accept any number.- Returns:
The critical temperature domain of the layout.
Header: fiction/technology/sidb/simulation/logic/operational_domain_ratio.hpp
-
struct operational_domain_ratio_params¶
Parameters for computing the ratio of operational parameter points around a specified parameter point to the total number of parameter points in the given parameter space.
Public Members
-
operational_domain_params op_domain_params = {}¶
Parameters for the operational domain computation.
-
operational_domain_params op_domain_params = {}¶
-
inline double fiction::sidb::simulation::logic::operational_domain_ratio(const layout &lyt, const std::vector<kitty::dynamic_truth_table> &spec, const parameter_point &pp, const operational_domain_ratio_params ¶ms = {})¶
Calculates the ratio of operational parameter points surrounding a specified parameter point to the total number of parameter points in the given parameter space. This function is useful for assessing how robust a gate design is to variations in its parameters.
A ratio close to 1 indicates that the gate is robust, meaning it functions correctly across a broad range of parameter values. A ratio close to 0 indicates that the gate is highly sensitive to parameter variations and may fail to operate correctly.
- Parameters:
lyt – The SiDB layout for which to compute the ratio of operational parameter points surrounding a specified parameter point to the total number of parameter points.
spec – The expected Boolean function of the layout, provided as a multi-output truth table.
params – Parameters.
pp – The specific parameter point around which the operational ratio is computed.
- Throws:
std::invalid_argument – if the sweep has fewer than two dimensions, a range is invalid, or the seed is non-finite, outside the grid, or has the wrong dimension count.
- Returns:
The ratio of operational parameter points to the total number of parameter points in the parameter space.
Header: fiction/technology/sidb/simulation/logic/verify_logic_match.hpp
-
inline operational_status fiction::sidb::simulation::logic::verify_logic_match(const layout &lyt, const charge_distribution &cd, const is_operational_params ¶ms, const std::vector<kitty::dynamic_truth_table> &spec, const uint64_t input_pattern, const std::vector<bdl_wire> &input_wires, const std::vector<bdl_wire> &output_wires)¶
Checks whether a given charge distribution of a layout implements the expected output for an input pattern: the output BDL pairs have to encode the truth-table entries and, if the parameters reject kinks, the wires have to be free of kinks. If positively charged SiDBs can occur in the layout under the given parameters (base 2 only), the layout is non-operational.
- Parameters:
lyt – The layout the charge distribution belongs to.
cd – The charge distribution to check.
params – Parameters.
spec – The Boolean function(s) to implement.
input_pattern – The input pattern
cdwas simulated for.input_wires – The input BDL wires of
lyt.output_wires – The output BDL wires of
lyt.
- Throws:
std::out_of_range – if validation encounters an invalid lattice basis index.
- Returns:
The operational status.
- class operational_status(*values)¶
Possible operational status of a layout.
- OPERATIONAL = 0¶
- NON_OPERATIONAL = 1¶
- class operational_condition(*values)¶
Condition to decide whether a layout is operational or non- operational.
- TOLERATE_KINKS = 0¶
- REJECT_KINKS = 1¶
- class operational_analysis_strategy(*values)¶
Simulation method to determine if the layout is operational or non- operational. There are three possible strategies:
SIMULATION_ONLY: This setting does not apply any filtering strategies to determine if the layout is operational. Instead, it relies solely on physical simulation to make this determination.FILTER_ONLY: This setting does only apply filtering strategies to determine if the layout is non-operational. If the layout passes all filtering strategies, it is considered operational. This is only an approximation. It may be possible that the layout is non-operational, but the filtering strategies do not detect it. Sweeping a parameter space this way is called the operational domain sketch. The filtering steps are only defined when kinks are rejected, and they enumerate the charge configurations of the canvas that the layout’sLOGICdots define, so this setting is only effective withREJECT_KINKSon a layout that has such dots.FILTER_THEN_SIMULATION: Before a physical simulation is conducted, the algorithm checks if filtering strategies have detected whether the layout is non-operational. This only provides any runtime benefits if kinks are rejected.
- SIMULATION_ONLY = 0¶
- FILTER_ONLY = 1¶
- FILTER_THEN_SIMULATION = 2¶
- class is_operational_params¶
Parameters for the
is_operationalalgorithm.- property input_bdl_iterator_params¶
Parameters for the BDL input iterator.
- property op_condition¶
Condition to decide whether a layout is operational or non- operational.
- property sim_engine¶
The simulation engine to be used for the operational domain computation.
- property simulation_parameters¶
The simulation parameters for the physical simulation of the ground state.
- property strategy_to_analyze_operational_status¶
Strategy to determine whether a layout is operational or non- operational.
- property timeout¶
Millisecond budget for the complete operation. Gate design, domains, and critical-temperature calculations share this budget across all nested checks. The maximum value means unlimited; zero expires immediately. Expiration throws
utils::timeout_errorwithout returning a partial result.
- is_operational(lyt: mnt.pyfiction.sidb.sidb_layout, spec: collections.abc.Sequence[mnt.pyfiction.synthesis.dynamic_truth_table], params: mnt.pyfiction.sidb.simulation.logic.is_operational_params = <mnt.pyfiction.sidb.simulation.logic.is_operational_params object at 0x579c36db9100>) tuple[operational_status, int]¶
- is_operational(lyt: sidb_layout, spec: Sequence[mnt.pyfiction.synthesis.dynamic_truth_table], params: is_operational_params, input_bdl_wire: Sequence[bdl_wire], output_bdl_wire: Sequence[bdl_wire], canvas_lyt: sidb_layout | None = None) tuple[operational_status, int]
- is_operational(input_pattern_layouts: Sequence[sidb_layout], spec: Sequence[mnt.pyfiction.synthesis.dynamic_truth_table], params: is_operational_params, input_bdl_wire: Sequence[bdl_wire], output_bdl_wire: Sequence[bdl_wire], canvas_lyt: sidb_layout | None = None) tuple[operational_status, int]
Overloaded function.
is_operational(lyt: mnt.pyfiction.sidb.sidb_layout, spec: collections.abc.Sequence[mnt.pyfiction.synthesis.dynamic_truth_table], params: mnt.pyfiction.sidb.simulation.logic.is_operational_params = <mnt.pyfiction.sidb.simulation.logic.is_operational_params object at 0x579c36db9100>) -> tuple[mnt.pyfiction.sidb.simulation.logic.operational_status, int]
Determines whether an SiDB layout implements the given Boolean function(s). Every input pattern is applied to the input BDL pairs, the ground states are simulated with the configured engine, and the charge states of the output BDL pairs are compared with the expected truth-table entries. If the layout carries logic dots, they form the canvas of the pruning filters that run before any simulation whenever the parameters ask for filtering and reject kinks.
- Parameters:
lyt – The layout to check.
spec – The Boolean function(s) it has to implement.
params – Parameters.
- Returns:
The operational status and the number of simulator invocations.
is_operational(lyt: mnt.pyfiction.sidb.sidb_layout, spec: collections.abc.Sequence[mnt.pyfiction.synthesis.dynamic_truth_table], params: mnt.pyfiction.sidb.simulation.logic.is_operational_params, input_bdl_wire: collections.abc.Sequence[mnt.pyfiction.sidb.simulation.logic.bdl_wire], output_bdl_wire: collections.abc.Sequence[mnt.pyfiction.sidb.simulation.logic.bdl_wire], canvas_lyt: mnt.pyfiction.sidb.sidb_layout | None = None) -> tuple[mnt.pyfiction.sidb.simulation.logic.operational_status, int]
Like the overload above, with the BDL wires and, optionally, the canvas given by the caller.
- Parameters:
lyt – The layout to check.
spec – The Boolean function(s) it has to implement.
params – Parameters.
input_bdl_wire – The input BDL wires of
lyt.output_bdl_wire – The output BDL wires of
lyt.canvas_lyt – The canvas; defaults to the logic dots of
lyt.
- Returns:
The operational status and the number of simulator invocations.
is_operational(input_pattern_layouts: collections.abc.Sequence[mnt.pyfiction.sidb.sidb_layout], spec: collections.abc.Sequence[mnt.pyfiction.synthesis.dynamic_truth_table], params: mnt.pyfiction.sidb.simulation.logic.is_operational_params, input_bdl_wire: collections.abc.Sequence[mnt.pyfiction.sidb.simulation.logic.bdl_wire], output_bdl_wire: collections.abc.Sequence[mnt.pyfiction.sidb.simulation.logic.bdl_wire], canvas_lyt: mnt.pyfiction.sidb.sidb_layout | None = None) -> tuple[mnt.pyfiction.sidb.simulation.logic.operational_status, int]
Like the overloads above, but with one layout per input pattern given by the caller instead of applying the patterns to the input BDL pairs.
- Parameters:
input_pattern_layouts – One layout per input pattern, pattern
0first.spec – The Boolean function(s) to implement.
params – Parameters.
input_bdl_wire – The input BDL wires.
output_bdl_wire – The output BDL wires.
canvas_lyt – The canvas; defaults to the logic dots of the first layout.
- Returns:
The operational status and the number of simulator invocations.
- Raises:
std::invalid_argument – if
specis empty or the number of layouts does not match the number of patterns.
- operational_input_patterns(lyt: mnt.pyfiction.sidb.sidb_layout, spec: collections.abc.Sequence[mnt.pyfiction.synthesis.dynamic_truth_table], params: mnt.pyfiction.sidb.simulation.logic.is_operational_params = <mnt.pyfiction.sidb.simulation.logic.is_operational_params object at 0x579c36db9cf0>) set[int]¶
- operational_input_patterns(lyt: sidb_layout, spec: Sequence[mnt.pyfiction.synthesis.dynamic_truth_table], params: is_operational_params, input_bdl_wire: Sequence[bdl_wire], output_bdl_wire: Sequence[bdl_wire], canvas_lyt: sidb_layout | None = None) set[int]
Overloaded function.
operational_input_patterns(lyt: mnt.pyfiction.sidb.sidb_layout, spec: collections.abc.Sequence[mnt.pyfiction.synthesis.dynamic_truth_table], params: mnt.pyfiction.sidb.simulation.logic.is_operational_params = <mnt.pyfiction.sidb.simulation.logic.is_operational_params object at 0x579c36db9cf0>) -> set[int]
Determines the input patterns for which the layout is operational.
- Parameters:
lyt – The layout to check.
spec – The Boolean function(s) it has to implement.
params – Parameters.
- Returns:
The operational input patterns.
operational_input_patterns(lyt: mnt.pyfiction.sidb.sidb_layout, spec: collections.abc.Sequence[mnt.pyfiction.synthesis.dynamic_truth_table], params: mnt.pyfiction.sidb.simulation.logic.is_operational_params, input_bdl_wire: collections.abc.Sequence[mnt.pyfiction.sidb.simulation.logic.bdl_wire], output_bdl_wire: collections.abc.Sequence[mnt.pyfiction.sidb.simulation.logic.bdl_wire], canvas_lyt: mnt.pyfiction.sidb.sidb_layout | None = None) -> set[int]
Like the overload above, with the BDL wires and, optionally, the canvas given by the caller.
- Parameters:
lyt – The layout to check.
spec – The Boolean function(s) it has to implement.
params – Parameters.
input_bdl_wire – The input BDL wires of
lyt.output_bdl_wire – The output BDL wires of
lyt.canvas_lyt – The canvas; defaults to none.
- Returns:
The operational input patterns.
- is_kink_induced_non_operational(lyt: mnt.pyfiction.sidb.sidb_layout, spec: collections.abc.Sequence[mnt.pyfiction.synthesis.dynamic_truth_table], params: mnt.pyfiction.sidb.simulation.logic.is_operational_params = <mnt.pyfiction.sidb.simulation.logic.is_operational_params object at 0x579c36dbac00>) bool¶
- is_kink_induced_non_operational(lyt: sidb_layout, spec: Sequence[mnt.pyfiction.synthesis.dynamic_truth_table], params: is_operational_params, input_bdl_wire: Sequence[bdl_wire], output_bdl_wire: Sequence[bdl_wire], canvas_lyt: sidb_layout | None = None) bool
Overloaded function.
is_kink_induced_non_operational(lyt: mnt.pyfiction.sidb.sidb_layout, spec: collections.abc.Sequence[mnt.pyfiction.synthesis.dynamic_truth_table], params: mnt.pyfiction.sidb.simulation.logic.is_operational_params = <mnt.pyfiction.sidb.simulation.logic.is_operational_params object at 0x579c36dbac00>) -> bool
Determines whether kinks are the reason the layout is non-operational.
- Parameters:
lyt – The layout to check.
spec – The Boolean function(s) it has to implement.
params – Parameters; kinks are rejected regardless of
params.op_condition.
- Returns:
trueif the layout is non-operational because of kinks.
is_kink_induced_non_operational(lyt: mnt.pyfiction.sidb.sidb_layout, spec: collections.abc.Sequence[mnt.pyfiction.synthesis.dynamic_truth_table], params: mnt.pyfiction.sidb.simulation.logic.is_operational_params, input_bdl_wire: collections.abc.Sequence[mnt.pyfiction.sidb.simulation.logic.bdl_wire], output_bdl_wire: collections.abc.Sequence[mnt.pyfiction.sidb.simulation.logic.bdl_wire], canvas_lyt: mnt.pyfiction.sidb.sidb_layout | None = None) -> bool
Like the overload above, with the BDL wires and, optionally, the canvas given by the caller.
- Parameters:
lyt – The layout to check.
spec – The Boolean function(s) it has to implement.
params – Parameters; kinks are rejected regardless of
params.op_condition.input_bdl_wire – The input BDL wires of
lyt.output_bdl_wire – The output BDL wires of
lyt.canvas_lyt – The canvas; defaults to none.
- Returns:
trueif the layout is non-operational because of kinks.
- kink_induced_non_operational_input_patterns(lyt: mnt.pyfiction.sidb.sidb_layout, spec: collections.abc.Sequence[mnt.pyfiction.synthesis.dynamic_truth_table], params: mnt.pyfiction.sidb.simulation.logic.is_operational_params = <mnt.pyfiction.sidb.simulation.logic.is_operational_params object at 0x579c36dba260>) set[int]¶
- kink_induced_non_operational_input_patterns(lyt: sidb_layout, spec: Sequence[mnt.pyfiction.synthesis.dynamic_truth_table], params: is_operational_params, input_bdl_wire: Sequence[bdl_wire], output_bdl_wire: Sequence[bdl_wire], canvas_lyt: sidb_layout | None = None) set[int]
Overloaded function.
kink_induced_non_operational_input_patterns(lyt: mnt.pyfiction.sidb.sidb_layout, spec: collections.abc.Sequence[mnt.pyfiction.synthesis.dynamic_truth_table], params: mnt.pyfiction.sidb.simulation.logic.is_operational_params = <mnt.pyfiction.sidb.simulation.logic.is_operational_params object at 0x579c36dba260>) -> set[int]
Determines the input patterns for which kinks render the layout non- operational.
- Parameters:
lyt – The layout to check.
spec – The Boolean function(s) it has to implement.
params – Parameters; kinks are rejected regardless of
params.op_condition.
- Returns:
The kink-induced non-operational input patterns.
kink_induced_non_operational_input_patterns(lyt: mnt.pyfiction.sidb.sidb_layout, spec: collections.abc.Sequence[mnt.pyfiction.synthesis.dynamic_truth_table], params: mnt.pyfiction.sidb.simulation.logic.is_operational_params, input_bdl_wire: collections.abc.Sequence[mnt.pyfiction.sidb.simulation.logic.bdl_wire], output_bdl_wire: collections.abc.Sequence[mnt.pyfiction.sidb.simulation.logic.bdl_wire], canvas_lyt: mnt.pyfiction.sidb.sidb_layout | None = None) -> set[int]
Like the overload above, with the BDL wires and, optionally, the canvas given by the caller.
- Parameters:
lyt – The layout to check.
spec – The Boolean function(s) it has to implement.
params – Parameters; kinks are rejected regardless of
params.op_condition.input_bdl_wire – The input BDL wires of
lyt.output_bdl_wire – The output BDL wires of
lyt.canvas_lyt – The canvas; defaults to none.
- Returns:
The kink-induced non-operational input patterns.
- class sweep_parameter(*values)¶
Possible sweep parameters for the operational domain computation.
- EPSILON_R = 0¶
- LAMBDA_TF = 1¶
- MU_MINUS = 2¶
- class parameter_point¶
- class parameter_point(values: Sequence[float])
The parameter point holds one parameter value per sweep dimension.
- class operational_domain¶
- class operational_domain(dims: Sequence[sweep_parameter])
An operational domain is a set of simulation parameter values for which a given SiDB layout is logically operational. This means that a layout is deemed operational if the layout’s ground state corresponds with a given Boolean function at the layout’s outputs for all possible input combinations. In this implementation, \(n\) BDL input wires and a single BDL output wire are assumed for a given layout. Any operational domain computation algorithm toggles through all \(2^n\) input combinations and evaluates the layout’s output behavior in accordance with the given Boolean function. The layout is only considered operational for a certain parameter combination, if the output behavior is correct for all input combinations. The operational domain can be computed by sweeping over specified simulation parameters and checking the operational status of the layout for each parameter combination. The operational domain is then defined as the set of all parameter combinations for which the layout is operational. Different techniques for performing these sweep are implemented.
- add_dimension(dim: sweep_parameter) None¶
Adds a dimension to sweep over. The first dimension is the x dimension, the second dimension is the y dimension, etc.
- Parameters:
dim – The dimension to add.
- get_dimension(index: int) sweep_parameter¶
Returns a specific dimension by index.
- Parameters:
index – The index of the dimension to return.
- Returns:
The dimension at the specified index.
- Raises:
std::out_of_range – if the index is out of range.
- get_number_of_dimensions() int¶
Returns the number of dimensions to sweep over.
- Returns:
The number of dimensions to sweep over.
- items() list[tuple[parameter_point, operational_status]]¶
- keys() list[parameter_point]¶
- values() list[operational_status]¶
- class critical_temperature_domain¶
- class critical_temperature_domain(dims: Sequence[sweep_parameter])
The
critical_temperature_domainclass collects the critical temperature and the operational status for a range of different physical parameters of a given SiDB layout. It allows for the evaluation of how the critical temperature depends on variations in the underlying parameter points. This enables simulations to explore the critical temperature’s behavior across different conditions and configurations.It was proposed in "The Operational Domain Explorer: A Comprehensive Framework to Unveil the Thermal Landscape of Silicon Dangling Bond Logic Beyond Conventional Operability" by M. Walter, J. Drewniok, and R. Wille in IEEE-NANO 2025 (https://ieeexplore.ieee.org/abstract/document/11113672).
- get_dimension(index: int) sweep_parameter¶
Returns a specific dimension by index.
- Parameters:
index – The index of the dimension to return.
- Returns:
The dimension at the specified index.
- Raises:
std::out_of_range – if the index is out of range.
- get_number_of_dimensions() int¶
Returns the number of dimensions to sweep over.
- Returns:
The number of dimensions to sweep over.
- items() list[tuple[parameter_point, tuple[operational_status, float]]]¶
- keys() list[parameter_point]¶
- maximum_ct() float¶
Finds the maximum critical temperature in the domain.
- Returns:
The maximum critical temperature.
- minimum_ct() float¶
Finds the minimum critical temperature in the domain.
- Returns:
The minimum critical temperature.
- values() list[tuple[operational_status, float]]¶
- class operational_domain_value_range(dimension: sweep_parameter)¶
- class operational_domain_value_range(dimension: sweep_parameter, min: float, max: float, step: float)
A range of values for a dimension sweep. The range is defined by a minimum value, a maximum value and a step size.
- property dimension¶
The sweep parameter of the dimension.
- property max¶
The maximum value of the dimension sweep.
- property min¶
The minimum value of the dimension sweep.
- property step¶
The step size of the dimension sweep.
- class operational_domain_params¶
Parameters for the operational domain computation. The parameters are used across the different operational domain computation algorithms.
- property number_of_threads¶
Number of worker threads to distribute the parameter points over.
Defaults to the number of hardware threads, or
1when that count is unavailable. Values below1are treated as1.Pinning it makes wall-clock comparisons reproducible across runs and machines, and allows an operational domain computation to leave cores free for other work.
- property on_progress¶
Callback that receives the number of evaluated parameter points. The total is known for grid search and random sampling only.
- property on_worker_progress¶
Reports logical worker activity with a fixed worker count for each invocation.
- property operational_params¶
Operational parameters. Their timeout bounds the entire domain calculation across all parameter points and workers. Finite budgets reject ClusterComplete and throw
utils::timeout_erroron expiration.
- property sweep_dimensions¶
Dimensions to sweep over together with their value ranges, ordered by priority.
The first dimension is the x dimension, the second dimension is the y dimension, etc. The default sweeps relative permittivity and screening distance from 1.0 to 10.0 in steps of 0.1.
- class operational_domain_stats¶
Statistics for the operational domain computation. The statistics are used across the different operational domain computation algorithms.
- property num_evaluated_parameter_combinations¶
Number of evaluated parameter combinations.
- property num_non_operational_parameter_combinations¶
Number of parameter combinations, for which the layout is non- operational.
- property num_operational_parameter_combinations¶
Number of parameter combinations, for which the layout is operational.
- property num_simulator_invocations¶
Number of simulator invocations.
- property num_total_parameter_points¶
Total number of parameter points in the parameter space.
- property time_total¶
The total runtime of the operational domain computation.
The same four strategies are available here. Grid search and random sampling accept any number of sweep dimensions; flood fill and contour tracing follow the shape of the operational region and therefore need at least two. In two dimensions, contour tracing walks the boundary as a closed curve; in three or more, where the boundary is a surface, it collects the boundary instead.
Setting strategy_to_analyze_operational_status to FILTER_ONLY computes the operational
domain sketch, which classifies each parameter point by filtering alone instead of by physical
simulation. It requires REJECT_KINKS and a layout with LOGIC dots; without either, the
call raises ValueError. The sketch pairs best with grid search and random sampling — see the
C++ tab for why combining it with flood fill or contour tracing needs a much higher sample count.
- operational_domain_grid_search(lyt: mnt.pyfiction.sidb.sidb_layout, spec: collections.abc.Sequence[mnt.pyfiction.synthesis.dynamic_truth_table], params: mnt.pyfiction.sidb.simulation.logic.operational_domain_params = <mnt.pyfiction.sidb.simulation.logic.operational_domain_params object at 0x579c36dc7410>, stats: mnt.pyfiction.sidb.simulation.logic.operational_domain_stats | None = None) operational_domain¶
Computes the operational domain of the given SiDB layout. The operational domain is the set of all parameter combinations for which the layout is logically operational. Logical operation is defined as the layout implementing the given truth table. The input BDL pairs of the layout are assumed to be in the same order as the inputs of the truth table.
This algorithm uses a grid search to find the operational domain. The grid search is performed by exhaustively sweeping all sweep dimensions. Since grid search is exhaustive, the algorithm is guaranteed to find the operational domain, if it exists within the parameter range. However, the algorithm performs one operational check per parameter combination, i.e., the product of the step counts of all sweep dimensions, where each operational check consists of up to \(2^n\) exact ground state simulations, where \(n\) is the number of inputs of the layout. Each exact ground state simulation has exponential complexity in of itself. Therefore, the algorithm is only feasible for small layouts with few inputs.
- Parameters:
lyt – Layout to compute the operational domain for.
spec – Expected Boolean functions, one dynamic truth table per output.
params – Parameters for the operational domain computation.
stats – Statistics of the process.
- Returns:
The operational domain of the layout.
- Raises:
std::invalid_argument – if the given sweep parameters are invalid, or if the operational domain sketch is requested without rejecting kinks or on a layout without
LOGICdots. Any number of sweep dimensions is accepted.
- operational_domain_random_sampling(lyt: mnt.pyfiction.sidb.sidb_layout, spec: collections.abc.Sequence[mnt.pyfiction.synthesis.dynamic_truth_table], samples: int, params: mnt.pyfiction.sidb.simulation.logic.operational_domain_params = <mnt.pyfiction.sidb.simulation.logic.operational_domain_params object at 0x579c36dc7e80>, stats: mnt.pyfiction.sidb.simulation.logic.operational_domain_stats | None = None) operational_domain¶
Computes the operational domain of the given SiDB layout. The operational domain is the set of all parameter combinations for which the layout is logically operational. Logical operation is defined as the layout implementing the given truth table. The input BDL pairs of the layout are assumed to be in the same order as the inputs of the truth table.
This algorithm uses random sampling to find a part of the operational domain that might not be complete. It performs a total of
samplesuniformly-distributed random samples within the parameter range. For each sample, the algorithm performs one operational check on the layout, where each operational check consists of up to \(2^n\) exact ground state simulations, where \(n\) is the number of inputs of the layout. Each exact ground state simulation has exponential complexity in of itself. Therefore, the algorithm is only feasible for small layouts with few inputs.- Parameters:
lyt – Layout to compute the operational domain for.
spec – Expected Boolean function of the layout given as a multi- output truth table.
samples – Number of samples to perform.
params – Operational domain computation parameters.
stats – Operational domain computation statistics.
- Returns:
The operational domain of the layout.
- Raises:
std::invalid_argument – if the given sweep parameters are invalid, or if the operational domain sketch is requested without rejecting kinks or on a layout without
LOGICdots. Any number of sweep dimensions is accepted.
- operational_domain_flood_fill(lyt: mnt.pyfiction.sidb.sidb_layout, spec: collections.abc.Sequence[mnt.pyfiction.synthesis.dynamic_truth_table], samples: int, params: mnt.pyfiction.sidb.simulation.logic.operational_domain_params = <mnt.pyfiction.sidb.simulation.logic.operational_domain_params object at 0x579c36d90dc0>, stats: mnt.pyfiction.sidb.simulation.logic.operational_domain_stats | None = None) operational_domain¶
Computes the operational domain of the given SiDB layout. The operational domain is the set of all parameter combinations for which the layout is logically operational. Logical operation is defined as the layout implementing the given truth table. The input BDL pairs of the layout are assumed to be in the same order as the inputs of the truth table.
This algorithm first uses random sampling to find several operational points within the parameter range. From there, it employs the “flood fill” algorithm to explore the operational domain. The algorithm is guaranteed to determine all operational “islands” in their entirety if the initial random sampling found at least one operational point within them. Thereby, this algorithm works for disconnected operational domains.
It performs
samplesuniformly-distributed random samples within the parameter range. From there, it performs another number of samples equal to the number of points within the operational domain plus the first non-operational point in each direction. For each sample, the algorithm performs one operational check on the layout, where each operational check consists of up to \(2^n\) exact ground state simulations, where \(n\) is the number of inputs of the layout. Each exact ground state simulation has exponential complexity in of itself. Therefore, the algorithm is only feasible for small layouts with few inputs.This flavor of operational domain computation was proposed in "Reducing the Complexity of Operational Domain Computation in Silicon Dangling Bond Logic" by M. Walter, J. Drewniok, S. S. H. Ng, K. Walus, and R. Wille in NANOARCH 2023.
- Parameters:
lyt – Layout to compute the operational domain for.
spec – Expected Boolean function of the layout given as a multi- output truth table.
samples – Number of samples to perform.
params – Operational domain computation parameters.
stats – Operational domain computation statistics.
- Returns:
The operational domain of the layout.
- Raises:
std::invalid_argument – if the given sweep parameters are invalid, or if the operational domain sketch is requested without rejecting kinks or on a layout without
LOGICdots. Flood fill and contour tracing additionally require at least two sweep dimensions; grid search and random sampling accept any number.
- operational_domain_contour_tracing(lyt: mnt.pyfiction.sidb.sidb_layout, spec: collections.abc.Sequence[mnt.pyfiction.synthesis.dynamic_truth_table], samples: int, params: mnt.pyfiction.sidb.simulation.logic.operational_domain_params = <mnt.pyfiction.sidb.simulation.logic.operational_domain_params object at 0x579c36dc9c90>, stats: mnt.pyfiction.sidb.simulation.logic.operational_domain_stats | None = None) operational_domain¶
Computes the operational domain of the given SiDB layout. The operational domain is the set of all parameter combinations for which the layout is logically operational. Logical operation is defined as the layout implementing the given truth table. The input BDL pairs of the layout are assumed to be in the same order as the inputs of the truth table.
This algorithm first uses random sampling to find a set of operational point within the parameter range. From there, it traverses outwards to find the edge of the operational area and performs Moore neighborhood contour tracing to explore the contour of the operational domain. This is repeated for all initially sampled points that do not lie within a contour. The algorithm is guaranteed to determine the contours of all operational “islands” if the initial random sampling found at least one operational point within them. Thereby, this algorithm works for disconnected operational domains.
It performs
samplesuniformly-distributed random samples within the parameter range. For each thusly discovered operational island, it performs another number of samples equal to the distance to an edge of each operational area. Finally, it performs up to 8 samples for each contour point (however, the actual number is usually lower). For each sample, the algorithm performs one operational check on the layout, where each operational check consists of up to \(2^n\) exact ground state simulations, where \(n\) is the number of inputs of the layout. Each exact ground state simulation has exponential complexity in of itself. Therefore, the algorithm is only feasible for small layouts with few inputs.- Parameters:
lyt – Layout to compute the operational domain for.
spec – Expected Boolean function of the layout given as a multi- output truth table.
samples – Number of samples to perform.
params – Operational domain computation parameters.
stats – Operational domain computation statistics.
- Returns:
The operational domain of the layout.
- Raises:
std::invalid_argument – if the given sweep parameters are invalid, or if the operational domain sketch is requested without rejecting kinks or on a layout without
LOGICdots. Flood fill and contour tracing additionally require at least two sweep dimensions; grid search and random sampling accept any number.
- critical_temperature_domain_grid_search(lyt: mnt.pyfiction.sidb.sidb_layout, spec: collections.abc.Sequence[mnt.pyfiction.synthesis.dynamic_truth_table], params: mnt.pyfiction.sidb.simulation.logic.operational_domain_params = <mnt.pyfiction.sidb.simulation.logic.operational_domain_params object at 0x579c36dcaac0>, stats: mnt.pyfiction.sidb.simulation.logic.operational_domain_stats | None = None) critical_temperature_domain¶
Computes the critical temperature domain of the given SiDB layout. The critical temperature domain consists of all parameter combinations for which the layout is logically operational, along with the critical temperature for each specific parameter point.
This algorithm uses a grid search to find the operational domain. The grid search is performed by exhaustively sweeping all sweep dimensions. Since grid search is exhaustive, the algorithm is guaranteed to find the operational domain, if it exists within the parameter range. However, the algorithm performs one operational check per parameter combination, i.e., the product of the step counts of all sweep dimensions, where each operational check consists of up to \(2^n\) exact ground state simulations, where \(n\) is the number of inputs of the layout. Each exact ground state simulation has exponential complexity in of itself. Therefore, the algorithm is only feasible for small layouts with few inputs.
- Parameters:
lyt – Layout to compute the operational domain for.
spec – Expected vector of truth tables of the layout. Each truth table represents an output of the Boolean function.
params – Operational domain computation parameters.
stats – Operational domain computation statistics.
- Returns:
The critical temperature domain of the layout.
- Raises:
std::invalid_argument – if the given sweep parameters are invalid, or if the operational domain sketch is requested without rejecting kinks or on a layout without
LOGICdots. Any number of sweep dimensions is accepted.
- critical_temperature_domain_random_sampling(lyt: mnt.pyfiction.sidb.sidb_layout, spec: collections.abc.Sequence[mnt.pyfiction.synthesis.dynamic_truth_table], samples: int, params: mnt.pyfiction.sidb.simulation.logic.operational_domain_params = <mnt.pyfiction.sidb.simulation.logic.operational_domain_params object at 0x579c36dcb590>, stats: mnt.pyfiction.sidb.simulation.logic.operational_domain_stats | None = None) critical_temperature_domain¶
Computes the critical temperature domain of the given SiDB layout. The critical temperature domain consists of all parameter combinations for which the layout is logically operational, along with the critical temperature for each specific parameter point.
This algorithm uses random sampling to find a part of the operational domain that might not be complete. It performs a total of
samplesuniformly-distributed random samples within the parameter range. For each sample, the algorithm performs one operational check on the layout, where each operational check consists of up to \(2^n\) exact ground state simulations, where \(n\) is the number of inputs of the layout. Each exact ground state simulation has exponential complexity in of itself. Therefore, the algorithm is only feasible for small layouts with few inputs.- Parameters:
lyt – Layout to compute the operational domain for.
spec – Expected Boolean function of the layout given as a multi- output truth table.
samples – Number of samples to perform.
params – Operational domain computation parameters.
stats – Operational domain computation statistics.
- Returns:
The critical temperature domain of the layout.
- Raises:
std::invalid_argument – if the given sweep parameters are invalid, or if the operational domain sketch is requested without rejecting kinks or on a layout without
LOGICdots. Any number of sweep dimensions is accepted.
- critical_temperature_domain_flood_fill(lyt: mnt.pyfiction.sidb.sidb_layout, spec: collections.abc.Sequence[mnt.pyfiction.synthesis.dynamic_truth_table], samples: int, params: mnt.pyfiction.sidb.simulation.logic.operational_domain_params = <mnt.pyfiction.sidb.simulation.logic.operational_domain_params object at 0x579c36dcbfc0>, stats: mnt.pyfiction.sidb.simulation.logic.operational_domain_stats | None = None) critical_temperature_domain¶
Computes the critical temperature domain of the given SiDB layout. The critical temperature domain consists of all parameter combinations for which the layout is logically operational, along with the critical temperature for each specific parameter point.
This algorithm first uses random sampling to find several operational points within the parameter range. From there, it employs the “flood fill” algorithm to explore the operational domain. The algorithm is guaranteed to determine all operational “islands” in their entirety if the initial random sampling found at least one operational point within them. Thereby, this algorithm works for disconnected operational domains.
It performs
samplesuniformly-distributed random samples within the parameter range. From there, it performs another number of samples equal to the number of points within the operational domain plus the first non-operational point in each direction. For each sample, the algorithm performs one operational check on the layout, where each operational check consists of up to \(2^n\) exact ground state simulations, where \(n\) is the number of inputs of the layout. Each exact ground state simulation has exponential complexity in of itself. Therefore, the algorithm is only feasible for small layouts with few inputs.- Parameters:
lyt – Layout to compute the operational domain for.
spec – Expected Boolean function of the layout given as a multi- output truth table.
samples – Number of samples to perform.
params – Operational domain computation parameters.
stats – Operational domain computation statistics.
- Returns:
The critical temperature domain of the layout.
- Raises:
std::invalid_argument – if the given sweep parameters are invalid, or if the operational domain sketch is requested without rejecting kinks or on a layout without
LOGICdots. Flood fill and contour tracing additionally require at least two sweep dimensions; grid search and random sampling accept any number.
- critical_temperature_domain_contour_tracing(lyt: mnt.pyfiction.sidb.sidb_layout, spec: collections.abc.Sequence[mnt.pyfiction.synthesis.dynamic_truth_table], samples: int, params: mnt.pyfiction.sidb.simulation.logic.operational_domain_params = <mnt.pyfiction.sidb.simulation.logic.operational_domain_params object at 0x579c36dccca0>, stats: mnt.pyfiction.sidb.simulation.logic.operational_domain_stats | None = None) critical_temperature_domain¶
Computes the critical temperature domain of the given SiDB layout. The critical temperature domain consists of all parameter combinations for which the layout is logically operational, along with the critical temperature for each specific parameter point.
This algorithm first uses random sampling to find a set of operational point within the parameter range. From there, it traverses outwards to find the edge of the operational area and performs Moore neighborhood contour tracing to explore the contour of the operational domain. This is repeated for all initially sampled points that do not lie within a contour. The algorithm is guaranteed to determine the contours of all operational “islands” if the initial random sampling found at least one operational point within them. Thereby, this algorithm works for disconnected operational domains. The critical temperature is computed for each operational point.
It performs
samplesuniformly-distributed random samples within the parameter range. For each thusly discovered operational island, it performs another number of samples equal to the distance to an edge of each operational area. Finally, it performs up to 8 samples for each contour point (however, the actual number is usually lower). For each sample, the algorithm performs one operational check on the layout, where each operational check consists of up to \(2^n\) exact ground state simulations, where \(n\) is the number of inputs of the layout. Each exact ground state simulation has exponential complexity in of itself. Therefore, the algorithm is only feasible for small layouts with few inputs.- Parameters:
lyt – Layout to compute the operational domain for.
spec – Expected Boolean function of the layout given as a multi- output truth table.
samples – Number of samples to perform.
params – Operational domain computation parameters.
stats – Operational domain computation statistics.
- Returns:
The critical temperature domain of the layout.
- Raises:
std::invalid_argument – if the given sweep parameters are invalid, or if the operational domain sketch is requested without rejecting kinks or on a layout without
LOGICdots. Flood fill and contour tracing additionally require at least two sweep dimensions; grid search and random sampling accept any number.
- class operational_domain_ratio_params¶
Parameters for computing the ratio of operational parameter points around a specified parameter point to the total number of parameter points in the given parameter space.
- property op_domain_params¶
Parameters for the operational domain computation.
- operational_domain_ratio(lyt: mnt.pyfiction.sidb.sidb_layout, spec: collections.abc.Sequence[mnt.pyfiction.synthesis.dynamic_truth_table], pp: mnt.pyfiction.sidb.simulation.logic.parameter_point, params: mnt.pyfiction.sidb.simulation.logic.operational_domain_ratio_params = <mnt.pyfiction.sidb.simulation.logic.operational_domain_ratio_params object at 0x579c36dcee80>) float¶
Calculates the ratio of operational parameter points surrounding a specified parameter point to the total number of parameter points in the given parameter space. This function is useful for assessing how robust a gate design is to variations in its parameters.
A ratio close to 1 indicates that the gate is robust, meaning it functions correctly across a broad range of parameter values. A ratio close to 0 indicates that the gate is highly sensitive to parameter variations and may fail to operate correctly.
- Parameters:
lyt – The SiDB layout for which to compute the ratio of operational parameter points surrounding a specified parameter point to the total number of parameter points.
spec – The expected Boolean function of the layout, provided as a multi-output truth table.
params – Parameters.
pp – The specific parameter point around which the operational ratio is computed.
- Returns:
The ratio of operational parameter points to the total number of parameter points in the parameter space.
- Raises:
std::invalid_argument – if the sweep has fewer than two dimensions, a range is invalid, or the seed is non- finite, outside the grid, or has the wrong dimension count.
Binary-dot Logic (BDL) Pair Detection¶
Header: fiction/technology/sidb/simulation/logic/detect_bdl_pairs.hpp
-
struct bdl_pair¶
A Binary-dot Logic (BDL) pair is a pair of SiDBs that are close to each other and, thus, most likely share a charge.
Public Functions
-
bdl_pair() = default¶
Standard constructor for empty BDL pairs.
-
inline bdl_pair(const sidb::dot_tag t, const lattice_site &u, const lattice_site &l) noexcept¶
Constructor for BDL pairs.
- Parameters:
t – Type of the SiDBs in the pair.
u – The upper SiDB of the pair.
l – The lower SiDB of the pair.
-
constexpr bool operator==(const bdl_pair &other) const noexcept = default¶
Equality operator. Also provides
operator!=via= default.- Parameters:
other – The other BDL pair to compare with.
- Returns:
trueif this BDL pair is equal to the other,falseotherwise.
-
inline constexpr bool operator<(const bdl_pair &other) const noexcept¶
Less than operator.
- Parameters:
other – The other BDL pair to compare with.
- Returns:
trueif this BDL pair is less than the other,falseotherwise.
-
inline constexpr bool operator<=(const bdl_pair &other) const noexcept¶
Less than or equal to operator.
- Parameters:
other – The other BDL pair to compare with.
- Returns:
trueif this BDL pair is less than or equal to the other,falseotherwise.
-
inline constexpr bool operator>(const bdl_pair &other) const¶
Greater than operator.
- Parameters:
other – The other BDL pair to compare with.
- Returns:
trueif this BDL pair is greater than the other,falseotherwise.
-
inline constexpr bool operator>=(const bdl_pair &other) const noexcept¶
Greater-than-or-equal-to operator.
- Parameters:
other – The other BDL pair to compare with.
- Returns:
trueif this BDL pair is greater than or equal to the other, otherwisefalse.
-
inline constexpr bool equal_ignore_type(const bdl_pair &other) const noexcept¶
Equality check ignoring type.
-
inline constexpr bool not_equal_ignore_type(const bdl_pair &other) const noexcept¶
Inequality check ignoring type.
-
inline constexpr bool has_same_y_coordinate(const bdl_pair &other) const noexcept¶
Checks if the
upperandlowerSiDBs in this BDL pair have the same y-coordinate as the corresponding SiDBs in the other BDL pair.
Public Members
-
sidb::dot_tag type = {}¶
The type of the SiDBs in the pair. BDL SiDBs must be of the same type. They can either be normal, input, or output SiDBs.
-
lattice_site upper = {}¶
The upper SiDB of the pair. Upper and lower are defined relative to each other via the
operator<overload.
-
lattice_site lower = {}¶
The lower SiDB of the pair. Upper and lower are defined relative to each other via the
operator<overload.
-
bdl_pair() = default¶
-
struct detect_bdl_pairs_params¶
Parameters for the BDL pair detection algorithms.
Public Members
-
double minimum_distance = {0.75}¶
The minimum distance between two SiDBs to be considered a BDL pair. This is useful to prevent, e.g., SiDBs of atomic wires to be considered BDL pairs. (unit: nm).
-
double maximum_distance = {1.5}¶
The maximum distance between two dots to be considered a BDL pair. This is useful to prevent unlikely pairings of SiDBs that are far apart and to improve performance of the matching algorithm. (unit: nm).
-
double minimum_distance = {0.75}¶
-
inline std::vector<bdl_pair> fiction::sidb::simulation::logic::detect_bdl_pairs(const layout &lyt, const std::optional<dot_tag> &type = std::nullopt, const detect_bdl_pairs_params ¶ms = {})¶
Detects the BDL pairs of an SiDB layout. Dots with the given tag are uniquely paired in increasing distance. The closest unpaired dots within
[params.minimum_distance, params.maximum_distance](defaults of 0.75 nm and 1.5 nm) form a pair. The lower bound keeps, e.g., the SiDBs of an atomic wire from being paired; the upper bound prevents unlikely pairings and bounds the work. Distances follow the layout’s lattice. The pairs are returned sorted.- Parameters:
lyt – The layout to detect BDL pairs in.
type – Optional dot tag to restrict the detection to (
INPUT,OUTPUT,NORMAL, …). If omitted, the BDL pairs of the input, output, and normal SiDBs are detected and returned in that order.params – Parameters for the BDL pair detection.
- Returns:
The detected BDL pairs.
- class bdl_pair¶
- class bdl_pair(t: sidb_dot_tag, u: lattice_site, l: lattice_site)
A Binary-dot Logic (BDL) pair is a pair of SiDBs that are close to each other and, thus, most likely share a charge.
- property lower¶
The lower SiDB of the pair. Upper and lower are defined relative to each other via the
operator<overload.
- property type¶
The type of the SiDBs in the pair. BDL SiDBs must be of the same type. They can either be normal, input, or output SiDBs.
- property upper¶
The upper SiDB of the pair. Upper and lower are defined relative to each other via the
operator<overload.
- class detect_bdl_pairs_params¶
Parameters for the BDL pair detection algorithms.
- property maximum_distance¶
The maximum distance between two dots to be considered a BDL pair. This is useful to prevent unlikely pairings of SiDBs that are far apart and to improve performance of the matching algorithm. (unit: nm).
- property minimum_distance¶
The minimum distance between two SiDBs to be considered a BDL pair. This is useful to prevent, e.g., SiDBs of atomic wires to be considered BDL pairs. (unit: nm).
- detect_bdl_pairs(lyt: sidb_layout, type: sidb_dot_tag | None = None, params: detect_bdl_pairs_params = <mnt.pyfiction.sidb.simulation.logic.detect_bdl_pairs_params object at 0x579c36da9f30>) list[bdl_pair]¶
Detects the BDL pairs of an SiDB layout. Dots with the given tag are uniquely paired in increasing distance. The closest unpaired dots within
[params.minimum_distance, params.maximum_distance](defaults of 0.75 nm and 1.5 nm) form a pair. The lower bound keeps, e.g., the SiDBs of an atomic wire from being paired; the upper bound prevents unlikely pairings and bounds the work. Distances follow the layout’s lattice. The pairs are returned sorted.- Parameters:
lyt – The layout to detect BDL pairs in.
type – Optional dot tag to restrict the detection to (
INPUT,OUTPUT,NORMAL, …). If omitted, the BDL pairs of the input, output, and normal SiDBs are detected and returned in that order.params – Parameters for the BDL pair detection.
- Returns:
The detected BDL pairs.
Binary-dot Logic (BDL) Wire Detection¶
Header: fiction/technology/sidb/simulation/logic/detect_bdl_wires.hpp
-
enum class fiction::sidb::simulation::logic::bdl_wire_selection : std::uint8_t¶
An enumeration of the selection of different types of wires.
Values:
-
enumerator ALL¶
Select all BDL wires.
-
enumerator INPUT¶
Select only BDL wires that start with input dots.
-
enumerator OUTPUT¶
Select only BDL wires that end with output dots.
-
enumerator ALL¶
-
struct detect_bdl_wires_params¶
This struct encapsulates parameters used for detecting BDL wires.
Public Members
-
double threshold_bdl_interdistance = 2.0¶
A distance threshold, which is used to determine if two pairs of BDLs are part of the same wire. (unit: nm).
-
detect_bdl_pairs_params bdl_pairs_params = {}¶
Parameters for the
detect_bdl_pairsalgorithm.
-
double threshold_bdl_interdistance = 2.0¶
-
struct bdl_wire¶
A BDL wire is a chain of BDL pairs. Wires with fewer than two pairs or only NORMAL pairs have no port; direction updates leave their end pairs unchanged. The vector constructor initializes the end pairs from the first and last supplied pairs. Adding only NORMAL pairs to a default-constructed wire leaves both unset.
For other wires, input and output pairs form the endpoints where present. An input-only wire ends at the farthest pair from its input; an output-only wire starts at the farthest pair from its output.
Public Functions
-
bdl_wire() noexcept = default¶
Constructs an empty wire.
-
inline explicit bdl_wire(std::vector<bdl_pair> p) noexcept¶
Constructs a wire from BDL pairs and determines its direction.
- Parameters:
p – The BDL pairs of the wire.
-
inline void add_bdl_pair(const bdl_pair &pair) noexcept¶
Adds a BDL pair to the wire, keeps the pairs sorted, and updates the direction.
- Parameters:
pair – The BDL pair to add.
-
inline void erase_bdl_pair(const bdl_pair &pair) noexcept¶
Removes a BDL pair from the wire and updates the direction if it was present.
- Parameters:
pair – The BDL pair to remove.
Public Members
-
fcn::port_direction port = {fcn::port_direction::NONE}¶
Port direction of the wire.
-
bdl_wire() noexcept = default¶
-
inline std::vector<bdl_wire> fiction::sidb::simulation::logic::detect_bdl_wires(const layout &lyt, const detect_bdl_wires_params ¶ms = {}, const bdl_wire_selection wire_selection = bdl_wire_selection::ALL)¶
Detects the BDL wires of an SiDB layout: the BDL pairs of all types are chained into wires along the layout’s lattice whenever two pairs lie within
params.threshold_bdl_interdistanceof each other.- Parameters:
lyt – The layout.
params – Parameters for the BDL pair and wire detection.
wire_selection – Which wires to return: all, input, or output wires.
- Returns:
The detected wires.
- class bdl_wire_selection(*values)¶
An enumeration of the selection of different types of wires.
- ALL = 0¶
- INPUT = 1¶
- OUTPUT = 2¶
- class detect_bdl_wires_params¶
This struct encapsulates parameters used for detecting BDL wires.
- property bdl_pairs_params¶
Parameters for the
detect_bdl_pairsalgorithm.
- property threshold_bdl_interdistance¶
A distance threshold, which is used to determine if two pairs of BDLs are part of the same wire. (unit: nm).
- class bdl_wire¶
- class bdl_wire(p: Sequence[bdl_pair])
A BDL wire is a chain of BDL pairs. Wires with fewer than two pairs or only NORMAL pairs have no port; direction updates leave their end pairs unchanged. The vector constructor initializes the end pairs from the first and last supplied pairs. Adding only NORMAL pairs to a default-constructed wire leaves both unset.
For other wires, input and output pairs form the endpoints where present. An input-only wire ends at the farthest pair from its input; an output-only wire starts at the farthest pair from its output.
- add_bdl_pair(pair: bdl_pair) None¶
Adds a BDL pair to the wire, keeps the pairs sorted, and updates the direction.
- Parameters:
pair – The BDL pair to add.
- property direction¶
Port direction of the wire.
- erase_bdl_pair(pair: bdl_pair) None¶
Removes a BDL pair from the wire and updates the direction if it was present.
- Parameters:
pair – The BDL pair to remove.
- find_bdl_pair_by_type(t: sidb_dot_tag) bdl_pair | None¶
Finds the first BDL pair of the given type.
- Parameters:
t – The SiDB type to look for.
- Returns:
The first BDL pair of type
t, orstd::nulloptif the wire has none.
- property first_bdl_pair¶
First BDL pair of the wire.
- property last_bdl_pair¶
Last BDL pair of the wire.
- property pairs¶
The BDL pairs of the wire.
- class port_direction(direction: cardinal = cardinal.NORTH, pi: bool = False, po: bool = False)¶
Direction and I/O flags of a BDL wire port.
- class cardinal(*values)¶
Cardinal port direction.
- property dir¶
Cardinal direction as an integer.
- property pi¶
Whether the port is a primary input.
- property po¶
Whether the port is a primary output.
- detect_bdl_wires(lyt: sidb_layout, params: detect_bdl_wires_params = <mnt.pyfiction.sidb.simulation.logic.detect_bdl_wires_params object at 0x579c36db22b0>, wire_selection: bdl_wire_selection = bdl_wire_selection.ALL) list[bdl_wire]¶
Detects the BDL wires of an SiDB layout: the BDL pairs of all types are chained into wires along the layout’s lattice whenever two pairs lie within
params.threshold_bdl_interdistanceof each other.- Parameters:
lyt – The layout.
params – Parameters for the BDL pair and wire detection.
wire_selection – Which wires to return: all, input, or output wires.
- Returns:
The detected wires.