I wanted to share some results from an experiment which I find thought were deeply surprising.

The basic idea is to prepare a superposition in a main register then conditionally apply lots of random gates to a "messy" register, undo them, and then measure the main register. The idea is to see whether noise can amplify certain outcomes.


The circuit diagram for the simplest case of this is:

1-qubit messy register

circuit-56544 is created using qiskit's random_circuit and turning it into a controlled gate. Note that the middle auxilliary qubit is especially important when there are multiple qubits in the top register to reduce number of controlled-ops.

My prediction was that either nothing would happen or that applying messy gates would "accidentally measure" the messy register because of noise, and collapse the top qubit into the 1 state. The qasm_simulator predicts that nothing will happen (which makes sense since the circuit is just the $H_0$ + identity):

enter image description here

However, when we run on a real device (ibmq_bogota), thus introducing noise, interesting things start to happen: enter image description here

This is the opposite of what I expected to happen, so I was quite shocked. However, as we increase the depth of the random circuits and the size of the messy register, this effect (and my surprise) are greatly amplified, until we're basically measuring only zeros: enter image description here

(Of course, I would love to see what happens for more qubits but I only have access to small hardware and obviously we can't trust simulators anymore.)

For now, I'm just hoping someone can explain what is actually going on here. To be clear, we can eliminate the possibility that the messy circuit is somehow inadvertedly doing Grovers-like amplification because the simulator predicts random uniform output for all of these circuits. Therefore, it is physical noise which is driving these effects. One possible metaphor is that qubits dislike interacting with the environment and so "prefer" to take the path of least resistance through the circuit. I am keen to hear what an Everettian (or indeed any interpretation) would say about this.


To add some motivation for understanding what's going on here, I just wanted to point out you can easily use this technique to create a search algorithm. So the circuit to find '101' is
enter image description here

For which we get:

enter image description here

To understand how well this algorithm scales in terms of search space, mess depth or mess width, we of course need to understand the basic effect here.


Sorry this post has been a bit of a mess (if you pardon the pun). I'll end with some questions:

  1. Is this due to a quantum effect not considered in the simulator or a physical effect not considered in QM? If former, which one?
  2. Which interpretation of QM is this most consistent with?
  3. How well does this scale?
  4. Are some random circuits messier than others?
  5. Is it the noiser the device, the better? Or does some other trade-off kick in at some point?

Please feel free to ask any of your own!

p.s. if anyone who has access to larger devices wants to investigate how this scales, I'm happy to share my code.

EDIT: as pointed out by LinLin, this can all be explained by the fact that decoherence means states tend towards |0...0>. As such, the following two circuits produce basically the same output, even though the latter has no entanglement between the main register and the mess.

enter image description here enter image description here

There's nothing surprising here, I just got a little overexcited.

  • 1
    $\begingroup$ did you add barrier between the random circuit and its conjugate? $\endgroup$
    – KAJ226
    Aug 2 at 15:26
  • $\begingroup$ @KAJ226 No. Should I? Does that stop it being compiled or something? $\endgroup$ Aug 2 at 15:59
  • 1
    $\begingroup$ well, without the barrier and depending on how you set up the optimization level or passmanagers, the compiler might just realized that all these gates can be canceled out and not having to actually execute them at all in the first place. That is, you might never actually executed that control operation in the first place. You can just look at your executed circuit and see what being executed to be sure. $\endgroup$
    – KAJ226
    Aug 2 at 17:40

It could have something to do with cross-talk and decoherence. By introducing the messy circuits, the other qubits are on idle as long as the messy circuits are being computed. Hence decoherence effects will certainly play a role here. As the qubits in the messy register are manipulated via randomized quantum gates, these manipulation can additionally have some effects on the remaining qubits.

  • $\begingroup$ That's a really good point. Since decoherence means that states tend towards |0...0>, then the longer the messy gates, the more likely you'll end up at |000> before measuring. I don't know how I didn't realise that. I just ran some tests and it seems like you get identical results whether or not the x register is entangled with c. I don't think there's anything interesting going on here so I think I'll delete this post. Thanks for your help! $\endgroup$ Aug 2 at 16:45

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.