qvm icon indicating copy to clipboard operation
qvm copied to clipboard

implement readout symmetrization option for MEASURE

Open stylewarning opened this issue 6 years ago • 1 comments

@marcusps suggests that readout symmetrization is a useful way to improve error rates in readout by averaging over measurement of 0 and 1 states. The general procedure, as I understand it, is this:

Given an instruction like

MEASURE q c

uniformly randomly either do nothing, or transform it to

X q
MEASURE q c
NOT c

This will, over many shots, symmetrize the behavior of MEASURE, giving it asymptotically 50% chance of reading out 0 or 1.

It would not be wise to actually transform the Quil program, and this sort of thing ought to happen during compilation to actual quantum machine code. But for the purpose of simulating error, we can install this behavior into a transition method, probably on the noisy-qvm class where it's actually useful.

stylewarning avatar Mar 06 '19 22:03 stylewarning

The improvement comes not from the symmetrization per se, but the fact the symmetrized errors in readout are easier to correct for.

The correct, IMHO, is OK to be performed at a higher level in the stack. Symmetrization should happen by inserting special instruction during compilation (similar to what you suggest), but also by coordinating with lower parts of the stack during execution. For that reason, others may want to chime in, in particular @caryan and @blakejohnson

Regarding the instructions you suggest, I would propose instead that

MEASURE q c

be replaced with

DECLARE theta REAL[1]
RX(theta) q

and some additional logic to only flip c if theta is pi (and not flip when it is 0). The reason to leave it parametric is that during execution we can choose to either randomly symmetrize, or to exhaustively symmetrize (if it isn't too expensive).

marcusps avatar Mar 06 '19 23:03 marcusps