# Is this a Bell test?

Inspired by this article which uses a $$|+\rangle$$ state as a control for a $$CSWAP$$, I realised you can conditionally measure a qubit by (maybe) swapping it with an empty ancilla, measuring it and (maybe) swapping it back.

As such, you could prepare a Bell pair, (maybe) measure half of it and then check if the other half was affected as follows:

If measurement changes the top qubit then the second $$H$$ gate should put it back into the |+> state and we should measure random results. If the measurement doesn't change the top qubit, then it should turn the $$|+\rangle$$ back to $$|0\rangle$$, deterministically measuring 0. Right?

If so, then I'm hoping there's some extension of the uncertainty principle that would imply that because there is no knowledge about whether the second qubit was measured, we could learn something about the first qubit. I hope.

Of course I've tried to test this but I don't believe the qiskit simulator and none of the IBM devices allow operations to take place after measurement ("Qubit measurement not the final instruction. [7006]"). So can anyone think of a way I could test it? Does this count as a Bell Test? Has this been tried before? Am I missing something obvious?

Not sure if this is the right place to post this but just interested to hear people's thoughts/predictions.

## 1 Answer

No, this isn't a Bell test. Testing for a violation of Bell's inequality requires testing over several distinct measurement bases. For a good example of Bell tests run on IBM hardware, see section II(3) here.

To run the circuit in the OP, just move the second $$H$$-gate on $$q_0$$ in front of the measurement on $$q_2$$. This will have no impact on your outcomes distribution (i.e. these two operations commute).

Edit: After skimming through the linked article, I would recommend caution when considering this commentary. The author, although impressive for a college junior, has some severe misconceptions regarding several important concepts.

• Thank you, that paper is very interesting. The main difference is that conditional measurement I'm trying to do. Could you elaborate on how they commute? I thought that measurement wasn't unitary Aug 31, 2020 at 17:15
• That's exactly what I'm trying to test - the top two qubits are entangled and therefore cannot be treated separately (see section 2 of the document you linked). As such, I'd like to test whether the (potential) measurement of the second qubit can affect the first since that is the prevailing understanding of how Bell pair measurements are correlated. Therefore, I think the position of the first measurement does matter in my experiment Aug 31, 2020 at 20:13
• I think that you unfortunately removed your comment while I was typing that, sorry if that creates any confusion. Aug 31, 2020 at 20:26
• @JohnBot Sorry, that's on me. I was hoping to think of a more satisfying response than pointing you to the tensor product structure, but in the end nothing more straightforward is coming to mind. Consider the state of the circuit after the CSWAP as $\vert \psi \rangle$, and call $\tilde H = H \otimes \mathbf{1} \otimes \mathbf{1} \otimes \mathbf{1}$ and a measurement operator $\tilde M = \mathbf{1} \otimes \mathbf{1} \otimes M \otimes \mathbf{1}$. By the basic properties of operator tensor products $[ \tilde H, \tilde M] = 0$, which is not impacted by entanglement in $\vert \psi \rangle$. Sep 1, 2020 at 3:29