Skip to content
This repository was archived by the owner on Aug 21, 2020. It is now read-only.
This repository was archived by the owner on Aug 21, 2020. It is now read-only.

Abyssmal lindblad_op performance for larger systems #32

@dnadlinger

Description

@dnadlinger

The performance of the lindblad equation implementation for non-tiny systems is … not great. For example, just do lindblad_op(Δ * a'a , [sqrt(κ) * a]) (e.g. through QuPropagator) on a Fock space of dimension 80 and watch it take a very non-negligible amount of time even though the resulting matrix is very sparse.

Even this very straightforward implementation seems to run circles around it:

super_pre_post(pre, post) = kron(transpose(post), pre)

dissipator(a) = super_pre_post(a, a') - 0.5 * super_pre_post(a'a, speye(size(a)...)) - 0.5 * super_pre_post(speye(size(a)...), a'a)

hamiltonian(h) = -1im * (super_pre_post(h, speye(size(h)...)) - super_pre_post(speye(size(h)...), h))

function lindblad_op(h::QuBase.AbstractQuMatrix, collapse_ops::Vector)
    super = hamiltonian(coeffs(h))
    for c_op in collapse_ops
       super += dissipator(coeffs(c_op))
    end
    super
end

(the result of this piece of code is a raw matrix instead of a QuBase object, but that's inconsequential)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions