What conventions do I use in this book?
When I want to highlight something important that you should especially remember, I use this kind of box:
This is very important.
This book has exercises throughout the text. We answer some in later discussions, but others, the majority, are left for you as thought experiments. They are numbered within chapters.
Exercise 0.1
Is this a sample exercise?
Exercise 0.2
Is this another sample exercise?
Try to work each exercise as you go along. If you need assistance, I recommend:
- asking your professor or instructor if you have one
- looking on Wikipedia
- checking the works cited in the References section
- performing a web search, including the words “quantum computing” along with your other terms
- searching the online documentation of the Qiskit and Cirq quantum software development kits
- browsing or posting a question in r/QuantumComputing on Reddit or Quantum Computing on Stack Exchange
- viewing videos on YouTube about quantum computing
Due to typographical restrictions, square roots in mathematical expressions within sentences in the eBook version of this book may not have lines over them. For example, an expression such as √(x + y) in a sentence is the same as
when it appears within a standalone centered formula.
Occasionally, you may see something such as 24. This is a reference to a book, article, or web content. The References section provides details about the works cited.
Though this is not a book about coding, I have included some sample calculations using Python version 3.11 or later. Most of the necessary features are available in earlier Python 3 versions.
Executable Python code and its produced results are shown in a monospace
font and we mark them off in the text in the following way:
2**50
1125899906842624
The second expression shown is indented and results from running the code.
Code can also span several lines, as in this example where we create and display a set of numbers that contains no duplicates:
print({1, 2, 3, 2, 4,
1, 5, 3, 6, 7,
1, 3, 8, 2})
{1, 2, 3, 4, 5, 6, 7, 8}
When I refer to Python function, method, and property names in text, they appear like this: print. Python module and package names appear like math and numpy.
The code bundle for the book is hosted on GitHub at
https://github.com/PacktPublishing/Dancing-with-Qubits-2E.
We also have other code bundles from the rich Packt catalog of books and videos available at https://github.com/PacktPublishing/. Check them out!
Share your thoughts
Once you’ve read Dancing with Qubits, Second Edition, we’d love to hear your thoughts! Scan the QR code below to go straight to the Amazon review page for this book and share your feedback.
https://packt.link/r/1837636753
Your review is important to us and the tech community and will help us make sure we’re delivering excellent quality content.
Learn more on Discord
Join the Discord community for this book, where you can share feedback, ask questions to the author, and learn about new releases: