GTorlai / PastaQ.jl

Package for Simulation, Tomography and Analysis of Quantum Computers
Apache License 2.0
141 stars 23 forks source link

`"bit_flip"` noise makes a complex circuit #281

Open mtfishman opened 2 years ago

mtfishman commented 2 years ago

Maybe we can check if the noise gate ends up real and convert it to real when possible.

julia> buildcircuit([Index(2, "Qubit")], [("X", 1)]; eltype=nothing, device=identity, noise=("bit_flip", (p=0.1,)))
2-element Vector{ITensor}:
 ITensor ord=2
Dim 1: (dim=2|id=483|"Qubit")'
Dim 2: (dim=2|id=483|"Qubit")
NDTensors.Dense{Float64, Vector{Float64}}
 2×2
 0.0  1.0
 1.0  0.0
 ITensor ord=3
Dim 1: (dim=2|id=483|"Qubit")'
Dim 2: (dim=2|id=483|"Qubit")
Dim 3: (dim=2|id=584|"kraus")
NDTensors.Dense{ComplexF64, Vector{ComplexF64}}
 2×2×2
[:, :, 1] =
 0.9486832980505138 + 0.0im                 0.0 + 0.0im
                0.0 + 0.0im  0.9486832980505138 + 0.0im

[:, :, 2] =
                 0.0 + 0.0im  0.31622776601683794 + 0.0im
 0.31622776601683794 + 0.0im                  0.0 + 0.0im