qiskit-textbook icon indicating copy to clipboard operation
qiskit-textbook copied to clipboard

A new chapter on ZX-calculus

Open Chriscrosser3310 opened this issue 3 years ago • 6 comments

What should the reader gain from this new content?

This is a proposal for a potential new chapter. The main goal of the chapter is to introduce ZX-calculus, a powerful graphical tool introduced in 2008 by Coecke and Duncan [3, 4]. It consists of graphical representations called ZX-diagrams and a set of rewriting rules for transforming ZX-diagrams into one another. As the name suggests, its two main generators are so-called Z-spiders and X-spiders, which arise from Z observable and X observable. ZX-calculus was later shown to be useful in a variety of quantum computing tasks, such as measurement-based quantum computation (one-way model or MBQC) [1, 9], quantum circuit optimization [7, 8, 10], error-correcting codes [2], and many more. After reading this proposed chapter, the student should be able to learn what ZX-calculus is, how to use it as a graphical tool, and where to apply it to quantum computing. The chapter should also help students develop a new perspective on concepts learned before this chapter.

My main reason for proposing the addition of ZX-calculus is that it provides much more intuitive interpretations to some aspects of quantum computing. There is a helpful analogy comparing it with LEGO [5]. To illustrate, with a set of ZX-calculus rewriting rules, one can derive circuit identities by simply drawing spiders, merging spiders, changing colors, or breaking spider legs, which is far more fun and intuitive than circuit pattern matching or matrix algebra (also could potentially be more efficient as an automated process). As another example, graph states as ZX-diagrams are exactly graphs; thus, the process of MBQC can be visualized through applying rewriting rules on these graphs, and one can quickly see how universal MBQC is achieved. I believe understanding ZX-calculus not only stimulates readers' interests in quantum computing, but also provides a new pattern of thinking to encourage original research.

Here is a potential list of topics:

  1. Diagrammatic approaches to quantum computation (things happening before ZX-calculus)
  2. Introduction to ZX-calculus (historical references, an overview of applications...)
  3. Z-spiders and X-spiders
  4. ZX-diagrams and rewriting rules
  5. Universality
  6. Completeness
  7. Represent and simplify quantum circuits with ZX-calculus, showing some examples such as GHZ state, teleportation, graph states, etc.
  8. Other applications such as MBQC, error correction, lattice surgery, etc.

I believe there are also previous works to integrate PyZX [11] and Qiskit. If more is done, this section could also introduce the interface for PyZX in Qiskit.

Where do you expect this new content to fit in with the current content?

We can put it at the end of the textbook as a supplementary chapter since ZX-calculus is not mainstream yet. No previous content needs to be changed to accommodate this proposed content since most of the concepts are additions or alternatives to previous content.

What material should this new content be based on?

I would imagine it to be a condensed version of the ZX-calculus section (9.4) in the book Picturing Quantum Processes by Coecke and Kissinger [6]. In addition, the paper by Van de Wetering [12] also provides potential good directions. The wording can be adjusted such that no assumption of the audience's background is made.

Are you proposing to write this new content? (y/n)

Yes, I'm planning to start working on this, but collaborations are welcomed. In addition, researchers in this field are encouraged to contribute.

References

[1] Backens, M., Miller-Bakewell, H., Felice, G.D., Lobski, L., & Wetering, J.V. (2020). There and back again: A circuit extraction tale. arXiv: Quantum Physics. [2] Chancellor, N., Kissinger, A., Roffe, J., Zohren, S., & Horsman, D.. (2018). Graphical Structures for Design and Verification of Quantum Error Correction. [3] Coecke, B., & Duncan, R. (2008). Interacting Quantum Observables. In Automata, Languages and Programming (pp. 298–310). Springer Berlin Heidelberg. [4] Coecke, B., & Duncan, R. (2011). Interacting quantum observables: categorical algebra and diagrammatics. New Journal of Physics, 13(4), 043016. [5] Coecke, B., Horsman, D., Kissinger, A., & Wang, Q.. (2021). Kindergarden quantum mechanics graduates (...or how I learned to stop gluing LEGO together and love the ZX-calculus). [6] Coecke, B., & Kissinger, A. (2017). Picturing Quantum Processes: A First Course in Quantum Theory and Diagrammatic Reasoning. Cambridge: Cambridge University Press. doi:10.1017/9781316219317 [7] Duncan, R., Kissinger, A., Perdrix, S., & Wetering, J.V. (2020). Graph-theoretic Simplification of Quantum Circuits with the ZX-calculus. Quantum, 4, 279. [8] Fagan, A., & Duncan, R. (2019). Optimising Clifford Circuits with Quantomatic. Electronic Proceedings in Theoretical Computer Science, 287, 85–105. [9] Kissinger, A., & Wetering, J.V. (2019). Universal MBQC with generalised parity-phase interactions and Pauli measurements. Quantum, 3, 134. [10] Kissinger, A., & Wetering, J.V. (2020). Reducing the number of non-Clifford gates in quantum circuits. Phys. Rev. A, 102, 022406. [11] Kissinger, A., & Wetering, J.V. (2020). PyZX: Large Scale Automated Diagrammatic Reasoning. Electronic Proceedings in Theoretical Computer Science, 318, 229–241. [12] Wetering, J.V. (2020). ZX-calculus for the working quantum computer scientist.

Chriscrosser3310 avatar Mar 13 '21 04:03 Chriscrosser3310

After discussing with @frankharkins, we listed a more detailed outline. Notice this outline is subject to change as the project progresses, and the actual titles may differ. It's a bit rough currently and many things might be missing, so any opinion & ideas are welcomed.

  1. Introduction to ZX-calculus
  • ZX-calculus is a graphical tool
  • Concepts of spiders
  • Rewriting rules
  • ZX-diagrams and linear maps
  • Transform quantum circuits into ZX-diagrams
  • History of development
  1. Pros and cons of ZX-calculus
  • More intuitive
  • Better circuit transpilation
  • Not complete under arbitrary gate set (will emphasize that completeness is covered later)
  1. Mathematical Properties
  • Universality
  • Completeness
  1. Other applications
  2. Other calculi

Chriscrosser3310 avatar Mar 17 '21 05:03 Chriscrosser3310

intro_zx_circuit_model.pdf I'll put here, to keep track of it with this textbook chapter open issue, slides I made as a gentle introduction to the zx-calculus for those interested in applying it to augment the circuit model. It was made to be accompanied by verbal narration, but (to anyone) feel free to adapt any part/whole of it [except the waterbending image which I do not own, and the blurry cartoon comics that are in the upcoming ZX-calculus textbook for secondary school students]. Excited for this :D

lia-approves avatar May 08 '21 00:05 lia-approves

intro_zx_circuit_model.pptx powerpoint of above file. Not sure why when exporting as pdf, the spiders became polygonal xD

lia-approves avatar May 08 '21 00:05 lia-approves

If you need someone to do this together, I want to join! I'm a CQC research scientist intern (and also Qiskit advocate) :)

0sophy1 avatar Jun 02 '21 14:06 0sophy1

@Chriscrosser3310 are you still working on this?

frankharkins avatar Aug 17 '21 09:08 frankharkins

@Chriscrosser3310 are you still working on this?

@frankharkins Yes, I paused for a while because I got busy with some other summer job, but I recently asked @0sophy1 to join and we’ll keep working on this. Although we might not be able to make any promise on when to finish.

Chriscrosser3310 avatar Aug 17 '21 10:08 Chriscrosser3310

Hi, not sure if you're still working on this, but quite a lot has changed in the interim and unfortunately we're not accepting new content at the moment. We still think this work is really valuable, and we're working to create an appropriate place for it within the textbook platform. Until then, I highly encourage you to continue to share your work through other channels.

I'm going to close this issue, but please let me know if I can support or help in any way.

frankharkins avatar Sep 06 '22 08:09 frankharkins