Qiskit Pocket Guide

Book description

The quantum computing market is predicted to grow by nearly $1.3 billion over the next five years. Why? Given their quantum mechanical nature, quantum computers are expected to solve difficult problems in chemistry, optimization, finance, and machine learning that classical computers find impossible to unravel.

This pocket guide provides software developers with a quick reference to Qiskit, an open source SDK for working with quantum computers. Packed with helpful programming examples, tables, figures, and lists, this handy book helps you find the information you need to develop and debug quantum programs.

Whether you're focused on business, engineering, or scientific applications, you'll learn how to choose and apply appropriate Qiskit classes, methods, and functions.

  • Learn how to create quantum circuits, define quantum gates, and leverage the transpiler
  • Explore modules for implementing quantum information concepts and quantum algorithms
  • Survey features of Qiskit that abstract and facilitate working with various quantum computers and simulators
  • Learn how to use the latest version of the Open Quantum Assembly Language

Publisher resources

View/Submit Errata

Table of contents

  1. Preface
    1. How This Book Is Structured
    2. Conventions Used in This Book
    3. Using Code Examples
    4. O’Reilly Online Learning
    5. How to Contact Us
    6. Acknowledgments
  2. I. Qiskit Fundamentals
  3. 1. Quantum Circuits and Operations
    1. Constructing Quantum Circuits
      1. Using the QuantumCircuit Class
      2. Using the QuantumRegister Class
      3. Using QuantumRegister Attributes
      4. Using the ClassicalRegister Class
      5. Using ClassicalRegister Attributes
    2. Instructions and Gates
      1. The Instruction Class
      2. The Gate Class
      3. The ControlledGate Class
    3. Parameterized Quantum Circuits
      1. Creating a Parameter Instance
      2. Using the ParameterVector Class
  4. 2. Running Quantum Circuits
    1. Using the BasicAer Simulators
      1. Using the BasicAer qasm_simulator Backend
      2. Using the BasicAer statevector_simulator Backend
      3. Using the BasicAer unitary_simulator Backend
    2. Using the Aer Simulators
      1. Using the Aer Legacy Simulators
      2. Using the AerSimulator Backend
    3. Monitoring Job Status and Obtaining Results
  5. 3. Visualizing Quantum Measurements and States
    1. Visualizing Measurement Counts
      1. Using the plot_histogram Function
    2. Visualizing Quantum States
      1. Using the plot_state_qsphere Function
      2. Using the plot_state_city Function
      3. Using the plot_bloch_multivector Function
      4. Using the plot_state_hinton Function
      5. Using the plot_state_paulivec Function
  6. 4. Using the Transpiler
    1. Quickstart with Transpile
    2. Transpiler Passes
      1. The PassManager
      2. Compiling/Translating Passes
      3. Routing Passes
      4. Optimization Passes
      5. Initial Layout Selection Passes
      6. Preset PassManagers
  7. II. Quantum Information and Algorithms
  8. 5. Quantum Information
    1. Using Quantum Information States
      1. Using the Statevector Class
      2. Using the DensityMatrix Class
    2. Using Quantum Information Operators
      1. Using the Operator Class
      2. Using the Pauli Class
    3. Using Quantum Information Channels
    4. Using Quantum Information Measures
      1. Using the state_fidelity Function
  9. 6. Operator Flow
    1. Creating Operator Flow Expressions
    2. Using the Operator Flow State Function Classes
      1. Using the StateFn Class
    3. Using the Operator Flow Primitive Operators Classes
      1. Using the PrimitiveOp Class
  10. 7. Quantum Algorithms
    1. Background on Quantum Algorithms
    2. Using the Algorithms Module
      1. Quickstart
      2. The Algorithms Interface
    3. Traditional Quantum Algorithms
      1. Grover’s Algorithm
      2. Phase Estimation Algorithms
      3. Amplitude Estimation Algorithms
    4. Eigensolvers
      1. NumPy Eigensolvers
      2. The Variational Quantum Eigensolver
      3. Parameterized Circuits
      4. Optimizers
  11. III. Additional Essential Functionality
  12. 8. Qiskit Circuit Library Standard Operations
    1. Standard Instructions
      1. Barrier
      2. Measure
      3. Reset
    2. Standard Single-Qubit Gates
      1. HGate
      2. IGate
      3. PhaseGate
      4. RXGate
      5. RYGate
      6. RZGate
      7. SGate
      8. SdgGate
      9. SXGate
      10. SXdgGate
      11. TGate
      12. TdgGate
      13. UGate
      14. XGate
      15. YGate
      16. ZGate
    3. Standard Multiqubit Gates
      1. C3XGate
      2. C3SXGate
      3. C4XGate
      4. CCXGate
      5. CHGate
      6. CPhaseGate
      7. CRXGate
      8. CRYGate
      9. CRZGate
      10. CSwapGate
      11. CSXGate
      12. CUGate
      13. CXGate
      14. CYGate
      15. CZGate
      16. DCXGate
      17. iSwapGate
      18. MCPhaseGate
      19. MCXGate
      20. SwapGate
  13. 9. Working with Providers and Backends
    1. Graphical Tools
    2. Text-Based Tools
    3. Getting System Info Programmatically
    4. Interacting with Quantum Systems on the Cloud
      1. Convenience Tools
      2. Runtime Services
  14. 10. OpenQASM
    1. Building Quantum Circuits in QASM
      1. Comments
      2. Version Strings
      3. Basic Syntax
      4. Implicit Looping
      5. Quantum Gates and Instructions
    2. Building Higher-Level Gates
      1. Modifying Existing Gates
      2. Defining New Gates
    3. Classical Types and Instructions
      1. Constants
      2. Shorthands
      3. Arrays of Classical Types
      4. Built-in Classical Instructions
    4. Building Quantum Programs
      1. Subroutines
      2. Inputs and Outputs
  15. Index
  16. About the Authors

Product information

  • Title: Qiskit Pocket Guide
  • Author(s): James L. Weaver, Frank J. Harkins
  • Release date: June 2022
  • Publisher(s): O'Reilly Media, Inc.
  • ISBN: 9781098112479