You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ubuntu 22.04.2 LTS | Linux 5.15.133.1-microsoft-standard-WSL2 x86_64 GNU/Linux
Python version
3.11.2
C++ compiler
Ubuntu clang version 14.0.0-1ubuntu1.1
Additional environment information
No response
Description
As the title states, I found as 20 DB layout (unfortunately not a smaller one thus far) for which QuickExact returns 4 physically valid charge distributions, yet the test below shows evidence that there are actually 2 unique physically valid charge distributions.
Expected behavior
An SiDB simulator should not return duplicate results, this could indicate some hidden inefficiency too.
Much to your benefit, I found a 5 DB example with the same issue :)
TEST_CASE("QuickExact duplicate charge configurations", "[quickexact]")
{
using sidb_lyt = sidb_cell_clk_lyt_siqad;
sidb_lyt lyt{};
lyt.assign_cell_type({2, 2, 1}, sidb_lyt::cell_type::NORMAL);
lyt.assign_cell_type({2, 3, 0}, sidb_lyt::cell_type::NORMAL);
lyt.assign_cell_type({7, 3, 1}, sidb_lyt::cell_type::NORMAL);
lyt.assign_cell_type({7, 4, 0}, sidb_lyt::cell_type::NORMAL);
lyt.assign_cell_type({8, 4, 1}, sidb_lyt::cell_type::NORMAL);
const sidb_simulation_result<sidb_lyt>& qe_res = quickexact(lyt);
// QuickExact returns 3 physically valid charge distributions in total
REQUIRE(qe_res.charge_distributions.size() == 3);
// This loop asserts that the first two are equal
for (uint64_t i = 0; i < 2; ++i)
{
CHECK(qe_res.charge_distributions[i].get_charge_state({2, 2, 1}) == sidb_charge_state::NEGATIVE);
CHECK(qe_res.charge_distributions[i].get_charge_state({2, 3, 0}) == sidb_charge_state::NEUTRAL);
CHECK(qe_res.charge_distributions[i].get_charge_state({7, 3, 1}) == sidb_charge_state::NEGATIVE);
CHECK(qe_res.charge_distributions[i].get_charge_state({7, 4, 0}) == sidb_charge_state::POSITIVE);
CHECK(qe_res.charge_distributions[i].get_charge_state({8, 4, 1}) == sidb_charge_state::NEGATIVE);
}
}
wlambooy
changed the title
🐛 QuickExact returns duplicate charge configurations for a 20 DB layout
🐛 QuickExact returns duplicate charge configurations
Mar 1, 2024
fiction version
fiction main -- latest to date (62a132f)
OS
Ubuntu 22.04.2 LTS | Linux 5.15.133.1-microsoft-standard-WSL2 x86_64 GNU/Linux
Python version
3.11.2
C++ compiler
Ubuntu clang version 14.0.0-1ubuntu1.1
Additional environment information
No response
Description
As the title states, I found as 20 DB layout (unfortunately not a smaller one thus far) for which
QuickExact
returns 4 physically valid charge distributions, yet the test below shows evidence that there are actually 2 unique physically valid charge distributions.Expected behavior
An SiDB simulator should not return duplicate results, this could indicate some hidden inefficiency too.
How to Reproduce
The text was updated successfully, but these errors were encountered: