Quantum state refactoring & docs