Skip to content

Operator bases which are not outer product "KetBra" bases #35

@akirakyle

Description

@akirakyle

I've been thinking a lot about all the issues related to bases here (#25, #26, #27, #32, #33, #34). To help me think through these issues, I've been iterating through a bunch of prototype abstract interfaces for Basis, OperatorBasis, and SuperOperatorBasis (discussed in #26) so I can get a feeling for how well different design tradeoffs in the abstract interface work out in practice. I'll hopefully submit that for some discussion here soon. One thing I've run into, which warrants a separate issue so that I have something to reference, is PauliBasis.

Currently PauliBasis is not actually used in anywhere in any dependent packages I could find aside from being exported by QuantumOpticsBase. Here's the current definition

struct PauliBasis{S,B} <: Basis
    shape::S
    bases::B
    function PauliBasis(num_qubits::T) where {T<:Integer}
        shape = [2 for _ in 1:num_qubits]
        bases = Tuple(SpinBasis(1//2) for _ in 1:num_qubits)
        return new{typeof(shape),typeof(bases)}(shape, bases)
    end
end

There's the test_pauli in QuantumOpticsBase which shows some examples of it being used such as

q2 = PauliBasis(2)
CNOT = DenseOperator(q2, q2, diagm(0 => [1,1,0,0], 1 => [0,0,1], -1 => [0,0,1]))

But this is not the CNOT gate in the pauli basis, but rather in the "standard" (assuming a given tensor product layout) computational basis. In the Pauli basis CNOT can be represented as (taken from Gottesman's textbook, the other elements can be found by acting by conjugation by other Paulis)

$$\begin{align*} X \otimes I &\to X \otimes X\\\ Z \otimes I &\to Z \otimes I\\\ I \otimes X &\to I \otimes X\\\ I \otimes Z &\to Z \otimes Z \end{align*}$$

Thus in order to meaningfully define an operator in the Pauli basis, one needs to fix some canonical ordering of the (complex) coefficients for $I,X,Z,Y$, which is really the whole point of the stabilizer tableau.

Currently every subtype of AbstractOperator{BL,BR} specifies a left hilbert space and right hilbert space basis which basically implicitly assumes a "KetBra" style operator basis in which basis elements for the operator are all outer products of basis elements for the Operators left and right Hilbert spaces. In general this need not be the case, and the Pauli basis is as example of a unitary operator basis for which the operator basis elements cannot be represented as outer products. Another example of operator bases are the Heisenberg-Weyl (sometimes called clock and shift) basis for density operators on arbitrary dimensional hilbert spaces. The Gaussian state formalism being developed in Gabs I think can be considered as working in a CV analogue of the PauliBasis which suggests that in fact the GaussianState should actually subtype AbstractOperator instead of StateVector given that it can represent mixed as well as pure states.

@Krastanov @apkille
Hopefully this makes some sense, but it's fine to hold off commenting until I have converged my prototyping work on something that I feel solves these issues at the interface level...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions