-
Notifications
You must be signed in to change notification settings - Fork 40
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Currently the gates used in test_pauli,jl are not actually correct for their given names due to incorrect assumptions about "endiandness" (see qojulia/QuantumOptics.jl#426). For example
julia> q2 = SpinBasis(1//2)^2
[Spin(1/2) ⊗ Spin(1/2)]
julia> CNOT = DenseOperator(q2, q2, diagm(0 => [1,1,0,0], 1 => [0,0,1], -1 => [0,0,1]))
Operator(dim=4x4)
basis: [Spin(1/2) ⊗ Spin(1/2)]
1.0 0.0 0.0 0.0
0.0 1.0 0.0 0.0
0.0 0.0 0.0 1.0
0.0 0.0 1.0 0.0when CNOT should be
julia> q1 = SpinBasis(1//2)
Spin(1/2)
julia> CNOT = dm(spinup(q1))⊗identityoperator(q1) + dm(spindown(q1))⊗sigmax(q1)
Operator(dim=4x4)
basis: [Spin(1/2) ⊗ Spin(1/2)]
1.0+0.0im 0.0+0.0im 0.0+0.0im 0.0+0.0im
0.0+0.0im 0.0+0.0im 0.0+0.0im 1.0+0.0im
0.0+0.0im 0.0+0.0im 1.0+0.0im 0.0+0.0im
0.0+0.0im 1.0+0.0im 0.0+0.0im 0.0+0.0imAlso this line in pauli.jl in the function that converts from ChiMatrix to PauliTransferMatrix hardcodes iteration over 2 qubit paulis so I think it will be incorrect for superoperators over other numbers of qubits (see here for the equation that this function implements). The test file only contains tests on 2 qubit superoperators so it wouldn't catch this.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working