# ZX Calculus -- proving the most basic of identities

I'm trying to show the following equivalence in the ZX calculus:

This is equivalent to showing that $$|0\rangle - i|1\rangle = |+\rangle + i|-\rangle.$$

I want to do this using the rules listed on Wikipedia, but am struggling. I tried applying the Colour Change rule followed by Euler Decomposition but wasn't sure how to take it further.

My lecturer essentially just listed the rules without a single example of their application, so I'm really at a loss for how to intuitively approach this problem. Thanks in advance!

## 1 Answer

Here is my attempt. I did:

1. Color change to introduce an Euler-decomposed H.
2. Fuse the leaf into a pi node so the angle can escape.
3. Add a branch to invoke the copy rule.
4. Clean up.

I'll note offhand that the way I'd actually prove this in practice is to just evaluate the graph into a tensor or a set of canonical stabilizer generators. I usually use the rewrite rules to explore equivalent things, rather than to verify equivalences. Because it's so easy to get to interesting places, but often hard to recover how you got there.

• Thank you! What rule are you using to go from line 4 to 5?
– jth
Jan 31, 2022 at 18:39
• @J.T. Ah that's three steps I suppose. Spider fusion to split out a pi node from the leaf, then pi copy rule to hop it over the black node, then spider fusion to merge the pi into the pi/2 on the other side. Jan 31, 2022 at 18:44
• Thanks again; you gain so much initial intuition from seeing a worked example. Our lecturer's hint for this problem was just 'use Euler and Copy rules' so perhaps it can be done more simply, although I get the impression he thinks that once we had seen the ZX rules we were suddenly as fluent in the calculus as him!
– jth
Jan 31, 2022 at 19:16