Skip to content

Commit 09f9f44

Browse files
committed
fix collapse_z phase randomness
1 parent 2d349a5 commit 09f9f44

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/backtrajectory.jl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,11 @@ function collapse_z!(T, q::Int)
117117
apply!(T, sHadamardYZ(pivot); phases=true)
118118
end
119119

120+
# Assign a measurement result.
121+
if rand(Bool) #TODO: maybe support a RNG
122+
apply!(T, sX(pivot); phases=true)
123+
end
124+
120125
return pivot
121126
end
122127

0 commit comments

Comments
 (0)