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

[ENHANCEMENT] Generic interface for eigenstates of spin operators #15

Open
mtfishman opened this issue Jan 28, 2025 · 0 comments
Open
Labels
enhancement New feature or request

Comments

@mtfishman
Copy link
Member

Currently there are some ad-hoc conventions for naming eigenstates of spin operators, such as "Z+", "Z-", "X+", "X-", etc.

We could have a more systematic and general approach, such as:

function (n::StateName"X")(domain)
  eigvals, eigvecs = eigen(OpName("X")(domain))
  i = findfirst((n.eigval), eigvals)
  return eigvecs[:, i]
end

Obviously that isn't ideal from a performance perspective, but that can serve as a naming convention (i.e. naming eigenvectors of an operator after the operator with the eigenvalue stored as a parameter) as well as a generic fallback definition. Then we can specialize in cases where the eigenvectors have closed forms, and/or we can cache commonly used eigenvectors.

@mtfishman mtfishman added the enhancement New feature or request label Jan 28, 2025
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