Introduction to Quirk Daniel Gauthier Department of Physics

  • Slides: 43
Download presentation
Introduction to Quirk Daniel Gauthier Department of Physics http: //wccftech. com/quantum-computers-get-stable-qubits/ OSU Quantum Information

Introduction to Quirk Daniel Gauthier Department of Physics http: //wccftech. com/quantum-computers-get-stable-qubits/ OSU Quantum Information Seminar September 21, 2018 1

Future of computing GPU CPU Quantum Processor Unit QPU We are still in the

Future of computing GPU CPU Quantum Processor Unit QPU We are still in the “nuts and bolts” stage, but rapid progress in the past couple of years Quantum internet The quantum processor will be best suited to speed up “hard” problems Software is being developed to make accessing a QPU easier (e. g. , Rigetti mixed classical and noisy quantum processors) 2

Outline • • Physical qubits IBM quantum experience quirk Single-qubit gates Two-qubit gates Classical

Outline • • Physical qubits IBM quantum experience quirk Single-qubit gates Two-qubit gates Classical Fourier transform Quantum Fourier transform 3

Simple quantum picture of an atom Bohr’s model of the hydrogen atom postulates that

Simple quantum picture of an atom Bohr’s model of the hydrogen atom postulates that the electron behaves as a wave (de Broglie wave) and that an integral number m of waves must fit in a close orbit Quantized angular momentum Hydrogen: 1 proton + 1 electron http: //slideplayer. com/slide/6042548/ And energy! 4

Discrete energy “levels” m=3 m=2 energy m=1 Quantum jumps between energy states go hand-in-hand

Discrete energy “levels” m=3 m=2 energy m=1 Quantum jumps between energy states go hand-in-hand with photon emission or absorption https: //en. wikipedia. org/wiki/Bohr_model T 1 time 5

Matter qubit “any” energy eigenstates can be used to realize a qubit energy Can

Matter qubit “any” energy eigenstates can be used to realize a qubit energy Can induce transitions or create superposition states by shining resonate light on the atom The sharpness of the levels allows us to ignore all of the other energy states a and b are complex probability amplitudes 6

A graphical method for describing the state of a qubit Bloch sphere A qubit

A graphical method for describing the state of a qubit Bloch sphere A qubit is described by a complex vector space! T 2 time describes the time scale for decay of superposition state A qubit state requires specifying two probability amplitudes a and b, which are complex. But there is a normalization condition, so requires 2(21 -1)=2 independent real numbers https: //en. wikipedia. org/wiki/Qubit 7

Interpretation of points on the Bloch sphere Atom is in the ground state Atom

Interpretation of points on the Bloch sphere Atom is in the ground state Atom is in a superposition state Atom is in the exited state https: //en. wikipedia. org/wiki/Qubit Errors: “z” errors, “x” errors (or “xy” errors) 8

Outline • • Physical qubits IBM quantum experience quirk Single-qubit gates Two-qubit gates Classical

Outline • • Physical qubits IBM quantum experience quirk Single-qubit gates Two-qubit gates Classical Fourier transform Quantum Fourier transform 9

Noisy quantum computers can be accessed over the web IBM Quantum Experience 10

Noisy quantum computers can be accessed over the web IBM Quantum Experience 10

Quantifying noisy IBM Quantum Experience 11

Quantifying noisy IBM Quantum Experience 11

Quantum Composer IBM Quantum Experience 12

Quantum Composer IBM Quantum Experience 12

Outline • • Physical qubits IBM quantum experience quirk Single-qubit gates Two-qubit gates Classical

Outline • • Physical qubits IBM quantum experience quirk Single-qubit gates Two-qubit gates Classical Fourier transform Quantum Fourier transform 13

Quirk is similar to the IBM Quantum Composer, but is a bit easier to

Quirk is similar to the IBM Quantum Composer, but is a bit easier to use for a first-time user wanting to explore gate-level programming of a quantum computer https: //algassert. com/quirk (search on “quirk quantum”) Written by a quantum information scientist in his “spare time, ” now is a Google engineer 14

Quirk is a classical simulation tool The back-end of quirk evaluations the operation of

Quirk is a classical simulation tool The back-end of quirk evaluations the operation of the quantum circuit using the rules of quantum mechanics using a classical computer There will be no “speed up” because we are evaluating quantum theory on a classical computer, but you can start to learn how a quantum computer operates at the gate level (think of machine language programming in the early days of classical computing, assembly language, etc. ) 15

Limitations of Quirk In quantum theory, a many qubit system is represented by a

Limitations of Quirk In quantum theory, a many qubit system is represented by a state that is a tensor product of the individual qubit states Specifying the state of an n-qubit system requires a complex vector that is size 2 n (but the normalization condition reduces this somewhat). Need 2(2 n-1) independent real numbers to specify the state (even though there are only n physical qubits) 220 = 1. 0× 106 225 = 3. 4× 107 250 = 1. 1× 1015 Quirk can handle ~20 -30 qubits depending on the problem 16

Two qubits https: //algassert. com/quirk#circuit={%22 cols%22: []} 17

Two qubits https: //algassert. com/quirk#circuit={%22 cols%22: []} 17

Two qubits (n=2) 18

Two qubits (n=2) 18

Vector/matrix representation of quantum states Using vector/matrix representation of quantum states Matrix form Start

Vector/matrix representation of quantum states Using vector/matrix representation of quantum states Matrix form Start in state as Quirk assumes (and IBM machine attempts to initialize in this state) 19

Outline • • Physical qubits IBM quantum experience quirk Single-qubit gates Two-qubit gates Classical

Outline • • Physical qubits IBM quantum experience quirk Single-qubit gates Two-qubit gates Classical Fourier transform Quantum Fourier transform 20

A “Hamiltonian” is use to describe qubit operation In quantum theory, the effect of

A “Hamiltonian” is use to describe qubit operation In quantum theory, the effect of a gate operation (manipulation of one or more qubits) is described mathematically by a Hamiltonian. In gate-based quantum computing, we can write a general quantum algorithm in terms of single- and two-qubit gates. A physically realizable Hamiltonian appropriate for quantum operations will have the form of a 2 n × 2 n Hermitian matrix with 22 n independent real numbers. The matrix is also unitary. 21

Creating a superposition of a single qubit Single qubit (n=1) gate known as the

Creating a superposition of a single qubit Single qubit (n=1) gate known as the Hadamard operator creates a superposition state. Requires a 21 × 21 Hermitian matrix Start in state Output state 22

Hadamard gate in Quirk https: //algassert. com/quirk#circuit={%22 cols%22: [[%22 H%22]]} 23

Hadamard gate in Quirk https: //algassert. com/quirk#circuit={%22 cols%22: [[%22 H%22]]} 23

Quantum NOT gate (Pauli-X gate) Matrix form 24

Quantum NOT gate (Pauli-X gate) Matrix form 24

Outline • • Physical qubits IBM quantum experience quirk Single-qubit gates Two-qubit gates Classical

Outline • • Physical qubits IBM quantum experience quirk Single-qubit gates Two-qubit gates Classical Fourier transform Quantum Fourier transform 25

Two qubit system (n=2) The state of the system is described in terms of

Two qubit system (n=2) The state of the system is described in terms of the tensor product of the two individual states We need 22=4 complex probability amplitudes. Using the “computational” basis states, find Base-10 (decimal) 26

n-qubit gates An n-qubit gate is described by a 2 n× 2 n Hermitian

n-qubit gates An n-qubit gate is described by a 2 n× 2 n Hermitian matrix Requires a lot of multiplications when n is large! 27

Controlled-NOT two-qubit gate Controlled NOT: state of “target” qubit depends on state of “control”

Controlled-NOT two-qubit gate Controlled NOT: state of “target” qubit depends on state of “control” qubit Matrix form 28

Creating an entangled state Output state can’t be written as the product of the

Creating an entangled state Output state can’t be written as the product of the two qubit states 29

Creating an entangled state: matrix representation 30

Creating an entangled state: matrix representation 30

CNOT gate in quirk, making an entangled state https: //algassert. com/quirk#circuit={%22 cols%22: [[%22 H%22]]}

CNOT gate in quirk, making an entangled state https: //algassert. com/quirk#circuit={%22 cols%22: [[%22 H%22]]} 31

Outline • • Physical qubits IBM quantum experience quirk Single-qubit gates Two-qubit gates Classical

Outline • • Physical qubits IBM quantum experience quirk Single-qubit gates Two-qubit gates Classical Fourier transform Quantum Fourier transform 32

Classical Discrete Fourier Transform Linear transformation of a set of N complex numbers xa

Classical Discrete Fourier Transform Linear transformation of a set of N complex numbers xa {x 0, x 1, …, x. N-1} time/frequency, used to find the “spectrum” of a set of time series data N 2 multiplications (Fast Fourier Transform requires (N log 2 N) multiplications) 33

Classical Discrete Fourier Transform: Matrix Form Linear transformation of a set of N complex

Classical Discrete Fourier Transform: Matrix Form Linear transformation of a set of N complex numbers xa {x 0, x 1, …, x. N-1} Unitary matrix N×N matrix N× 1 vector 34

Classical Discrete Fourier Transform: Matrix Form Linear transformation of a set of N complex

Classical Discrete Fourier Transform: Matrix Form Linear transformation of a set of N complex numbers xa {x 0, x 1, …, x. N-1} Unitary matrix N×N matrix Quantum concept: N× 1 vector Use n qubits to represent the vector, where N=2 n or n=log 2 N Classical simulation still takes N memory elements and an N×N matrix. 35

Outline • • Physical qubits IBM quantum experience quirk Single-qubit gates Two-qubit gates Classical

Outline • • Physical qubits IBM quantum experience quirk Single-qubit gates Two-qubit gates Classical Fourier transform Quantum Fourier transform 36

Quantum Fourier Transform Use decimal short-hand notation for the quantum states If the initial

Quantum Fourier Transform Use decimal short-hand notation for the quantum states If the initial states are computational basis states (xa = 0 or 1), can just initialize the input qubits in either the state or Factoring integers via Shor’s algorithm requires a method for finding the period of a sequence of numbers, which only requires a quantum Fourier transform using these basis states 37

Quantum Fourier Transform Use decimal short-hand notation for the quantum states If the initial

Quantum Fourier Transform Use decimal short-hand notation for the quantum states If the initial states are computational basis states (xa = 0 or 1), can just initialize the input qubits in either the state or Factoring integers via Shor’s algorithm requires a method for finding the period of a sequence of numbers, which only requires a quantum Fourier transform using these basis states (Have a very long sequence of binary numbers and need to find when a pattern repeats in the sequence) 38

Quantum Fourier Transform for 3 qubits (n=3) Decimal notation Binary notation These quantum states

Quantum Fourier Transform for 3 qubits (n=3) Decimal notation Binary notation These quantum states require 23 = 8 complex numbers to specify Or 23 = 8 complex numbers are represented by these states is represented by an 8 × 8 matrix How do we realized usingle- and two-qubit gates? 39

Phase gate Circuit requires a Hadamard gate and a controlled “phase gate” Single-qubit version

Phase gate Circuit requires a Hadamard gate and a controlled “phase gate” Single-qubit version of phase gate (operation on target gate): Rotate the state about the z-axis by p/2 Rotate the state about the z-axis by p/4 40

QFT circuit for n=3 Requires n(n+1)/2 gates (there are more efficient circuits) Performs the

QFT circuit for n=3 Requires n(n+1)/2 gates (there are more efficient circuits) Performs the Fourier transform for 23 = 8 classical bits Output state of circuit SWAP gate 41

QFT Quirk (n=3) https: //algassert. com/quirk#circuit={%22 cols%22: [[1, %22 X%22], [%22 H%22], [ %22

QFT Quirk (n=3) https: //algassert. com/quirk#circuit={%22 cols%22: [[1, %22 X%22], [%22 H%22], [ %22 Z%22, %22%E 2%80%A 2%22], [%22 Z^%C 2%BD%22, 1, %22%E 2%80%A 2%22], [1, %22 H %22], [1, %22 Z%22, %22%E 2%80%A 2%22], [1, 1, %22 H%22]]} 42

Summary • Quirk is an easy-to-use simulation tool for gate-based quantum computation • The

Summary • Quirk is an easy-to-use simulation tool for gate-based quantum computation • The quantum Fourier transform has an exponential speed up in comparison to its classical counterpart because • n qubits represent a N=2 n sequence of binary numbers • the QFT only requires n(n+1)/2 gates where as the classical FT requires N 2 multiplications (or N log 2 N for the FFT) 43