Quantum Sorter