Skip to content
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

Restructuring of the heuristic system #410

Merged
merged 53 commits into from
Jan 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
8603bfd
first implementation
EliasLF Dec 26, 2023
4204205
take max of old and new heuristic
EliasLF Dec 26, 2023
f395749
introduce setting to choose heuristic and lookahead heuristic
EliasLF Dec 31, 2023
4bfb646
restructure tests
EliasLF Jan 2, 2024
230a1d6
🎨 pre-commit fixes
pre-commit-ci[bot] Jan 2, 2024
f19a696
Merge branch 'main' into heuristicsSetting
EliasLF Jan 2, 2024
93d836d
Merge branch 'main' into heuristicsSetting
EliasLF Jan 2, 2024
2c46590
adding comments to large test functions
EliasLF Jan 2, 2024
c60d736
fix CNOT reversals
EliasLF Jan 4, 2024
e030504
fix further bugs in heuristic properties test
EliasLF Jan 5, 2024
318a700
move reversals into costFixed for goal nodes
EliasLF Jan 5, 2024
fb7eb9e
Merge branch 'main' into heuristicsSetting
EliasLF Jan 5, 2024
f1a54a5
fix tests after merge
EliasLF Jan 5, 2024
c4c30d5
making local variables const
EliasLF Jan 5, 2024
d882ac4
fix NodeCostCalculation test
EliasLF Jan 5, 2024
8824d46
fix earlyTermination test
EliasLF Jan 5, 2024
6ff7b6e
further optimize GateCountSumDistanceMinusSharedSwaps
EliasLF Jan 7, 2024
72f4012
fix calculation of shared swaps
EliasLF Jan 10, 2024
63fbf1b
fix register sizes in example circuits
EliasLF Jan 10, 2024
d2106bb
adding documentation
EliasLF Jan 10, 2024
74f706a
🎨 pre-commit fixes
pre-commit-ci[bot] Jan 10, 2024
9d56889
fix test_compile
EliasLF Jan 10, 2024
a1f0bb7
expose heuristic enums in python module
EliasLF Jan 11, 2024
cc0cd8c
fixing teleport mapping bug
EliasLF Jan 11, 2024
f077450
🎨 pre-commit fixes
pre-commit-ci[bot] Jan 11, 2024
4d6c89e
adjust data logging paths for parallel testing
EliasLF Jan 11, 2024
7ac87c4
🎨 pre-commit fixes
pre-commit-ci[bot] Jan 11, 2024
7ec24e5
fix mypy errors
EliasLF Jan 12, 2024
01f7999
Merge branch 'heuristicsSetting' of https://github.com/EliasLF/qmap i…
EliasLF Jan 12, 2024
57c0bb1
fix test_compile
EliasLF Jan 12, 2024
b1ca64d
fix lint warnings
EliasLF Jan 12, 2024
1df94d0
🎨 pre-commit fixes
pre-commit-ci[bot] Jan 12, 2024
0af096f
fix lookahead
EliasLF Jan 12, 2024
c98d899
Merge branch 'main' into heuristicsSetting
EliasLF Jan 12, 2024
0bb568d
🎨 pre-commit fixes
pre-commit-ci[bot] Jan 12, 2024
cd9fa90
fixing case style of optimalSolutions
EliasLF Jan 12, 2024
1c28eac
finish heuristic support for semidirectional architectures
EliasLF Jan 13, 2024
477a429
isEdgeBidirectional and considerDirection in isEdgeConnected
EliasLF Jan 13, 2024
3f4c604
adding comments for isBidirectional and isUnidirectional
EliasLF Jan 13, 2024
c37145d
🎨 pre-commit fixes
pre-commit-ci[bot] Jan 13, 2024
b6e471d
remove redundant code
EliasLF Jan 15, 2024
76e3006
simplify buildEdgeSkipTable
EliasLF Jan 15, 2024
8bcb9ce
expose heuristic properties in config json
EliasLF Jan 15, 2024
2d1e361
checkParameters
EliasLF Jan 15, 2024
c940d49
ignore bugprone-branch-clone lint warning
EliasLF Jan 15, 2024
e599ab8
🎨 pre-commit fixes
pre-commit-ci[bot] Jan 15, 2024
8b7cdf1
fix linter warning in Configuration::json
EliasLF Jan 15, 2024
36b8a8a
use asserts for internal error checking
EliasLF Jan 15, 2024
08c7588
use copy constructor for Node members
EliasLF Jan 15, 2024
ad9cf4a
🎨 pre-commit fixes
pre-commit-ci[bot] Jan 15, 2024
08514f2
user ordered sets for activeQubits
EliasLF Jan 15, 2024
6f6f894
Merge branch 'heuristicsSetting' of https://github.com/EliasLF/qmap i…
EliasLF Jan 15, 2024
ade1f54
🎨 pre-commit fixes
pre-commit-ci[bot] Jan 15, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions docs/source/library/Mapping.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,16 @@ The following classes provide a more explicit way of initializing the respective
.. currentmodule:: mqt.qmap
.. autoclass:: Method

.. autoclass:: Heuristic

.. autoclass:: LookaheadHeuristic

.. autoclass:: Layering

.. autoclass:: InitialLayout

.. autoclass:: EarlyTermination

.. autoclass:: Encoding

.. autoclass:: CommanderGrouping
Expand Down
4 changes: 2 additions & 2 deletions examples/0410184_169.qasm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
OPENQASM 2.0;
include "qelib1.inc";
qreg q[16];
creg c[16];
qreg q[14];
creg c[14];
cx q[4],q[3];
cx q[6],q[5];
cx q[8],q[7];
Expand Down
4 changes: 2 additions & 2 deletions examples/3_17_13.qasm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
OPENQASM 2.0;
include "qelib1.inc";
qreg q[16];
creg c[16];
qreg q[3];
creg c[3];
x q[2];
cx q[0],q[2];
cx q[2],q[1];
Expand Down
4 changes: 2 additions & 2 deletions examples/4_49_16.qasm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
OPENQASM 2.0;
include "qelib1.inc";
qreg q[16];
creg c[16];
qreg q[5];
creg c[5];
h q[1];
t q[3];
t q[4];
Expand Down
4 changes: 2 additions & 2 deletions examples/4gt10-v1_81.qasm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
OPENQASM 2.0;
include "qelib1.inc";
qreg q[16];
creg c[16];
qreg q[5];
creg c[5];
x q[0];
h q[1];
t q[2];
Expand Down
4 changes: 2 additions & 2 deletions examples/4gt11_82.qasm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
OPENQASM 2.0;
include "qelib1.inc";
qreg q[16];
creg c[16];
qreg q[5];
creg c[5];
cx q[2],q[1];
cx q[1],q[2];
cx q[3],q[2];
Expand Down
4 changes: 2 additions & 2 deletions examples/4gt11_83.qasm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
OPENQASM 2.0;
include "qelib1.inc";
qreg q[16];
creg c[16];
qreg q[5];
creg c[5];
cx q[2],q[1];
cx q[1],q[2];
cx q[3],q[2];
Expand Down
4 changes: 2 additions & 2 deletions examples/4gt11_84.qasm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
OPENQASM 2.0;
include "qelib1.inc";
qreg q[16];
creg c[16];
qreg q[5];
creg c[5];
h q[0];
t q[2];
t q[1];
Expand Down
4 changes: 2 additions & 2 deletions examples/4gt12-v0_86.qasm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
OPENQASM 2.0;
include "qelib1.inc";
qreg q[16];
creg c[16];
qreg q[6];
creg c[6];
cx q[2],q[1];
cx q[1],q[2];
cx q[3],q[2];
Expand Down
4 changes: 2 additions & 2 deletions examples/4gt12-v0_87.qasm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
OPENQASM 2.0;
include "qelib1.inc";
qreg q[16];
creg c[16];
qreg q[6];
creg c[6];
cx q[2],q[1];
cx q[1],q[2];
cx q[3],q[2];
Expand Down
4 changes: 2 additions & 2 deletions examples/4gt12-v0_88.qasm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
OPENQASM 2.0;
include "qelib1.inc";
qreg q[16];
creg c[16];
qreg q[6];
creg c[6];
h q[3];
t q[2];
t q[1];
Expand Down
4 changes: 2 additions & 2 deletions examples/4gt12-v1_89.qasm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
OPENQASM 2.0;
include "qelib1.inc";
qreg q[16];
creg c[16];
qreg q[6];
creg c[6];
x q[0];
cx q[4],q[0];
h q[0];
Expand Down
4 changes: 2 additions & 2 deletions examples/4gt13-v1_93.qasm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
OPENQASM 2.0;
include "qelib1.inc";
qreg q[16];
creg c[16];
qreg q[5];
creg c[5];
x q[0];
cx q[4],q[0];
cx q[0],q[4];
Expand Down
4 changes: 2 additions & 2 deletions examples/4gt13_90.qasm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
OPENQASM 2.0;
include "qelib1.inc";
qreg q[16];
creg c[16];
qreg q[5];
creg c[5];
cx q[2],q[1];
cx q[1],q[2];
cx q[3],q[2];
Expand Down
4 changes: 2 additions & 2 deletions examples/4gt13_91.qasm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
OPENQASM 2.0;
include "qelib1.inc";
qreg q[16];
creg c[16];
qreg q[5];
creg c[5];
cx q[2],q[1];
cx q[1],q[2];
cx q[3],q[2];
Expand Down
4 changes: 2 additions & 2 deletions examples/4gt13_92.qasm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
OPENQASM 2.0;
include "qelib1.inc";
qreg q[16];
creg c[16];
qreg q[5];
creg c[5];
cx q[4],q[0];
h q[0];
t q[1];
Expand Down
4 changes: 2 additions & 2 deletions examples/4gt4-v0_72.qasm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
OPENQASM 2.0;
include "qelib1.inc";
qreg q[16];
creg c[16];
qreg q[6];
creg c[6];
cx q[4],q[1];
h q[0];
t q[4];
Expand Down
4 changes: 2 additions & 2 deletions examples/4gt4-v0_73.qasm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
OPENQASM 2.0;
include "qelib1.inc";
qreg q[16];
creg c[16];
qreg q[6];
creg c[6];
cx q[0],q[1];
cx q[2],q[1];
cx q[1],q[2];
Expand Down
4 changes: 2 additions & 2 deletions examples/4gt4-v0_78.qasm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
OPENQASM 2.0;
include "qelib1.inc";
qreg q[16];
creg c[16];
qreg q[6];
creg c[6];
cx q[2],q[1];
cx q[1],q[2];
cx q[3],q[2];
Expand Down
4 changes: 2 additions & 2 deletions examples/4gt4-v0_79.qasm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
OPENQASM 2.0;
include "qelib1.inc";
qreg q[16];
creg c[16];
qreg q[6];
creg c[6];
cx q[2],q[1];
cx q[1],q[2];
cx q[3],q[2];
Expand Down
4 changes: 2 additions & 2 deletions examples/4gt4-v0_80.qasm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
OPENQASM 2.0;
include "qelib1.inc";
qreg q[16];
creg c[16];
qreg q[6];
creg c[6];
h q[0];
t q[2];
t q[1];
Expand Down
4 changes: 2 additions & 2 deletions examples/4gt4-v1_74.qasm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
OPENQASM 2.0;
include "qelib1.inc";
qreg q[16];
creg c[16];
qreg q[6];
creg c[6];
x q[0];
h q[1];
t q[0];
Expand Down
4 changes: 2 additions & 2 deletions examples/4gt5_75.qasm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
OPENQASM 2.0;
include "qelib1.inc";
qreg q[16];
creg c[16];
qreg q[5];
creg c[5];
cx q[4],q[1];
cx q[3],q[0];
cx q[1],q[4];
Expand Down
4 changes: 2 additions & 2 deletions examples/4gt5_76.qasm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
OPENQASM 2.0;
include "qelib1.inc";
qreg q[16];
creg c[16];
qreg q[5];
creg c[5];
cx q[0],q[1];
cx q[2],q[1];
cx q[1],q[2];
Expand Down
4 changes: 2 additions & 2 deletions examples/4gt5_77.qasm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
OPENQASM 2.0;
include "qelib1.inc";
qreg q[16];
creg c[16];
qreg q[5];
creg c[5];
x q[0];
cx q[4],q[1];
cx q[1],q[4];
Expand Down
4 changes: 2 additions & 2 deletions examples/4mod5-bdd_287.qasm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
OPENQASM 2.0;
include "qelib1.inc";
qreg q[16];
creg c[16];
qreg q[7];
creg c[7];
x q[4];
x q[6];
cx q[3],q[4];
Expand Down
4 changes: 2 additions & 2 deletions examples/4mod5-v0_18.qasm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
OPENQASM 2.0;
include "qelib1.inc";
qreg q[16];
creg c[16];
qreg q[5];
creg c[5];
x q[0];
x q[1];
h q[4];
Expand Down
4 changes: 2 additions & 2 deletions examples/4mod5-v0_19.qasm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
OPENQASM 2.0;
include "qelib1.inc";
qreg q[16];
creg c[16];
qreg q[5];
creg c[5];
x q[3];
cx q[1],q[3];
cx q[3],q[4];
Expand Down
4 changes: 2 additions & 2 deletions examples/4mod5-v0_20.qasm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
OPENQASM 2.0;
include "qelib1.inc";
qreg q[16];
creg c[16];
qreg q[5];
creg c[5];
cx q[3],q[1];
x q[0];
cx q[0],q[2];
Expand Down
4 changes: 2 additions & 2 deletions examples/4mod5-v1_22.qasm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
OPENQASM 2.0;
include "qelib1.inc";
qreg q[16];
creg c[16];
qreg q[5];
creg c[5];
x q[4];
cx q[0],q[2];
cx q[1],q[3];
Expand Down
4 changes: 2 additions & 2 deletions examples/4mod5-v1_23.qasm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
OPENQASM 2.0;
include "qelib1.inc";
qreg q[16];
creg c[16];
qreg q[5];
creg c[5];
x q[4];
h q[4];
t q[0];
Expand Down
4 changes: 2 additions & 2 deletions examples/4mod5-v1_24.qasm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
OPENQASM 2.0;
include "qelib1.inc";
qreg q[16];
creg c[16];
qreg q[5];
creg c[5];
x q[4];
cx q[3],q[1];
h q[0];
Expand Down
4 changes: 2 additions & 2 deletions examples/4mod7-v0_94.qasm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
OPENQASM 2.0;
include "qelib1.inc";
qreg q[16];
creg c[16];
qreg q[5];
creg c[5];
h q[0];
t q[1];
t q[4];
Expand Down
4 changes: 2 additions & 2 deletions examples/4mod7-v1_96.qasm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
OPENQASM 2.0;
include "qelib1.inc";
qreg q[16];
creg c[16];
qreg q[5];
creg c[5];
x q[0];
x q[0];
h q[0];
Expand Down
4 changes: 2 additions & 2 deletions examples/9symml_195.qasm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
OPENQASM 2.0;
include "qelib1.inc";
qreg q[16];
creg c[16];
qreg q[11];
creg c[11];
h q[1];
t q[6];
t q[10];
Expand Down
4 changes: 2 additions & 2 deletions examples/C17_204.qasm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
OPENQASM 2.0;
include "qelib1.inc";
qreg q[16];
creg c[16];
qreg q[7];
creg c[7];
cx q[5],q[1];
cx q[5],q[0];
h q[1];
Expand Down
4 changes: 2 additions & 2 deletions examples/adr4_197.qasm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
OPENQASM 2.0;
include "qelib1.inc";
qreg q[16];
creg c[16];
qreg q[13];
creg c[13];
h q[4];
t q[6];
t q[12];
Expand Down
4 changes: 2 additions & 2 deletions examples/aj-e11_165.qasm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
OPENQASM 2.0;
include "qelib1.inc";
qreg q[16];
creg c[16];
qreg q[5];
creg c[5];
cx q[1],q[2];
cx q[2],q[3];
h q[2];
Expand Down
4 changes: 2 additions & 2 deletions examples/alu-bdd_288.qasm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
OPENQASM 2.0;
include "qelib1.inc";
qreg q[16];
creg c[16];
qreg q[7];
creg c[7];
cx q[0],q[5];
h q[5];
t q[1];
Expand Down
Loading
Loading