tommycahir,
I think you were just banking on something that Quantum::Superpositions doesn't promise. The eigenstates function returns a list of states in the superposition, but does not say in order. I peeked under the hood and discovered that it generates a unique list by using a hash and we all know that hash order is not array order. There are ways to still use the module and maintain order - but it requires more work.