-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
be8e686
commit 367cba8
Showing
69 changed files
with
14,733 additions
and
1,526 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,6 +11,3 @@ coverage: | |
patch: | ||
default: | ||
threshold: 1% | ||
codecov: | ||
notify: | ||
after_n_builds: 8 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
groups: | ||
github-actions: | ||
patterns: | ||
- "*" | ||
schedule: | ||
interval: "weekly" | ||
day: "wednesday" | ||
time: "06:00" | ||
timezone: "Europe/Vienna" | ||
|
||
- package-ecosystem: "pip" | ||
directory: "/" | ||
groups: | ||
python-dependencies: | ||
patterns: | ||
- "*" | ||
schedule: | ||
interval: "weekly" | ||
day: "friday" | ||
time: "06:00" | ||
timezone: "Europe/Vienna" |
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
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
This file was deleted.
Oops, something went wrong.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
version: 2 | ||
|
||
submodules: | ||
include: all | ||
recursive: true | ||
|
||
build: | ||
os: ubuntu-22.04 | ||
tools: | ||
python: "3.11" | ||
jobs: | ||
post_checkout: | ||
# Skip docs build if the commit message contains "skip ci" | ||
- (git --no-pager log --pretty="tformat:%s -- %b" -1 | grep -viq "skip ci") || exit 183 | ||
# Skip docs build if there are no changes related to docs | ||
- | | ||
if [ "$READTHEDOCS_VERSION_TYPE" = "external" ] && git diff --quiet origin/main -- docs/ .readthedocs.yaml src/mqt/ .github/contributing* .github/support*; | ||
then | ||
exit 183; | ||
fi | ||
sphinx: | ||
configuration: docs/conf.py | ||
|
||
python: | ||
install: | ||
- method: pip | ||
path: . | ||
extra_requirements: | ||
- docs |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
@MISC{volpe2024towards, | ||
@INPROCEEDINGS{volpe2024towards, | ||
AUTHOR = {D.Volpe and N. Quetschlich and M. Graziano and G. Turvani and R. Wille}, | ||
TITLE = {{Towards an Automatic Framework for Solving Optimization Problems with Quantum Computers}}, | ||
YEAR = {2024}, | ||
EPRINT = {}, | ||
EPRINTTYPE = {}, | ||
BOOKTITLE = {IEEE International Conference on Quantum Software (QSW)}, | ||
} |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
Constraints Class | ||
================= | ||
|
||
It manages the constraints of the problem. It is used to store the constraints and to check if a solution satisfies them. | ||
|
||
Constraints types supported | ||
--------------------------- | ||
|
||
Types of constraints supported: | ||
|
||
- *Equality*, writing the equality as a quadratic penalty function, i.e. sum = b imposed with g = (sum-b)^2 | ||
- *Inequality*, moving to equality with the continuous auxiliary variables a to be expanded with the encoding technique of the Variables class | ||
- *Not constraint* among binary variables, i.e. Not(a) = b imposed with g = 2ab - a - b + 1 | ||
- *And constraint* among binary variables, i.e. a and b = c imposed with ab -2(a+b)c + 3c | ||
- *Or constraint* among binary variables, i.e. a or b = c imposed with ab + (a+b)(1-2c) + c | ||
- *Xor constraint* among binary variables, i.e. a xor b = c imposed with 2ab - 2(a+b)c - 4(a+b)\_aux+4_aux c +a+b+c+4+\_aux | ||
|
||
Constraints declarations | ||
------------------------ | ||
|
||
The class provides methods to declare variables: | ||
|
||
- *add_constraint(expression: str, hard: bool = True, variable_precision: bool = True)*: adds a constraint to the list of constraints. | ||
- *expression* is a string that represents the constraint | ||
- *hard* parameter is a boolean that indicates if the constraint is hard or soft. | ||
- *variable_precision* parameter is a boolean that indicates if the constraint is to be considered in the precision of the variables. | ||
|
||
Example: | ||
-------- | ||
|
||
.. code-block:: python | ||
from mqt.qao.constraints import Constraints | ||
from mqt.qao.variables import Variables | ||
constraint = Constraints() | ||
variables = Variables() | ||
variables.add_binary_variable("a") | ||
variables.add_binary_variable("b") | ||
variables.add_binary_variable("c") | ||
variables.add_discrete_variable("d", [-1, 1, 3]) | ||
variables.add_continuous_variable("e", -2, 2, 0.25, "", "") | ||
constraint.add_constraint("~a = b", True, True, False) | ||
constraint.add_constraint("a | b = c", True, True, False) | ||
constraint.add_constraint("d + e <= 1", True, True, False) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
.. include:: ../.github/contributing.rst |
Oops, something went wrong.