Reset specific wires?

Hi there,

I’m playing around with a quantum autoencoder model, in which I want to be able to reset a specified set of wires to |0>, but not all of them, within a larger circuit. This is to be performed in between the encoder and decoder sections of my circuit, in which I want to throw away the “trash” qubits from the encoder and replace them with with qubits in state |0> before feeding into the decoder.

Currently I am using the default.qubit backend, and performing the operation by doing a SWAP between the trash qubits and another set of clean qubits, but this increases the total number of wires that needs to be included in the circuit. It would be much more efficient if I could simply reset those trash qubits instead.

It appears that Reset() only applies to all wires, not a subset. Is there another method that would work for my task under the default.qubit plugin, or should I use a different plugin instead?

Thanks so much!

Hi @Eric_Brown! Unfortunately, as far as I can tell, this functionality would result in a mixed state, whereas default qubit is only a pure state simulator.

There are a few possible alternatives:

  • Determine if one of Cirq/Qiskit/PyQuil support resetting individual qubits, and if so, we can add support to the corresponding plugins. I’m not sure off the top of my head, but I don’t believe I’ve seen this functionality myself?

  • Make a ‘fork’ of default qubit that supports mixed state simulation

Hi Josh, thanks a lot! This sheds a lot of light.

1 Like