diff --git a/.gitmodules b/.gitmodules index 57b3509d..b40a6f71 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,4 +1,4 @@ -[submodule "extern/qfr"] - path = extern/qfr - url = https://github.com/cda-tum/qfr.git +[submodule "extern/mqt-core"] + path = extern/mqt-core + url = https://github.com/cda-tum/mqt-core.git branch = main diff --git a/CMakeLists.txt b/CMakeLists.txt index aef82cb2..8442cd82 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -21,7 +21,7 @@ macro(CHECK_SUBMODULE_PRESENT modulename) endif() endmacro() -check_submodule_present(qfr) +check_submodule_present(mqt-core) # add main library code add_subdirectory(src) diff --git a/MANIFEST.in b/MANIFEST.in index 388e954e..837d28a8 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -2,7 +2,7 @@ prune docs prune test prune .idea -graft extern/qfr +graft extern/mqt-core prune **/.github prune **/apps prune **/doc @@ -12,12 +12,11 @@ prune **/plots prune **/test prune **/tests -prune extern/qfr/extern/json/include -prune extern/qfr/extern/dd_package/extern -prune extern/qfr/extern/zx/extern/googletest -prune extern/qfr/extern/zx/extern/boost/config/checks -prune extern/qfr/extern/zx/extern/boost/config/tools -prune extern/qfr/extern/zx/extern/boost/multiprecision/config -prune extern/qfr/extern/zx/extern/boost/multiprecision/example -prune extern/qfr/extern/zx/extern/boost/multiprecision/performance -prune extern/qfr/extern/zx/extern/boost/multiprecision/tools +prune extern/mqt-core/extern/json/include +prune extern/mqt-core/extern/googletest +prune extern/mqt-core/extern/boost/config/checks +prune extern/mqt-core/extern/boost/config/tools +prune extern/mqt-core/extern/boost/multiprecision/config +prune extern/mqt-core/extern/boost/multiprecision/example +prune extern/mqt-core/extern/boost/multiprecision/performance +prune extern/mqt-core/extern/boost/multiprecision/tools diff --git a/extern/mqt-core b/extern/mqt-core new file mode 160000 index 00000000..04b20827 --- /dev/null +++ b/extern/mqt-core @@ -0,0 +1 @@ +Subproject commit 04b20827b2aed8b1e4862d0e5c3e8aeb4f2c35fc diff --git a/extern/qfr b/extern/qfr deleted file mode 160000 index cc193f16..00000000 --- a/extern/qfr +++ /dev/null @@ -1 +0,0 @@ -Subproject commit cc193f160e16fc6891cec126ab1702bb781db3a1 diff --git a/include/Configuration.hpp b/include/Configuration.hpp index 5cd78c37..17fa6b96 100644 --- a/include/Configuration.hpp +++ b/include/Configuration.hpp @@ -20,7 +20,7 @@ class Configuration { public: // configuration options for execution struct Execution { - dd::fp numericalTolerance = dd::ComplexTable<>::tolerance(); + dd::fp numericalTolerance = dd::ComplexTable::tolerance(); bool parallel = true; std::size_t nthreads = std::max(2U, std::thread::hardware_concurrency()); diff --git a/include/EquivalenceCheckingManager.hpp b/include/EquivalenceCheckingManager.hpp index b071b460..5718284d 100644 --- a/include/EquivalenceCheckingManager.hpp +++ b/include/EquivalenceCheckingManager.hpp @@ -95,7 +95,7 @@ class EquivalenceCheckingManager { // what is executed during `run` void setTolerance(dd::fp tol) { configuration.execution.numericalTolerance = tol; - dd::ComplexTable<>::setTolerance(tol); + dd::ComplexTable::setTolerance(tol); } void setParallel(bool parallel) { configuration.execution.parallel = parallel; diff --git a/include/checker/zx/ZXChecker.hpp b/include/checker/zx/ZXChecker.hpp index d1623f08..12209d4a 100644 --- a/include/checker/zx/ZXChecker.hpp +++ b/include/checker/zx/ZXChecker.hpp @@ -9,10 +9,10 @@ #include "Definitions.hpp" #include "EquivalenceCriterion.hpp" #include "QuantumComputation.hpp" -#include "Simplify.hpp" -#include "ZXDiagram.hpp" #include "checker/EquivalenceChecker.hpp" #include "nlohmann/json.hpp" +#include "zx/Simplify.hpp" +#include "zx/ZXDiagram.hpp" namespace ec { class ZXEquivalenceChecker : public EquivalenceChecker { diff --git a/mqt/qcec/CMakeLists.txt b/mqt/qcec/CMakeLists.txt index f8bde351..6249847b 100644 --- a/mqt/qcec/CMakeLists.txt +++ b/mqt/qcec/CMakeLists.txt @@ -1,4 +1,4 @@ pybind11_add_module(py${PROJECT_NAME} bindings.cpp) -target_link_libraries(py${PROJECT_NAME} PRIVATE ${PROJECT_NAME} MQT::qfr_python) +target_link_libraries(py${PROJECT_NAME} PRIVATE ${PROJECT_NAME} MQT::CorePython) target_compile_definitions(py${PROJECT_NAME} PRIVATE VERSION_INFO=${QCEC_VERSION_INFO}) diff --git a/mqt/qcec/bindings.cpp b/mqt/qcec/bindings.cpp index 6e7253f7..4900f1f9 100644 --- a/mqt/qcec/bindings.cpp +++ b/mqt/qcec/bindings.cpp @@ -8,8 +8,8 @@ #include "pybind11/pybind11.h" #include "pybind11/stl.h" #include "pybind11_json/pybind11_json.hpp" -#include "qiskit/QasmQobjExperiment.hpp" -#include "qiskit/QuantumCircuit.hpp" +#include "python/qiskit/QasmQobjExperiment.hpp" +#include "python/qiskit/QuantumCircuit.hpp" #include #include @@ -192,7 +192,7 @@ PYBIND11_MODULE(pyqcec, m) { // Convenience functions // Execution .def("set_tolerance", &EquivalenceCheckingManager::setTolerance, - "tolerance"_a = dd::ComplexTable<>::tolerance(), + "tolerance"_a = dd::ComplexTable::tolerance(), "Set the :attr:`numerical tolerance " "<.Configuration.Execution.numerical_tolerance>` of the underlying " "decision diagram package.") diff --git a/setup.py b/setup.py index 126bd256..f27ba5a7 100644 --- a/setup.py +++ b/setup.py @@ -50,6 +50,7 @@ def build_extension(self, ext: CMakeExtension) -> None: f"-DPYTHON_EXECUTABLE={sys.executable}", f"-DQCEC_VERSION_INFO={version}", f"-DCMAKE_BUILD_TYPE={cfg}", + "-DBUILD_MQT_CORE_TESTS=OFF", "-DBINDINGS=ON", ] build_args = [] diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 62882d3d..da065308 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,5 +1,5 @@ # add MQT::qfr library -add_subdirectory("${PROJECT_SOURCE_DIR}/extern/qfr" "extern/qfr" +add_subdirectory("${PROJECT_SOURCE_DIR}/extern/mqt-core" "extern/mqt-core" EXCLUDE_FROM_ALL) add_library( @@ -24,7 +24,7 @@ target_include_directories(${PROJECT_NAME} PUBLIC ${PROJECT_SOURCE_DIR}/include ${PROJECT_BINARY_DIR}/include) # link to the MQT::qfr libraries -target_link_libraries(${PROJECT_NAME} PUBLIC MQT::qfr_dd MQT::qfr_zx) +target_link_libraries(${PROJECT_NAME} PUBLIC MQT::CoreDD MQT::CoreZX) # add MQT alias add_library(MQT::${PROJECT_NAME} ALIAS ${PROJECT_NAME}) diff --git a/src/EquivalenceCheckingManager.cpp b/src/EquivalenceCheckingManager.cpp index 1d073119..ef25e53e 100644 --- a/src/EquivalenceCheckingManager.cpp +++ b/src/EquivalenceCheckingManager.cpp @@ -6,7 +6,6 @@ #include "EquivalenceCheckingManager.hpp" #include "EquivalenceCriterion.hpp" -#include "Expression.hpp" #include "zx/FunctionalityConstruction.hpp" #include diff --git a/src/checker/zx/ZXChecker.cpp b/src/checker/zx/ZXChecker.cpp index dac29e94..4fb0d8b6 100644 --- a/src/checker/zx/ZXChecker.cpp +++ b/src/checker/zx/ZXChecker.cpp @@ -7,10 +7,9 @@ #include "Definitions.hpp" #include "QuantumComputation.hpp" -#include "Simplify.hpp" -#include "ZXDiagram.hpp" -#include "dd/Definitions.hpp" #include "zx/FunctionalityConstruction.hpp" +#include "zx/Simplify.hpp" +#include "zx/ZXDiagram.hpp" #include #include