We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e3e84d8 commit 2d349a5Copy full SHA for 2d349a5
src/backtrajectory.jl
@@ -97,7 +97,7 @@ function collapse_z!(T, q::Int)
97
while pivot <= n && getxbit(t, n+q, pivot) == 0
98
pivot += 1
99
end
100
- if pivot == n+1
+ if pivot >= n+1
101
# No anti-commuting stabilizer generator. Measurement is deterministic.
102
return -1
103
@@ -134,7 +134,7 @@ end
134
# return backtrajectory(circuit0, nqubits(state))
135
# end
136
137
-function backtrajectory(circuit::Vector{AbstractOperation})
+function backtrajectory(circuit::Vector{<:AbstractOperation})
138
n = 0
139
for op in circuit
140
if op isa AbstractSingleQubitOperator
0 commit comments