Skip to content

Make a more generic eigen_gaussian function #5

@mtfishman

Description

@mtfishman

In ITensor/ITensors.jl#1106, @b-kloss introduced a function eigen_gaussian which properly diagonalizes fermionic Gaussian Hamiltonians and correlation matrices with pairing terms using a Schur decomposition. This leaves a situation where users should use Julia's eigen function from LinearAlgebra for number conserving fermionic Gaussian Hamiltonians and states and eigen_gaussian for more general parity conserving fermionic Gaussian Hamiltonians and states. It would be nice to develop a common interface for both of those cases.

One option is that internally we have wrappers ConservesNf and ConservesNfParity which can wrap any object (i.e. a Hamiltonian, correlation matrix, Gaussian circuit, etc.) and mark that they are either number conserving or parity conserving, which helps with code organization so that we can have code that is mostly generic across those two cases but then specialized with dispatch as needed. We could expose those types and then dispatch on them in eigen_gaussian (or eigen). Functions like hopping_hamiltonian(::OpSum) and quadratic_hamiltonian(::OpSum) could output quadratic Hamiltonians wrapped in ConservesNf and ConservesNfParity (respectively) which could then automatically get used for dispatch, so some of these details could get hidden from users.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions