Ross Duncan 10 YEARS of ZX
Total Page:16
File Type:pdf, Size:1020Kb
Introduction to the ZX-calculus Ross Duncan 10 YEARS OF ZX The story in 3 parts : 1 : Introduction to the ZX-calculus (past 10+ years) 2 : Completeness of ZX-calculus (past ~1 year) (Simon Perdrix) 3 : The ZH-calculus (next 10 years!) (Miriam Backens) What is the ZX-calculus? 1. Formal Theory for quantum computing • Diagrammatic syntax for representing quantum processes • Axioms expressing equalities between diagrams • Sound interpretation of diagrams as linear maps What is the ZX-calculus? 2. A graph rewriting system • A language of labelled graphs • Rewrite rules expressing equations • “Compute” by double push-out rewriting What is the ZX-calculus? 3. A particular class of tensor networks • Index free diagrammatic presentation • Simple contraction rules • Transformation laws between different presentations of the same tensor What is the ZX-calculus? 4. Categorical algebraic theory • A PROP whose morphisms are diagrams • Distributive laws between: • Frobenius algebras • Hopf Algebras • Abelian groups • Some other axioms What is the ZX-calculus? 5. Intermediate representation for quantum programs • Architecture independent • Formal theory of “program” transformations • Suggestive of more basic operations than the usual unitary gates 0. Motivations Transistors are shrinking 10000 1000 100 Feature Size (nm) Log-scale Feature 1972 1988 2005 2016 10 1 1970 1980 1990 2000 2010 2020 Transistors are shrinking 10000 1000 100 Feature Size (nm) Log-scale Feature 1972 1988 2005 2016 10 Quantum effects become important 1 1970 1980 1990 2000 2010 2020 Quantum Computing • IDEA: exploit quantum effects for computation • Fast algorithms (Shor, Grover) • Simulate physical systems (chemistry, materials) • Novel cryptographic protocols (QKD, blind computing) • …. and more. Quantum Computing announced: 75 qubit machine in the lab Quantum Computing 16 qubits target: 50 qubit machine for sale by 2021 Quantum Computing target: 400 qubits by 2020 Motivations Motivations Motivations Motivations Motivations λx.λy.λz.xz(yz) Motivations Motivations Motivations Hilbert space, unitary transforms, self-adjoint operators.... Motivations ???? Hilbert space, unitary transforms, self-adjoint operators.... The need for abstraction: This is an 8-bit adder D ~ 2^1764 What’s so special about quantum? What’s so special about quantum? Seek a mathematical answer. Superposition? Superposition? Superposition? Classical waves can exhibit superposition too! No-Cloning and No-Deleting Theorem: There are no unitary operations D such that D : ⇥ ⇥ ⇥ | ⌅ ⇤⇥ | ⌅| ⌅ D : φ φ φ | ⌅ ⇤⇥ | ⌅| ⌅ unless ψ and φ are orthogonal [Wooters & Zurek 1982] | | Theorem: There are no unitary operations E such that E : ⇥ 0 | ⇤ ⇥ | ⇤ E : φ 0 | ⇤ ⇥ | ⇤ unless ψ and φ are orthogonal [Pati & Braunstein 2000] | | No-Cloning and No-Deleting Linear types have been proposed* to capture this: !AAB Separate classical and quantum data⊗ in a hybrid machine ** Hensinger et al Nature 2005 But we need additional axioms to get the QM-like behaviour *vanTonder 2003, Selinger and Valiron 2005, Arrighi and Dowek 2003, Altenkirch & Grattage 2005 Non-locality or Contextuality? * Aspect et al PRL 1981 Non-locality or Contextuality? But! “generalised probabilistic theories” display even stronger non-locality than quantum theory! Many aspects of contextuality appear in classical settings like databases and NLP! * Aspect et al PRL 1981 Complementarity Quantum systems have properties which are not accessible at the same time. They are not even simultaneously well-defined! 1. Quantum Theory in 5 minutes 1. Quantum Theory in 5* minutes *Might be more than 5 1. Quantum states are represented by unit vectors in a complex Hilbert space. 0 , 1 , 1 ( 0 + 1 ) 2 =: | ⇤ | ⇤ √2 | ⇤ | ⇤ ∈ Q 0 | 0 + eiα 1 | | 1 | 2. The state space formed by combining two or more systems is the tensor product of their individual state spaces 010 := 0 1 0 2 2 2 = 3 | ⌅ | ⌅| ⌅| ⌅⇥ ⊗ ⊗ Q 3. For each discrete time step, an undisturbed quantum system evolves according to a unitary operator acting on its state space X, Z, H : X, Z : Q2 Q2 Q → Q ⇤ ⇤ → ...but the quantum state is not directly accessible... more on this later! Example: Z-Rotation 0 | 1 | Quantum Circuits Ψ Input register “Time” | Í 2n - 2n U : C C Unitary gates ΨÕ Output register | Í Universality We say that a model of quantum computation is universal if it can represent all unitary maps. The circuit model requires a small set of gates to be universal: Universality We say that a model of quantum computation is universal if it can represent all unitary maps. The circuit model requires a small set of gates to be universal: Example 3.9 (Bell state). A Bell state, 00 + 11 , is prepared by the circuit | Í | Í below, on the left. 0 0 | Í | Í Q R H T H = ú ú ú æ æ æ c d c d c d c d a b The corresponding zx-calculus derivation is a proof of the correctness of this circuit. To simplifyQuantum the next Circuits example, we introduce some shorthand for some useful Example 3.9 (Bell state). A Bell state, 00 + 11 , is prepared by the circuit circuit elements. | Í | Í below, on the left. 0 0 | Í | Í H 0 + | Í Q R H T H Z= := ú ú| Í := ú æ æ Hæ c d c d H c d c d a b ThePreparing corresponding a Bell statezx-calculusControlled- derivation gate is a proof of the correctness of this circuit.Example 3.10 (1D-cluster state). A 1-dimensional cluster state consists of a collection qubits 1,...,n initialised in the state + = 0 + 1 , which are then Z | Í | Í | Í entangledTo simplify by the applying next example, a Z operation we introduce to qubits somei and shorthandi 1, and for some to i and usefuli +1. · ≠ circuitThe corresponding elements. circuit is shown below: ... + + + + ... ... ... | Í | Í | Í |HÍ 0 Q R H H H T Z Z Z = + | Í Z := | Í := c d ... H H H ... c ... Z Z ... d c H d c d a b The zx-calculus translation can be radically simplified by repeated use of the Examplespider rule: 3.10 (1D-cluster state). A 1-dimensional cluster state consists of a collection qubits 1,...,n initialised in the state + = 0 + 1 , which are then ... ... | Í | Í | Í entangled by applying a Z operation to qubits i and i 1, and to i and i +1. H H · H ... H H≠ H H H ... The corresponding circuit is shown below:ú ... H H ... æ ... + + + + ... ... ... | Í | Í | Í | Í Q The 1D-cluster is a special case of a moreR generalH class of states:H graphH states. T These statesZ are the basisZ of measurement-basedZ = quantum computation, and will c d ... H H ... cplay... an importantZ role later inZ the paper.... d c d c d a b The3.2zx-calculus Circuit-like translation diagrams can be radically simplified by repeated use of the spider rule: While the preceding has demonstrated the ease with quantum circuits can be ...translated into diagrams, there... are many diagrams which do not correspond to ... ... H H H ú H H H H H æ ... H H ... 16 The 1D-cluster is a special case of a more general class of states: graph states. These states are the basis of measurement-based quantum computation, and will play an important role later in the paper. 3.2 Circuit-like diagrams While the preceding has demonstrated the ease with quantum circuits can be translated into diagrams, there are many diagrams which do not correspond to 16 Quantum Observables 4. Each observable quantity O is represented as self-adjoint operator Oˆ = λ e e : i i | i⇥ i| λ ˆ •The possible values of O are the eigenvalues i of O When we observe O for a system in state ψ , there is • 2 | probability e ψ of observing λ . i | ⇥ i •If λ i is the outcome of the measurement, the system is then in state e i . | X and Z Spins We can measure the spin of qubit ⇤ = α 0 + ⇥ 1 | | | 10 01 Z = X = 0 1 10 − ⇥ ⇥ α 0 + ⇥ 1 | ⇥ | ⇥ p =( p =( 2 α α 2 α + ⇥ −⇥ = ⇥ ) = p ) / p / 2 2 2 2 ⇥ ⇥ 0 1 + | ⇥ | ⇥ | ⇥ |⇥ X and Z Spins We can measure the spin of qubit ⇤ = α 0 + ⇥ 1 | | | 10 01 Z = X = 0 1 10 − ⇥ ⇥ 0 | ⇥ p p =1 =1 =1 / p =0 / 2 p 2 ⇥ ⇥ 0 1 + | ⇥ | ⇥ | ⇥ |⇥ Quantum Observables Measuring A then B may give a different answer than measuring B first then A! Not all observables are well defined at the same time: • Two observables are compatible if their operators commute • Two operators commute if they have the same eigenvectors • Identify a non-degenerate observable with its eigenbasis Incompatible Observables a0 b0 b1 a1 Complementary Observables a0 b1 b0 a1 1 ai bj = | | ⇥| ⌅D Complementary Observables a0 b1 b0 a1 1 ai bj = “Mutually Unbiased Bases” | | ⇥| ⌅D 2. Diagrammatic Languages PAST / HEAVEN FUTURE / HELL Why Diagrams? Why Diagrams? 100 0 1 1 010 0 01 ⇤ ⇤ ⌅ ⌅ 2 1 ⇥ 001 0 ⇥ 10 ⇥ ⇥ ⌥ ⌥ 000ei⇤ ⌥ ⌥ ⇧ ⇧ ⌃ ⌃ 1000 1000 11 01 0010 ⇤⇤ ⇤ ⇤ ⌅⌅ ⇤ 0001 ⇥ 1 1 ⇤ 10 ⇥ 0100 ⇤ ⇥ − ⇥⇥ ⇥ ⌥⌥ ⌥ ⌥ 0001 ⌥⌥ ⌥ ⌥ ⇧⇧ ⇧ ⇧ ⌃⌃ 1000 0100 10 10 ⇤⇤ ⌅ ⌅⌅ ⌅ = ? 0001 ⇥ 01 ⇥ 01 ⇥ ⇥ ⌥⌥ 0010 ⌥⌥ ⇧⇧ ⌃ ⌃⌃ ⌃ 1000 100 0 0100 cos ⌅ 10 010 0 ⇤⇤ ⌅ 6 ⌅ ⇤ ⌅ ⇤ 0001 ⇤ i sin ⌅ ⇥ 0 ei⇥ ⇥ 001 0 6 ⇥ ⇥⇥ ⌥⌥ 0010 ⌥ 000eiα ⌥⌥ ⌥ ⇧⇧ ⌃ ⌃ ⇧ ⌃ Diagrams A B j : A B C D E j ⊗ ⇥ ⊗ ⊗ C D E Diagrams Input Systems A B j : A B C D E j ⊗ ⇥ ⊗ ⊗ C D E Diagrams Input Systems A B j : A B C D E j ⊗ ⇥ ⊗ ⊗ C D E Output Systems Diagrams Input Systems A B j : A B C D E j Interaction, ⊗ ⇥ ⊗ ⊗ or process, or state change, or ... C D E Output Systems Monoidal Categories f : A Bg: B Ch: C D → → → A B C f g h B C D Monoidal Categories f : A Bg: B Ch: C D → → → A B C f g h B C D g f : A C ◦ ⇥ A f B g C Monoidal Categories f : A Bg: B Ch: C D → → → A B C f g h B C D g f : A C ◦ ⇥ A f h : A C B D f ⊗ ⊗ ⇥ ⊗ A C B f h g B D C Monoidal Categories A f A C B A B C f h g f g h B D C B C D g k h C E D Monoidal Categories Monoidal categories have a special unit object called I which is a left and right identity for the tensor: I A = A = A I ⊗ ⊗ id f = f = f id I ⊗ ⊗ I No lines are drawn for I in the graphical notation: ⇥ : I A φ† : A I φ† ⇥ : I I ⇥ ⇥ ◦ ⇥ ⇥ : I A φ† : A I φ†⇥ :⇥I : I A I φ† : A I φ† ⇥ : I I ⇥ ⇥ ◦ ⇥ ⇥ ⇥ ◦ ⇥ ⇥ : I A φ⇥† : IA AI φ† : A⇥ : I I I φ† ⇥ : I I ⇥ ⇥⇥ ◦ ⇥ ⇥ ◦ ⇥ Graphical Calculus Theorem Thm: one diagram can be deformed to another iff their denotations are equal by the structural equations of the category.