-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🐛 Increased tolerance to avoid undetected degeneracy and added forbidden BDL types in wire detection #685
base: main
Are you sure you want to change the base?
Conversation
…on_detected_degeneracy' into increase_error_margin_to_avoid_non_detected_degeneracy
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #685 +/- ##
=======================================
Coverage 98.36% 98.36%
=======================================
Files 254 253 -1
Lines 41399 41484 +85
Branches 1878 1883 +5
=======================================
+ Hits 40722 40806 +84
- Misses 677 678 +1
... and 3 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
clang-tidy review says "All clean, LGTM! 👍" |
…put wire and vice versa.
Signed-off-by: GitHub Actions <[email protected]>
clang-tidy review says "All clean, LGTM! 👍" |
clang-tidy review says "All clean, LGTM! 👍" |
I think that is an excellent idea! Since there is always the possibility of getting degenerate groundstates, we should respect that in the function name, i.e.: |
Good call! Would it make sense then to parameterize the function to allow degeneracy or not? Or have two separate functions for that? I'm also okay with having a single one simply called |
Personally, I do not see a reason for parameterizing it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clang-tidy made some suggestions
Signed-off-by: GitHub Actions <[email protected]>
bindings/mnt/pyfiction/include/pyfiction/algorithms/simulation/sidb/sidb_simulation_result.hpp
Outdated
Show resolved
Hide resolved
[[nodiscard]] std::vector<bdl_wire<Lyt>> | ||
filter_wires_by_type(const typename technology<Lyt>::cell_type& type) const noexcept | ||
filter_wires_by_type(const typename technology<Lyt>::cell_type& type, | ||
const typename technology<Lyt>::cell_type forbidden_type) const noexcept |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe I'm missing something here. If you filter wires by a certain type, why do you need to specify another type that is prohibited? Wouldn't any type != type
be automatically prohibited by definition?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I understand that this is not great and confusing. Thanks for bringing this up!
I think we should solve this differently and use a different name for the input. The idea is that forbidden_type
can be used to remove BDL pairs of the given type from the wire. This is needed in the specific case of a BDL wire with input and output BDL pairs (typically the BDL wires of our gates have either input or output BDL wires and not both).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The fact that this seems necessary hints at a design flaw somewhere. Maybe calling the filter function twice to remove all the dots you want gone wouldn't be so bad.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm, what do you think about the new version.
include/fiction/algorithms/simulation/sidb/detect_bdl_wires.hpp
Outdated
Show resolved
Hide resolved
include/fiction/algorithms/simulation/sidb/detect_bdl_wires.hpp
Outdated
Show resolved
Hide resolved
include/fiction/algorithms/simulation/sidb/sidb_simulation_result.hpp
Outdated
Show resolved
Hide resolved
include/fiction/algorithms/simulation/sidb/sidb_simulation_result.hpp
Outdated
Show resolved
Hide resolved
include/fiction/algorithms/simulation/sidb/sidb_simulation_result.hpp
Outdated
Show resolved
Hide resolved
Signed-off-by: GitHub Actions <[email protected]>
…on_detected_degeneracy' into increase_error_margin_to_avoid_non_detected_degeneracy
Signed-off-by: GitHub Actions <[email protected]>
…on_detected_degeneracy' into increase_error_margin_to_avoid_non_detected_degeneracy
…on_detected_degeneracy' into increase_error_margin_to_avoid_non_detected_degeneracy
Signed-off-by: GitHub Actions <[email protected]>
Description
This PR increases the tolerance used in
groundstate_from_simulation_results
to extract the ground states from simulation results. Previously, it failed to detect the degeneracy of the ground state in some cases, leading to "weird" operational domains. This should now be fixed.Example:

This operational domain should be empty, which is only the case if the degeneracy of the ground state is correctly detected. As said, this should be fixed now.
Checklist: