Book description
Develop skills in Python and Quantum Computing by implementing exciting algorithms, mathematical functions, classical searching, data analysis, plotting data, machine learning techniques, and quantum circuits.
Key Features
- Create quantum circuits and algorithms using Qiskit and run them on quantum computing hardware and simulators
- Learn the Pythonic way to write elegant and efficient code
- Delve into Python's advanced features, including machine learning, analyzing data, and searching
Book Description
Dancing with Python helps you learn Python and quantum computing in a practical way. It will help you explore how to work with numbers, strings, collections, iterators, and files.
The book goes beyond functions and classes and teaches you to use Python and Qiskit to create gates and circuits for classical and quantum computing. Learn how quantum extends traditional techniques using the Grover Search Algorithm and the code that implements it. Dive into some advanced and widely used applications of Python and revisit strings with more sophisticated tools, such as regular expressions and basic natural language processing (NLP). The final chapters introduce you to data analysis, visualizations, and supervised and unsupervised machine learning.
By the end of the book, you will be proficient in programming the latest and most powerful quantum computers, the Pythonic way.
What you will learn
- Explore different quantum gates and build quantum circuits with Qiskit and Python
- Write succinct code the Pythonic way using magic methods, iterators, and generators
- Analyze data, build basic machine learning models, and plot the results
- Search for information using the quantum Grover Search Algorithm
- Optimize and test your code to run efficiently
Who this book is for
The book will help you get started with coding for Python and Quantum Computing.
Basic familiarity with algebra, geometry, trigonometry, and logarithms is required as the book does not cover the detailed mathematics and theory of quantum computing. You can check out the author's Dancing with Qubits book, also published by Packt, for an approachable and comprehensive introduction to quantum computing.
Table of contents
- Preface
- Chapter 1: Doing the Things That Coders Do
- Part I: Getting to Know Python
- Chapter 2: Working with Expressions
- Chapter 3: Collecting Things Together
- Chapter 4: Stringing You Along
- Chapter 5: Computing and Calculating
- Chapter 6: Defining and Using Functions
-
Chapter 7: Organizing Objects into Classes
- 7.1 Objects
- 7.2 Classes, methods, and variables
- 7.3 Object representation
- 7.4 Magic methods
- 7.5 Attributes and properties
- 7.6 Naming conventions and encapsulation
- 7.7 Commenting Python code
- 7.8 Documenting Python code
- 7.9 Enumerations
- 7.10 More polynomial magic
- 7.11 Class variables
- 7.12 Class and static methods
- 7.13 Inheritance
- 7.14 Iterators
- 7.15 Generators
- 7.16 Objects in collections
- 7.17 Creating modules
- 7.18 Summary
- Chapter 8: Working with Files
- PART II: Algorithms and Circuits
- Chapter 9: Understanding Gates and Circuits
- Chapter 10: Optimizing and Testing Your Code
- Chapter 11: Searching for the Quantum Improvement
- PART III: Advanced Features and Libraries
- Chapter 12: Searching and Changing Text
- Chapter 13: Creating Plots and Charts
- Chapter 14: Analyzing Data
- Chapter 15: Learning, Briefly
- Appendices
-
Appendix A: Tools
- A.1 The operating system command line
- A.2 Installing Python
- A.3 Installing Python modules and packages
- A.4 Installing a virtual environment
- A.5 Installing the Python packages used in this book
- A.6 The Python interpreter
- A.7 IDLE
- A.8 Visual Studio Code
- A.9 Jupyter notebooks
- A.10 Installing and setting up Qiskit
- A.11 The IBM Quantum Composer and Lab
- A.12 Linting
- Appendix B: Staying Current
- Appendix C: The Complete UniPoly Class
- Appendix D: The Complete Guitar Class Hierarchy
- Appendix E: Notices
- Appendix F: Production Notes
- References
- Other Books You May Enjoy
- Index
Product information
- Title: Dancing with Python
- Author(s):
- Release date: August 2021
- Publisher(s): Packt Publishing
- ISBN: 9781801077859
You might also like
book
Make Python Talk
This fun, hands-on book will take your basic Python skills to the next level as you …
book
Hands-On Explainable AI (XAI) with Python
Resolve the black box models in your AI applications to make them fair, trustworthy, and secure. …
book
Applying Math with Python
Discover easy-to-follow solutions and techniques to help you to implement applied mathematical concepts such as probability, …
book
Python Deep Learning Projects
Insightful practical projects to master deep learning and neural network architectures using Python, Keras and MXNet …