Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make a more generic eigen_gaussian function #5

Open
mtfishman opened this issue Apr 3, 2023 · 0 comments
Open

Make a more generic eigen_gaussian function #5

mtfishman opened this issue Apr 3, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@mtfishman
Copy link
Member

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.

@mtfishman mtfishman added the enhancement New feature or request label Apr 3, 2023
@mtfishman mtfishman transferred this issue from ITensor/ITensors.jl May 9, 2024
@mtfishman mtfishman changed the title [ITensorGaussianMPS] [ENHANCEMENT] Make a more generic eigen_gaussian function Make a more generic eigen_gaussian function May 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant