3

I'm learning ZX-calculus, but I'm getting confused when trying to obtain some simple results to compute probabilities for different outcomes.

Here's a simple example where I'm getting lost. Here, a is a Boolean / binary variable.

enter image description here Given the circuit above, I would expect to measure the qubit to be 0 with zero probability and 1 with probability one. But according to the scalar rules here, I compute probability of 2? I can always renormalize, but this seems (to me) tricky when I want to compute more complex measurement probabilities. What is the best way to go forward in the ZX-calculus?

For context, what I really want to show is how to obtain the measurement probability in Figure 2 of this paper with the ZX-calculus.

enter image description here

where it is claimed

enter image description here

But I keep getting lost with global phase differences and not being totally sure how to compute probabilities with correct normalization from the get-go.

jjgoings
  • 221
  • 1
  • 5

1 Answers1

4

OK, I made two mistakes. Both were corrected by a closer reading of the paper "Simulating quantum circuits with ZX-calculus reduced stabiliser decompositions".

First, as was pointed out by Craig, the leaf nodes didn't have the correct normalization. I needed to add factors of $\sqrt{2}$ for each computational basis state added. This is shown more clear in Eq 14 of the above paper, shown below.


enter image description here


Second, I incorrectly assumed that by putting computational basis leaf nodes to the graph, reducing them down to a scalar function would be equivalent to the probability. It is not. What's computed is the amplitude. So to get probability I just need to $|\cdot|^2$ it.

Alternatively, I can do like what they do in Eq 18 of the same paper and add the adjoint of the circuit. This seems unnecessary to me in most cases, unless you are wanting a marginal probability and don't want to enumerate over all possible cases.

That said, I figured enough out revisit the adder. Given the circuit:

enter image description here

We can rewrite as a diagram

enter image description here

and then consider the probability of measuring the $|101\rangle$ state, that is, $P(x=|101\rangle)$.

We can augment with computational basis spiders, and be sure to extract the correct scalar value (6 computational basis states total, each with a $1/\sqrt{2}$ prefactor).

enter image description here

Finally, we can fuse:

enter image description here

And then using the state copy rules get the scalar:

enter image description here

This evaluates to $$ \frac{1}{8}\times 2 \times \left(1 + \exp{(i\alpha)}\right)\times \left( 1 + \exp{(i\left(\beta + \pi\right))}\right) $$

or

$$ \frac{1}{4}\left(1 + \exp{(i\alpha)}\right)\times \left( 1 - \exp{(i\beta)}\right) $$

such that

$$ P(x=|101\rangle) = \left|\frac{1}{4}\left(1 + \exp{(i\alpha)}\right)\left( 1 - \exp{(i\beta)}\right)\right|^2 = \cos^2{(\alpha/2)}\sin^2{(\beta/2)} $$

as you can confirm here. The situation is analogous for the other non-zero contribution. Thus we obtain the result (Eq 7) in Widdows (2022).

jjgoings
  • 221
  • 1
  • 5