Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Learn Quantum Computing with Python and IBM Quantum Experience

You're reading from   Learn Quantum Computing with Python and IBM Quantum Experience A hands-on introduction to quantum computing and writing your own quantum programs with Python

Arrow left icon
Product type Paperback
Published in Sep 2020
Publisher Packt
ISBN-13 9781838981006
Length 510 pages
Edition 1st Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
Robert Loredo Robert Loredo
Author Profile Icon Robert Loredo
Robert Loredo
Arrow right icon
View More author details
Toc

Table of Contents (21) Chapters Close

Preface 1. Section 1: Tour of the IBM Quantum Experience (QX)
2. Chapter 1: Exploring the IBM Quantum Experience FREE CHAPTER 3. Chapter 2: Circuit Composer – Creating a Quantum Circuit 4. Chapter 3: Creating Quantum Circuits using Quantum Lab Notebooks 5. Section 2: Basics of Quantum Computing
6. Chapter 4: Understanding Basic Quantum Computing Principles 7. Chapter 5: Understanding the Quantum Bit (Qubit) 8. Chapter 6: Understanding Quantum Logic Gates 9. Section 3: Algorithms, Noise, and Other Strange Things in Quantum World
10. Chapter 7: Introducing Qiskit and its Elements 11. Chapter 8: Programming with Qiskit Terra 12. Chapter 9: Monitoring and Optimizing Quantum Circuits 13. Chapter 10: Executing Circuits Using Qiskit Aer 14. Chapter 11: Mitigating Quantum Errors Using Ignis 15. Chapter 12: Learning about Qiskit Aqua 16. Chapter 13: Understanding Quantum Algorithms 17. Chapter 14: Applying Quantum Algorithms 18. Assessments 19. Other Books You May Enjoy Appendix A: Resources

Reviewing the results of your quantum circuit on Quantum Lab Notebooks

In this section, we'll conclude this chapter by running the circuit on a quantum simulator and a real device. We'll then review the results by following these steps:

  1. From the open Notebook, enter and run the following in the next empty cell:
    backend = Aer.get_backend('qasm_simulator')

    The preceding code generates a backend object that will connect to the specified simulator or device. In this case, we are generating a backend object linked to the QASM simulator.

  2. In the next empty cell, let's run the execute function. This function takes in three parameters—the circuit we wish to run, the backend we want to run it on, and how many shots we wish to execute. The returned object will be a job object with the contents of the executed circuit on the backend. The code for this can be seen here:
    job_simulator = execute(qc, backend, shots=1024)
  3. We now want to extract the results...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image