Skip to content

Commit 2c7e7f1

Browse files
authored
🐛 Fix definition issue for DCX gate in DD package (#494)
## Description Fixes #489. The DCX gate (as well as the `xx_minus_yy` gate) had wrong gate matrix definitions in the underlying DD package within mqt-core. These have now been fixed. A test has been added to check that the proper definition can be successfully verified. ## Checklist: <!--- This checklist serves as a reminder of a couple of things that ensure your pull request will be merged swiftly. --> - [x] The pull request only contains commits that are related to it. - [x] I have added appropriate tests and documentation. - [x] I have made sure that all CI jobs on GitHub pass. - [x] The pull request introduces no new warnings and follows the project's style guidelines. --------- Signed-off-by: burgholzer <[email protected]>
1 parent 7f13175 commit 2c7e7f1

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

cmake/ExternalDependencies.cmake

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ endif()
2222
# cmake-format: off
2323
set(MQT_CORE_VERSION 2.7.0
2424
CACHE STRING "MQT Core version")
25-
set(MQT_CORE_REV "2ccf532b66998af376c256ae94a39eed802b990c"
25+
set(MQT_CORE_REV "9f885e4a47e3f65e380dbe855ef9fabcc5ed570e"
2626
CACHE STRING "MQT Core identifier (tag, branch or commit hash)")
2727
set(MQT_CORE_REPO_OWNER "cda-tum"
2828
CACHE STRING "MQT Core repository owner (change when using a fork)")

test/test_simple_circuit_identities.cpp

+6
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,12 @@ INSTANTIATE_TEST_SUITE_P(
9090
"q[0], q[1];\n",
9191
"OPENQASM 2.0;\ninclude \"qelib1.inc\";\nqreg q[2];\ns q[0]; s "
9292
"q[1]; h q[0]; cx q[0],q[1]; cx q[1],q[0]; h q[1];\n"}},
93+
std::pair{
94+
"dcx_decomposition",
95+
std::pair{"OPENQASM 2.0;\ninclude \"qelib1.inc\";\nqreg q[2];\ndcx "
96+
"q[0], q[1];\n",
97+
"OPENQASM 2.0;\ninclude \"qelib1.inc\";\nqreg q[2];\ncx "
98+
"q[0],q[1];\ncx q[1],q[0];\n"}},
9399
std::pair{"Global_Phase",
94100
std::pair{"OPENQASM 2.0;\ninclude \"qelib1.inc\";\nqreg "
95101
"q[1];\nz q[0]; x q[0]; z q[0];\n",

0 commit comments

Comments
 (0)