A selection of the most important recent news, articles, and papers about quantum computing.
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
(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
(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.”
Share this:
Notable and Interesting Recent Quantum News, Articles, and Papers for Wednesday, July 17, 2024
A selection of the most important recent news, articles, and papers about quantum computing.
News, Articles, and Analyses
Infleqtion Leads the Way with First Quantum Computer Installation at NQCC — Infleqtion
(Tuesday, July 16, 2024) “We’re thrilled to announce the installation of our state-of-the-art neutral atom quantum computer at the National Quantum Computing Centre (NQCC). As the first company to deploy hardware under the NQCC’s quantum computing testbed programme, this milestone showcases our cutting-edge technology and de”
Oxford company unveils ‘pivotal’ quantum computing chip – BBC News
(Tuesday, July 16, 2024) “Oxford Ionics claim to have created the first quantum chip of its kind that could be mass-produced.”
Pritzker announces federal partner for quantum computing campus
(Wednesday, July 17, 2024) “CHICAGO (WCIA) — Illinois’ proposal to create a new quantum computing campus has a new partner with a federal agency. Governor J.B. Pritzker announced the partnership of Defense Advanced Research Projects Agency, part of the U.S. Department of Defense, with Illinois’ quantum computing campus Tuesday. The partnership is named Quantum Proving Ground. “The future of […]”
Technical Papers and Preprints
[2107.02151] Continuous Variable Quantum Algorithms: an Introduction
Authors: Buck, Samantha; Coleman, Robin; Sargsyan, Hayk
(Monday, July 05, 2021) “Quantum computing is usually associated with discrete quantum states and physical quantities possessing discrete eigenvalue spectrum. However, quantum computing in general is any computation accomplished by the exploitation of quantum properties of physical quantities, discrete or otherwise. It has been shown that physical quantities with continuous eigenvalue spectrum can be used for quantum computing as well. Currently, continuous variable quantum computing is a rapidly developing field both theoretically and experimentally. In this pedagogical introduction we present the basic theoretical concepts behind it and the tools for algorithm development. The paper targets readers with discrete quantum computing background, who are new to continuous variable quantum computing.”
Towards quantum enhanced adversarial robustness in machine learning | Nature Machine Intelligence
(Thursday, May 25, 2023) “To fulfil the potential of quantum machine learning for practical applications in the near future, it needs to be robust against adversarial attacks. West and colleagues give an overview of recent developments in quantum adversarial machine learning, and outline key challenges and future research directions to advance the field.”
[2407.02467] Error mitigation with stabilized noise in superconducting quantum processors
Authors: Kim, Youngseok; Govia, Luke C. G.; Dane, Andrew; Berg, Ewout van den; Zajac, David M.; Mitchell, Bradley; Liu, Yinyu; Balakrishnan, Karthik; Keefe, George; Stabile, Adam; Pritchett, Emily; Stehlik, Jiri; Kandala, Abhinav
(Tuesday, July 02, 2024) “Pre-fault tolerant quantum computers have already demonstrated the ability to estimate observable values accurately, at a scale beyond brute-force classical computation. This has been enabled by error mitigation techniques that often rely on a representative model on the device noise. However, learning and maintaining these models is complicated by fluctuations in the noise over unpredictable time scales, for instance, arising from resonant interactions between superconducting qubits and defect two-level systems (TLS). Such interactions affect the stability and uniformity of device performance as a whole, but also affect the noise model accuracy, leading to incorrect observable estimation. Here, we experimentally demonstrate that tuning of the qubit-TLS interactions helps reduce noise instabilities and consequently enables more reliable error-mitigation performance. These experiments provide a controlled platform for studying the performance of error mitigation in the presence of quasi-static noise. We anticipate that the capabilities introduced here will be crucial for the exploration of quantum applications on solid-state processors at non-trivial scales.”
[2407.05178] A typology of quantum algorithms
Authors: Arnault, Pablo; Arrighi, Pablo; Herbert, Steven; Kasnetsi, Evi; Li, Tianyi
(Saturday, July 06, 2024) “We draw the current landscape of quantum algorithms, by classifying about 130 quantum algorithms, according to the fundamental mathematical problems they solve, their real-world applications, the main subroutines they employ, and several other relevant criteria. The primary objectives include revealing trends of algorithms, identifying promising fields for implementations in the NISQ era, and identifying the key algorithmic primitives that power quantum advantage.”
Share this:
Notable and Interesting Recent Quantum News, Articles, and Papers for Saturday, July 13, 2024
A selection of the most important recent news, articles, and papers about quantum computing.
News and Articles
A breakthrough on the edge: One step closer to topological quantum computing
(Wednesday, July 10, 2024) “Researchers at the University of Cologne have achieved a significant breakthrough in quantum materials, potentially setting the stage for advancements in topological superconductivity and robust quantum computing / publication in ‘Nature Physics’”
Partnership boosts UK access to most powerful quantum technologies – UKRI
(Thursday, July 11, 2024) “UK industry and researchers will gain unparalleled access to the world’s most powerful quantum computers.”
Bob Sutor; Vice President and Practice Lead, Emerging Technologies, The Futurum Group will speak at IQT Quantum + AI in New York City October 29-30 – Inside Quantum Technology
(Friday, July 12, 2024) “Bob Sutor; Vice President and Practice Lead, Emerging Technologies, The Futurum Group will speak at IQT Quantum + AI in New York City October 29-30. Dr. Bob Sutor has been a technical leader and executive in the IT industry for over 40 years. He is a theoretical mathematician by training, with a Ph.D. from Princeton”
Technical Papers and Preprints
[2406.17653] Algorithmic Fault Tolerance for Fast Quantum Computing
(Tuesday, June 25, 2024) “Fast, reliable logical operations are essential for the realization of useful quantum computers, as they are required to implement practical quantum algorithms at large scale. By redundantly encoding logical qubits into many physical qubits and using syndrome measurements to detect and subsequently correct errors, one can achieve very low logical error rates. However, for most practical quantum error correcting (QEC) codes such as the surface code, it is generally believed that due to syndrome extraction errors, multiple extraction rounds — on the order of the code distance d — are required for fault-tolerant computation. Here, we show that contrary to this common belief, fault-tolerant logical operations can be performed with constant time overhead for a broad class of QEC codes, including the surface code with magic state inputs and feed-forward operations, to achieve “algorithmic fault tolerance”. Through the combination of transversal operations and novel strategies for correlated decoding, despite only having access to partial syndrome information, we prove that the deviation from the ideal measurement result distribution can be made exponentially small in the code distance. We supplement this proof with circuit-level simulations in a range of relevant settings, demonstrating the fault tolerance and competitive performance of our approach. Our work sheds new light on the theory of fault tolerance, potentially reducing the space-time cost of practical fault-tolerant quantum computation by orders of magnitude.”
[2407.02553] Large-scale quantum reservoir learning with an analog quantum computer
(Tuesday, July 02, 2024) “Quantum machine learning has gained considerable attention as quantum technology advances, presenting a promising approach for efficiently learning complex data patterns. Despite this promise, most contemporary quantum methods require significant resources for variational parameter optimization and face issues with vanishing gradients, leading to experiments that are either limited in scale or lack potential for quantum advantage. To address this, we develop a general-purpose, gradient-free, and scalable quantum reservoir learning algorithm that harnesses the quantum dynamics of neutral-atom analog quantum computers to process data. We experimentally implement the algorithm, achieving competitive performance across various categories of machine learning tasks, including binary and multi-class classification, as well as timeseries prediction. Effective and improving learning is observed with increasing system sizes of up to 108 qubits, demonstrating the largest quantum machine learning experiment to date. We further observe comparative quantum kernel advantage in learning tasks by constructing synthetic datasets based on the geometric differences between generated quantum and classical data kernels. Our findings demonstrate the potential of utilizing classically intractable quantum correlations for effective machine learning. We expect these results to stimulate further extensions to different quantum hardware and machine learning paradigms, including early fault-tolerant hardware and generative machine learning tasks.”
[2407.07202] Quantum Approximate Optimization: A Computational Intelligence Perspective
(Tuesday, July 09, 2024) “Quantum computing is an emerging field on the multidisciplinary interface between physics, engineering, and computer science with the potential to make a large impact on computational intelligence (CI). The aim of this paper is to introduce quantum approximate optimization methods to the CI community because of direct relevance to solving combinatorial problems. We introduce quantum computing and variational quantum algorithms (VQAs). VQAs are an effective method for the near-term implementation of quantum solutions on noisy intermediate-scale quantum (NISQ) devices with less reliable qubits and early-stage error correction. Then, we explain Farhi et al.’s quantum approximate optimization algorithm (Farhi’s QAOA, to prevent confusion). This VQA is generalized by Hadfield et al. to the quantum alternating operator ansatz (QAOA), which is a nature-inspired (particularly, adiabatic) quantum metaheuristic for approximately solving combinatorial optimization problems on gate-based quantum computers. We discuss connections of QAOA to relevant domains, such as computational learning theory and genetic algorithms, discussing current techniques and known results regarding hybrid quantum-classical intelligence systems. We present a schematic of how QAOA is constructed, and also discuss how CI techniques can be used to improve QAOA. We conclude with QAOA implementations for the well-known maximum cut, maximum bisection, and traveling salesperson problems, which can serve as templates for CI practitioners interested in using QAOA.”
[2407.07694] Scalable, high-fidelity all-electronic control of trapped-ion qubits
(Wednesday, July 10, 2024) “The central challenge of quantum computing is implementing high-fidelity quantum gates at scale. However, many existing approaches to qubit control suffer from a scale-performance trade-off, impeding progress towards the creation of useful devices. Here, we present a vision for an electronically controlled trapped-ion quantum computer that alleviates this bottleneck. Our architecture utilizes shared current-carrying traces and local tuning electrodes in a microfabricated chip to perform quantum gates with low noise and crosstalk regardless of device size. To verify our approach, we experimentally demonstrate low-noise site-selective single- and two-qubit gates in a seven-zone ion trap that can control up to 10 qubits. We implement electronic single-qubit gates with 99.99916(7
Share this:
My Recent Futurum Group Publications: Thursday, July 11, 2024 Edition
Quantum in Context: Quantum Companies Rotate in New Leaders – The Futurum Group
“Learn which quantum computing companies have recently replaced their CEOs & reasons Boards of Directors make such changes.”
Study of Quantum Computing Energy Efficiency – The Futurum Group
“Learn about a study in France that will look at the energy efficiency of quantum computing systems versus HPC for well-known algorithms.”
Share this:
Notable and Interesting Recent AI News, Articles, and Papers for Thursday, July 11, 2024
A selection of the most important recent news and articles about AI.
Enabling Quantum Computing with AI | NVIDIA Technical Blog
(Sunday, May 12, 2024) “Building a useful quantum computer in practice is incredibly challenging. Significant improvements are needed in the scale, fidelity, speed, reliability, and programmability of quantum computers to…”
The Words That Give Away Generative AI Text | WIRED
(Sunday, July 07, 2024) “From ‘delves’ to ‘showcasing,’ certain words boomed in usage after LLMs became mainstream.”
Top 5 potential uses, pitfalls for generative AI in federal government
(Monday, July 08, 2024) “We believe Multi-Agent Systems are the only viable approach to bringing generative AI into the U.S. government in a managed manner.”
Share this:
Notable Recent Quantum News, Articles, and Papers for Thursday, July 11, 2024
A selection of the most important recent news and articles about #quantumcomputing.
Fourier Quantum Process Tomography | npj Quantum Information
(Thursday, May 09, 2024) “The characterization of a quantum device is a crucial step in the development of quantum experiments. This is accomplished via Quantum Process Tomography, which combines the outcomes of different projective measurements to deliver a possible reconstruction of the underlying process. The tomography is typically performed by processing an overcomplete set of measurements and extracting the process matrix from maximum-likelihood estimation. Here, we introduce Fourier Quantum Process Tomography, a technique which requires a reduced number of measurements, and benchmark its performance against the standard maximum-likelihood approach. Fourier Quantum Process Tomography is based on measuring probability distributions in two conjugate spaces for different state preparations and projections. Exploiting the concept of phase retrieval, our scheme achieves a complete and robust characterization of the setup by processing a near-minimal set of measurements. We experimentally test the technique on different space-dependent polarization transformations, reporting average fidelities higher than 90% and significant computational advantage.”
Enabling Quantum Computing with AI | NVIDIA Technical Blog
(Sunday, May 12, 2024) “Building a useful quantum computer in practice is incredibly challenging. Significant improvements are needed in the scale, fidelity, speed, reliability, and programmability of quantum computers to…”
Kipu Quantum Acquires Quantum Computing Platform Built by Anaqor AG to Accelerate Development of Industrially Relevant Quantum Solutions
(Thursday, July 11, 2024) “/PRNewswire/ — Kipu Quantum, the worldwide leading quantum software company, announced today the strategic acquisition of PlanQK, the German quantum computing…”
Simulating the universe’s most extreme environments | IBM Quantum Computing Blog
“Scalable techniques for quantum simulations of high-energy physics.”
Quantum in Context: Quantum Companies Rotate in New Leaders – The Futurum Group
“Learn which quantum computing companies have recently replaced their CEOs & reasons Boards of Directors make such changes.”
EDF, Alice & Bob, Quandela and CNRS Partner to Optimize Quantum Computing’s Energy Efficiency
“PARIS, July 10, 2024 — French electric utility company EDF, in collaboration with quantum computing firms Quandela and Alice & Bob, and the French National Centre for Scientific Research (CNRS), has […]”
Study of Quantum Computing Energy Efficiency – The Futurum Group
“Learn about a study in France that will look at the energy efficiency of quantum computing systems versus HPC for well-known algorithms.”
Oxford Ionics breaks global quantum performance records
“Oxford Ionics has demonstrated the highest performing quantum chip in the world, which can be produced at scale in a standard semiconductor fabrication plant.”
Share this:
Notable and Interesting Recent Quantum News, Articles, and Papers for Tuesday, July 9, 2024
planqc Announces €50 Million Series A
(Monday, July 08, 2024) “Digital atom-based quantum computing company planqc announced that the company has secured €50 million financing in a Series A round.”
Zapata AI and D-Wave Quantum Announce Expanded Partnership for Advanced Generative AI Solutions
“BOSTON and PALO ALTO, Calif., July 8, 2024 — Zapata Computing Holdings Inc., a leader in Industrial Generative AI software solutions, and D-Wave Quantum Inc., a leader in quantum computing […]”
Share this:
Notable and Interesting Recent AI News, Articles, and Papers for Tuesday, July 9, 2024
Unleash developer productivity with generative AI | McKinsey
(Tuesday, June 27, 2023) “A new McKinsey study shows that software developers can complete tasks up to twice as fast with generative AI. Four actions can help maximize productivity.”
IBM Makes Generative AI Platform for DevOps Available – DevOps.com
(Tuesday, July 02, 2024) “IBM has made available IBM Concert, leveraging generative artificial intelligence and knowledge graphs to surface in real-time dependencies.”
Maintaining human oversight in AI-enhanced software development – Help Net Security
(Wednesday, July 03, 2024) “It’s not that AI-generated code introduces new security gaps; it just means that even more code will make its way through existing gaps.”
Transparency From Behind the Generative AI Curtain – The New Stack
(Friday, July 05, 2024) “The Foundational Model Transparency Index illuminates the black box of data on which large language models are trained.”
Nintendo Says Generative AI Can Be Used in ‘Creative Ways,’ but Highlights IP Issues – IGN
(Friday, July 05, 2024) “Nintendo has commented on the controversial topic of generative AI in video game development, outline the pros and cons as it sees them.”
Enterprises must stop GenAI experiments and start long-term strategies | Computer Weekly
“Steven Webb, chief technology & innovation officer, Capgemini UK argues for enterprise organisations to put aside GenAI experimentation and build long-term strategies with it.”
Gen AI and software development | Deloitte Insights
“Freeplay CEO Ian Cairns describes how the organization has adapted to the paradigm shift that generative AI demands while building AI applications”
Zapata AI and D-Wave Quantum Announce Expanded Partnership for Advanced Generative AI Solutions
“BOSTON and PALO ALTO, Calif., July 8, 2024 — Zapata Computing Holdings Inc., a leader in Industrial Generative AI software solutions, and D-Wave Quantum Inc., a leader in quantum computing […]”
Share this:
Notable and Interesting Recent Quantum News, Articles, and Papers for Monday, July 1, 2024
Quantum technology companies set for big tax incentives under new law
(Thursday, June 27, 2024) “Economic development package also expands film, EV industry tax breaks”
Canada Amends Export Control List to Include Goods and Technology Related to Quantum Computing and Advanced Semiconductors
(Thursday, June 27, 2024) “On June 19, 2024, Global Affairs Canada issued a Notice to Exporters regarding regulatory amendments to the Export Control List (ECL) that were previously approved by an order-in-council (Order) on May 31, 2024 (Amendments). The Amendments target goods and technology in relation to quantum computing and advanced semiconductors, following similar unilateral amendments (or proposed amendments)”
Share this:
New video and podcast page
Since I do a lot of talking for a living, I’ve revamped my Videos and Podcasts page to include many more of the recordings I’ve done with folks over the last several years about quantum computing. Whatever else it is, it’s a gallery of strange frozen expressions on my face in the cover images.
Share this:
From classical FLOPS to quantum CLOPS
This week IBM Quantum introduced a new quantum computing architecture-neutral performance speed metric called CLOPS. CLOPS is short for “Circuit Layer Operations per Second.” For those of you familiar with measuring the speed of high performance classical computers, the acronym is a nod to the metric FLOPS, or “Floating point Operations per Second.”
CLOPS joins Quantum Volume (a measurement of quantum circuit execution quality) and Number of Qubits (an indication of the size of the problem your system can handle) as one of the three essential ways that we can measure progress toward practical Quantum Advantage. Quantum Advantage signifies the point where quantum computers together with classical computing systems can do better than the classical systems alone.
Resources and articles to learn more about CLOPS and quantum computing metrics
The IBM Research Blog: Driving quantum performance: more qubits, higher Quantum Volume, and now a proper measure of speed
The technical white paper on arxiv: Scale, Quality, and Speed: three key attributes to measure the performance of near-term quantum computers
IBM Quantum head Jay Gambetta’s YouTube video: Three Metrics for Quantum Computing Performance: Scale, Quality and Speed
My Inside Quantum Technology conference keynote on November 1, 2021:
- IQT Fall: Sutor, Gasman say quantum needs to focus on what’s practical to achieve what’s possible – Inside Quantum Technology
- Fierce Electronics: IBM proposes new quantum computing speed metric: CLOPS
ZDNet article: Quantum computing: IBM just created this new way to measure the speed of quantum processors
DevClass article: Horses for courses: IBM trots out CLOPS as measure of quantum performance
Share this:
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.
Share this:
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.
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
- my Dancing with Qubits book
- Robert Loredo’s Learn Quantum Computing with Python and IBM Quantum Experience: A hands-on introduction to quantum computing and writing your own quantum programs with Python
- the online Qiskit Textbook
Share this:
Availability of my book Dancing with Python and its table of contents
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
Share this:
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:
The choices were:
- 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
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.
Share this:
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.)
Share this:
A #QuantumComputing mini-quiz for 2021-04-11
What Quantum Computing circuit is this in the IBM Quantum Composer?
What is it doing? Name the parts.
I think the Composer is extraordinarily elegant.
Share this:
Video of my Q-munity Tech Workshop talk: Quantum Computing – The Next Five Years
My Q-munity Tech Workshop talk from February 25th is now on YouTube. The abstract for the talk was:
There’s a lot of work to be done before quantum computing can reach the scale and performance it must reach to be part of production workloads. In this talk, I’ll describe the IBM Quantum roadmap for the next five years and argue that it is really an industry execution plan for all of us.
Share this:
Call for papers: Education, Research, and Application of Quantum Computing – HICSS 2022
My IBM Quantum colleague Dr. Andrew Wack and I are hosting a minitrack at the Hawaii International Conference on System Sciences (HICSS) 2022.
The description of the minitrack is:
There is no question that quantum computing will be a technology that will spur breakthroughs in natural science, AI, and computational algorithms such as those used in finance. IBM, Google, Honeywell, and several startups are working hard to create the next generation of “supercomputers” based on universal quantum technology.
What exactly is quantum computing, how does it work, how do we teach it, how do we leverage it in education and research, and what will it take to achieve these quantum breakthroughs?
The purpose of this minitrack is to bring together educators and researchers who are working to bring quantum computing into the mainstream.
We are looking for reports that
- improve our understanding of how to integrate quantum computing into business, machine learning, computer science, and applied mathematics university curriculums,
- describe hands-on student experiences with the open-source Qiskit quantum software development kit, and
- extend computational techniques for business, finance, and economics from classical to quantum systems.
It is part of the Decision Analytics and Service Science track at HICSS.
Please consider submitting a report and sharing this Call for Papers with your colleagues.
Share this:
“How to use interference to your advantage – a quantum computing catch up”
My IBM Quantum colleague Blake Johnson and I had a great conversation with Ben Popper of StackOverflow about software and quantum computing.