Skip to content

Commit

Permalink
fix #191 - too restrictive typeassert for MixedDestabilizer
Browse files Browse the repository at this point in the history
  • Loading branch information
Fe-r-oz committed Sep 23, 2024
1 parent 05491d9 commit e1bb8b9
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/QuantumClifford.jl
Original file line number Diff line number Diff line change
Expand Up @@ -569,8 +569,13 @@ function MixedDestabilizer(stab::Stabilizer{T}; undoperm=true, reportperm=false)
t[n+r+s+1:end] = sZ # The other logical set in the tableau
end
if undoperm
t = t[:,invperm(permx[permz])]::T
return MixedDestabilizer(t, r+s)::MixedDestabilizer{T}
if isa(t, SubArray)
t = t[:, invperm(permx[permz])]::T
return MixedDestabilizer(t, r+s)::MixedDestabilizer{T}
else
t = t[:, invperm(permx[permz])]
return MixedDestabilizer(t, r+s)
end
end
if reportperm
return (MixedDestabilizer(t, r+s)::MixedDestabilizer{T}, r, permx, permz)
Expand Down

0 comments on commit e1bb8b9

Please sign in to comment.