quantum circuit optimisation verification and simulation
play

Quantum circuit optimisation, verification, and simulation with PyZX - PowerPoint PPT Presentation

Quantum circuit optimisation, verification, and simulation with PyZX Aleks Kissinger aleks.kissinger@cs.ox.ac.uk John van de Wetering john@vdwetering.name Institute for Computing and Information Sciences Radboud University Nijmegen February


  1. Quantum circuit optimisation, verification, and simulation with PyZX Aleks Kissinger aleks.kissinger@cs.ox.ac.uk John van de Wetering john@vdwetering.name Institute for Computing and Information Sciences Radboud University Nijmegen February 1, 2020

  2. PyZX: a Python library for manipulating large ZX-diagrams

  3. Quantum computation § Quantum computation is done by quantum circuits .

  4. Quantum computation § Quantum computation is done by quantum circuits . § A quantum circuit consists of quantum gates .

  5. Quantum computation § Quantum computation is done by quantum circuits . § A quantum circuit consists of quantum gates . § Single qubit gates: NOT, S, T, H.

  6. Quantum computation § Quantum computation is done by quantum circuits . § A quantum circuit consists of quantum gates . § Single qubit gates: NOT, S, T, H. ? ? T = S H(adamard) NOT S = H NOT H

  7. Quantum computation § Quantum computation is done by quantum circuits . § A quantum circuit consists of quantum gates . § Single qubit gates: NOT, S, T, H. ? ? T = S H(adamard) NOT S = H NOT H § Two qubit gate: CNOT (controlled NOT).

  8. Quantum computation § Quantum computation is done by quantum circuits . § A quantum circuit consists of quantum gates . § Single qubit gates: NOT, S, T, H. ? ? T = S H(adamard) NOT S = H NOT H § Two qubit gate: CNOT (controlled NOT). § These are all the gates you need.

  9. Quantum computation § Quantum computation is done by quantum circuits . § A quantum circuit consists of quantum gates . § Single qubit gates: NOT, S, T, H. ? ? T = S H(adamard) NOT S = H NOT H § Two qubit gate: CNOT (controlled NOT). § These are all the gates you need. § Our objective (for now) is to minimize number of gates needed

  10. Circuit diagrams NOT = CNOT = + +

  11. Circuit diagrams NOT = CNOT = + + An example quantum circuit: ` T ` H S ` S

  12. Circuit identities = + + = H H T : = T = T T S

  13. Gate commutation = + + + + T T = + + = T T T T + + + +

  14. More circuit equalities

  15. And more circuit equalities

  16. And even more circuit equalities

  17. Things get messy because circuits are very rigid

  18. Things get messy because circuits are very rigid Enter ZX-diagrams

  19. ZX-diagrams What gates are to circuits, spiders are to ZX-diagrams.

  20. ZX-diagrams What gates are to circuits, spiders are to ZX-diagrams. Z-spiders: X-spiders: ( α P r 0 , 2 π s ) α α ... ... ... ...

  21. ZX-diagrams What gates are to circuits, spiders are to ZX-diagrams. Z-spiders: X-spiders: ( α P r 0 , 2 π s ) α α ... ... ... ... Spiders can be wired in any way: π 2 β 3 π 2 α 0 π

  22. ZX-diagrams What gates are to circuits, spiders are to ZX-diagrams. Z-spiders: X-spiders: ( α P r 0 , 2 π s ) α α ... ... ... ... Spiders can be wired in any way: π 2 β 3 π 2 α 0 π Note: “Only connectivity matters”

  23. Quantum gates as ZX-diagrams Every quantum gate can be written as a ZX-diagram: S “ T “ π π 2 4 H “ := π π π 2 2 2 CNOT “

  24. Quantum gates as ZX-diagrams Every quantum gate can be written as a ZX-diagram: S “ T “ π π 2 4 H “ := π π π 2 2 2 CNOT “ Theorem Any linear map between qubits can be represented as a ZX-diagram.

  25. Rules for ZX-diagrams: The ZX-calculus α ... ... “ ... α ` β “ ... ... α α ... ... β ... ... a π a π a π a π “ a π α “ ... ... a π α p - 1 q a α ... ... a π a π “ “ “ α, β P r 0 , 2 π s , a P t 0 , 1 u

  26. Completeness of the ZX-calculus Theorem If two ZX-diagrams represent the same computation, then they can be transformed into one another using the previous rules (and one additional one).

  27. Completeness of the ZX-calculus Theorem If two ZX-diagrams represent the same computation, then they can be transformed into one another using the previous rules (and one additional one). So instead of dozens of circuit equalities, we just have a few simple rules.

  28. PyZX § PyZX is an open-source Python library. § github.com/Quantomatic/pyzx

  29. PyZX § PyZX is an open-source Python library. § github.com/Quantomatic/pyzx § Its goal is to allow easy manipulation of large ZX-diagrams.

  30. PyZX § PyZX is an open-source Python library. § github.com/Quantomatic/pyzx § Its goal is to allow easy manipulation of large ZX-diagrams. § Does circuit optimisation § Does circuit verification § Does circuit simulation (WIP)

  31. Demonstration time

  32. Want to learn more? § github.com/Quantomatic/pyzx § zxcalculus.com

  33. Want to learn more? § github.com/Quantomatic/pyzx § zxcalculus.com

  34. Want to learn more? § github.com/Quantomatic/pyzx § zxcalculus.com Thank you for your attention!

Recommend


More recommend