Skip to content

Commit

Permalink
Respect ENABLE_ENV_VARS
Browse files Browse the repository at this point in the history
  • Loading branch information
WrathfulSpatula committed Jan 23, 2024
1 parent ac8bcb8 commit b6a6d39
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions include/qbdthybrid.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,13 @@ class QBdtHybrid : public QParity, public QInterface {
return;
}

#if ENABLE_ENV_VARS
const double threshold = getenv("QRACK_QBDT_HYBRID_THRESHOLD")
? std::stod(getenv("QRACK_QBDT_HYBRID_THRESHOLD"))
: std::log2(strideBits - qubitCount);
#else
const double threshold = std::log2(strideBits - qubitCount);
#endif

if ((2.0 - threshold) <= FP_NORM_EPSILON) {
// This definitely won't switch to state vector.
Expand Down

0 comments on commit b6a6d39

Please sign in to comment.