Hands-on Introduction to Qiskit
Stefan Kühn
Workshop on Quantum Computing and Quantum Sensors DESY, 18 August 2020 Current NISQ devices have already outperformed classical devices Commercially/openly available devices I D-Wave I IBM Quantum Experience I Rigetti Computing I IONQ I ... Image taken from https://ai.googleblog.com/2019/10/quantum-supremacy-using-programmable.html Arute et al., Nature 574, 505 (2019)
dummy Motivation
On the verge of the NISQ era Noisy Intermediate-Scale Quantum (NISQ) technology is available Noise signicantly limits the circuit depths that can be executed reliably
J. Preskill, Quantum 2, 79 (2018) Commercially/openly available devices I D-Wave I IBM Quantum Experience I Rigetti Computing I IONQ I ...
dummy Motivation
On the verge of the NISQ era Noisy Intermediate-Scale Quantum (NISQ) technology is available Noise signicantly limits the circuit depths that can be executed reliably Current NISQ devices have already outperformed classical devices
J. Preskill, Quantum 2, 79 (2018) Image taken from https://ai.googleblog.com/2019/10/quantum-supremacy-using-programmable.html Arute et al., Nature 574, 505 (2019) dummy Motivation
On the verge of the NISQ era Noisy Intermediate-Scale Quantum (NISQ) technology is available Noise signicantly limits the circuit depths that can be executed reliably Current NISQ devices have already outperformed classical devices Commercially/openly available devices I D-Wave I IBM Quantum Experience I Rigetti Computing I IONQ I ... J. Preskill, Quantum 2, 79 (2018) Image taken from https://ai.googleblog.com/2019/10/quantum-supremacy-using-programmable.html Arute et al., Nature 574, 505 (2019) dummy Outline
1 Motivation
2 Basics of the circuit model of quantum computing
3 The Qiskit SDK
4 Hands-on Exercises
5 Further reading & Outlook |0i
θ sin(θ) cos(φ)
φ ~r = sin(θ) sin(φ) 0 1 | i + i | i cos(θ)
|0i + |1i
|1i
dummy Basics of the circuit model of quantum computing
Quantum bits Qubit: two-dimensional quantum system Hilbert space H with basis {|0i , |1i} Contrary to classical bits, it can be in a superposition θ 0 iφ θ 1 |ψi = cos 2 | i + e sin 2 | i dummy Basics of the circuit model of quantum computing
Quantum bits Qubit: two-dimensional quantum system Hilbert space H with basis {|0i , |1i} Contrary to classical bits, it can be in a superposition θ 0 iφ θ 1 |ψi = cos 2 | i + e sin 2 | i
|0i
θ sin(θ) cos(φ)
φ ~r = sin(θ) sin(φ) 0 1 | i + i | i cos(θ)
|0i + |1i
|1i 1 1 √ 0 1 √ 0 1 = 2 (| i + | i) ⊗ 2 (| i + | i) ⇒ product state 1 √ 0 0 1 1 I |ψ2i = 2 (| i ⊗ | i + | i ⊗ | i) ⇒ entangled state (Bell state) In the following ⊗ often suppressed: |0i ⊗ |0i → |0i |0i , |00i
dummy Basics of the circuit model of quantum computing
Quantum bits n qubits: Hilbert space is the tensor product H ⊗ · · · ⊗ H | {z } n times Most general state in the computational basis
1 X |ψi = ci1...in |i1i ⊗ · · · ⊗ |iN i i1,...,in=0 A quantum state that cannot be factored as a tensor product of states of its local constituents is called entangled 1 0 0 0 1 1 0 1 1 I |ψ1i = 2 (| i ⊗ | i + | i ⊗ | i + | i ⊗ | i + | i ⊗ | i) ⇒ entangled state (Bell state) In the following ⊗ often suppressed: |0i ⊗ |0i → |0i |0i , |00i
dummy Basics of the circuit model of quantum computing
Quantum bits n qubits: Hilbert space is the tensor product H ⊗ · · · ⊗ H | {z } n times Most general state in the computational basis
1 X |ψi = ci1...in |i1i ⊗ · · · ⊗ |iN i i1,...,in=0 A quantum state that cannot be factored as a tensor product of states of its local constituents is called entangled 1 0 0 0 1 1 0 1 1 I |ψ1i = 2 (| i ⊗ | i + | i ⊗ | i + | i ⊗ | i + | i ⊗ | i) 1 1 √ 0 1 √ 0 1 = 2 (| i + | i) ⊗ 2 (| i + | i) ⇒ product state 1 √ 0 0 1 1 I |ψ2i = 2 (| i ⊗ | i + | i ⊗ | i) dummy Basics of the circuit model of quantum computing
Quantum bits n qubits: Hilbert space is the tensor product H ⊗ · · · ⊗ H | {z } n times Most general state in the computational basis
1 X |ψi = ci1...in |i1i ⊗ · · · ⊗ |iN i i1,...,in=0 A quantum state that cannot be factored as a tensor product of states of its local constituents is called entangled 1 0 0 0 1 1 0 1 1 I |ψ1i = 2 (| i ⊗ | i + | i ⊗ | i + | i ⊗ | i + | i ⊗ | i) 1 1 √ 0 1 √ 0 1 = 2 (| i + | i) ⊗ 2 (| i + | i) ⇒ product state 1 √ 0 0 1 1 I |ψ2i = 2 (| i ⊗ | i + | i ⊗ | i) ⇒ entangled state (Bell state) In the following ⊗ often suppressed: |0i ⊗ |0i → |0i |0i , |00i Typically gates only act on a few qubits in a nontrivial way
U
dummy Basics of the circuit model of quantum computing
Quantum gates Quantum mechanics is reversible, |ψi undergoes unitary evolution under some (time-dependent) Hamiltonian H(t)
Z t |ψ(t)i = T exp −i ds H(s) |ψ0i 0 Quantum gates are represented by unitary matrices dummy Basics of the circuit model of quantum computing
Quantum gates Quantum mechanics is reversible, |ψi undergoes unitary evolution under some (time-dependent) Hamiltonian H(t)
Z t |ψ(t)i = T exp −i ds H(s) |ψ0i 0 Quantum gates are represented by unitary matrices Typically gates only act on a few qubits in a nontrivial way
U dummy Basics of the circuit model of quantum computing
Common single-qubit quantum gates
0 1 |0i → |1i X X X = 1 0 |1i → |0i 0 −i |0i → −i |1i Y Y Y = i 0 |1i → i |0i 1 0 |0i → |0i Z Z Z = 0 −1 |1i → − |1i 1 1 1 0 0 1 √ √ ! | i → √ (| i + | i) 2 2 2 Hadamard H H = 1 1 √ − √ 1 2 2 |1i → √ (|0i − |1i) 2
dummy Basics of the circuit model of quantum computing
Common single-qubit quantum gates