44 state aliasing - #5
Conversation
jayvanderwall-snl
left a comment
There was a problem hiding this comment.
It looks like the alias attribute is missing from the LSFineLevel class despite being in the rest of the subclasses of AtomicInternalEnergyLevel. But it seems like this was an intentional choice, otherwise you could have put it in AtomicInternalEnergyLevel itself. What is going on there?
Co-authored-by: jayvanderwall-snl <89104236+jayvanderwall-snl@users.noreply.github.com>
|
The issue was me not being able to read good, but I did fix the ordering issue by making |
I don't see the commit in the history, but if it passes the tests and aligns with the intention, then feel free to push the commit. Is there a way for me to see this commit before pushing? It's okay if not |
Sorry it seems I'm not as sharp this morning as I'd like. The way we've done this in other cases is make another branch that you can see and possibly merge in. I'll do that going forward. |
Sounds good - thank you for making this change! Feel free to proceed with the merge, or I can do so. |

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.