# Trouble re-creating quantum psuedo-telepathy

I am trying to replicate the results from this webpage here utilizing qiskit:

http://twistedoakstudios.com/blog/Post6536_implementing-quantum-pseudo-telepathy

Since the splitter gate mentioned in the article is a custom gate they are using, I had to recreate it using the unitary function like so:

splitter = [[1/sqrt(2), 1.j/sqrt(2)],
[1.j/sqrt(2), 1/sqrt(2)]]

#to place the gate in qiskit

qc = QuantumCircuit(4)

qc.unitary(splitter, [0])


I tried to re-create the results of the example scenario (under the section "playing the game" where Alice is given the bottom row and Bob is given the center column). Here is a pic of the circuit:

And these are results I get are the following histogram:

Now, these results DO make sense if you interpret them as {Bob top, Bob center, Alice center, Alice left}. For example, if they measured the qubits and they collapsed into 1000, then that means Bob will place one token at the top and one token at the bottom slots (since there's a 0 in the center slot, the remaining token must go in the bottom slot), and Alice places no tokens (since she has 2 zeroes). This would beat the game.

However, I ran the same program, but this time testing when Alice gets the top row and Bob gets the left column. The resulting circuit looks like this:

And the histogram looks like this:

Assuming that we read the results the same way, these numbers suddenly fail. For example, 0100 fails because this means Bob places a token in the center and at the bottom while Alice places no tokens, meaning no one placed any tokens at the intersecting spot.

What, if anything, am I doing wrong?

This is actually a pretty complicated circuit to verify, because there are so many cases and details to get wrong. I didn't try to use the exact circuits from the blog post, because it is going out of its way to do the required measurements in-place. But these kinds of conditional measurements are easier to express out-of-place.

In Quirk, you can use "parity controls" as a way to condition on Pauli product observables. Combined with NOT gates controlled by the row/col selection, we can encode each of the cases. I made a Quirk circuit that generated a random row and column, and then extracted the appropriate observable for Alice and Bob, and then checked that the value they each assigned to the common cell was identical. Here is the circuit:

The "Off" at the end indicates a 0% chance of losing. You can check that removing bits of the circuits makes the display not say Off anymore.

To get always-opposite assignments on the common cell, as in the blog post, invert all of Alice's choices.