Quantum computation with write-only memory