Skip to content

Commit

Permalink
minor cleanup in TODO3(apply)
Browse files Browse the repository at this point in the history
  • Loading branch information
Fe-r-oz committed Jul 18, 2024
1 parent bb0baf0 commit 67165b9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/nonclifford.jl
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,9 @@ function apply!(state::GeneralizedStabilizer, gate::AbstractPauliChannel; prune_
dᵢ′ = dₗ .⊻ dᵢ
dⱼ′ = dᵣ .⊻ dⱼ
χ′ = χ * w * (-tone)^c * (im)^(-phaseₗ+phaseᵣ+4)
newdict[(dᵢ′,dⱼ′)] = get!(newdict,(dᵢ′,dⱼ′),0)+χ′
if abs(χ′) >= prune_threshold
newdict[(dᵢ′,dⱼ′)] = get!(newdict,(dᵢ′,dⱼ′),0)+χ′
end
end
end
filter!(x -> abs(x[2]) >= prune_threshold, newdict)
Expand Down

0 comments on commit 67165b9

Please sign in to comment.