diff --git a/src/Simulation/Simulators/OpenSystemsSimulator/Decompositions/Utils.qs b/src/Simulation/Simulators/OpenSystemsSimulator/Decompositions/Utils.qs index 308af8341b7..8bf129733d9 100644 --- a/src/Simulation/Simulators/OpenSystemsSimulator/Decompositions/Utils.qs +++ b/src/Simulation/Simulators/OpenSystemsSimulator/Decompositions/Utils.qs @@ -135,12 +135,12 @@ namespace Microsoft.Quantum.Experimental.Decompositions { internal operation SpreadZ (from : Qubit, to : Qubit[]) : Unit is Adj { if (Length(to) > 0) { - Controlled Intrinsic.X([to[0]], from); if (Length(to) > 1) { let half = Length(to) / 2; SpreadZ(to[0], to[half + 1 .. Length(to) - 1]); SpreadZ(from, to[1 .. half]); } + Controlled Intrinsic.X([to[0]], from); } }