-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* 🐛 Hotfix Duostra topological order * 📊 add regression test * 🎨 lint --------- Co-authored-by: chinyi0523 <[email protected]>
- Loading branch information
1 parent
8c49774
commit 37158f5
Showing
5 changed files
with
132 additions
and
0 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
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 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,23 @@ | ||
device read benchmark/topology/casablanca.layout | ||
qcir qubit add 3 | ||
qcir gate add h 0 | ||
qcir gate add h 1 --prepend | ||
qcir gate add cz 0 2 --prepend | ||
qcir gate add cz 1 2 --prepend | ||
qcir gate add h 0 --prepend | ||
qcir gate add h 1 --prepend | ||
qcir gate add h 2 --prepend | ||
qcir gate add h 2 --prepend | ||
qcir print -d | ||
duostra -c | ||
qcir new | ||
qcir qubit add 3 | ||
qcir gate add cx 2 1 | ||
qcir gate add cx 2 0 | ||
qc2zx | ||
zxopt | ||
zx2qc | ||
qcir print -d | ||
duostra -c | ||
|
||
quit -f |
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,81 @@ | ||
qsyn> device read benchmark/topology/casablanca.layout | ||
|
||
qsyn> qcir qubit add 3 | ||
|
||
qsyn> qcir gate add h 0 | ||
|
||
qsyn> qcir gate add h 1 --prepend | ||
|
||
qsyn> qcir gate add cz 0 2 --prepend | ||
|
||
qsyn> qcir gate add cz 1 2 --prepend | ||
|
||
qsyn> qcir gate add h 0 --prepend | ||
|
||
qsyn> qcir gate add h 1 --prepend | ||
|
||
qsyn> qcir gate add h 2 --prepend | ||
|
||
qsyn> qcir gate add h 2 --prepend | ||
|
||
qsyn> qcir print -d | ||
Q 0 - h( 4)----------------------------------cz( 2)-- h( 0)- | ||
Q 1 - h( 5)------------------cz( 3)-- h( 1)- | ||
Q 2 - h( 7)-- h( 6)----------cz( 3)----------cz( 2)- | ||
|
||
qsyn> duostra -c | ||
Routing... | ||
|
||
Checking... | ||
|
||
Duostra Result: | ||
|
||
Scheduler: search | ||
Router: duostra | ||
Placer: dfs | ||
|
||
Mapping Depth: 13 | ||
Total Time: 16 | ||
#SWAP: 1 | ||
|
||
|
||
qsyn> qcir new | ||
|
||
qsyn> qcir qubit add 3 | ||
|
||
qsyn> qcir gate add cx 2 1 | ||
|
||
qsyn> qcir gate add cx 2 0 | ||
|
||
qsyn> qc2zx | ||
|
||
qsyn> zxopt | ||
[error] Unknown command!! (zxopt) | ||
|
||
qsyn> zx2qc | ||
[error] ZXGraph 0 is not extractable because it is not graph-like!! | ||
|
||
qsyn> qcir print -d | ||
Q 0 -------------------------cx( 1)- | ||
Q 1 ---------cx( 0)- | ||
Q 2 ---------cx( 0)----------cx( 1)- | ||
|
||
qsyn> duostra -c | ||
Routing... | ||
|
||
Checking... | ||
|
||
Duostra Result: | ||
|
||
Scheduler: search | ||
Router: duostra | ||
Placer: dfs | ||
|
||
Mapping Depth: 10 | ||
Total Time: 10 | ||
#SWAP: 1 | ||
|
||
|
||
qsyn> | ||
qsyn> quit -f | ||
|