Quantum circuits: From Structure to Software Aleks Kissinger Quantum Natural Language Processing, Oxford 2020 Aleks Kissinger QNLP 2020 1 / 34
Quantum software 1. := the code the runs on a quantum computer factoring search physical simulation optimisation problems linear systems & codes network flows natural language processing ... 2. := the code that makes that code (better) • compilers • optimisation • verification Aleks Kissinger QNLP 2020 2 / 34
Problem: no quantum computers Rigetti Aspen IBM Q Rochester Google Sycamore (+ Oxford, Vienna, Delft, Sussex, Grenoble...) Aleks Kissinger QNLP 2020 3 / 34
⊕ H S 0 ⊕ H 0 ⊕ ⊕ 0 H X T ⊕ Z Z 0 ⊕ 0 Aleks Kissinger QNLP 2020 4 / 34
⊕ ⊕ H S 0 H 0 ⊕ ⊕ 0 H X T ⊕ Z Z 0 ⊕ 0 Aleks Kissinger QNLP 2020 4 / 34
H S 0 H 0 ⊕ ⊕ 0 H X T ⊕ Z Z 0 ⊕ 0 Aleks Kissinger QNLP 2020 4 / 34
H S 0 H 0 ⊕ ⊕ 0 H X T ⊕ Z Z 0 ⊕ 0 Aleks Kissinger QNLP 2020 4 / 34
⊕ ⊕ H H = = ⊕ ⊕ ⊕ H H = Z Z = ⊕ ⊕ = H S H S H H ⊕ ⊕ ⊕ . . . Aleks Kissinger QNLP 2020 5 / 34
* Selinger 2015 Aleks Kissinger QNLP 2020 5 / 34
* Selinger 2015 Aleks Kissinger QNLP 2020 5 / 34
* Amy, Chen, & Ross 2018 Aleks Kissinger QNLP 2020 5 / 34
* Nam et al 2018 Aleks Kissinger QNLP 2020 5 / 34
⊕ H S 0 ⊕ H 0 ⊕ ⊕ ⊕ H X T 0 ⊕ 0 Z Z ⊕ 0 π π π π 2 2 2 2 π π π 2 2 2 π π π π π 2 2 2 4 π π Aleks Kissinger QNLP 2020 6 / 34
⊕ H S 0 ⊕ H 0 ⊕ ⊕ ⊕ H X T 0 ⊕ 0 Z Z ⊕ 0 π π π π 2 2 2 2 π π π 2 2 2 π π π π π 2 2 2 4 π π Aleks Kissinger QNLP 2020 6 / 34
π π π π 2 2 2 2 π π π 2 2 2 π π π π π 2 2 2 4 π π Aleks Kissinger QNLP 2020 6 / 34
π π π π 2 2 2 2 π π π 2 2 2 π π π π π 2 2 2 4 π π ZX-diagram Aleks Kissinger QNLP 2020 6 / 34
ZX-diagrams ...are made of spiders : 1 0 � � ... 0 0 = α ... ... ... 0 0 e i α 0 � 1 � 1 1 := � � := √ ... ... α α ... ... 1 − 1 2 Aleks Kissinger QNLP 2020 7 / 34
π 2 β 3 π 2 α π Aleks Kissinger QNLP 2020 8 / 34
β 3 π α 2 π π 2 Aleks Kissinger QNLP 2020 8 / 34
β π 3 π α 2 π 2 Aleks Kissinger QNLP 2020 8 / 34
1 ZX calculus these 8 rules = ⇒ everything before 1 Vilmart 2018. arXiv:1812.09114 Aleks Kissinger QNLP 2020 9 / 34
⊕ H S 0 ⊕ H 0 ⊕ ⊕ ⊕ 0 H X T ⊕ Z Z 0 ⊕ 0 Aleks Kissinger QNLP 2020 10 / 34
π π π π 2 2 2 2 π π π 2 2 2 π π π π π 2 2 2 4 π π Aleks Kissinger QNLP 2020 10 / 34
π π π 2 2 π π π 2 2 2 π π π π π 2 2 2 4 2 π Aleks Kissinger QNLP 2020 10 / 34
π π π 2 2 π π 2 2 π π π π 2 2 4 Aleks Kissinger QNLP 2020 10 / 34
π π π 2 2 π π 2 2 π π π π 2 2 4 Aleks Kissinger QNLP 2020 10 / 34
π π 2 π π 2 2 π π π π 2 2 4 Aleks Kissinger QNLP 2020 10 / 34
π 2 π π 4 Aleks Kissinger QNLP 2020 10 / 34
π 2 π 4 Aleks Kissinger QNLP 2020 10 / 34
π 2 π 4 Aleks Kissinger QNLP 2020 10 / 34
π 2 π 4 Aleks Kissinger QNLP 2020 10 / 34
Q: How do we scale up? π π π π 2 2 2 2 π π π 2 2 2 ≪ π π π π π 2 2 2 4 π π � �� � ∼ 30 spiders � �� � 10 3 - 10 7 spiders A: Automation. Aleks Kissinger QNLP 2020 11 / 34
Quantomatic • General-purpose, medium scale tool for teaching and experimenting with graphical calculi Aleks Kissinger QNLP 2020 12 / 34
PyZX • Special-purpose, large scale circuit optimisation tool for ZX-calculus Aleks Kissinger QNLP 2020 13 / 34
The idea 1. Turn equations into directed rewrite rules ... ... ... = ⇒ ... α α = → ... ... ... ... α + β α + β ... ... ... ... β β β β ... ... 2. Use rewrite rules to simplify ZX-diagrams 3. Extract meaningful data from simplified diagram (e.g. optimised circuits, amplitudes/probabilities, ...). Aleks Kissinger QNLP 2020 14 / 34
Clifford circuits • Built from: CNOT := H := S := π 2 • Efficient to classically simulate (Gottesman-Knill) • Expressible by Clifford ZX-diagrams ... 2 ... ... 2 ... ; k ∈ Z ❦ π ❦ π Aleks Kissinger QNLP 2020 15 / 34
Clifford ZX-calculus ... ... = ... ... α = α = ... ... ... ... α + β α + β ... ... = ... ... β β β β ... ... = = = ... ... ... ... ... ... ... ... α α π π π 2 2 2 complete for Clifford ZX-diagrams Aleks Kissinger QNLP 2020 16 / 34
Equations � Rewrite rules Aleks Kissinger QNLP 2020 17 / 34
Equations � Rewrite rules ... ... = ... ... α = α = ... α + β ... ... α + β ... ... ... = ... ... β β β β ... ... = = = ... ... ... ... ... ... ... ... α α π π π 2 2 2 Aleks Kissinger QNLP 2020 17 / 34
Equations � Rewrite rules ... ... → ... ... α → α → ... α + β ... ... α + β ... ... ... → ... ... β β β β ... ... = = = ... ... ... ... ... ... ... ... α α π π π 2 2 2 Aleks Kissinger QNLP 2020 17 / 34
Equations � Rewrite rules ... ... → ... ... α → α → ... α + β ... ... α + β ... ... ... → ... ... β β β β ... ... → = = ... ... ... ... ... ... ... ... α α π π π 2 2 2 Aleks Kissinger QNLP 2020 17 / 34
π 2 3 π 2 π Aleks Kissinger QNLP 2020 18 / 34
π 2 3 π 2 π Aleks Kissinger QNLP 2020 18 / 34
π 2 3 π 2 π Aleks Kissinger QNLP 2020 18 / 34
Equations � Rewrite rules ... ... → ... ... α → α → ... α + β ... ... α + β ... ... ... → ... ... β β β β ... ... → = = ... ... ... ... ... ... ... ... α α π π π 2 2 2 Aleks Kissinger QNLP 2020 19 / 34
Equations � Rewrite rules ... ... → ... ... α → α → ... α + β ... ... α + β ... ... ... → ... ... β β β β ... ... → = = ... ... ... ... ... ... ... ... α α π π π 2 2 2 Aleks Kissinger QNLP 2020 19 / 34
Aleks Kissinger ... ... ... α ... ... α β β ... ... → → ... ... α + β α Equations � Rewrite rules ... ... ... ... ... ... ❥ π ... α ... ❦ π ... ... β β ... ... ... → = ... ... ... ... ❦ π ❦ π α + β ... ... ❥ π ❥ π ... ... ... ... ... ± π 2 ... ... ... → → = ... ... QNLP 2020 ∓ π ∓ π ... 2 2 ... ... ... ∓ π ∓ π 2 2 ... ... 19 / 34
Aleks Kissinger ... ... ... α ... ... α β β ... ... → → ... ... α + β α Equations � Rewrite rules ... ... ... ... ... ... ❥ π ... α ... ❦ π ... ... β β ... ... ... → → ... ... ... ... ❦ π ❦ π α + β ... ... ❥ π ❥ π ... ... ... ... ... ± π 2 ... ... ... → → → ... ... QNLP 2020 ∓ π ∓ π ... 2 2 ... ... ... ∓ π ∓ π 2 2 ... ... 19 / 34
Equations � Rewrite rules ... ... → ... ... α → α → ... α + β ... ... α + β ... ... ... → ... ... β β β β ... ... pivoting local complementation ... ... ... ∓ π ∓ π ... ... ... ... ... ❥ π ... 2 2 ❦ π → → → ... ... ... ... ... ... ... ... ... ... ... ... α α ❥ π ± π ❦ π 2 ... ... ... ... ... ❥ π ❦ π ... ... ... ... ∓ π ∓ π 2 2 Aleks Kissinger QNLP 2020 19 / 34
Computing the skeleton 3 π 3 π 3 π π π π ... 2 2 2 2 2 2 π π π π 3 π 3 π 2 4 2 2 2 2 ... π π π 3 π 3 π 2 2 2 2 2 ... 5 π π π 3 π 4 2 2 2 ... 3 π π 3 π ... 2 ... 2 2 3 π 3 π 3 π π ... 2 ... 2 2 4 3 π π π ... 2 2 ... 2 π π ... ... 2 2 3 π 3 π 3 π 3 π π π ... ... 2 2 2 2 2 2 3 π 3 π π π ... ... 2 2 2 2 3 π π π π ... ... 2 2 2 2 π π ... 2 2 ... 3 π π π π 3 π π ... 2 2 2 2 2 2 3 π 3 π 3 π π ... 2 4 2 2 π π π ... 2 2 2 π π π π ... 2 2 2 2 π ⇒ 5 π 4 π 4 π 2 π π π π 2 4 4 Aleks Kissinger QNLP 2020 20 / 34
ZX-diagram � circuit? π 5 π 4 π 4 π 2 π π π π 2 4 4 • ZX-diagrams can represent any linear map, but circuits are always unitary • = ⇒ not all ZX-diagrams are equal to circuits • All unitary ZX-diagrams can be written as circuits, but at what cost??? Aleks Kissinger QNLP 2020 21 / 34
Problem (Circuit extraction problem) Given a ZX-diagram that represents a unitary linear map, find an equivalent quantum circuit. Conjecture If the circuit extraction problem is solvable with polynomial overhead, then BQP = PostBQP. = ⇒ need heuristics or extra data Aleks Kissinger QNLP 2020 22 / 34
Recommend
More recommend