Questions tagged [zx-calculus]

The ZX-calculus is a high-level and intuitive graphical language for pure qubit quantum mechanics (QM), based on category theory. (arXiv: 1602.04744)

Filter by
Sorted by
Tagged with
2 votes
0 answers
46 views

Using ZX calculus to postselect the first round of a distance-2 rotated surface code

I'm translating gate model language to ZX calculus diagram using such notation, to describe the first round of measurement of such a distance-2 rotated surface code below. I wrote this diagram where ...
Jiakai Wang's user avatar
3 votes
1 answer
113 views

$CNOT$ teleportation in ZX-calculus: how to simplify my circuit further?

I am stuck in simplyfing the following cNOT teleportation in ZX-calculus. I don't know how to proceed further. The circuit I start from is taken from this thesis (Fig 2.14, page 22). Which property ...
Marco Fellous-Asiani's user avatar
6 votes
1 answer
207 views

Getting intuition on the state-injection relations for the generalized $\exp(-iP \pi/8)$ $T$-gates (ideally using ZX calculus)

In Litinsky's paper, there are many circuits relations, like the one below. The left handside represents the "rotation" $\exp(-i P \phi)$ with $\phi=\pi/8$ with similar definitions for the ...
Marco Fellous-Asiani's user avatar
1 vote
0 answers
49 views

Global (Ising) Gates and ZX-calculus representation

I could find from this source -- but also from other works on ZX-calculus -- the following extract: This looks to me as a generalisation of a 2-qubit Ising gate to an $n$-qubit global Ising gate. ...
Daniele Cuomo's user avatar
0 votes
1 answer
155 views

Zx graphs in Stim

It is possible to create an ASCII graph in Stimzx for a ZX calculus diagram. I would like to create something like this but I cannot seem to recreate the correct ASCII format. When I do something ...
Mark's user avatar
  • 38
0 votes
1 answer
51 views

Rewriting a contradictory ZX loop into an independent pi node

Consider the following ZX graph: If you perform tensor contraction on this graph, you get the zero tensor. Therefore it should be equivalent to this graph: How do you rewrite the graph, axiom by ...
Craig Gidney's user avatar
  • 33.3k
3 votes
1 answer
99 views

How do I get correct measurement probabilities in ZX calculus?

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, <...
jjgoings's user avatar
  • 221
3 votes
2 answers
340 views

Does the ZX calculus allow for Y-axis rotations?

I'm trying to understand how Y-axis rotations are represented in ZX Calculus. In the paper, wikipedia, everywhere I look, it's as if there is no such thing as Y-axis rotations, only X and Z. I ...
RustyToms's user avatar
  • 133
1 vote
1 answer
59 views

ZX-calculus: meaning of no horizontal edge

Consider the following ZX-diagram: As you can notice, there are some nodes, belonging the same qubit, which are not connected by any edge (neither blue or black). What is the meaning of that (during ...
Daniele Cuomo's user avatar
1 vote
0 answers
159 views

PyZX optimisation steps for Clifford circuits

Given the following ZX-diagram It should represent some random Clifford circuit (LC means Local Clifford). As far as I got, any Clifford circuit can be transformed into a ZX-diagram like the above, i....
Daniele Cuomo's user avatar
3 votes
1 answer
69 views

Can H-boxes have a copy-like rule in the ZH-calculus with respect to $\pi$ gates?

In the ZX-calculus we have the following rule, which I think it is known as the copy-rule (grey/white colours may be interchanged; with respect to the usual red/green notation the translation is white ...
R.W's user avatar
  • 2,327
4 votes
1 answer
145 views

Is it possible to implement the ZX-calculus bialgebra rule without adaptivity or post-selection?

In the ZX-calculus, one of the fundamental rules of the diagrammatic reasoning is known as the bialgebra rule and it is described by the given diagrammatic equation: Question: Can we implement this ...
R.W's user avatar
  • 2,327
1 vote
1 answer
184 views

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 ...
T.H's user avatar
  • 196
7 votes
2 answers
272 views

ZX-calculus: pi-copy rule not required for completeness?

In ZX-calculus, the $\pi$-copy rule is quite famous, and is used for instance here: However, this paper never introduces this rule, and says that this set is enough to prove the Clifford completeness ...
Léo Colisson's user avatar
5 votes
1 answer
210 views

ZX-Calculus: understand clifford+T/general ZX rules

This paper that proves the completeness of the ZX-Calculus introduces different gates: and However, they seem very cryptic to me (except maybe the rule E). What is the intuition (what they mean, and ...
Léo Colisson's user avatar
8 votes
1 answer
713 views

Explain the representation of the CNOT gate in ZX-calculus

In ZX-calculus, the CNOT gate is represented by this: Can someone show me why this is true, using just the basic rewriting rules? All books/papers I have seen simply take it without proof, but I can'...
NNN's user avatar
  • 363
4 votes
1 answer
82 views

ZX calculus: What do diamond and loop mean?

Recently, I started to study practical application of ZX calculus but I am confused by meaning of "diamond" and "loop". Issue no. 1: There are these rules: B-rule and D-rule But this example seems ...
Martin Vesely's user avatar
4 votes
3 answers
437 views

What are some applications of the ZX calculus?

Recently, I came across ZX calculus. It is an interesting method to describe quantum circuits. However, it seems to me, too complicated for day-to-day use in circuit design (something like to program ...
Martin Vesely's user avatar
2 votes
2 answers
262 views

ZX-Calculus: how to prove this simple equation between two very small circuits

Short version: How could I prove in ZX-calculus that these two diagrams are equal (up to a global phase), using axioms from this paper (Fig. 1) for example? Any intuition is welcome! Long version:...
Léo Colisson's user avatar
3 votes
2 answers
352 views

ZX-calculus : measurement and output probabilities

I'm discovering ZX-Calculus, and it seems to be much easier to do computations on circuit that would take much more time with the usual formalism. However, I can't find a nice way to represent ...
Léo Colisson's user avatar
7 votes
2 answers
424 views

Diagrammatic Quantum Reasoning: Proving the loop equation using yanking equations

I'm trying to study the book: Picturing Quantum Processes: A First Course in Quantum Theory and Diagrammatic Reasoning, and would like some help with Exercise 4.12: The relevant equations are as ...
Mahathi Vempati's user avatar
9 votes
4 answers
2k views

Controlled Hadamard gate in ZX-calculus

What is the representation of the CH gate in ZX-calculus? Is there a general recipe for going from a ZX-calculus representation of a gate to the representation of the controlled version?
Daniel Mahler's user avatar
15 votes
2 answers
813 views

Graphical Calculus for Quantum Circuits

So far I have read a little bit about zx-calculus & y-calculus. From Reversible Computation: The zx-calculus is a graphical language for describing quantum systems. The zx-calculus is an ...
user820789's user avatar
  • 3,302