Skip to content

Commit

Permalink
🔀 Merge pull request #74 from DVLab-NTU/feat/stabilizer_tableaux
Browse files Browse the repository at this point in the history
Feat/stabilizer tableaux
  • Loading branch information
chinyi0523 authored Mar 3, 2024
2 parents 170d761 + e18b1e2 commit 011d7f2
Show file tree
Hide file tree
Showing 54 changed files with 3,888 additions and 484 deletions.
11 changes: 10 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,13 @@ FetchContent_Declare(
GIT_SHALLOW ON)
FetchContent_MakeAvailable(GSL)

FetchContent_Declare(
dynamic_bitset
SYSTEM
GIT_REPOSITORY https://github.com/pinam45/dynamic_bitset.git
GIT_TAG v1.2.1)
FetchContent_MakeAvailable(dynamic_bitset)

file(
GLOB_RECURSE SOURCES
RELATIVE ${CMAKE_SOURCE_DIR}
Expand Down Expand Up @@ -152,7 +159,9 @@ target_link_libraries_system(
libfort::fort
fmt::fmt
spdlog::spdlog
Microsoft.GSL::GSL)
Microsoft.GSL::GSL
sul::dynamic_bitset)

target_link_libraries(
${CMAKE_PROJECT_NAME} PRIVATE lapack OpenMP::OpenMP_CXX ${BLAS_LIBRARIES}
${LAPACK_LIBRARIES})
Expand Down
9 changes: 9 additions & 0 deletions benchmark/qasm/test.qasm
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
OPENQASM 2.0;
include "qelib1.inc";
qreg q[5];

x q[1];
x q[2];
mcx q[3] q[0] q[2] q[1];
x q[1];
x q[2];
103 changes: 103 additions & 0 deletions demo/cnotT_100.qasm
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
OPENQASM 2.0;
include "qelib1.inc";
qreg q[5];
t q[1];
cx q[2],q[0];
tdg q[2];
t q[3];
tdg q[0];
tdg q[1];
tdg q[1];
cx q[1],q[2];
cx q[4],q[1];
cx q[0],q[3];
cx q[1],q[2];
tdg q[1];
tdg q[3];
tdg q[4];
tdg q[3];
cx q[4],q[1];
tdg q[4];
cx q[1],q[4];
cx q[4],q[1];
tdg q[2];
cx q[0],q[2];
tdg q[2];
tdg q[3];
t q[0];
t q[2];
tdg q[0];
cx q[1],q[0];
tdg q[4];
t q[3];
cx q[1],q[3];
t q[4];
tdg q[4];
cx q[0],q[4];
tdg q[0];
cx q[3],q[1];
cx q[0],q[1];
tdg q[3];
t q[1];
tdg q[1];
tdg q[0];
t q[0];
t q[0];
cx q[0],q[2];
tdg q[2];
tdg q[3];
tdg q[4];
cx q[3],q[4];
t q[0];
cx q[0],q[4];
t q[1];
tdg q[3];
t q[3];
tdg q[0];
cx q[2],q[4];
t q[4];
cx q[3],q[4];
t q[4];
tdg q[4];
cx q[0],q[3];
cx q[1],q[3];
cx q[1],q[3];
cx q[0],q[2];
cx q[0],q[4];
tdg q[3];
t q[4];
t q[4];
tdg q[2];
tdg q[3];
tdg q[3];
cx q[2],q[1];
tdg q[0];
cx q[0],q[1];
t q[1];
cx q[0],q[4];
cx q[4],q[1];
tdg q[4];
cx q[0],q[2];
t q[1];
tdg q[2];
cx q[3],q[0];
t q[1];
t q[3];
cx q[1],q[4];
tdg q[0];
cx q[1],q[3];
cx q[4],q[1];
tdg q[0];
cx q[0],q[2];
tdg q[4];
tdg q[1];
tdg q[3];
tdg q[1];
tdg q[0];
cx q[1],q[4];
t q[2];
t q[3];
cx q[4],q[2];
t q[4];
cx q[3],q[2];
t q[4];
28 changes: 28 additions & 0 deletions demo/cnotT_25.qasm
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
OPENQASM 2.0;
include "qelib1.inc";
qreg q[3];
t q[1];
t q[1];
t q[1];
cx q[1],q[0];
t q[0];
cx q[1],q[0];
cx q[1],q[0];
cx q[2],q[0];
tdg q[2];
t q[1];
cx q[1],q[2];
tdg q[0];
cx q[0],q[2];
tdg q[1];
t q[2];
t q[1];
tdg q[0];
tdg q[0];
tdg q[0];
tdg q[1];
t q[0];
cx q[0],q[2];
tdg q[1];
tdg q[2];
t q[2];
53 changes: 53 additions & 0 deletions demo/cnotT_50.qasm
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
OPENQASM 2.0;
include "qelib1.inc";
qreg q[3];
cx q[2],q[0];
tdg q[0];
t q[1];
tdg q[0];
t q[1];
cx q[0],q[1];
tdg q[2];
cx q[2],q[1];
tdg q[2];
t q[2];
cx q[0],q[1];
t q[1];
tdg q[2];
cx q[1],q[0];
t q[0];
tdg q[0];
cx q[1],q[2];
tdg q[2];
tdg q[0];
t q[1];
cx q[2],q[0];
tdg q[2];
cx q[2],q[0];
t q[1];
t q[0];
cx q[1],q[0];
tdg q[1];
tdg q[0];
tdg q[1];
t q[2];
tdg q[0];
cx q[1],q[2];
tdg q[0];
t q[1];
t q[0];
tdg q[2];
cx q[1],q[2];
tdg q[1];
cx q[0],q[2];
t q[0];
tdg q[2];
cx q[0],q[1];
cx q[0],q[2];
tdg q[1];
cx q[0],q[2];
t q[2];
tdg q[2];
t q[1];
cx q[0],q[1];
cx q[2],q[0];
10 changes: 10 additions & 0 deletions demo/demo.dof
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
//logger debug
qcir read demo/sample_H.qasm
qcir draw demo/figure/sample_H_before.png
qc2ts
phase_poly
qcir draw demo/figure/sample_H_after.png
qc2ts
ts eq 0 1

q -f
9 changes: 9 additions & 0 deletions demo/rzzz.qasm
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
OPENQASM 2.0;
include "qelib1.inc";
qreg q[3];

cx q[0], q[1];
cx q[1], q[2];
t q[2];
cx q[1], q[2];
cx q[0], q[1];
21 changes: 21 additions & 0 deletions demo/sample_H.qasm
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
OPENQASM 2.0;
include "qelib1.inc";
qreg q[3];
tdg q[0];
cx q[0],q[2];
t q[2];
cx q[1],q[2];
h q[0];
tdg q[1];
t q[2];
cx q[2],q[0];
t q[0];
h q[2];
cx q[0],q[2];
cx q[0],q[1];
t q[0];
cx q[1],q[2];
tdg q[2];
t q[0];
cx q[2],q[1];
tdg q[1];
20 changes: 20 additions & 0 deletions demo/sample_cnotT.qasm
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
OPENQASM 2.0;
include "qelib1.inc";
qreg q[3];
t q[1];
cx q[1],q[0];
t q[0];
cx q[2],q[0];
tdg q[2];
t q[1];
cx q[1],q[2];
tdg q[0];
cx q[0],q[2];
t q[2];
tdg q[0];
tdg q[1];
t q[0];
cx q[0],q[2];
tdg q[1];
tdg q[2];

Loading

0 comments on commit 011d7f2

Please sign in to comment.