pyquil icon indicating copy to clipboard operation
pyquil copied to clipboard

Discarding unwanted ancillas

Open sampallister opened this issue 7 years ago • 3 comments

It'd be useful if unwanted ancillas can be dropped from a wavefunction object once they're no longer needed; lots of algorithms need big ancillary registers and it could be hard/cumbersome to read the output in these cases. E.g:

a|0000001>+b|0000010> -> a|01>+b|10>.

It'd be useful even if you had to manually declare which qubits are ancillary and only allow dropping of the totally uncomputed (i.e. all 0) registers, I think.

sampallister avatar Nov 15 '17 22:11 sampallister

Hi @sam-pally, we will look into such a feature.

stylewarning avatar Nov 15 '17 22:11 stylewarning

Could we implement this in in PyQuil with the wavefunction equivalent of the range operator? Something like: twobit_wavefunction = wavefunction[0..2]

stevenheidel avatar Nov 15 '17 23:11 stevenheidel

@stevenheidel Has this been implemented?

vtomole avatar Apr 30 '18 18:04 vtomole