Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

♻️ miscellaneous changes pulled from #622 #669

Merged
merged 3 commits into from
Aug 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 11 additions & 10 deletions cmake/ExternalDependencies.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,13 @@ else()
endif()
endif()

option(USE_SYSTEM_BOOST "Whether to try to use the system Boost installation" ON)
option(USE_SYSTEM_BOOST "Whether to try to use the system Boost installation" OFF)
set(BOOST_MIN_VERSION
1.80.0
CACHE STRING "Minimum required Boost version")
find_package(Boost ${BOOST_MIN_VERSION} CONFIG QUIET)
if(NOT Boost_FOUND OR NOT USE_SYSTEM_BOOST)
if(USE_SYSTEM_BOOST)
find_package(Boost ${BOOST_MIN_VERSION} CONFIG REQUIRED)
else()
set(BOOST_MP_STANDALONE
ON
CACHE INTERNAL "Use standalone boost multiprecision")
Expand All @@ -54,14 +55,14 @@ if(NOT Boost_FOUND OR NOT USE_SYSTEM_BOOST)
set(BOOST_URL
https://github.com/boostorg/multiprecision/archive/refs/tags/Boost_${BOOST_VERSION}.tar.gz)
if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.24)
FetchContent_Declare(boost_multiprecision URL ${BOOST_URL} FIND_PACKAGE_ARGS
${BOOST_MIN_VERSION} CONFIG)
list(APPEND FETCH_PACKAGES boost_multiprecision)
FetchContent_Declare(boost_mp URL ${BOOST_URL} FIND_PACKAGE_ARGS ${BOOST_MIN_VERSION} CONFIG
NAMES boost_multiprecision)
list(APPEND FETCH_PACKAGES boost_mp)
else()
find_package(boost_multiprecision ${BOOST_MIN_VERSION} QUIET CONFIG)
if(NOT boost_multiprecision_FOUND)
FetchContent_Declare(boost_multiprecision URL ${BOOST_URL})
list(APPEND FETCH_PACKAGES boost_multiprecision)
find_package(boost_mp ${BOOST_MIN_VERSION} QUIET CONFIG NAMES boost_multiprecision)
if(NOT boost_mp_FOUND)
FetchContent_Declare(boost_mp URL ${BOOST_URL})
list(APPEND FETCH_PACKAGES boost_mp)
endif()
endif()
endif()
Expand Down
2 changes: 1 addition & 1 deletion include/mqt-core/ir/operations/CompoundOperation.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class CompoundOperation final : public Operation {

[[nodiscard]] bool isNonUnitaryOperation() const override;

[[nodiscard]] inline bool isSymbolicOperation() const override;
[[nodiscard]] bool isSymbolicOperation() const override;

[[nodiscard]] bool isCustomGate() const;

Expand Down
2 changes: 1 addition & 1 deletion src/ir/parsers/QASM3Parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ class OpenQasm3Parser final : public InstVisitor {
}

for (uint64_t i = 0; i < qubit.second; ++i) {
qubits.emplace_back(qubit.first + i);
qubits.emplace_back(static_cast<qc::Qubit>(qubit.first + i));
}
}

Expand Down
Loading