1 Qubits, Gates, and Circuits 1
1.1 Bits and Qubits . . . . . . . . . . . . . . . . . . . . . . . . 1
1.1.1 Circuits in Space vs. Circuits in Time . . . . . . . 1
1.1.2 Superposition . . . . . . . . . . . . . . . . . . . . . 2
1.1.3 No Cloning . . . . . . . . . . . . . . . . . . . . . . 3
1.1.4 Reversibility . . . . . . . . . . . . . . . . . . . . . 4
1.1.5 Entanglement . . . . . . . . . . . . . . . . . . . . . 4
1.2 Single-Qubit States . . . . . . . . . . . . . . . . . . . . . . 5
1.3 Measurement and the Born Rule . . . . . . . . . . . . . . 6
1.4 Unitary Operations and Single-Qubit Gates . . . . . . . . 7
1.5 Two-Qubit Gates . . . . . . . . . . . . . . . . . . . . . . . 9
1.5.1 Two-Qubit States . . . . . . . . . . . . . . . . . . . 9
1.5.2 Two-Qubit Gates . . . . . . . . . . . . . . . . . . . 11
1.5.3 Controlled-NOT . . . . . . . . . . . . . . . . . . . 13
1.6 Bell State . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
1.7 No Cloning, Revisited . . . . . . . . . . . . . . . . . . . . 15
1.8 Example: Deutsch's Problem . . . . . . . . . . . . . . . . 17
1.9 Key Characteristics of Quantum Computing . . . . . . . . 20
1.10 Quantum Computing Systems . . . . . . . . . . . . . . . . 22
1.11 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
2 Physics of Single Qubit Gates 29
2.1 Requirements for a Quantum Computer . . . . . . . . . . 29
2.2 Single Qubit Gates . . . . . . . . . . . . . . . . . . . . . . 30
2.2.1 Rotations . . . . . . . . . . . . . . . . . . . . . . . 30
2.2.2 Two State Systems . . . . . . . . . . . . . . . . . . 38
2.2.3 Creating Rotations: Rabi Oscillations . . . . . . . 44
2.3 Quantum State Tomography . . . . . . . . . . . . . . . . 49
2.4 Expectation Values and the Pauli Operators . . . . . . . . 51
2.5 Density Matrix . . . . . . . . . . . . . . . . . . . . . . . . 52
2.6 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
iii
iv CONTENTS
3 Physics of Two Qubit Gates 59
3.1 √
iSWAP Gate . . . . . . . . . . . . . . . . . . . . . . . . 59
3.2 Coupled Tunable Qubits . . . . . . . . . . . . . . . . . . . 61
3.3 Fixed-frequency Qubits . . . . . . . . . . . . . . . . . . . 64
3.4 Other Controlled Gates . . . . . . . . . . . . . . . . . . . 66
3.5 Two-qubit States and the Density Matrix . . . . . . . . . 68
3.6 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
4 Superconducting Quantum Computer Systems 73
4.1 Transmission Lines . . . . . . . . . . . . . . . . . . . . . . 73
4.1.1 General Transmission Line Equations . . . . . . . 73
4.1.2 Lossless Transmission Lines . . . . . . . . . . . . . 75
4.1.3 Transmission Lines with Loss . . . . . . . . . . . . 77
4.2 Terminated Lossless Line . . . . . . . . . . . . . . . . . . 82
4.2.1 Reflection Coefficient . . . . . . . . . . . . . . . . . 82
4.2.2 Power (Flow of Energy) and Return Loss . . . . . 84
4.2.3 Standing Wave Ratio (SWR) . . . . . . . . . . . . 85
4.2.4 Impedance as a Function of Position . . . . . . . . 86
4.2.5 Quarter Wave Transformer . . . . . . . . . . . . . 88
4.2.6 Coaxial, Microstrip, and Co-planar Lines . . . . . 89
4.3 S Parameters . . . . . . . . . . . . . . . . . . . . . . . . . 92
4.3.1 Lossless Condition . . . . . . . . . . . . . . . . . . 93
4.3.2 Reciprocity . . . . . . . . . . . . . . . . . . . . . . 94
4.4 Transmission (ABCD) Matrices . . . . . . . . . . . . . . . 94
4.5 Attenuators . . . . . . . . . . . . . . . . . . . . . . . . . . 99
4.6 Circulators and Isolators . . . . . . . . . . . . . . . . . . . 100
4.7 Power Dividers/Combiners . . . . . . . . . . . . . . . . . 102
4.8 Mixers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
4.9 Low-pass Filters . . . . . . . . . . . . . . . . . . . . . . . 111
4.10 Noise . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112
4.10.1 Thermal Noise . . . . . . . . . . . . . . . . . . . . 113
4.10.2 Equivalent Noise Temperature . . . . . . . . . . . 116
4.10.3 Noise Factor and Noise Figure . . . . . . . . . . . 117
4.10.4 Attenuators and Noise . . . . . . . . . . . . . . . . 118
4.10.5 Noise in Cascaded Systems . . . . . . . . . . . . . 120
4.11 Low Noise Amplifiers . . . . . . . . . . . . . . . . . . . . . 121
4.12 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
5 Resonators: Classical Treatment 125
5.1 Parallel Lumped Element Resonator . . . . . . . . . . . . 125
5.2 Capacitive Coupling to a Parallel Lumped-Element Res[1]onator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128
5.3 Transmission Line Resonator . . . . . . . . . . . . . . . . 130
5.4 Capacitive Coupling to a Transmission Line Resonator . . 133
5.5 Capacitively-Coupled Lossless Resonators . . . . . . . . . 136
CONTENTS v
5.6 Classical Model of Qubit Readout . . . . . . . . . . . . . 142
5.7 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . 146
6 Resonators: Quantum Treatment 149
6.1 Lagrangian Mechanics . . . . . . . . . . . . . . . . . . . . 149
6.1.1 Hamilton's Principle . . . . . . . . . . . . . . . . . 149
6.1.2 Calculus of Variations . . . . . . . . . . . . . . . . 150
6.1.3 Lagrangian Equation of Motion . . . . . . . . . . . 151
6.2 Hamiltonian Mechanics . . . . . . . . . . . . . . . . . . . 153
6.3 Harmonic Oscillators . . . . . . . . . . . . . . . . . . . . . 153
6.3.1 Classical Harmonic Oscillator . . . . . . . . . . . . 154
6.3.2 Quantum Mechanical Harmonic Oscillator . . . . . 156
6.3.3 Raising and Lowering Operators . . . . . . . . . . 158
6.3.4 Can a Harmonic Oscillator be used as a Qubit? . . 160
6.4 Circuit Quantum Electrodynamics . . . . . . . . . . . . . 162
6.4.1 Classical LC Resonant Circuit . . . . . . . . . . . 162
6.4.2 Quantization of the LC Circuit . . . . . . . . . . . 163
6.4.3 Circuit Electrodynamic Approach for General Cir[1]cuits . . . . . . . . . . . . . . . . . . . . . . . . . . 164
6.4.4 Circuit Model for Transmission Line Resonator . . 165
6.4.5 Quantizing a Transmission Line Resonator . . . . 168
6.4.6 Quantized Coupled LC Resonant Circuits . . . . . 169
6.4.7 Schrödinger, Heisenberg, and Interaction Pictures 172
6.4.8 Resonant Circuits and Qubits . . . . . . . . . . . . 175
6.4.9 The Dispersive Regime . . . . . . . . . . . . . . . . 178
6.5 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . 182
7 Theory of Superconductivity 183
7.1 Bosons and Fermions . . . . . . . . . . . . . . . . . . . . . 184
7.2 Bloch Theorem . . . . . . . . . . . . . . . . . . . . . . . . 186
7.3 Free Electron Model for Metals . . . . . . . . . . . . . . . 188
7.3.1 Discrete States in Finite Samples . . . . . . . . . . 189
7.3.2 Phonons . . . . . . . . . . . . . . . . . . . . . . . . 191
7.3.3 Debye Model . . . . . . . . . . . . . . . . . . . . . 193
7.3.4 Electron-Phonon Scattering and Electrical Con[1]ductivity . . . . . . . . . . . . . . . . . . . . . . . 194
7.3.5 Perfect Conductor vs. Superconductor . . . . . . . 196
7.4 Bardeen, Cooper and Schrieffer Theory of Superconduc[1]tivity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199
7.4.1 Cooper Pair Model . . . . . . . . . . . . . . . . . . 199
7.4.2 Dielectric Function . . . . . . . . . . . . . . . . . . 203
7.4.3 Jellium . . . . . . . . . . . . . . . . . . . . . . . . 204
7.4.4 Scattering Amplitude and Attractive Electron-Electron
Interaction . . . . . . . . . . . . . . . . . . . . . . 208
7.4.5 Interpretation of Attractive Interaction . . . . . . 209
vi CONTENTS
7.4.6 Superconductor Hamiltonian . . . . . . . . . . . . 210
7.4.7 Superconducting Ground State . . . . . . . . . . . 211
7.5 Electrodynamics of Superconductors . . . . . . . . . . . . 215
7.5.1 Cooper Pairs and the Macroscopic Wave Function 215
7.5.2 Potential Functions . . . . . . . . . . . . . . . . . . 216
7.5.3 London Equations . . . . . . . . . . . . . . . . . . 217
7.5.4 London Gauge . . . . . . . . . . . . . . . . . . . . 219
7.5.5 Penetration Depth . . . . . . . . . . . . . . . . . . 220
7.5.6 Flux Quantization . . . . . . . . . . . . . . . . . . 221
7.6 Chapter Summary . . . . . . . . . . . . . . . . . . . . . . 223
7.7 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . 224
8 Josephson Junctions 225
8.1 Tunneling . . . . . . . . . . . . . . . . . . . . . . . . . . . 225
8.1.1 Reflection from a Barrier . . . . . . . . . . . . . . 226
8.1.2 Finite Thickness Barrier . . . . . . . . . . . . . . . 229
8.2 Josephson Junctions . . . . . . . . . . . . . . . . . . . . . 231
8.2.1 Current and Voltage Relations . . . . . . . . . . . 231
8.2.2 Josephson Junction Hamiltonian . . . . . . . . . . 235
8.2.3 Quantized Josephson Junction Analysis . . . . . . 237
8.3 Superconducting Quantum Interference Devices (SQUIDs) 239
8.4 Josephson Junction Parametric Amplifiers . . . . . . . . . 241
8.5 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . 242
9 Errors and Error Mitigation 245
9.1 NISQ Processors . . . . . . . . . . . . . . . . . . . . . . . 245
9.2 Decoherence . . . . . . . . . . . . . . . . . . . . . . . . . . 246
9.3 State Preparation and Measurement Errors . . . . . . . . 248
9.4 Characterizing Gate Errors . . . . . . . . . . . . . . . . . 250
9.5 State Leakage and Suppression using Pulse Shaping . . . 254
9.6 Zero-Noise Extrapolation . . . . . . . . . . . . . . . . . . 257
9.7 Optimized Control using Deep Learning . . . . . . . . . . 260
9.8 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . 261
10 Quantum Error Correction 265
10.1 Review of Classical Error Correction . . . . . . . . . . . . 265
10.1.1 Error Detection . . . . . . . . . . . . . . . . . . . . 266
10.1.2 Error Correction: Repetition Code . . . . . . . . . 267
10.1.3 Hamming Code . . . . . . . . . . . . . . . . . . . . 268
10.2 Quantum Errors . . . . . . . . . . . . . . . . . . . . . . . 269
10.3 Detecting and Correcting Quantum Errors . . . . . . . . . 272
10.3.1 Bit Flip . . . . . . . . . . . . . . . . . . . . . . . . 272
10.3.2 Phase Flip . . . . . . . . . . . . . . . . . . . . . . 274
10.3.3 Correcting Bit and Phase Flips: Shor's 9-qubit Code275
10.3.4 Arbitrary Rotations . . . . . . . . . . . . . . . . . 277
CONTENTS vii
10.4 Stabilizer Codes . . . . . . . . . . . . . . . . . . . . . . . 279
10.4.1 Stabilizers . . . . . . . . . . . . . . . . . . . . . . . 279
10.4.2 Stabilizers for Error Correction . . . . . . . . . . . 280
10.5 Operating on Logical Qubits . . . . . . . . . . . . . . . . 283
10.6 Error Thresholds . . . . . . . . . . . . . . . . . . . . . . . 285
10.6.1 Concatenation of Error Codes . . . . . . . . . . . . 286
10.6.2 Threshold Theorem . . . . . . . . . . . . . . . . . 286
10.7 Surface Codes . . . . . . . . . . . . . . . . . . . . . . . . . 288
10.7.1 Stabilizers . . . . . . . . . . . . . . . . . . . . . . . 289
10.7.2 Error Detection and Correction . . . . . . . . . . . 291
10.7.3 Logical X and Z Operators . . . . . . . . . . . . . 295
10.7.4 Multiple Qubits: Lattice Surgery . . . . . . . . . . 297
10.7.5 CNOT . . . . . . . . . . . . . . . . . . . . . . . . . 301
10.7.6 Single-Qubit Gates . . . . . . . . . . . . . . . . . . 305
10.8 Summary and Further Reading . . . . . . . . . . . . . . . 306
10.9 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . 308
11 Quantum Logic: Efficient Implementation of Classical
Computations 309
11.1 Reversible Logic . . . . . . . . . . . . . . . . . . . . . . . 310
11.1.1 Reversible Logic Gates . . . . . . . . . . . . . . . . 311
11.1.2 Reversible Logic Circuits . . . . . . . . . . . . . . 313
11.2 Quantum Logic Circuits . . . . . . . . . . . . . . . . . . . 317
11.2.1 Entanglement and Uncomputing . . . . . . . . . . 317
11.2.2 Multi-qubit gates . . . . . . . . . . . . . . . . . . . 319
11.2.3 Qubit topology . . . . . . . . . . . . . . . . . . . . 321
11.3 Efficient Arithmetic Circuits: Adder . . . . . . . . . . . . 322
11.3.1 Quantum Ripple Carry Adder . . . . . . . . . . . . 323
11.3.2 In-place Ripple Carry Adder . . . . . . . . . . . . 326
11.3.3 Carry-Lookahead Adder . . . . . . . . . . . . . . . 329
11.3.4 Adder Comparison . . . . . . . . . . . . . . . . . . 334
11.4 Phase Logic . . . . . . . . . . . . . . . . . . . . . . . . . . 336
11.4.1 Controlled-Z and Controlled-Phase Gates . . . . . 336
11.4.2 Selective Phase Change . . . . . . . . . . . . . . . 339
11.4.3 Phase Logic Gates . . . . . . . . . . . . . . . . . . 341
11.5 Summary and Further Reading . . . . . . . . . . . . . . . 342
11.6 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . 345
12 Some Quantum Algorithms 347
12.1 Computational Complexity . . . . . . . . . . . . . . . . . 347
12.1.1 Quantum Program Run-Time . . . . . . . . . . . . 348
12.1.2 Classical Complexity Classes . . . . . . . . . . . . 349
12.1.3 Quantum Complexity . . . . . . . . . . . . . . . . 350
12.2 Grover's Search Algorithm . . . . . . . . . . . . . . . . . . 351
12.2.1 Grover Iteration . . . . . . . . . . . . . . . . . . . 351
viii CONTENTS
12.2.2 Quantum Implementation . . . . . . . . . . . . . . 354
12.2.3 Generalizations . . . . . . . . . . . . . . . . . . . . 357
12.3 Quantum Fourier Transform . . . . . . . . . . . . . . . . . 358
12.3.1 Frequencies and Quantum-encoded Signals . . . . 358
12.3.2 Inverse QFT . . . . . . . . . . . . . . . . . . . . . 361
12.3.3 Quantum Implementation . . . . . . . . . . . . . . 362
12.3.4 Computational Complexity . . . . . . . . . . . . . 365
12.4 Quantum Phase Estimation . . . . . . . . . . . . . . . . . 365
12.4.1 Quantum Implementation . . . . . . . . . . . . . . 366
12.4.2 Computational Complexity and Other Issues . . . 367
12.5 Shor's Algorithm . . . . . . . . . . . . . . . . . . . . . . . 368
12.5.1 Hybrid Classical-Quantum Algorithm . . . . . . . 368
12.5.2 Finding the Period . . . . . . . . . . . . . . . . . . 370
12.5.3 Computational Complexity . . . . . . . . . . . . . 373
12.6 Variational Quantum Algorithms . . . . . . . . . . . . . . 375
12.6.1 Variational Quantum Eigensolver . . . . . . . . . . 377
12.6.2 Quantum Approximate Optimization Algorithm . 382
12.6.3 Challenges and Opportunities . . . . . . . . . . . . 386
12.7 Summary and Further Reading . . . . . . . . . . . . . . . 387
12.8 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . 388