2
$\begingroup$

I have been looking for quantum computer simulators and came across QCAD (http://qcad.osdn.jp/). It is stated on their website that "Measurement gates on QCAD are different from real measurements."

I wonder if other simulators, like those listed on Quantiki (https://quantiki.org/wiki/list-qc-simulators), might have the same problem of incorrectly mapping the design with the experimental values.

$\endgroup$
  • 1
    $\begingroup$ Community votes, please: is this a) ontopic and b) not too broad? $\endgroup$ – Raphael Mar 18 '16 at 8:13
  • 1
    $\begingroup$ Perhaps you can do the research yourself and report your results here. $\endgroup$ – Yuval Filmus Mar 18 '16 at 12:34
  • 1
    $\begingroup$ Questions about specific tools or software packages are generally not appropriate here. See our help center. $\endgroup$ – D.W. Mar 19 '16 at 21:15
4
$\begingroup$

Based on QCAD's help file, their measurement gates are more like measure-later-suggestions:

The measurement gates on QCAD only set "measurement flags". After the calculation, the measurement is performed.

I'm very surprised they would return a wrong answer instead of throwing an error. Most simlators won't do this, and if they do it should be reported as a bug.

For example, I use the same cheat in my own simulator (which you can play with in your browser), but I prevent any later operations that would cause the result to differ compared to deferring the measurement. So it lets you hit a measured qubit with a NOT gate, but a Hadamard gate or a controlled-by-unmeasured-qubit NOT gate will be forcibly disabled. Which is frustrating, but at least not misleading.

But Why?

The reason this limitation exists is efficiency. It's the difference between $\Theta(4^n)$ operations and $\Theta(2^n)$ operations needed to simulate a gate applied to an $n$-qubit system. Operations on mixed states are much more expensive to simulate than operations on pure states, and deferring measurement allows the simulation to only use pure states.

Workaround

A simple workaround for this limitation is to include an extra qubit, CNOT the value you wanted to measure onto the extra qubit, then measure the extra qubit. This is mathematically equivalent to measuring the original qubit, but will sidestep the limitation in the simulator that prevents you from then doing more things with the original qubit and still getting the correct result.

Easy Alternatives w/o By-Design Silent Mistakes

Microsoft's LiQui|>

Google's in-browser "Quantum computing playground"

Davy Wybiral's toy in-browser simulator

"Quirk", my own toy in-browser simulator

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.