Skip to content

Some issues with PauliTransferMatrix and ChiMatrix #191

@akirakyle

Description

@akirakyle

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.0

when 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.0im

Also 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions