From f41df210421a16f3d46295f6693cca5817eb0e9a Mon Sep 17 00:00:00 2001 From: a3moses Date: Mon, 9 Dec 2024 10:57:57 -0500 Subject: [PATCH] fix to execute_circuit_steps_once_, all unit tests pass. --- include/qpp/classes/qengine.hpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/qpp/classes/qengine.hpp b/include/qpp/classes/qengine.hpp index bf4bce4b5..a7b562f07 100644 --- a/include/qpp/classes/qengine.hpp +++ b/include/qpp/classes/qengine.hpp @@ -240,7 +240,9 @@ class QEngineT : public QBaseEngine { } bool measured = false; - for (auto it = steps[pos]; it.get_ip() < steps.size(); ++it) { + auto it = steps[0]; + it.advance(pos); + for (; it.get_ip() < steps.size(); ++it) { if (internal::is_measurement(it)) { measured = true; }