Skip to content

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

@mtfishman

Description

@mtfishman

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.

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