From 92ee896662273db10a3d86249ad8720a9743900b Mon Sep 17 00:00:00 2001 From: Jan Drewniok <97012901+Drewniok@users.noreply.github.com> Date: Wed, 15 Nov 2023 17:00:51 +0100 Subject: [PATCH 1/4] =?UTF-8?q?=F0=9F=90=9B=20Correct=20y-direction=20boun?= =?UTF-8?q?dary=20for=20Moore=20neighborhood=20(#331)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * :bug: use correct limit in y-direction. * :white_check_mark: Add test to cover non-symmetric parameter space. --- .../simulation/sidb/operational_domain.hpp | 2 +- .../simulation/sidb/operational_domain.cpp | 84 ++++++++++++++++++- 2 files changed, 84 insertions(+), 2 deletions(-) diff --git a/include/fiction/algorithms/simulation/sidb/operational_domain.hpp b/include/fiction/algorithms/simulation/sidb/operational_domain.hpp index d1a45f361..f8a56d428 100644 --- a/include/fiction/algorithms/simulation/sidb/operational_domain.hpp +++ b/include/fiction/algorithms/simulation/sidb/operational_domain.hpp @@ -871,7 +871,7 @@ class operational_domain_impl const auto decr_x = (x > 0) ? x - 1 : x; const auto incr_x = (x + 1 < x_indices.size()) ? x + 1 : x; const auto decr_y = (y > 0) ? y - 1 : y; - const auto incr_y = (y + 1 < x_indices.size()) ? y + 1 : y; + const auto incr_y = (y + 1 < y_indices.size()) ? y + 1 : y; // add neighbors in clockwise direction diff --git a/test/algorithms/simulation/sidb/operational_domain.cpp b/test/algorithms/simulation/sidb/operational_domain.cpp index c22a050bf..3d744ab0b 100644 --- a/test/algorithms/simulation/sidb/operational_domain.cpp +++ b/test/algorithms/simulation/sidb/operational_domain.cpp @@ -77,7 +77,7 @@ TEST_CASE("BDL wire operational domain computation", "[operational-domain]") operational_domain_stats op_domain_stats{}; - SECTION("operational area") + SECTION("operational area, same number of steps in x- and y-direction") { op_domain_params.x_min = 5.1; op_domain_params.x_max = 6.1; @@ -158,6 +158,88 @@ TEST_CASE("BDL wire operational domain computation", "[operational-domain]") } } + SECTION("operational area, different number of steps in x- and y-direction") + { + op_domain_params.x_min = 5.1; + op_domain_params.x_max = 6.1; + op_domain_params.x_step = 0.1; + + op_domain_params.y_min = 4.5; + op_domain_params.y_max = 5.0; + op_domain_params.y_step = 0.1; + + SECTION("grid_search") + { + const auto op_domain = operational_domain_grid_search(lyt, std::vector{create_id_tt()}, + op_domain_params, &op_domain_stats); + + // check if the operational domain has the correct size (10 steps in each dimension) + CHECK(op_domain.operational_values.size() == 50); + + // for the selected range, all samples should be within the parameters and operational + check_op_domain_params_and_operational_status(op_domain, op_domain_params, operational_status::OPERATIONAL); + + CHECK(mockturtle::to_seconds(op_domain_stats.time_total) > 0.0); + CHECK(op_domain_stats.num_simulator_invocations == 100); + CHECK(op_domain_stats.num_evaluated_parameter_combinations == 50); + CHECK(op_domain_stats.num_operational_parameter_combinations == 50); + CHECK(op_domain_stats.num_non_operational_parameter_combinations == 0); + } + SECTION("random_sampling") + { + const auto op_domain = operational_domain_random_sampling(lyt, std::vector{create_id_tt()}, 100, + op_domain_params, &op_domain_stats); + + // check if the operational domain has the correct size + CHECK(op_domain.operational_values.size() <= 100); + + // for the selected range, all samples should be within the parameters and operational + check_op_domain_params_and_operational_status(op_domain, op_domain_params, operational_status::OPERATIONAL); + + CHECK(mockturtle::to_seconds(op_domain_stats.time_total) > 0.0); + CHECK(op_domain_stats.num_simulator_invocations <= 200); + CHECK(op_domain_stats.num_evaluated_parameter_combinations <= 100); + CHECK(op_domain_stats.num_evaluated_parameter_combinations > 0); + CHECK(op_domain_stats.num_operational_parameter_combinations <= 100); + CHECK(op_domain_stats.num_non_operational_parameter_combinations == 0); + } + + SECTION("flood_fill") + { + const auto op_domain = operational_domain_flood_fill(lyt, std::vector{create_id_tt()}, 1, + op_domain_params, &op_domain_stats); + + // check if the operational domain has the correct size + CHECK(op_domain.operational_values.size() == 50); + + // for the selected range, all samples should be within the parameters and operational + check_op_domain_params_and_operational_status(op_domain, op_domain_params, operational_status::OPERATIONAL); + + CHECK(mockturtle::to_seconds(op_domain_stats.time_total) > 0.0); + CHECK(op_domain_stats.num_simulator_invocations == 100); + CHECK(op_domain_stats.num_evaluated_parameter_combinations == 50); + CHECK(op_domain_stats.num_operational_parameter_combinations == 50); + CHECK(op_domain_stats.num_non_operational_parameter_combinations == 0); + } + SECTION("contour_tracing") + { + const auto op_domain = operational_domain_contour_tracing(lyt, std::vector{create_id_tt()}, 1, + op_domain_params, &op_domain_stats); + + // check if the operational domain has the correct size + CHECK(op_domain.operational_values.size() <= 50); + + // for the selected range, all samples should be within the parameters and operational + check_op_domain_params_and_operational_status(op_domain, op_domain_params, operational_status::OPERATIONAL); + + CHECK(mockturtle::to_seconds(op_domain_stats.time_total) > 0.0); + CHECK(op_domain_stats.num_simulator_invocations <= 100); + CHECK(op_domain_stats.num_evaluated_parameter_combinations <= 50); + CHECK(op_domain_stats.num_operational_parameter_combinations <= 50); + CHECK(op_domain_stats.num_non_operational_parameter_combinations == 0); + } + } + SECTION("non-operational area") { op_domain_params.x_min = 2.5; From 926c895d6146e7f25f02bd94b00a29621581269b Mon Sep 17 00:00:00 2001 From: Jan Drewniok <97012901+Drewniok@users.noreply.github.com> Date: Thu, 16 Nov 2023 23:47:02 +0100 Subject: [PATCH 2/4] =?UTF-8?q?=E2=9C=A8=20Function=20to=20assess=20the=20?= =?UTF-8?q?physical=20population=20stability=20(#323)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * :art: fix inconsistency. * :art: check if global potential is not equal zero. * :sparkles: new function to assess population stability. * :memo: small fix in docstring. * :memo: small fix. * :art: small fix. * :art: implement clang-tidy suggestion. * :art: implement clang-tidy suggestion. * :art: implement Marcel's suggestions. * :white_check_mark: add test. * :art: add reference. * :art: implement Marcel's suggestions. * :art: small fix. * :sparkles: new function which converts an electrostatic potential to the corresponding distance. * :white_check_mark: unit test for new function. * :memo: update docu. * :art: add distance to assess_physical_population_stability.hpp * :white_check_mark: update unit test. * :art: fix typo. * :art: implement Marcel's suggestions. * :art: implement Marcel's suggestions. * :art: small fix. * :art: implement Marcel's suggestions. * :art: implement Marcel's suggestions. * :art: implement Marcel's suggestions. * :art: small fix. * :art: add Lyt to avoid deduction error. * :art: use reference instead of copy. --- docs/algorithms/sidb_simulation.rst | 21 + .../assess_physical_population_stability.hpp | 378 ++++++++++++++++++ .../sidb/convert_potential_to_distance.hpp | 64 +++ .../algorithms/simulation/sidb/quickexact.hpp | 104 ++--- .../charge_distribution_surface.hpp | 30 +- .../assess_physical_population_stability.cpp | 253 ++++++++++++ .../sidb/convert_potential_to_distance.cpp | 78 ++++ 7 files changed, 851 insertions(+), 77 deletions(-) create mode 100644 include/fiction/algorithms/simulation/sidb/assess_physical_population_stability.hpp create mode 100644 include/fiction/algorithms/simulation/sidb/convert_potential_to_distance.hpp create mode 100644 test/algorithms/simulation/sidb/assess_physical_population_stability.cpp create mode 100644 test/algorithms/simulation/sidb/convert_potential_to_distance.cpp diff --git a/docs/algorithms/sidb_simulation.rst b/docs/algorithms/sidb_simulation.rst index ffb774bfb..663995861 100644 --- a/docs/algorithms/sidb_simulation.rst +++ b/docs/algorithms/sidb_simulation.rst @@ -173,3 +173,24 @@ Binary-dot Logic (BDL) Pair Detection .. doxygenstruct:: fiction::detect_bdl_pairs_params :members: .. doxygenfunction:: fiction::detect_bdl_pairs + + +Assess Population Stability +^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +**Header:** ``fiction/algorithms/simulation/sidb/assess_physical_population_stability.hpp`` + +.. doxygenenum:: fiction::transition_type +.. doxygenstruct:: fiction::population_stability_information + :members: +.. doxygenstruct:: fiction::assess_physical_population_stability_params + :members: +.. doxygenfunction:: fiction::assess_physical_population_stability + + +Convert Potential to Distance +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +**Header:** ``fiction/algorithms/simulation/sidb/convert_potential_to_distance.hpp`` + +.. doxygenfunction:: fiction::convert_potential_to_distance diff --git a/include/fiction/algorithms/simulation/sidb/assess_physical_population_stability.hpp b/include/fiction/algorithms/simulation/sidb/assess_physical_population_stability.hpp new file mode 100644 index 000000000..7cf19c96c --- /dev/null +++ b/include/fiction/algorithms/simulation/sidb/assess_physical_population_stability.hpp @@ -0,0 +1,378 @@ +// +// Created by Jan Drewniok on 02.11.23. +// + +#ifndef FICTION_ASSESS_PHYSICAL_POPULATION_STABILITY_HPP +#define FICTION_ASSESS_PHYSICAL_POPULATION_STABILITY_HPP + +#include "fiction/algorithms/simulation/sidb/convert_potential_to_distance.hpp" +#include "fiction/algorithms/simulation/sidb/quickexact.hpp" +#include "fiction/algorithms/simulation/sidb/sidb_simulation_parameters.hpp" +#include "fiction/layouts/cell_level_layout.hpp" +#include "fiction/traits.hpp" +#include "fiction/types.hpp" + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace fiction +{ + +/** + * Possible types of charge transitions that can occur in an SiDB layout. These transitions represent + * changes in the charge state of SiDBs, including transitions from neutral to negative, negative to neutral, neutral to + * positive, and positive to neutral. + */ +enum class transition_type +{ + /** + * SiDB is neutrally charged, but is closest to being negatively charged. + */ + NEUTRAL_TO_NEGATIVE, + /** + * SiDB is negatively charged, but is closest to being neutrally charged. + */ + NEGATIVE_TO_NEUTRAL, + /** + * SiDB is neutrally charged, but is closest to being positively charged. + */ + NEUTRAL_TO_POSITIVE, + /** + * SiDB is positively charged, but is closest to being neutrally charged. + */ + POSITIVE_TO_NEUTRAL, +}; +/** + * This struct encapsulates information related to the population stability of a charge distribution. + * It includes details about the SiDB closest to a charge transition (critical cell), the specific + * charge state transition, the electrostatic potential difference required for the + * transition, the corresponding distance, and the total electrostatic energy of the + * given charge distribution. + * + * @tparam Lyt SiDB cell-level layout type. + */ +template +struct population_stability_information +{ + /** + * SiDB cell which is closest to a charge transition. + */ + typename Lyt::cell critical_cell{}; + /** + * Charge transition from the current charge state to the closest one. + */ + transition_type transition_from_to{}; + /** + * Absolute electrostatic potential (unit: V) required for the charge state transition. + */ + double minimum_potential_difference_to_transition{}; + /** + * Distance (unit: nm) corresponding to the minimum potential difference. + */ + double distance_corresponding_to_potential{}; + /** + * Total electrostatic energy (unit: eV) of given charge distribution. + */ + double system_energy{}; +}; + +/** + * This struct stores the parameters required to assess the population stability. + */ +struct assess_physical_population_stability_params +{ + /** + * Parameters for the electrostatic potential. + */ + sidb_simulation_parameters physical_parameters{}; + /** + * The precision level for the conversion from the minimum potential difference to the corresponding + * distance. + */ + uint64_t precision_for_distance_corresponding_to_potential = 2; +}; + +namespace detail +{ + +template +class assess_physical_population_stability_impl +{ + public: + /** + * Constructor for assess_physical_population_stability_impl. + * + * @param lyt SiDB layout. + * @param parameters The simulation parameters used for the assessment. + */ + assess_physical_population_stability_impl(const Lyt& lyt, + const assess_physical_population_stability_params& parameters) : + layout{lyt}, + params{parameters} + {} + + /** + * Runs a population stability assessment for a given SiDB layout using the provided simulation parameters. + * This function determines the minimum electrostatic potential required for charge state transitions within the + * layout and identifies the corresponding critical SiDB along with the type of charge state transition. + * + * @return A vector of population stability information structures, where each element represents a charge + * distribution in ascending energy order. Each structure contains details about the critical SiDB, the type of + * charge state transition, and the minimum electrostatic potential required for the charge transition. + */ + [[nodiscard]] std::vector> run() noexcept + { + const quickexact_params quickexact_parameters{params.physical_parameters}; + const auto simulation_results = quickexact(layout, quickexact_parameters); + const auto energy_and_unique_charge_index = collect_energy_and_charge_index(simulation_results); + + std::vector> popstability_information{}; + popstability_information.reserve(simulation_results.charge_distributions.size()); + + // Access the unique indices + for (const auto& energy_and_index : energy_and_unique_charge_index) + { + const auto it = std::find_if( + simulation_results.charge_distributions.begin(), simulation_results.charge_distributions.end(), + [&](const charge_distribution_surface& charge_lyt) + { + // Compare with the first element of the pair returned by get_charge_index_and_base() + return charge_lyt.get_charge_index_and_base().first == energy_and_index.charge_index; + }); + + if (it == simulation_results.charge_distributions.end()) + { + continue; + } + + const auto& charge_lyt = *it; + + population_stability_information population_stability_info{}; + population_stability_info.minimum_potential_difference_to_transition = + std::numeric_limits::infinity(); + + charge_lyt.foreach_cell( + [this, &charge_lyt, &population_stability_info](const auto& c) + { + switch (charge_lyt.get_charge_state(c)) + { + case sidb_charge_state::NEGATIVE: + { + population_stability_info = handle_negative_charges(*charge_lyt.get_local_potential(c), c, + population_stability_info); + break; + } + case sidb_charge_state::NEUTRAL: + { + population_stability_info = handle_neutral_charges(*charge_lyt.get_local_potential(c), c, + population_stability_info); + break; + } + case sidb_charge_state::POSITIVE: + { + population_stability_info = handle_positive_charges(*charge_lyt.get_local_potential(c), c, + population_stability_info); + break; + } + case sidb_charge_state::NONE: + { + break; + } + } + }); + population_stability_info.system_energy = charge_lyt.get_system_energy(); + population_stability_info.distance_corresponding_to_potential = convert_potential_to_distance( + population_stability_info.minimum_potential_difference_to_transition, params.physical_parameters, + params.precision_for_distance_corresponding_to_potential); + popstability_information.push_back(population_stability_info); + } + + return popstability_information; + }; + + private: + /** + * This struct represents the electrostatic energy and charge index of a charge distribution. + */ + struct energy_and_charge_index + { + /** + * Electrostatic energy of the charge distribution. + */ + double energy; + /** + * Charge index of the charge distribution. + */ + uint64_t charge_index; + }; + /** + * Layout to analyze. + */ + const Lyt& layout; + /** + * Parameters required to assess the population stability. + */ + const assess_physical_population_stability_params& params; + + /** + * This function checks if the absolute difference between the given local potential and + * µ- is smaller than the current minimum potential difference to transition for a negatively charged SiDB. + * If `true`, it updates the population stability information with the new minimum difference and critical cell. + * + * @param local_potential The local potential associated with the cell. + * @param c The cell for which the charge state is being considered (SiDB is negatively charged). + * @param pop_stability_information The current population stability information. + * + * @return An updated population stability information with potential transition details. + */ + [[nodiscard]] population_stability_information + handle_negative_charges(const double local_potential, const typename Lyt::cell& c, + const population_stability_information& pop_stability_information) noexcept + { + auto updated_pop_stability_information = pop_stability_information; + + if (std::abs(-local_potential + params.physical_parameters.mu_minus) < + updated_pop_stability_information.minimum_potential_difference_to_transition) + { + updated_pop_stability_information.minimum_potential_difference_to_transition = + std::abs(-local_potential + params.physical_parameters.mu_minus); + updated_pop_stability_information.critical_cell = c; + updated_pop_stability_information.transition_from_to = transition_type::NEGATIVE_TO_NEUTRAL; + } + + return updated_pop_stability_information; + } + /** + * This function checks if the absolute difference between the given local potential and + * µ- or µ+ is smaller than the current minimum potential difference. + * If `true`, it updates the population stability information with the new minimum difference and critical cell. + * + * @param local_potential The local potential associated with the cell. + * @param c The cell for which the charge state is being considered (SiDB is neutrally charged). + * @param pop_stability_information The current population stability information. + * + * @return An updated population stability information with potential transition details. + */ + [[nodiscard]] population_stability_information + handle_neutral_charges(const double local_potential, const typename Lyt::cell& c, + const population_stability_information& pop_stability_information) noexcept + { + auto updated_pop_stability_information = pop_stability_information; + if (std::abs(-local_potential + params.physical_parameters.mu_minus) < + std::abs(-local_potential + params.physical_parameters.mu_plus())) + { + if (std::abs(-local_potential + params.physical_parameters.mu_minus) < + updated_pop_stability_information.minimum_potential_difference_to_transition) + { + updated_pop_stability_information.minimum_potential_difference_to_transition = + std::abs(-local_potential + params.physical_parameters.mu_minus); + updated_pop_stability_information.critical_cell = c; + updated_pop_stability_information.transition_from_to = transition_type::NEUTRAL_TO_NEGATIVE; + } + } + + else + { + if (std::abs(-local_potential + params.physical_parameters.mu_plus()) < + updated_pop_stability_information.minimum_potential_difference_to_transition) + { + updated_pop_stability_information.minimum_potential_difference_to_transition = + std::abs(-local_potential + params.physical_parameters.mu_plus()); + updated_pop_stability_information.critical_cell = c; + updated_pop_stability_information.transition_from_to = transition_type::NEUTRAL_TO_POSITIVE; + } + } + + return updated_pop_stability_information; + } + /** + * This function checks if the absolute difference between the given local potential and µ+ is smaller than the + * current minimum potential difference. If true`, it updates the + * population stability information with the new minimum difference and critical cell. + * + * @param local_potential The local potential associated with the cell. + * @param c The cell for which the charge state is being considered (SiDB is positively charged). + * @param pop_stability_information The current population stability information. + * + * @return An updated population stability information with potential transition details. + */ + [[nodiscard]] population_stability_information + handle_positive_charges(const double local_potential, const typename Lyt::cell& c, + const population_stability_information& pop_stability_information) noexcept + { + auto updated_pop_stability_information = pop_stability_information; + if (std::abs(-local_potential + params.physical_parameters.mu_plus()) < + updated_pop_stability_information.minimum_potential_difference_to_transition) + { + updated_pop_stability_information.minimum_potential_difference_to_transition = + std::abs(-local_potential + params.physical_parameters.mu_plus()); + updated_pop_stability_information.critical_cell = c; + updated_pop_stability_information.transition_from_to = transition_type::POSITIVE_TO_NEUTRAL; + } + + return updated_pop_stability_information; + } + /** + * Collects the system energy with the corresponding charge index information of all physically valid + * charge distributions of a given SiDB layout. + * + * @param sim_results The simulation results, including all physically valid charge distributions. + * @return A vector of energy_and_charge_index pairs, where each pair consists of a double value representing + * the system energy and a uint64_t representing the unique charge index. The vector is sorted in ascending order + * of the energy values. + */ + [[nodiscard]] std::vector + collect_energy_and_charge_index(const sidb_simulation_result& sim_results) const noexcept + { + std::vector energy_charge_index{}; + energy_charge_index.reserve(sim_results.charge_distributions.size()); + + std::transform( + sim_results.charge_distributions.cbegin(), sim_results.charge_distributions.cend(), + std::back_inserter(energy_charge_index), + [](const auto& ch_lyt) { + return energy_and_charge_index{ch_lyt.get_system_energy(), ch_lyt.get_charge_index_and_base().first}; + }); + + // Sort the vector in ascending order of the energy value + std::sort(energy_charge_index.begin(), energy_charge_index.end(), + [](const auto& lhs, const auto& rhs) { return lhs.energy < rhs.energy; }); + + return energy_charge_index; + } +}; + +} // namespace detail + +/** + * This function assesses the population stability of each physically valid charge distributions of a given SiDB layout. + * It determines the minimum absolute electrostatic potential required to induce a charge distribution transition. + * The function also identifies the SiDB for which this is the case (critical SiDB) and the corresponding charge state + * transition (i.e., the change from one charge state to another). + * @tparam Lyt SiDB cell-level layout type. + * @param lyt The layout for which the population stability is assessed. + * @param params Parameters used to assess the population stability. + * @return A vector of population stability information for all physically valid charge distributions of the given SiDB + * layout. + */ +template +[[nodiscard]] std::vector> +assess_physical_population_stability(const Lyt& lyt, const assess_physical_population_stability_params& params) noexcept +{ + static_assert(is_cell_level_layout_v, "Lyt is not a cell-level layout"); + static_assert(has_sidb_technology_v, "Lyt is not an SiDB layout"); + static_assert(has_siqad_coord_v, "Lyt is not based on SiQAD coordinates"); + + detail::assess_physical_population_stability_impl p{lyt, params}; + return p.run(); +}; + +} // namespace fiction + +#endif // FICTION_ASSESS_PHYSICAL_POPULATION_STABILITY_HPP diff --git a/include/fiction/algorithms/simulation/sidb/convert_potential_to_distance.hpp b/include/fiction/algorithms/simulation/sidb/convert_potential_to_distance.hpp new file mode 100644 index 000000000..a4028e1e7 --- /dev/null +++ b/include/fiction/algorithms/simulation/sidb/convert_potential_to_distance.hpp @@ -0,0 +1,64 @@ +// +// Created by Jan Drewniok on 10.11.23. +// + +#ifndef FICTION_CONVERT_POTENTIAL_TO_DISTANCE_HPP +#define FICTION_CONVERT_POTENTIAL_TO_DISTANCE_HPP + +#include "fiction/algorithms/simulation/sidb/sidb_simulation_parameters.hpp" +#include "fiction/technology/physical_constants.hpp" + +#include +#include +#include +#include + +namespace fiction +{ + +/** + * The electrostatic potential on hydrogen-passivated silicon is typically modeled using a screened Coulomb potential. + * This electrostatic potential is commonly employed to determine the electrostatic potential for a given distance + * (between SiDB and point under consideration) and given physical parameters. However, the function provided here + * serves the inverse purpose by calculating the distance for a given potential and given physical parameters. + * + * @note Runtime depends exponentially on the provided precision. + * + * @param params The physical parameters for a given hydrogen-passivated silicon surface. + * @param potential The electrostatic potential (unit: V) to be converted to a distance. + * @param precision The precision level for the conversion, specifying the number of decimal places. + * @return The distance (unit: nm) corresponding to the given electrostatic potential. + */ +[[nodiscard]] inline double +convert_potential_to_distance(const double potential, + const sidb_simulation_parameters& params = sidb_simulation_parameters{}, + const uint64_t precision = 2) noexcept +{ + // function to calculate the electrostatic potential for a given distance and given physical parameters on the H-Si + // surface + const auto calculate_potential_for_given_distance = [¶ms](const double distance) noexcept + { + return params.k() * params.epsilon_r / params.epsilon_r / (distance * 1e-9) * + std::exp(-distance / params.lambda_tf) * physical_constants::ELEMENTARY_CHARGE; + }; + + // calculate the step size based on the precision + const double step_size = std::pow(10, -static_cast(precision)); + + // initialize distance and potential for the initial step + double distance = step_size; + double potential_for_given_distance = calculate_potential_for_given_distance(distance); + + // as long as the electrostatic potential is still larger than the given potential, the distance is increased + while (potential_for_given_distance > potential) + { + distance += step_size; + potential_for_given_distance = calculate_potential_for_given_distance(distance); + } + + return distance; +} + +} // namespace fiction + +#endif // FICTION_CONVERT_POTENTIAL_TO_DISTANCE_HPP diff --git a/include/fiction/algorithms/simulation/sidb/quickexact.hpp b/include/fiction/algorithms/simulation/sidb/quickexact.hpp index 7e42b83f9..15fedafd8 100644 --- a/include/fiction/algorithms/simulation/sidb/quickexact.hpp +++ b/include/fiction/algorithms/simulation/sidb/quickexact.hpp @@ -86,7 +86,7 @@ class quickexact_impl { public: quickexact_impl(const Lyt& lyt, const quickexact_params& parameter) : - layout{lyt}, + layout{lyt.clone()}, charge_lyt{lyt}, params{parameter} { @@ -345,22 +345,14 @@ class quickexact_impl if (charge_layout.is_physically_valid()) { - charge_distribution_surface charge_lyt_copy{charge_layout}; - charge_lyt_copy.recompute_system_energy(); + charge_distribution_surface charge_lyt_copy{charge_lyt}; - // The pre-assigned negatively-charged SiDBs are added to the final layout. - for (const auto& cell : preassigned_negative_sidbs) - { - charge_lyt_copy.add_sidb(cell, sidb_charge_state::NEGATIVE); - } + charge_layout.foreach_cell( + [&charge_lyt_copy, &charge_layout](const auto& c) + { charge_lyt_copy.assign_charge_state(c, charge_layout.get_charge_state(c)); }); - if constexpr (has_get_sidb_defect_v) - { - for (const auto& [cell, defect] : real_placed_defects) - { - charge_lyt_copy.assign_sidb_defect(cell, defect); - } - } + charge_lyt_copy.update_after_charge_change(); + charge_lyt_copy.recompute_system_energy(); result.charge_distributions.push_back(charge_lyt_copy); } } @@ -398,23 +390,14 @@ class quickexact_impl { if (charge_layout.is_physically_valid()) { - charge_distribution_surface charge_lyt_copy{charge_layout}; - charge_lyt_copy.recompute_system_energy(); - - // The pre-assigned negatively-charged SiDBs are added to the final layout. - for (const auto& cell : preassigned_negative_sidbs) - { - charge_lyt_copy.add_sidb(cell, sidb_charge_state::NEGATIVE); - } + charge_distribution_surface charge_lyt_copy{charge_lyt}; - if constexpr (has_get_sidb_defect_v) - { - for (const auto& [cell, defect] : real_placed_defects) - { - charge_lyt_copy.assign_sidb_defect(cell, defect); - } - } + charge_layout.foreach_cell( + [&charge_lyt_copy, &charge_layout](const auto& c) + { charge_lyt_copy.assign_charge_state(c, charge_layout.get_charge_state(c)); }); + charge_lyt_copy.update_after_charge_change(); + charge_lyt_copy.recompute_system_energy(); result.charge_distributions.push_back(charge_lyt_copy); } @@ -428,22 +411,14 @@ class quickexact_impl if (charge_layout.is_physically_valid()) { - charge_distribution_surface charge_lyt_copy{charge_layout}; - charge_lyt_copy.recompute_system_energy(); + charge_distribution_surface charge_lyt_copy{charge_lyt}; - for (const auto& cell : preassigned_negative_sidbs) - { - charge_lyt_copy.add_sidb(cell, sidb_charge_state::NEGATIVE); - } - - if constexpr (has_get_sidb_defect_v) - { - for (const auto& [cell, defect] : real_placed_defects) - { - charge_lyt_copy.assign_sidb_defect(cell, defect); - } - } + charge_layout.foreach_cell( + [&charge_lyt_copy, &charge_layout](const auto& c) + { charge_lyt_copy.assign_charge_state(c, charge_layout.get_charge_state(c)); }); + charge_lyt_copy.update_after_charge_change(); + charge_lyt_copy.recompute_system_energy(); result.charge_distributions.push_back(charge_lyt_copy); } @@ -465,23 +440,15 @@ class quickexact_impl { if (charge_layout.is_physically_valid()) { - charge_distribution_surface charge_lyt_copy{charge_layout}; - charge_lyt_copy.recompute_system_energy(); + charge_distribution_surface charge_lyt_copy{charge_lyt}; - // The pre-assigned negatively-charged SiDBs are added to the final layout. - for (const auto& cell : preassigned_negative_sidbs) - { - charge_lyt_copy.add_sidb(cell, sidb_charge_state::NEGATIVE); - } - - if constexpr (has_get_sidb_defect_v) - { - for (const auto& [cell, defect] : real_placed_defects) - { - charge_lyt_copy.assign_sidb_defect(cell, defect); - } - } + charge_layout.foreach_cell( + [&charge_lyt_copy, &charge_layout](const auto& c) + { charge_lyt_copy.assign_charge_state(c, charge_layout.get_charge_state(c)); }); + charge_lyt_copy.update_after_charge_change(); + charge_lyt_copy.recompute_system_energy(); + charge_lyt_copy.charge_distribution_to_index_general(); result.charge_distributions.push_back(charge_lyt_copy); } @@ -492,21 +459,14 @@ class quickexact_impl if (charge_layout.is_physically_valid()) { - charge_distribution_surface charge_lyt_copy{charge_layout}; + charge_distribution_surface charge_lyt_copy{charge_lyt}; - for (const auto& cell : preassigned_negative_sidbs) - { - charge_lyt_copy.add_sidb(cell, sidb_charge_state::NEGATIVE); - } - - if constexpr (has_get_sidb_defect_v) - { - for (const auto& [cell, defect] : real_placed_defects) - { - charge_lyt_copy.assign_sidb_defect(cell, defect); - } - } + charge_layout.foreach_cell([&charge_lyt_copy, &charge_layout](const auto& c) + { charge_lyt_copy.assign_charge_state(c, charge_layout.get_charge_state(c)); }); + charge_lyt_copy.update_after_charge_change(); + charge_lyt_copy.recompute_system_energy(); + charge_lyt_copy.charge_distribution_to_index_general(); result.charge_distributions.push_back(charge_lyt_copy); } diff --git a/include/fiction/technology/charge_distribution_surface.hpp b/include/fiction/technology/charge_distribution_surface.hpp index f3967dfcd..ed27f324b 100644 --- a/include/fiction/technology/charge_distribution_surface.hpp +++ b/include/fiction/technology/charge_distribution_surface.hpp @@ -1282,11 +1282,14 @@ class charge_distribution_surface : public Lyt void assign_global_external_potential(const double potential_value, dependent_cell_mode dependent_cell = dependent_cell_mode::FIXED) noexcept { - this->foreach_cell( - [this, &potential_value](const auto& c) { - strg->local_external_pot.insert({c, potential_value}); - }); - this->update_after_charge_change(dependent_cell); + if (potential_value != 0.0) + { + this->foreach_cell( + [this, &potential_value](const auto& c) { + strg->local_external_pot.insert({c, potential_value}); + }); + this->update_after_charge_change(dependent_cell); + } } /** * This function determines if given layout has to be simulated with three states since positively charged SiDBs can @@ -1769,6 +1772,23 @@ class charge_distribution_surface : public Lyt { strg->cell_charge.push_back(charge); strg->sidb_order.push_back(c); + + // sort sidbs by the relation given by the coordinates and sort charge vector accordingly + std::vector> combined_vector{}; + combined_vector.reserve(strg->cell_charge.size()); + + for (size_t i = 0; i < strg->sidb_order.size(); i++) + { + combined_vector.emplace_back(strg->sidb_order[i], strg->cell_charge[i]); + } + + std::sort(combined_vector.begin(), combined_vector.end()); + + for (size_t i = 0; i < combined_vector.size(); i++) + { + strg->sidb_order[i] = combined_vector[i].first; + strg->cell_charge[i] = combined_vector[i].second; + } } private: diff --git a/test/algorithms/simulation/sidb/assess_physical_population_stability.cpp b/test/algorithms/simulation/sidb/assess_physical_population_stability.cpp new file mode 100644 index 000000000..1a5bc7694 --- /dev/null +++ b/test/algorithms/simulation/sidb/assess_physical_population_stability.cpp @@ -0,0 +1,253 @@ +// +// Created by Jan Drewniok on 02.11.23. +// + +#include +#include + +#include +#include +#include +#include +#include + +using namespace fiction; + +using layout = sidb_cell_clk_lyt_siqad; + +TEST_CASE("Single SiDB", "[assess-physical-population-stability]") +{ + layout lyt{}; + lyt.assign_cell_type({1, 1, 0}, sidb_technology::cell_type::NORMAL); + + SECTION("Precision of distance_corresponding_to_potential is two") + { + const auto params = assess_physical_population_stability_params{sidb_simulation_parameters{2, -0.29}, 2}; + const auto result = assess_physical_population_stability(lyt, params); + REQUIRE(result.size() == 1); + const auto& population_stability_detail = result[0]; + CHECK(population_stability_detail.critical_cell == siqad::coord_t{1, 1, 0}); + CHECK(population_stability_detail.transition_from_to == transition_type::NEGATIVE_TO_NEUTRAL); + CHECK(population_stability_detail.minimum_potential_difference_to_transition == 0.29); + REQUIRE_THAT(population_stability_detail.distance_corresponding_to_potential, + Catch::Matchers::WithinAbs(0.77, 1e-5)); + } + + SECTION("Precision of distance_corresponding_to_potential is three") + { + const auto params = assess_physical_population_stability_params{sidb_simulation_parameters{2, -0.29}, 3}; + const auto result = assess_physical_population_stability(lyt, params); + REQUIRE(result.size() == 1); + const auto& population_stability_detail = result[0]; + CHECK(population_stability_detail.critical_cell == siqad::coord_t{1, 1, 0}); + CHECK(population_stability_detail.transition_from_to == transition_type::NEGATIVE_TO_NEUTRAL); + CHECK(population_stability_detail.minimum_potential_difference_to_transition == 0.29); + REQUIRE_THAT(population_stability_detail.distance_corresponding_to_potential, + Catch::Matchers::WithinAbs(0.762, 1e-5)); + } +} + +TEST_CASE("Three SiDBs with positive charge states", "[assess-physical-population-stability]") +{ + layout lyt{}; + const auto params = assess_physical_population_stability_params{}; + lyt.assign_cell_type({1, 1, 0}, sidb_technology::cell_type::NORMAL); + lyt.assign_cell_type({1, 1, 1}, sidb_technology::cell_type::NORMAL); + lyt.assign_cell_type({2, 1, 0}, sidb_technology::cell_type::NORMAL); + + const auto result = assess_physical_population_stability(lyt, params); + REQUIRE(result.size() == 3); + + SECTION("Check correct energy order") + { + CHECK(result[0].system_energy < result[1].system_energy); + CHECK(result[1].system_energy < result[2].system_energy); + } + + SECTION("Ground state") + { + const auto& population_stability_detail = result[0]; + CHECK(population_stability_detail.critical_cell == siqad::coord_t{2, 1, 0}); + CHECK(population_stability_detail.transition_from_to == transition_type::NEGATIVE_TO_NEUTRAL); + CHECK(population_stability_detail.minimum_potential_difference_to_transition < 0.43); + REQUIRE_THAT(population_stability_detail.distance_corresponding_to_potential, + Catch::Matchers::WithinAbs(0.56, 1e-5)); + } + SECTION("1st excited state") + { + const auto& population_stability_detail = result[1]; + CHECK(population_stability_detail.critical_cell == siqad::coord_t{2, 1, 0}); + CHECK(population_stability_detail.transition_from_to == transition_type::NEGATIVE_TO_NEUTRAL); + CHECK(population_stability_detail.minimum_potential_difference_to_transition < 0.23); + REQUIRE_THAT(population_stability_detail.distance_corresponding_to_potential, + Catch::Matchers::WithinAbs(0.94, 1e-5)); + } + + SECTION("2nd excited state") + { + const auto& population_stability_detail = result[2]; + CHECK(population_stability_detail.critical_cell == siqad::coord_t{1, 1, 1}); + CHECK(population_stability_detail.transition_from_to == transition_type::NEUTRAL_TO_NEGATIVE); + CHECK(population_stability_detail.minimum_potential_difference_to_transition < 0.21); + REQUIRE_THAT(population_stability_detail.distance_corresponding_to_potential, + Catch::Matchers::WithinAbs(1.01, 1e-5)); + } +} + +TEST_CASE("Bestagon AND gate", "[assess-physical-population-stability]") +{ + layout lyt{}; + const auto params = assess_physical_population_stability_params{}; + lyt.assign_cell_type({36, 1, 0}, sidb_technology::cell_type::INPUT); + lyt.assign_cell_type({2, 1, 0}, sidb_technology::cell_type::INPUT); + + lyt.assign_cell_type({38, 0, 0}, sidb_technology::cell_type::INPUT); + lyt.assign_cell_type({0, 0, 0}, sidb_technology::cell_type::INPUT); + + lyt.assign_cell_type({23, 9, 0}, sidb_technology::cell_type::NORMAL); + lyt.assign_cell_type({18, 11, 1}, sidb_technology::cell_type::NORMAL); + lyt.assign_cell_type({18, 9, 0}, sidb_technology::cell_type::NORMAL); + lyt.assign_cell_type({19, 8, 0}, sidb_technology::cell_type::NORMAL); + + lyt.assign_cell_type({20, 14, 0}, sidb_technology::cell_type::NORMAL); + lyt.assign_cell_type({19, 13, 0}, sidb_technology::cell_type::NORMAL); + lyt.assign_cell_type({26, 16, 0}, sidb_technology::cell_type::NORMAL); + lyt.assign_cell_type({24, 15, 0}, sidb_technology::cell_type::NORMAL); + lyt.assign_cell_type({32, 2, 0}, sidb_technology::cell_type::NORMAL); + lyt.assign_cell_type({30, 3, 0}, sidb_technology::cell_type::NORMAL); + lyt.assign_cell_type({26, 4, 0}, sidb_technology::cell_type::NORMAL); + lyt.assign_cell_type({24, 5, 0}, sidb_technology::cell_type::NORMAL); + lyt.assign_cell_type({12, 4, 0}, sidb_technology::cell_type::NORMAL); + lyt.assign_cell_type({14, 5, 0}, sidb_technology::cell_type::NORMAL); + lyt.assign_cell_type({6, 2, 0}, sidb_technology::cell_type::NORMAL); + lyt.assign_cell_type({8, 3, 0}, sidb_technology::cell_type::NORMAL); + + lyt.assign_cell_type({32, 18, 0}, sidb_technology::cell_type::OUTPUT); + lyt.assign_cell_type({30, 17, 0}, sidb_technology::cell_type::OUTPUT); + + lyt.assign_cell_type({36, 19, 0}, sidb_technology::cell_type::NORMAL); + + SECTION("no input specified") + { + const auto result = assess_physical_population_stability(lyt, params); + REQUIRE(result.size() == 8); + const auto& population_stability_detail = result[0]; + CHECK(population_stability_detail.critical_cell == siqad::coord_t{2, 1, 0}); + CHECK(population_stability_detail.transition_from_to == transition_type::NEUTRAL_TO_NEGATIVE); + CHECK(population_stability_detail.minimum_potential_difference_to_transition < 0.021); + REQUIRE_THAT(population_stability_detail.distance_corresponding_to_potential, + Catch::Matchers::WithinAbs(4.79, 1e-5)); + } + + SECTION("input 00") + { + lyt.assign_cell_type({36, 1, 0}, sidb_technology::cell_type::EMPTY); + lyt.assign_cell_type({2, 1, 0}, sidb_technology::cell_type::EMPTY); + const auto result = assess_physical_population_stability(lyt, params); + REQUIRE(result.size() == 2); + const auto& population_stability_detail = result[0]; + CHECK(population_stability_detail.critical_cell == siqad::coord_t{14, 5, 0}); + CHECK(population_stability_detail.transition_from_to == transition_type::NEUTRAL_TO_NEGATIVE); + CHECK(population_stability_detail.minimum_potential_difference_to_transition < 0.026); + REQUIRE_THAT(population_stability_detail.distance_corresponding_to_potential, + Catch::Matchers::WithinAbs(4.32, 1e-5)); + } + + SECTION("input 01") + { + lyt.assign_cell_type({36, 1, 0}, sidb_technology::cell_type::EMPTY); + lyt.assign_cell_type({0, 0, 0}, sidb_technology::cell_type::EMPTY); + + const auto result = assess_physical_population_stability(lyt, params); + REQUIRE(result.size() == 4); + const auto& population_stability_detail = result[0]; + CHECK(population_stability_detail.critical_cell == siqad::coord_t{32, 18, 0}); + CHECK(population_stability_detail.transition_from_to == transition_type::NEUTRAL_TO_NEGATIVE); + CHECK(population_stability_detail.minimum_potential_difference_to_transition < 0.041); + REQUIRE_THAT(population_stability_detail.distance_corresponding_to_potential, + Catch::Matchers::WithinAbs(3.3, 1e-5)); + } + + SECTION("input 10") + { + lyt.assign_cell_type({38, 0, 0}, sidb_technology::cell_type::EMPTY); + lyt.assign_cell_type({0, 0, 0}, sidb_technology::cell_type::EMPTY); + + const auto result = assess_physical_population_stability(lyt, params); + REQUIRE(result.size() == 8); + const auto& population_stability_detail = result[0]; + CHECK(population_stability_detail.critical_cell == siqad::coord_t{19, 8, 0}); + CHECK(population_stability_detail.transition_from_to == transition_type::NEUTRAL_TO_NEGATIVE); + CHECK(population_stability_detail.minimum_potential_difference_to_transition < 0.02); + REQUIRE_THAT(population_stability_detail.distance_corresponding_to_potential, + Catch::Matchers::WithinAbs(4.87, 1e-5)); + } + + SECTION("input 11") + { + lyt.assign_cell_type({36, 1, 0}, sidb_technology::cell_type::EMPTY); + lyt.assign_cell_type({2, 1, 0}, sidb_technology::cell_type::EMPTY); + + const auto result = assess_physical_population_stability(lyt, params); + REQUIRE(result.size() == 2); + const auto& population_stability_detail = result[0]; + CHECK(population_stability_detail.critical_cell == siqad::coord_t{14, 5, 0}); + CHECK(population_stability_detail.transition_from_to == transition_type::NEUTRAL_TO_NEGATIVE); + CHECK(population_stability_detail.minimum_potential_difference_to_transition < 0.026); + REQUIRE_THAT(population_stability_detail.distance_corresponding_to_potential, + Catch::Matchers::WithinAbs(4.32, 1e-5)); + } +} + +TEST_CASE("Bestagon CROSSING gate input 11", "[assess-physical-population-stability]") +{ + layout lyt{}; + const auto params = assess_physical_population_stability_params{}; + lyt.assign_cell_type({36, 1, 0}, sidb_technology::cell_type::INPUT); + lyt.assign_cell_type({2, 1, 0}, sidb_technology::cell_type::INPUT); + + lyt.assign_cell_type({6, 2, 0}, sidb_technology::cell_type::NORMAL); + lyt.assign_cell_type({20, 12, 0}, sidb_technology::cell_type::NORMAL); + lyt.assign_cell_type({8, 3, 0}, sidb_technology::cell_type::NORMAL); + lyt.assign_cell_type({14, 5, 0}, sidb_technology::cell_type::NORMAL); + lyt.assign_cell_type({14, 11, 1}, sidb_technology::cell_type::NORMAL); + + lyt.assign_cell_type({12, 4, 0}, sidb_technology::cell_type::NORMAL); + lyt.assign_cell_type({14, 15, 0}, sidb_technology::cell_type::NORMAL); + lyt.assign_cell_type({26, 4, 0}, sidb_technology::cell_type::NORMAL); + + lyt.assign_cell_type({14, 9, 0}, sidb_technology::cell_type::NORMAL); + lyt.assign_cell_type({24, 15, 0}, sidb_technology::cell_type::NORMAL); + lyt.assign_cell_type({12, 16, 0}, sidb_technology::cell_type::NORMAL); + + lyt.assign_cell_type({18, 9, 0}, sidb_technology::cell_type::NORMAL); + lyt.assign_cell_type({26, 16, 0}, sidb_technology::cell_type::NORMAL); + lyt.assign_cell_type({24, 13, 1}, sidb_technology::cell_type::NORMAL); + + lyt.assign_cell_type({24, 5, 0}, sidb_technology::cell_type::NORMAL); + lyt.assign_cell_type({30, 3, 0}, sidb_technology::cell_type::NORMAL); + lyt.assign_cell_type({16, 13, 1}, sidb_technology::cell_type::NORMAL); + + lyt.assign_cell_type({32, 2, 0}, sidb_technology::cell_type::NORMAL); + lyt.assign_cell_type({20, 8, 0}, sidb_technology::cell_type::NORMAL); + + lyt.assign_cell_type({30, 17, 0}, sidb_technology::cell_type::OUTPUT); + lyt.assign_cell_type({6, 18, 0}, sidb_technology::cell_type::OUTPUT); + + lyt.assign_cell_type({32, 18, 0}, sidb_technology::cell_type::OUTPUT); + lyt.assign_cell_type({8, 17, 0}, sidb_technology::cell_type::OUTPUT); + + lyt.assign_cell_type({2, 19, 0}, sidb_technology::cell_type::NORMAL); + lyt.assign_cell_type({36, 19, 0}, sidb_technology::cell_type::NORMAL); + + CHECK(lyt.num_cells() == 27); + + const auto result = assess_physical_population_stability(lyt, params); + REQUIRE(result.size() == 20); + const auto& population_stability_detail = result[0]; + CHECK(population_stability_detail.critical_cell == siqad::coord_t{14, 9, 0}); + CHECK(population_stability_detail.transition_from_to == transition_type::NEUTRAL_TO_NEGATIVE); + CHECK(population_stability_detail.minimum_potential_difference_to_transition < 0.01); + REQUIRE_THAT(population_stability_detail.distance_corresponding_to_potential, + Catch::Matchers::WithinAbs(6.88, 1e-5)); +} diff --git a/test/algorithms/simulation/sidb/convert_potential_to_distance.cpp b/test/algorithms/simulation/sidb/convert_potential_to_distance.cpp new file mode 100644 index 000000000..c39000367 --- /dev/null +++ b/test/algorithms/simulation/sidb/convert_potential_to_distance.cpp @@ -0,0 +1,78 @@ +// +// Created by Jan Drewniok on 10.11.23. +// + +#include +#include + +#include +#include + +#include + +using namespace fiction; + +TEST_CASE("Conversion of potential to distance", "[convert-potential-to-distance]") +{ + auto params = sidb_simulation_parameters{}; + + SECTION("Valid conversion with default parameters") + { + uint64_t const precision = 1; + const double potential_value = 5.0; + const double expected_distance = 0.1; + REQUIRE_THAT(convert_potential_to_distance(potential_value, params, precision), + Catch::Matchers::WithinAbs(expected_distance, 1e-5)); + } + + SECTION("Valid conversion with custom parameters, precision is 1") + { + params.epsilon_r = 2.0; + params.lambda_tf = 1.0; + const uint64_t precision = 1; + const double potential_value = 0.01; + const double expected_distance = 3.2; + REQUIRE_THAT(convert_potential_to_distance(potential_value, params, precision), + Catch::Matchers::WithinAbs(expected_distance, 1e-5)); + } + + SECTION("Valid conversion with custom parameters, precision is 2") + { + params.epsilon_r = 2.0; + params.lambda_tf = 1.0; + const uint64_t precision = 2; + const double potential_value = 0.01; + const double expected_distance = 3.14; + REQUIRE_THAT(convert_potential_to_distance(potential_value, params, precision), + Catch::Matchers::WithinAbs(expected_distance, 1e-5)); + } + + SECTION("Valid conversion with custom parameters, precision is 3") + { + params.epsilon_r = 2.0; + params.lambda_tf = 1.0; + const uint64_t precision = 3; + const double potential_value = 0.01; + const double expected_distance = 3.135; + REQUIRE_THAT(convert_potential_to_distance(potential_value, params, precision), + Catch::Matchers::WithinAbs(expected_distance, 1e-5)); + } + + SECTION("Valid conversion with custom parameters, precision is 0") + { + const uint64_t precision = 0; + const double potential_value = 0.03; + const double expected_distance = 4; + REQUIRE_THAT(convert_potential_to_distance(potential_value, params, precision), + Catch::Matchers::WithinAbs(expected_distance, 1e-5)); + } + + SECTION("Conversion with infinite potential") + { + const uint64_t precision = 3; + const double potential_value = std::numeric_limits::infinity(); + const double expected_distance = 0.001; + REQUIRE_THAT(convert_potential_to_distance(potential_value, params, precision), + Catch::Matchers::WithinAbs(expected_distance, 1e-5)); + } +} From 181929f3fb24e41072b6b1b402bdbe357e66267f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 17 Nov 2023 09:58:13 +0000 Subject: [PATCH 3/4] :arrow_up: Bump the submodules group with 3 updates (#334) --- libs/Catch2 | 2 +- libs/parallel-hashmap | 2 +- libs/pybind11 | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/libs/Catch2 b/libs/Catch2 index 01cac90c6..de7ba4e88 160000 --- a/libs/Catch2 +++ b/libs/Catch2 @@ -1 +1 @@ -Subproject commit 01cac90c6298f8d5cda34eebda24412f644142f8 +Subproject commit de7ba4e8897bbe56c612b980d02f249a92d0eada diff --git a/libs/parallel-hashmap b/libs/parallel-hashmap index 401552da8..004690579 160000 --- a/libs/parallel-hashmap +++ b/libs/parallel-hashmap @@ -1 +1 @@ -Subproject commit 401552da80b0971f818e648621260720ad40934e +Subproject commit 0046905791006b5a85dbf62f7a98c65987b72e68 diff --git a/libs/pybind11 b/libs/pybind11 index e250155af..dc9b39596 160000 --- a/libs/pybind11 +++ b/libs/pybind11 @@ -1 +1 @@ -Subproject commit e250155afadde7100e627e6aa4a541137a863243 +Subproject commit dc9b39596d986aeb061bd3debe52d30e2467dc48 From 987ef42b08334adc170b1d8b364c824232c9da17 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 17 Nov 2023 10:59:09 +0100 Subject: [PATCH 4/4] :arrow_up: Bump the github-actions group with 1 update (#333) Bumps the github-actions group with 1 update: [actions/github-script](https://github.com/actions/github-script). - [Release notes](https://github.com/actions/github-script/releases) - [Commits](https://github.com/actions/github-script/compare/v6...v7) --- updated-dependencies: - dependency-name: actions/github-script dependency-type: direct:production update-type: version-update:semver-major dependency-group: github-actions ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/clang-tidy-review-post.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/clang-tidy-review-post.yml b/.github/workflows/clang-tidy-review-post.yml index 3778d3212..fc6c96e78 100644 --- a/.github/workflows/clang-tidy-review-post.yml +++ b/.github/workflows/clang-tidy-review-post.yml @@ -14,7 +14,7 @@ jobs: steps: # Download the artifact uploaded by the lint action - name: Download Clang-Tidy artifact - uses: actions/github-script@v6 + uses: actions/github-script@v7 with: script: | const artifacts = await github.rest.actions.listWorkflowRunArtifacts({