-
Notifications
You must be signed in to change notification settings - Fork 1
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
Add Exact Qrisp SAT Solver Variant #113
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Merged
tubadzin
force-pushed
the
feat/exact-qrisp-sat-solver
branch
from
February 2, 2025 11:04
1c9fbbf
to
42feea5
Compare
Quality Gate passedIssues Measures |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
exact_sat.py
and the correspondingExactQrispSatSolver
classThis variant utilizes (almost) the same logic as the default
QrispSatSolver
. The key difference is that this version (in theory) avoids considering impossible variable assignments. For this, the Oracle needs to know the size of the solution space.sharp-sat-solver
As mentioned above,
exact_sat.py
requires the size of the solution space to function correctly. To address this, I have added a Linux binary that, given a.cnf
file, approximates the number of solutions. Unfortunately, this approximation fails in trivial cases where the.cnf
file is unsatisfiable, such as:This case should obviously return
0
, but the solver instead returns1
or2
(if pre-processing is disabled). The issue arises because the solver simplifies contradictory clauses, and once removed, the remaining formula is interpreted as having no constraints, allowingx
to take any value (both true and false).Additionally, I attempted to compile this program for Windows, but to no avail. Both cross-compiling and building it on my Windows machine failed. This led me down a long rabbit hole where I replaced platform-dependent code iteratively. While I eventually managed to build an
.exe
, it still produced errors when running. I have yet to find another SharpSAT solver that works on Windows. Some alternatives I considered are: