44 state aliasing - #5
Open
EthanMcGarrigle-SNL wants to merge 8 commits into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Added functionality to create alternative names or "aliases" for energy levels and energy eigenstates in IonSim. This is a quality-of-life update meant to improve readability of basis states and levels in the context of quantum information or other applications. For example, we can alias a level in Yb171+ with name "S1/2, 0, 0" with an alias "0" or "down" or "1" for "S1/2, 1, 0". For the example of a 2-qubit basis, the state "S1/2, 0, 0 ; S1/2, 1, 0" would be aliased to "01". This is a nice feature when dealing with intermediate states or Rydberg states, which can be abbreviated to common symbols like "e" for excited or "r" for Rydberg.
Summary of changes:
Added functionality for the AtomicSpin and MotionalMode constructors to accept a list of aliases by the user.
Atomic internal energy levels and Fock energy levels now have an optional alias attribute.
The user can specify a "join rule" to customize how basis states (in the basis of energy eigenstates) will join aliases from each degree of freedom together. e.g. A user can choose the alias to be "01" or "0,1" or "0;1" for the 2-qubit basis state "S1/2, 0, 0 ; S1/2, 1, 0" in Yb171+.
Added tests to test_basis.py to ensure correct functionality and integration into automated testing.