I am having trouble understanding what IBM's histogram is doing.

I have independently verified, in agreement with the statevector given from IBM, that after all these steps the statevector should be in the state:

$$ |\psi\rangle = \left(\frac{1}{\sqrt{6}}\> \frac{1}{\sqrt{6}}\>\frac{1}{\sqrt{6}}\>0\>\frac{1}{\sqrt{6}}\>\frac{1}{\sqrt{6}}\>\frac{1}{\sqrt{6}}\> 0 \> \ldots 0\right)^T $$

Where the dots stand in for 23 more 0's. When simulating measurement, I acquire the following Histogram:

Histogram from Simulating Measurement

Which matches up exactly with the absolute value of the squares amplitudes, which is what I believe the histogram should generate, especially after this answer confirmed as much.

However IBM does not generate this histogram, it generates the following histogram:

Histogram from IBM

which is exactly the histogram I generate independently when I ignore the resets.

Does IBM have an error when dealing with Resets, or am I misunderstanding something?


2 Answers 2


The IBM histogram is correct. You seem to be under the impression that a reset is a postselection.

Applying a reset to a qubit cannot change the expected measurement statistics on other qubits. That would violate the no-communication theorem. So the distribution before the reset is equal to the distribution after. The same is not true for a postselection, because postselection implicitly involves broadcasting a "do we continue or do we restart?" bit.

Anyways, you can see that the probability distribution before the reset matches what IBM is saying and that the probability distribution after postselecting is the one you're incorrectly expecting:

enter image description here

  • $\begingroup$ Maybe I simply don't understand resets/post selection well enough, but if we continue the circuit after the reset, surely the later probability differs compared to having never reset at all, no? How do I reconcile these two facts? $\endgroup$
    – Craig
    Jan 11 at 21:25
  • 1
    $\begingroup$ @Craig Why would they differ? The no communication theorem guarantees you can't change the observable statistics of one part of a system by operating a separate part. The two parts of the system have to touch after the operation for the operation to spread the difference. After you've finished the Toffoli gates, where are the qubits being reset touching the other qubits? Nowhere! Therefore nothing you do to them at that point can affect the statistics you get from observations of the other qubits. $\endgroup$ Jan 11 at 22:12
  • $\begingroup$ I think I understand. Further (multi-qubit) gates would be this touching (interacting) after the reset, but if there are not further gates then the resetting can never have an effect on the rest of the system. Yes? $\endgroup$
    – Craig
    Jan 11 at 23:25
  • $\begingroup$ @Craig That's right. $\endgroup$ Jan 12 at 0:25
  • $\begingroup$ Apologies for the barrage of clarifying questions: Is it possible to simulate this without having an ancillary qubit the whole time? All my probabilities work out when I introduce a $|0\rangle$ ancilla to swap and emulate a reset. However at some point I would like to dispose of the ancilla, unfortunately this would get rid of some probability. My Naive thought is to simply re-normalize after discarding but that probably violate the no-communication theorem. Any help/resources would be greatly appreciated $\endgroup$
    – Craig
    Jan 12 at 2:49

The answer of Craig G., including the circuit on Quirk, is perfectly clear. It greatly shows the difference between reset and post-selection.

Unfortunately, IBM's Composer seems actually confusing, as Craig's initial question pointed out. Here are two pictures taken from the composer.

Circuit number #1 is an entangled superposition of four states : |000>, |011>, |100>, |111>

circuit #1, no reset

Reseting the middle bit gives a superposition of two states : |000> and |100>, which looks very much like a selection.

Circuit #2 with reset

I was expecting four states : |000>, |001>, |100>, |101> (and indeed, measuring the bits actually provides these four states).

Thus, Craig's original question still holds : why is IBM's composer apparently inconsistent between state vector and measured probabilities?


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.