Quantum Encoder