Defect Influence¶
Header: fiction/technology/sidb/simulation/defects/defect_influence.hpp
-
struct defect_influence_params¶
Parameters of the defect influence analysis.
Public Types
-
enum class influence_definition : uint8_t¶
What counts as an influence of the defect on the layout.
Values:
-
enumerator OPERATIONALITY_CHANGE¶
The defect changes the operational status of the layout (a specification is required).
-
enumerator GROUND_STATE_CHANGE¶
The defect changes the ground state of the layout (for every input pattern if a specification is given).
-
enumerator OPERATIONALITY_CHANGE¶
Public Members
-
logic::is_operational_params operational_params = {}¶
Operational and simulation parameters. Their timeout bounds the entire defect domain calculation, including ground-state comparisons. Expiration throws
utils::timeout_errorwithout returning a partial result.
-
std::pair<int32_t, int32_t> additional_scanning_area = {50, 6}¶
The scanning area extends the layout’s bounding box by this many columns and rows in every direction.
-
influence_definition influence_def = {influence_definition::OPERATIONALITY_CHANGE}¶
The influence definition.
-
std::size_t number_of_threads = {std::max(std::size_t{std::thread::hardware_concurrency()}, std::size_t{1})}¶
Number of threads to use.
-
utils::progress_callback on_progress = {}¶
Callback that receives the number of evaluated defect positions or, for QuickTrace, contour points.
-
enum class influence_definition : uint8_t¶
-
enum class fiction::sidb::simulation::defects::defect_influence_status : uint8_t¶
Whether a defect at a position influences the layout.
Values:
-
enumerator INFLUENTIAL¶
The defect influences the layout.
-
enumerator NON_INFLUENTIAL¶
The defect does not influence the layout.
-
enumerator INFLUENTIAL¶
-
class defect_influence_domain : public fiction::sidb::simulation::domain<lattice_site, defect_influence_status>¶
The influence of a defect on a layout for every evaluated defect position.
-
struct defect_influence_stats¶
Statistics of the defect influence analysis.
Public Members
-
std::size_t num_simulator_invocations = {0}¶
Number of simulator invocations.
-
std::size_t num_evaluated_defect_positions = {0}¶
Number of evaluated defect positions.
-
std::size_t num_influencing_defect_positions = {0}¶
Number of influencing defect positions.
-
std::size_t num_non_influencing_defect_positions = {0}¶
Number of non-influencing defect positions.
-
std::size_t num_simulator_invocations = {0}¶
-
inline defect_influence_domain fiction::sidb::simulation::defects::defect_influence_grid_search(const layout &lyt, const std::vector<kitty::dynamic_truth_table> &spec, const defect_influence_params ¶ms = {}, const std::size_t step_size = 1, defect_influence_stats *stats = nullptr)¶
This algorithm uses a grid search to determine the defect influence domain. The grid search is performed by exhaustively sweeping all possible atomic defect positions in x and y dimensions.
- Parameters:
lyt – Layout to compute the defect influence domain for.
spec – Expected Boolean function of the layout given as a multi-output truth table.
step_size – The parameter specifying the interval between consecutive defect positions to be evaluated.
params – Defect influence domain computation parameters.
stats – Statistics.
- Throws:
std::invalid_argument – if
step_sizeis zero.std::invalid_argument – if
specis empty.std::invalid_argument – if
params.additional_scanning_areacontains a negative value.
- Returns:
The defect influence domain of the layout.
-
inline defect_influence_domain fiction::sidb::simulation::defects::defect_influence_grid_search(const layout &lyt, const defect_influence_params ¶ms = {}, const std::size_t step_size = 1, defect_influence_stats *stats = nullptr)¶
This algorithm uses a grid search to determine the defect influence domain. The grid search is performed by exhaustively sweeping all possible atomic defect positions in x and y dimensions.
Set
params.influence_deftoGROUND_STATE_CHANGEto compare ground states without a truth table. WithOPERATIONALITY_CHANGE, this overload classifies sampled defect positions as non-influential.- Parameters:
lyt – Layout to compute the defect influence domain for.
step_size – The parameter specifying the interval between consecutive defect positions to be evaluated.
params – Defect influence domain computation parameters.
stats – Statistics.
- Throws:
std::invalid_argument – if
step_sizeis zero.std::invalid_argument – if
params.additional_scanning_areacontains a negative value.
- Returns:
The defect influence domain of the layout.
-
inline defect_influence_domain fiction::sidb::simulation::defects::defect_influence_random_sampling(const layout &lyt, const std::vector<kitty::dynamic_truth_table> &spec, const std::size_t samples, const defect_influence_params ¶ms = {}, defect_influence_stats *stats = nullptr)¶
This algorithm uses random sampling to find a part of the defect influence domain that might not be complete. It performs a total of
samplesuniformly-distributed random samples within the specified area.- Parameters:
lyt – Layout to compute the defect influence domain for.
spec – Expected Boolean function of the layout given as a multi-output truth table.
samples – Number of random samples to perform.
params – Defect influence domain computation parameters.
stats – Statistics.
- Throws:
std::invalid_argument – if
specis empty.std::invalid_argument – if
params.additional_scanning_areacontains a negative value.
- Returns:
The (partial) defect influence domain of the layout.
-
inline defect_influence_domain fiction::sidb::simulation::defects::defect_influence_random_sampling(const layout &lyt, const std::size_t samples, const defect_influence_params ¶ms = {}, defect_influence_stats *stats = nullptr)¶
This algorithm uses random sampling to find a part of the defect influence domain that might not be complete. It performs a total of
samplesuniformly-distributed random samples within the specified area.Set
params.influence_deftoGROUND_STATE_CHANGEto compare ground states without a truth table. WithOPERATIONALITY_CHANGE, this overload classifies sampled defect positions as non-influential.- Parameters:
lyt – Layout to compute the defect influence domain for.
samples – Number of random samples to perform.
params – Defect influence domain computation parameters.
stats – Statistics.
- Throws:
std::invalid_argument – if
params.additional_scanning_areacontains a negative value.- Returns:
The (partial) defect influence domain of the layout.
-
inline defect_influence_domain fiction::sidb::simulation::defects::defect_influence_quicktrace(const layout &lyt, const std::vector<kitty::dynamic_truth_table> &spec, const std::size_t samples, const defect_influence_params ¶ms = {}, defect_influence_stats *stats = nullptr)¶
The QuickTrace algorithm which was proposed in “QuickTrace: An Efficient Contour Tracing Algorithm for Defect Robustness Simulation of Silicon Dangling Bond Logic” by J. Drewniok, M. Walter, and R. Wille in ISCAS 2025 (https://ieeexplore.ieee.org/document/11044082) applies contour tracing to identify the boundary (contour) between influencing and non-influencing defect positions for a given SiDB layout.
The algorithm uses a screened Coulomb potential, where the electrostatic interaction weakens as distance increases. If a defect at position
pcauses the SiDB layout to be non-influential, then defects further away from the layout are also likely to have no influence on the layout’s functionality or performance. Conversely, defects closer to the layout may cause it to fail. This behavior allows for efficient contour tracing of the transition between influential and non-influential states.The process is as follows:
Initialization: Randomly select
samplesinitial defect positions several nanometers away from the layout where they are unlikely to influence the layout.Contour Tracing: For each position, perform a defect-aware physical simulation to identify adjacent positions along the x-axis that influence the layout.
Contour Following: Trace the contour of non-influential positions until the starting point is reached again, thereby closing the contour.
Repetition: Repeat steps 1-3 for multiple initial heights to identify additional contours, since multiple influential-to-non-influential contours may exist. This process helps to detect all relevant transitions in the layout. This algorithm uses contour tracing to identify the transition between influencing and non-influencing defect positions of the SiDB layout. It starts by searching for defect locations on the left side (bounding_box + additional scanning area). The y-coordinate for these positions is chosen randomly. The number of samples is determined by the
samplesparameter. Then, the algorithm moves each defect position to the right, searching for the last non-influencing defect position.
- Parameters:
lyt – Layout to compute the defect influence domain for.
spec – Expected Boolean function of the layout given as a multi-output truth table.
samples – Number of samples to perform.
params – Defect influence domain computation parameters.
stats – Defect influence computation statistics.
- Throws:
std::invalid_argument – if
specis empty.std::invalid_argument – if
params.additional_scanning_areacontains a negative value.
- Returns:
The (partial) defect influence domain of the layout.
-
inline defect_influence_domain fiction::sidb::simulation::defects::defect_influence_quicktrace(const layout &lyt, const std::size_t samples, const defect_influence_params ¶ms = {}, defect_influence_stats *stats = nullptr)¶
Applies contour tracing to identify the boundary (contour) between influencing and non-influencing defect positions for a given SiDB layout.
The algorithm uses a screened Coulomb potential, where the electrostatic interaction weakens as distance increases. If a defect at position
pcauses the SiDB layout to be non-influential, then defects further away from the layout are also likely to have no influence on the layout’s functionality or performance. Conversely, defects closer to the layout may cause it to fail. This behavior allows for efficient contour tracing of the transition between influential and non-influential states.The process is as follows:
Initialization: Randomly select
samplesinitial defect positions several nanometers away from the layout where they are unlikely to influence the layout.Contour Tracing: For each position, perform a defect-aware physical simulation to identify adjacent positions along the x-axis that influence the layout.
Contour Following: Trace the contour of non-influential positions until the starting point is reached again, thereby closing the contour.
Repetition: Repeat steps 1-3 for multiple initial heights to identify additional contours, since multiple influential-to-non-influential contours may exist. This process helps to detect all relevant transitions in the layout.
Set
params.influence_deftoGROUND_STATE_CHANGEto compare ground states without a truth table. WithOPERATIONALITY_CHANGE, this overload classifies sampled defect positions as non-influential.- Parameters:
lyt – Layout to compute the defect influence domain for.
samples – Number of samples to perform.
params – Defect influence domain computation parameters.
stats – Defect influence computation statistics.
- Throws:
std::invalid_argument – if
params.additional_scanning_areacontains a negative value.- Returns:
The (partial) defect influence domain of the layout.
Header: fiction/technology/sidb/simulation/defects/defect_clearance.hpp
-
struct defect_clearance¶
The defect clearance of a layout: the farthest influential defect position, measured by the distance to the closest SiDB, and that distance.
Public Members
-
lattice_site defect_position = {}¶
The influential defect position farthest from the layout.
-
double defect_clearance_distance = {}¶
Its distance to the closest SiDB (unit: nm).
-
lattice_site defect_position = {}¶
-
inline defect_clearance fiction::sidb::simulation::defects::calculate_defect_clearance(const layout &lyt, const defect_influence_domain &defect_inf_domain) noexcept¶
Computes the defect clearance from a defect influence domain: for every influential position, the distance to the closest SiDB of the layout is determined, and the maximum of those distances is the clearance. Any defect farther away than that does not influence the layout.
- Parameters:
lyt – The layout.
defect_inf_domain – The defect influence domain of
lyt.
- Returns:
The defect clearance.