File tree Expand file tree Collapse file tree 6 files changed +8
-5
lines changed
Expand file tree Collapse file tree 6 files changed +8
-5
lines changed Original file line number Diff line number Diff line change 11cmake_minimum_required (VERSION 3.10)
2- project (Qrack VERSION 10.4.1 DESCRIPTION "High Performance Quantum Bit Simulation" LANGUAGES CXX)
2+ project (Qrack VERSION 10.5.0 DESCRIPTION "High Performance Quantum Bit Simulation" LANGUAGES CXX)
33
44# Installation commands
55include (GNUInstallDirs)
Original file line number Diff line number Diff line change 11option (ENABLE_BOOST "Use Boost libraries (if available)" ON )
2+ option (ENABLE_CPP_INT "Use Boost library cpp_int (if available)" OFF )
23if (ENABLE_BOOST)
34 if (POLICY CMP0167)
45 cmake_policy (SET CMP0167 NEW)
Original file line number Diff line number Diff line change 11#cmakedefine ENABLE_ALU 1
22#cmakedefine ENABLE_BCD 1
3+ #cmakedefine ENABLE_CPP_INT 1
34#cmakedefine ENABLE_DEVRAND 1
45#cmakedefine ENABLE_ENV_VARS 1
56#cmakedefine ENABLE_FMA 1
Original file line number Diff line number Diff line change 3636 \
3737 return 0 ;
3838
39- #if (QBCAPPOW < 7) || ((QBCAPPOW < 8) && defined(__SIZEOF_INT128__)) || ((QBCAPPOW > 7) && defined(BOOST_AVAILABLE))
39+ #if (QBCAPPOW < 7) || ((QBCAPPOW < 8) && defined(__SIZEOF_INT128__)) || \
40+ ((QBCAPPOW > 7 ) && defined (BOOST_AVAILABLE) && defined (ENABLE_CPP_INT))
4041inline void bi_not_ip (bitCapInt* left) { *left = ~(*left); }
4142inline void bi_and_ip (bitCapInt* left, const bitCapInt& right) { *left &= right; }
4243inline void bi_or_ip (bitCapInt* left, const bitCapInt& right) { *left |= right; }
@@ -146,7 +147,7 @@ inline bitLenInt popCountOcl(bitCapIntOcl n)
146147
147148#if (QBCAPPOW < 7) || ((QBCAPPOW < 8) && defined(__SIZEOF_INT128__))
148149inline int bi_log2 (const bitCapInt& n) { return log2Ocl ((bitCapIntOcl)n); }
149- #elif (QBCAPPOW > 7) && defined(BOOST_AVAILABLE)
150+ #elif (QBCAPPOW > 7) && defined(BOOST_AVAILABLE) && defined(ENABLE_CPP_INT)
150151inline int bi_log2 (const bitCapInt& n) { return boost::multiprecision::msb (n); }
151152#endif
152153inline bitLenInt log2 (bitCapInt n) { return (bitLenInt)bi_log2 (n); }
Original file line number Diff line number Diff line change @@ -73,7 +73,7 @@ constexpr bitCapInt QRACK_MAX_UINT = ~0U;
7373#define bitCapInt unsigned __int128
7474#define QRACK_MAX_QUBITS 128
7575constexpr bitCapInt QRACK_MAX_UINT = ~0U ;
76- #elif BOOST_AVAILABLE
76+ #elif ENABLE_CPP_INT && BOOST_AVAILABLE
7777#include < boost/multiprecision/cpp_int.hpp>
7878constexpr size_t QRACK_MAX_QUBITS = (1 << QBCAPPOW);
7979typedef boost::multiprecision::cpp_int bitCapInt;
Original file line number Diff line number Diff line change 2525#include < future>
2626#endif
2727
28- #if (QBCAPPOW > 6) && BOOST_AVAILABLE
28+ #if ENABLE_CPP_INT && (QBCAPPOW > 6) && BOOST_AVAILABLE
2929#include < map>
3030#define SparseStateVecMap std::map<bitCapInt, complex >
3131#else
You can’t perform that action at this time.
0 commit comments