From e9fcdd0172316ad0a5899b72d630891ac7d545a9 Mon Sep 17 00:00:00 2001 From: WrathfulSpatula Date: Sat, 2 Nov 2024 06:41:21 -0400 Subject: [PATCH] Minor style fix --- src/qengine/state.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qengine/state.cpp b/src/qengine/state.cpp index cd6aa5bad..db2d91bf8 100644 --- a/src/qengine/state.cpp +++ b/src/qengine/state.cpp @@ -232,7 +232,7 @@ void QEngineCPU::SetPermutation(const bitCapInt& perm, const complex& phaseFac) if (phaseFac == CMPLX_DEFAULT_ARG) { complex phase; if (randGlobalPhase) { - real1_f angle = Rand() * 2 * (real1_f)PI_R1; + const real1_f angle = Rand() * 2 * (real1_f)PI_R1; phase = complex((real1)cos(angle), (real1)sin(angle)); } else { phase = ONE_CMPLX;