Skip to content

Commit 9555fad

Browse files
authored
Fix compile issues (#159)
1 parent 710035b commit 9555fad

File tree

6 files changed

+7
-7
lines changed

6 files changed

+7
-7
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required(VERSION 3.18...3.24)
1+
cmake_minimum_required(VERSION 3.19...3.24)
22

33
project(
44
qmap

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ circ_mapped, results = qmap.compile(circ, arch=FakeLondon())
4848

4949
## System Requirements and Building
5050

51-
The implementation is compatible with any C++17 compiler and a minimum CMake version of 3.18.
51+
The implementation is compatible with any C++17 compiler and a minimum CMake version of 3.19.
5252
Please refer to the [documentation](https://mqtqmap.readthedocs.io/en/latest/) on how to build the project.
5353

5454
Building (and running) is continuously tested under Linux, macOS, and Windows using the [latest available system versions for GitHub Actions](https://github.com/actions/virtual-environments).

cmake/FindZ3.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ if(NOT FOUND_SUITABLE_VERSION)
119119
execute_process(
120120
COMMAND ${Python_EXECUTABLE} -c "import os, z3; print(os.path.dirname(z3.__file__))"
121121
OUTPUT_VARIABLE Z3_PYTHON_ROOT)
122-
string(STRIP ${Z3_PYTHON_ROOT} Z3_PYTHON_ROOT)
122+
string(STRIP "${Z3_PYTHON_ROOT}" Z3_PYTHON_ROOT)
123123
message(STATUS "Z3_PYTHON_ROOT: ${Z3_PYTHON_ROOT}")
124124

125125
if(Z3_PYTHON_ROOT)

docs/source/DevelopmentGuide.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ Initial Setup
9494
Working on the core C++ library
9595
###############################
9696

97-
Building the project requires a C++ compiler supporting *C++17* and CMake with a minimum version of *3.18*.
97+
Building the project requires a C++ compiler supporting *C++17* and CMake with a minimum version of *3.19*.
9898

9999
.. note::
100100
We noticed some issues when compiling with Microsoft's *MSCV* compiler toolchain.

docs/source/Installation.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ In order to get the best performance out of QMAP and enable platform-specific co
104104
105105
(venv) $ pip install mqt.qmap --no-binary mqt.qmap
106106
107-
This requires a `C++ compiler <https://en.wikipedia.org/wiki/List_of_compilers#C++_compilers>`_ compiler supporting *C++17*, a minimum `CMake <https://cmake.org/>`_ version of *3.18* and the `SMT solver Z3 <https://github.com/Z3Prover/z3>`_. Z3 has to be installed and the dynamic linker has to be able to find the library. This can be accomplished in a multitude of ways:
107+
This requires a `C++ compiler <https://en.wikipedia.org/wiki/List_of_compilers#C++_compilers>`_ compiler supporting *C++17*, a minimum `CMake <https://cmake.org/>`_ version of *3.19* and the `SMT solver Z3 <https://github.com/Z3Prover/z3>`_. Z3 has to be installed and the dynamic linker has to be able to find the library. This can be accomplished in a multitude of ways:
108108

109109
- Under Ubuntu 20.04 and newer: :code:`sudo apt-get install libz3-dev`
110110
- Under macOS: :code:`brew install z3`

src/Architecture.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ void Architecture::loadCouplingMap(std::istream&& is) {
4141

4242
// get number of qubits
4343
if (std::getline(is, line)) {
44-
if (std::regex_match(line, m, r_nqubits)) {
44+
if (std::regex_search(line, m, r_nqubits)) {
4545
nqubits = static_cast<unsigned short>(std::stoul(m.str(1)));
4646
} else {
4747
throw QMAPException("No qubit count found in coupling map file: " + line);
@@ -51,7 +51,7 @@ void Architecture::loadCouplingMap(std::istream&& is) {
5151
}
5252
// load edges
5353
while (std::getline(is, line)) {
54-
if (std::regex_match(line, m, r_edge)) {
54+
if (std::regex_search(line, m, r_edge)) {
5555
auto v1 = static_cast<unsigned short>(std::stoul(m.str(1)));
5656
auto v2 = static_cast<unsigned short>(std::stoul(m.str(2)));
5757
couplingMap.emplace(v1, v2);

0 commit comments

Comments
 (0)