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

Creating a neural network discriminator

Machine learning is a growing area in quantum computing. Researchers have been looking at ways to leverage quantum computational techniques in various areas of machine learning, such as generative adversarial networks and supervised learning for regression and classification.

In this section, we will focus on the discriminator model as opposed to the generative model. As a reminder, the discriminator model learns by using conditional probability distribution, whereas the generative model learns via joint probability distribution.

In this section, we will create a PyTorchDiscriminator class based on PyTorch. This class contains various methods that will allow you to load your model and perform a training step, based on the parameters of your discriminator. Let's get started:

  1. First, we'll create a PyTorchDiscriminator class by specifying the number of features (the dimension of the input data vector) and the dimension of...
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