Wave-functions can be created from a string containing 1's (occupied) and 0's (unoccupied). For each Fermionic spin-orbital on has one bit. For Bosonic modes Quanty reserves 8 bit, i.e. Bosons can have an occupation from 0 to 255. A wave-function resembling a single electron in a $p_x$ orbital with spin-up could be created by defining 6 spin-orbitals, creating two lists of length 3 for spin-up and spin-down and by creating a wave function that is a linear combination of $m_l=1$ and $m_l=-1$.

- Example.Quanty
-- a number of Fermionic modes or spin-orbitals NF=6 -- a number of Bosonic modes (phonon modes, ...) NB=0 -- For a p-shell we would like the have 6 -- spinorbitals with the quantum numbers -- spin down ml=-1,ml=0,ml=1 and -- spin up with ml=-1, ml=0, ml=1 -- We can group different spin-orbitals into -- lists and assign meaning to them IndexDn={0,2,4} IndexUp={1,3,5} -- the code knows that a 3 fold degenerate shell -- has l=1 and ml=-1, 0 and 1 are -- assigned to them automatically -- the wave-function with one electron in the -- px orbital with spin down is created as psipx = NewWavefunction(NF, NB, {{"100000",math.sqrt(1/2)}, {"000010",math.sqrt(1/2)}})