Notable and Interesting Recent Quantum News, Articles, and Papers for Saturday, July 20, 2024

A selection of the most important recent news, articles, and papers about quantum computing.


Image of a cube-shaped futuristic quantum computer

News, Articles, and Analyses

The Long-Term Forecast for Quantum Computing Still Looks Bright – Boston Consulting Group

Authors: Jean-François Bobier; Matt Langione; Cassia Naudet-Baulieu; Zheng Cui; and Eitoku Watanabe

“Is quantum computing finally nearing the point where it can fulfill its transformative potential? The answer, right now, is mixed.”

Quantum June 2024 Monthly Market Snapshot Report – The Futurum Group

Author: Dr. Bob Sutor

“Learn about market & tech developments in the quantum computing industry in June 2024, including improved qubits and product sales & delivery.”

Technical Papers and Preprints

Physics – Mechanical Coupling to Spin Qubits

(Wednesday, June 26, 2024) “A vibrating nanobeam could be used to share information between distant solid-state spin qubits, potentially allowing use of these qubits in complex computations.”

Physics – Measuring Qubits with “Time Travel” Protocol

(Thursday, June 27, 2024) “Quantum sensing can benefit from entanglement protocols that can be interpreted as allowing qubits to go backward in time to choose an optimal initial state.”

[2407.13012] CUAOA: A Novel CUDA-Accelerated Simulation Framework for the QAOA

Authors: Stein, Jonas; Blenninger, Jonas; Bucher, David; Eder, Josef Peter; Çetiner, Elif; Zorn, Maximilian; Linnhoff-Popien, Claudia

arXiv logo(Wednesday, July 17, 2024) “The Quantum Approximate Optimization Algorithm (QAOA) is a prominent quantum algorithm designed to find approximate solutions to combinatorial optimization problems, which are challenging for classical computers. In the current era, where quantum hardware is constrained by noise and limited qubit availability, simulating the QAOA remains essential for research. However, existing state-of-the-art simulation frameworks suffer from long execution times or lack comprehensive functionality, usability, and versatility, often requiring users to implement essential features themselves. Additionally, these frameworks are primarily restricted to Python, limiting their use in safer and faster languages like Rust, which offer, e.g., advanced parallelization capabilities. In this paper, we develop a GPU accelerated QAOA simulation framework utilizing the NVIDIA CUDA toolkit. This framework offers a complete interface for QAOA simulations, enabling the calculation of (exact) expectation values, direct access to the statevector, fast sampling, and high-performance optimization methods using an advanced state-of-the-art gradient calculation technique. The framework is designed for use in Python and Rust, providing flexibility for integration into a wide range of applications, including those requiring fast algorithm implementations leveraging QAOA at its core. The new framework’s performance is rigorously benchmarked on the MaxCut problem and compared against the current state-of-the-art general-purpose quantum circuit simulation frameworks Qiskit and Pennylane as well as the specialized QAOA simulation tool QOKit. Our evaluation shows that our approach outperforms the existing state-of-the-art solutions in terms of runtime up to multiple orders of magnitude. Our implementation is publicly available at https://github.com/JFLXB/cuaoa and Zenodo.”

[2407.13616] Quantum Local Search for Traveling Salesman Problem with Path-Slicing Strategy

Authors: Liu, Chen-Yu; Matsuyama, Hiromichi; Huang, Wei-hao; Yamashiro, Yu

arXiv logo(Thursday, July 18, 2024) “We present novel path-slicing strategies integrated with quantum local search to optimize solutions for the Traveling Salesman Problem (TSP), addressing the limitations of current Noisy Intermediate-Scale Quantum (NISQ) technologies. Our hybrid quantum-classical approach leverages classical path initialization and quantum optimization to effectively manage the computational challenges posed by the TSP. We explore various path slicing methods, including k-means and anti-k-means clustering, to divide the TSP into manageable subproblems. These are then solved using quantum or classical solvers. Our analysis, performed on multiple TSP instances from the TSPlib, demonstrates the ability of our strategies to achieve near-optimal solutions efficiently, highlighting significant improvements in solving efficiency and resource utilization. This approach paves the way for future applications in larger combinatorial optimization scenarios, advancing the field of quantum optimization.”

 

Data science in my book Dancing with Python

In my blog entry Quantum computing in my book Dancing with Python,” I covered what my book covers related to quantum computing. I also published the entry “Availability of my book Dancing with Python and its table of contents.”

Today, I want to specifically list what I discuss in the book in what I term “an extended definition of data science.” The core chapters are in Part III. Here are their titles, introductions, and chapter tables of contents:

III Advanced Features and Libraries

12 Searching and Changing Text

We represent much of the world’s information as text. Think of all the words in all the digital newspapers, e-books, PDF files, blogs, emails, texts, and social media services such as Twitter and Facebook. Given a block of text, how do we search it to see if some desired information is present? How can we change the text to add formatting or corrections or extract information?

Chapter 4, Stringing You Along, covered Python’s functions and methods. This chapter begins with regular expressions and then proceeds to natural language processing (NLP) basics: how to go from a string of text to some of the meaning contained therein.

12.1 Core string search and replace methods
12.2 Regular expressions
12.3 Introduction to Natural Language Processing
12.4 Summary

13 Creating Plots and Charts

Among mathematicians and computer scientists, it’s said that a picture is worth 210 words. Okay, that’s a bad joke, but it’s one thing to manipulate and compute with data, but quite another to create stunning visualizations that convey useful information.

While there are many ways of building images and charts, Matplotlib is the most widely used Python library for doing so. [MAT] Matplotlib is very flexible and can produce high-quality output for print or digital media. It also has great support for a wide variety of backends
that give you powerful mouse-driven interactivity. Generally speaking, if you have a coding project and you need to visualize numeric information, see if Matplotlib already does what you want. This chapter covers the core functionality of this essential library.

13.1 Function plots
13.2 Bar charts
13.3 Histograms
13.4 Pie charts
13.5 Scatter plots
13.6 Moving to three dimensions
13.7 Summary

14 Analyzing Data

While we can use fancy names like “data science,” “analytics,” and “artificial intelligence” to talk about working with data, sometimes you just want to read, write, and process files containing many rows and columns of information. People have been doing this interactively for years, typically using applications like Microsoft Excel® and online apps like Google Sheets™.

To “programmatically” manipulate data, I mean that we use Python functions and methods. This chapter uses the popular pandas library to create and manipulate these collections of rows and columns, called DataFrames. [PAN] [PCB] We will later introduce other methods in Chapter 15, Learning, Briefly. Before we discuss DataFrames, let’s review some core ideas from statistics.

14.1 Statistics
14.2 Cats and commas
14.3 pandas DataFrames
14.4 Data cleaning
14.5 Statistics with pandas
14.6 Converting categorical data
14.7 Cats by gender in each locality
14.8 Are all tortoiseshell cats female?
14.9 Cats in trees and circles
14.10 Summary

15 Learning, Briefly

Machine learning is not new, but it and its sub-discipline, deep learning, are now being used extensively for many applications in artificial intelligence (AI). There are hundreds of academic and practical coding books about machine learning.

This final chapter introduces machine learning and neural networks primarily through the scikit-learn sklearn module. Consider this a jumping-off point where you can use the Python features you’ve learned in this book to go more deeply into these essential AI areas if they interest you.

15.1 What is machine learning?
15.2 Cats again
15.3 Feature scaling
15.4 Feature selection and reduction
15.5 Clustering
15.6 Classification
15.7 Linear regression
15.8 Concepts of neural networks
15.9 Quantum machine learning
15.10 Summary

This book is an introduction, so my goal is to get you started on a broad range of topics. For example, here are the Python modules and packages discussed or used in each of the four chapters in Part III:

12 Searching and Changing Text: re, flashtext, spacy
13 Creating Plots and Charts: matplotlib, numpy, mpl_toolkits.mplot3d
14 Analyzing Data: pandas, numpy, matplotlib, squarify, matplotlib-venn
15 Learning, Briefly: sklearn, pandas, numpy

I mention in passing in the book several other packages, such as pytorch, as pointers for further exploration. I did not include in the list above standard modules such as math, random, and sys.

Quantum computing in my book Dancing with Python

My new book, Dancing with Python: Learn Python software development from scratch and get started with quantum computing, is now available from Amazon and other sources, and I recently posted the full table of contents. Though it is an introduction to Python, albeit with discussions of several advanced modules, it provides a unified approach with quantum computing.

My approach is described in the Preface:

How do you learn to code in this new world that involves both classical and quantum hardware?

One way to do it is to learn classical computing by itself. This is the traditional way of doing it, using a language such as C, C++, JavaScript, Java, Go, or Python. Along the way, you would learn how to use extra functionality in libraries of code along with the programming tools or from a third-party provider. Examples of these are the C++ Standard Library; the Java Platform, Enterprise Edition; the Python Standard Library; or the thousands of Python packages listed in the Python Package Index.

Once you have the philosophy, syntax, structure, and idioms of the classical programming language understood, you then learn quantum computing on top of that. For example, you could use the Qiskit open source quantum computing software development kit (SDK) along with Python. These mesh together and operate exceptionally well. Thousands of people are already Qiskit coders. If you know Python, this is a great approach.

But what if you are learning to code or have only a small amount of experience? What if I could offer you the chance to learn classical and quantum computing in a unified manner? Would it be useful if I could help you understand the concepts of both so that you don’t see them as different disciplines? That’s what I do in this book.

Teaching approach in Dancing with Python

I talk about aspects of quantum computing throughout the book and in many places I provide pointers to sections in my quantum computing book Dancing with Qubits. That book is not a prerequisite for Dancing with Python, but the referenced sections will help you learn more about the topics if you wish to go deeper.

I first talk about qubits, “quantum bits”, in section 1.11. The main chapters that discuss quantum computing are 9 and 11:


9 Understanding Gates and Circuits

Classical computers use logical gates to manipulate bits. Using them, we assemble circuits to implement more complicated processes like addition and multiplication. Eventually, we get all the software that runs on computers everywhere.

Quantum computers use qubits to significantly extend the power of bits, as we saw in section 1.11. We assemble these into quantum circuits to implement algorithms.

There is a strong connection between classical and quantum computing, and a quantum computing system is a classical computing system extended with one or more quantum devices. These devices are the physical implementations of qubits and the software and hardware that control them.

This chapter examines bits and qubits, gates that operate upon them, and how we assemble them into circuits.

9.1 The software stack
9.2 Boolean operations and bit logic gates
9.3 Logic circuits
9.4 Simplifying bit expressions
9.5 Universality for bit gates
9.6 Quantum gates and operations
9.7 Quantum circuits
9.8 Universality for quantum gates
9.9 Summary


11 Searching for the Quantum Improvement

By considering new approaches and getting clever, we can develop classical algorithms that are faster than you might have expected. Using quantum techniques, we can go a step further: perform some operations faster than seems possible.

This chapter compares classical and quantum search techniques to see how extending our basic information unit from the bit to the qubit can show remarkable improvements. Note that I only discuss mainstream “universal” quantum computing and not limited-purpose systems that perform operations like simulated annealing.

11.1 Classical searching
11.2 Quantum searching via Grover
11.3 Oracles
11.4 Inversion about the mean
11.5 Amplitude amplification
11.6 Searching over two qubits
11.7 Summary


If you wish to learn more about quantum computing after reading this book, I suggest you look at

Availability of my book Dancing with Python and its table of contents

Cover of book Dancing with Python by Robert S. Sutor
My new book Dancing with Python: Learn Python software development from scratch and get started with quantum computing is now available for purchase from Amazon and Packt Publishing.


Develop skills in Python by implementing exciting algorithms, including mathematical functions, classical searching, data analysis, plotting data, machine learning techniques, and quantum circuits.

Key Features

Learn Python basics to write elegant and efficient code

Create quantum circuits and algorithms using Qiskit and run them on quantum computing hardware and simulators

Delve into Python’s advanced features, including machine learning, analyzing data, and searching


Contributors

About the author
About the reviewer

Contents

List of Figures

Preface

Why did I write this book?
For whom did I write this book?
What does this book cover?
What conventions do I use in this book?
Get in touch

1 Doing the Things That Coders Do

1.1 Data
1.2 Expressions
1.3 Functions
1.4 Libraries
1.5 Collections
1.6 Conditional processing
1.7 Loops
1.8 Exceptions
1.9 Records
10 Contents
1.10 Objects and classes
1.11 Qubits
1.12 Circuits
1.13 Summary

I Getting to Know Python

2 Working with Expressions

2.1 Numbers
2.2 Strings
2.3 Lists
2.4 Variables and assignment
2.5 True and False
2.6 Arithmetic
2.7 String operations
2.8 List operations
2.9 Printing
2.10 Conditionals
2.11 Loops
2.12 Functions
2.13 Summary

3 Collecting Things Together

3.1 The big three
3.2 Lists
3.3 The joy of O(1)
3.4 Tuples
3.5 Comprehensions
3.6 What does “Pythonic” mean?
3.7 Nested comprehensions
3.8 Parallel traverse
3.9 Dictionaries
3.10 Sets
3.11 Summary

4 Stringing You Along

4.1 Single, double, and triple quotes
4.2 Testing for substrings
4.3 Accessing characters
4.4 Creating strings
4.5 Strings and iterations
4.6 Strings and slicing
4.7 String tests
4.8 Splitting and stripping
4.9 Summary

5 Computing and Calculating

5.1 Using Python modules
5.2 Integers
5.3 Floating-point numbers
5.4 Rational numbers
5.5 Complex numbers
5.6 Symbolic computation
5.7 Random numbers
5.8 Quantum randomness
5.9 Summary

6 Defining and Using Functions

6.1 The basic form
6.2 Parameters and arguments
6.3 Naming conventions
6.4 Return values
6.5 Keyword arguments
6.6 Default argument values
6.7 Formatting conventions
6.8 Nested functions
6.9 Variable scope
6.10 Functions are objects
6.11 Anonymous functions
6.12 Recursion
6.13 Summary

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

8 Working with Files

8.1 Paths and the file system
8.2 Moving around the file system
8.3 Creating and removing directories
8.4 Lists of files and folders
8.5 Names and locations
8.6 Types of files
8.7 Reading and writing files
8.8 Saving and restoring data
8.9 Summary

II Algorithms and Circuits

9 Understanding Gates and Circuits

9.1 The software stack
9.2 Boolean operations and bit logic gates
9.3 Logic circuits
9.4 Simplifying bit expressions
9.5 Universality for bit gates
9.6 Quantum gates and operations
9.7 Quantum circuits
9.8 Universality for quantum gates
9.9 Summary

10 Optimizing and Testing Your Code

10.1 Testing your code
10.2 Timing how long your code takes to run
10.3 Optimizing your code
10.4 Looking for orphan code
10.5 Defining and using decorators
10.6 Summary

11 Searching for the Quantum Improvement

11.1 Classical searching
11.2 Quantum searching via Grover
11.3 Oracles
11.4 Inversion about the mean
11.5 Amplitude amplification
11.6 Searching over two qubits
11.7 Summary

III Advanced Features and Libraries

12 Searching and Changing Text

12.1 Core string search and replace methods
12.2 Regular expressions
12.3 Introduction to Natural Language Processing
12.4 Summary

13 Creating Plots and Charts

13.1 Function plots
13.2 Bar charts
13.3 Histograms
13.4 Pie charts
13.5 Scatter plots
13.6 Moving to three dimensions
13.7 Summary

14 Analyzing Data

14.1 Statistics
14.2 Cats and commas
14.3 pandas DataFrames
14.4 Data cleaning
14.5 Statistics with pandas
14.6 Converting categorical data
14.7 Cats by gender in each locality
14.8 Are all tortoiseshell cats female?
14.9 Cats in trees and circles
14.10 Summary

15 Learning, Briefly

15.1 What is machine learning?
15.2 Cats again
15.3 Feature scaling
15.4 Feature selection and reduction
15.5 Clustering
15.6 Classification
15.7 Linear regression
15.8 Concepts of neural networks
15.9 Quantum machine learning
15.10 Summary

Appendices

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

B Staying Current

B.1 python.org
B.2 qiskit.org
B.3 Python expert sites
B.4 Asking questions and getting answers

C The Complete UniPoly Class

D The Complete Guitar Class Hierarchy

E Notices

E.1 Photos, images, and diagrams
E.2 Data
E.3 Trademarks
E.4 Python 3 license

F Production Notes

References

Other Books You May Enjoy

Index

Index Formatting Examples
Python function, method, and property index
Python class index
Python module and package index
General index

And the subtitle of Dancing with Python will be …

Almost two weeks ago, I put up a poll on LinkedIn asking for opinions on what should be the subtitle of my next book, Dancing with Python. Here are the poll results:

Poll results on the subtitle of Dancing with Python

The choices were:

  1. Learn to code using traditional and quantum computing techniques
  2. A unified introduction to classical and quantum Python software development
  3. Learn Python software development from scratch and get started with quantum computing

The second option had been my working subtitle for most of the writing of the book. Two weeks ago, the book’s development editor at Packt suggested that the subtitle was too academic and might not appeal to a general audience. After some back and forth, we agreed on the other two choices and I suggested we do a poll.

I’m pleased that the votes were as balanced as they were. As you can see, you all cast 589 votes and there were more than 46,000 views. While my initial choice came in first, we are going with the third choice that had the second highest vote tally:

Dancing with Python
Learn Python software development from scratch and get started with quantum computing

From the comments and other conversations, this subtitle generated the most excitement and even passion, if I may call it that. It’s very descriptive of the book and my intent in writing it, has good keywords, and I think is much less formal for than my original.

Thank you for participating and sharing your opinion! If all goes well, the book should be out in print and eBook forms from Packt by early September.

Poll on the subtitle of my next book, Dancing with Python

Packt will be publishing my next book, Dancing with Python, sometime around early September. From the draft preface:

Once you have the philosophy, syntax, structure, and idioms of the classical programming language understood, you then learn quantum computing on top of that. For example, you could use the Qiskit open-source quantum computing software development kit (SDK) along with Python. [QIS] These mesh together and operate exceptionally well. Thousands of people are already Qiskit coders. If you know Python, this is a great approach.

But what if you are learning to code or have only a small amount of experience? What if I could offer you the chance to learn classical and quantum computing in a unified manner? Would it be useful if I could help you understand the concepts of both so that you don’t see them as different disciplines? That’s what I do in this book.

One of the tricky things about writing a book is coming up with a good subtitle. It should be interesting, help with SEO, and make people want to explore more. Here are three candidate subtitles:

  • Learn to code using traditional and quantum computing techniques
  • A unified introduction to classical and quantum Python software development
  • Learn Python software development from scratch and get started with quantum computing

I would like you to help make the choice by taking this poll on LinkedIn. You can choose from among these options. Please note that if you happen to suggest something in the comments that we like and use, you are implicitly giving us all rights to do so without credit or remuneration. (Sorry for the legalize.)

Please vote!

My Visual Studio Code configuration

People occasionally ask me about the tools I use for writing and coding. Visual Studio Code is my editor of choice, and it’s the best I’ve ever used. I change visual themes every few months to see if there is one I like better than the last. My current theme is Dark+ Material.

My Visual Studo Code theme

I use about 30 extensions for Python, HTML, CSS, Markdown, and LaTeX, plus a few others for general editing.

First part of Visual Studio Code extension list First part of Visual Studio Code extension list

The Amazon Kindle version of Dancing with Qubits is now available!

Page from Kindle version of Dancing with QubitsI’m pleased to announce that the Amazon Kindle version of my quantum computing book Dancing with Qubits is now available!

This book provides a comfortable and conversational introduction to quantum computing. I take you through the mathematics you need at a pace that allows you to understand not just “what” but also “why.” When we get to quantum computing, concepts like superposition and entanglement are shown to be natural ideas building on what we’ve already seen, and then illustrated via gates, circuits, and algorithms.

Throughout the book, I highlight important results, provide questions to answer, and give links to references where you can learn more. This allows the book to be used for self-study or as a textbook.

Important ideas like Quantum Volume are explained to give you a head start for reading more advanced texts and research papers. I provide many references to related content in math, physics, quantum computing, AI, and financial services. Dancing with Qubits concludes with questions for you to think about and ask experts so that you can gauge progress in the field over the next few years.

Features of the Kindle edition

Page from the book Dancing with Qubits

  • The text will get larger or smaller as you wish and you can change to a font that is comfortable for you to read.
  • There are links throughout the book to other sections and the references in each chapter.
  • Many of the references have links to external sources, such as arxiv or Nature for research papers.
  • The content is in color, if your Kindle device supports it.
  • You can search for terms throughout the book.
  • I’ve maximized the number of mathematical expressions that are expressed textually (see below) to improve the reading experience.

The print version of Dancing with Qubits still has the full, rich mathematical formatting, albeit in black and white. In essence, whether you choose the print or Kindle version, the content is consistent and the formatting is the best I know how to produce for each medium.

Technical Notes

Here are a few comments about the production of the Kindle version, in case you are interested.

Page from the book Dancing with Qubits

  • The original content for Dancing with Qubits is in LaTeX. From that I can produce the black and white print version, a color PDF eBook, and an epub3 file from which the Amazon Kindle and several other MOBI eBook versions are created.
  • I used make4ht and tex4ht to go from the LaTeX source files to HTML. While very powerful, the documentation is scarce and I spent many hours trying to figure how to make things work and then writing sed and Python scripts to fix things that were not quite right.
  • I wrote Python scripts to create the various files needed for epub3, such as opf and navigation, and to break the 30,000+ line HTML file into smaller XHTML files. I used tidy several times to format the HTML and XHTML.
  • The epub3 validators in several free epub3 editing apps either skipped problems entirely or gave false negatives. I found pagina EPUB-Checker to be the best software for validation.
  • I wanted to maximize the amount of HTML formatting I could use and MathML is not available in a practical sense for all eBook formats. tex4ht produced very inconsistent results. So while I could express $x_2$ as x2 in the text without extra fonts, more two-dimensional objects like matrices had to be represented using images. I created macros to produce the right format based on what kind of document I was trying to produce.
  • I used tikz/pgf and quantikz for the figures, especially the quantum circuit diagrams. I externalized the figures as JPEG images. It took quite a bit to figure out how to get them to be the right size for the Kindle version.
  • Some math expressions in the book and chapter tables of contents have weird spacing if they involve subscripts or superscripts. This is an artifact of the Kindle software. This did not happen, for example, when I viewed the book in the Apple Books app.

Some practical things you can do to learn about quantum computing

People often ask me “Where should I get started in order to learn about quantum computing?”. Here are several steps you can take. I work for IBM, so things I link to will often be to the IBM Quantum program. Also, I acknowledge that several of the links and videos toward the beginning involve me, but we’ll get through those quickly.

Watch some introductory videos

If you only watch one video, watch this one from WIRED with Talia Gershon:

This one with me is from early 2019 and discussed the IBM Q System One:

Finally, this video from CNBC with Professor Scott Aaronson of the University of Texas Austin, Martin Reynolds of Gartner, and me brings things up to date in January, 2020. Note that I personally do not support many of the statements about “Quantum Supremacy” (horrible label, supercomputers do have massive amounts of storage, off-by-15-million-percent math error):

Get a book

If you are really just getting started and want to systematically work through the required math at an easy and conversational pace, my book Dancing with Qubits should prepare you for more advanced material and give you a start to reading research papers. (Shameless self-plug.)

If you are a hard core physics and/or computer science person, you want to have Quantum Computation and Quantum Information: 10th Anniversary Edition 10th Anniversary ed. Edition by Michael A. Nielsen and Issac L. Chuang in your library. It’s a little old by now, but if you want to end up doing quantum computing research, you will likely have to become very familiar and comfortable with the contents. Other books to consider are Quantum Computing: A Gentle Introduction (good on algorithms, “gentle” is subjective!) and Quantum Computing for Computer Scientists (a bit dated and make sure you get a copy of the errata).

Play a game

Hello Quantum is available for Apple iOS and Android and will teach you the basics of how quantum gates and circuits work.

Hello Quantum screen shots

Build and run circuits with a real quantum computer

Quantum simulators have their place for basic education, experimentation, and debugging. Note, though, that a quantum simulator is to real quantum computer hardware as a TV console flight simulator is to a real plane. If you want a job as a pilot, I would prefer you knew how to fly an actual airplane.

The easiest way to get started without writing code is with the IBM Quantum Composer within the IBM Quantum Experience.

The IBM Quantum Experience has over 200,000 registered users, so you’ll be joining a very large community of beginner, intermediate, and advanced users.

IBM Quantum Composer

Learn Python

If you are going to write quantum computing code, learn Python. As I write this, the latest version is 3.8. You want Python 3, not Python 2.

Learn Jupyter Notebooks

This is the modern way of developing full documents with interactive code, executions, graphics, videos, and visualizations. It’s used within the IBM Quantum Experience but also many other computational and AI applications. You are mainly interested in how to use it through a browser, not how to run and maintain the console.

Website (introductory): Introduction to Jupyter Notebooks

Write quantum computing code in Qiskit

Qiskit is the leading open source platform for developing quantum computing code and applications. It’s available on Github and available under the Apache 2,0 license. It’s had over 300,000 downloads but I’m recommending you use it through your browser on the IBM Cloud. As with the Composer, it is available through the IBM Quantum Experience.

Whether you want to download Qiskit or use it online, the easiest way to get get started is to watch the series of videos by Abe Asfaw.

From there, you can watch the other videos and also learn about the Qiskit Community.

At this point you are ready to work your way through the online open source Learn Quantum Computing through Qiskit.Open source Qiskit textbook

Dancing With Qubits, First Edition: What about the eBook?

Cover of the book Dancing with QubitsYesterday was very exciting because I received my first printed copy of the book. There’s just something about holding a physical, printed book that you’ve labored over for many months. Others are starting to get their copies too, and I hope that within a couple of weeks everyone who pre-ordered the print version will have copies in hand.

What if you ordered the eBook? Wasn’t that an option on Amazon? Why isn’t it listed there now? Why was your Kindle eBook order canceled?

The original plan was to provide the eBook in a PDF-like, print replica format that was in color and had active links within and beyond the book. You can still purchase this eBook at the Packt Publishing website.

As for Amazon, let’s just say that they ultimately wanted a reflowable version of the book rather than a fixed format version. As I’ve mentioned before, this presents many challenges to producing beautiful math. The reflowable format allows you to change the font and font size you use on your Kindle or in the Kindle app. It makes it easier to read on small devices. I understand the value.

Hence, I’m now working to create a reflowable version with one guiding principle: as much as possible, I must have a single source for the book that will produce future versions of the printed, fixed-format PDF, and reflowable formats

Here’s the strategy:

  • Use tools like make4ht to translate the original LaTeX into HTML. Convert the HTML into MOBI and EPUB3 formats with a minimal amount of hand editing.
  • Use standard HTML entities and CSS for as much of the in-sentence math as possible.
  • Avoid using extra fonts within the HTML.
  • Use automatically-generated PNG files for any other math.
  • Use automatically-generated SVG and PNG files for figures coming from LaTeX tikz environments. (This is not working at all right now.)
  • Use new macros for the math to produce either LaTeX or HTML versions.
  • Use a small Python program I wrote to convert simple math to new markup using the new macros.

Screen shot of the VSCode editor

There is much work to do but things are looking promising. I can’t now give you any estimated time of arrival for the Kindle reflowable version or any guarantee that it will arrive eventually, but it’s my strong intention to make it happen. There are unknown unknowns yet to be discovered.

In the meanwhile, as I mentioned above, you can get a PDF-like digital version of the book from Packt.

A final point: despite several people staring at the text, a few errors crept in. These are mostly typos or omitted words. I’m keeping track of these on the corrections and clarifications page for the book. I incorporate these fixes into the text as they are discovered and I hope that future versions of the book, printed and digital, include them.


Previous: What’s in the book

In December, 2019, Packt Publishing published my book Dancing with Qubits: How quantum computing works and how it can change the world. Through a series of blog entries, I talk about the writing and publishing process, and then about the content.

My Visual Studio Code extensions for LaTeX and Python

I’m in the final stages of writing a book about quantum computing using LaTeX and I also do a lot of Python programming when I get a chance. A couple of years ago, I decided to try using the Visual Studio Code editor and I just love it. I’ve used dozens of programming editors in my life (vi, not emacs, thank you very much), and VSCode has the best functionality of all of them.

One of its best features is its extension architecture. Though I experiment with various extensions occasionally, I keep a core set. If I am going to so something special such as editing Markdown text, I will use an extra extension or two until I am done with the task and then uninstall them.

These are the extensions I use now for LaTeX editing and Python coding. They are all available in the editor through the Marketplace.

  • Blank Line Organizer – removes extraneous extra lines that creep into text while editing
  • Bookmarks – as you would suspect, allows you to set a bookmark somewhere in a file and then jump back to it quickly
  • Bracket Pair Colorizer 2 – paints matching parentheses, brackets, and curly brackets in the same color. I’ve tried the original and Rainbow Brackets, and none of these three are perfect. These version is the fastest and mostly best.
  • change-case – provides many options for changing the case (e.g., uppercase, lowercase, sentence case) of selected text
  • Code Runner – helps execute code in the environment
  • Code Spell Checker – tells you when a word has questionable spelling, though not good on suggesting alternatives. You can put comments in the file saying which words to ignore or store them in a file in the folder.
  • LaTeX Workshop – the workhorse large set of code to assist in editing LaTeX markup. I don’t use all the features and I still run things like pdflatex from the command line, but it is hugely helpful. As an aside, you probably want to get latexindent running on your machine if possible.
  • latex-count – simple add-on that shows how many non-markup words are in your document
  • MagicPython – syntax highlighter for Python
  • Python – the main set of code providing Python editing and execution
  • qiskit-vscode – editing and execution support for the open source Qiskit quantum computing development platform
  • Rewrap – rewraps lines of text. Useful when LaTeX content gets too ragged.
  • Settings Sync – saves your editor setting on GitHub so you can have the same environment across machines.
Verified by MonsterInsights