Overview

12 Conclusions and outlook

This concluding chapter consolidates the book’s core ideas and sets expectations for practical quantum computing in the near term. It reviews when and why quantum methods help—chiefly in specialized tasks such as sampling from complex probability distributions, searching for desired outcomes, and estimating probabilities—and underscores that most useful workflows will be hybrid, pairing quantum subroutines with classical computation. The discussion revisits quantum parallelism and measurement as the main sources of power, while emphasizing their structural constraints: algorithms must align with the kinds of interference and linear-algebraic patterns quantum circuits can express. With an eye to “quantum readiness,” the chapter draws an analogy to the early days of deep learning, encouraging readers to identify candidate problems and build intuition now so they can benefit as hardware matures.

On the software side, the chapter stresses the value of a fast, flexible simulator for learning and research. It introduces Hume, a compact simulator developed throughout the book that mirrors Qiskit’s syntax, enables practical shortcuts (for example, implementing phase oracles as sign flips and using classical FFT for the QFT), and provides source-level compatibility to switch seamlessly between local simulation and Qiskit. Utilities are provided to convert circuits and run them on IBM Quantum backends without code changes, lowering the barrier to real-hardware experiments. To support practice and repetition, the chapter also presents an interactive assistant that can build circuits and demonstrate end-to-end solutions—such as the knapsack example—helping translate concepts into working workflows.

Technically, the chapter revisits single-qubit gates through the butterfly computing pattern: gates recombine amplitude pairs in a structure that mirrors FFT-style diagrams, and controlled operations narrow which pairs interact. It extends the book’s visualization toolkit by treating quantum states as images, where rows/columns encode qubit partitions and gate actions correspond to row/column recombinations; step-by-step “state evolution” views make interference dynamics tangible. Looking ahead, the chapter surveys additional solution families: combinatorial optimization via CPBO and QUBO, including handling non-integer coefficients through distribution-based encodings, and Shor’s algorithm for integer factorization, which leverages function encoding and the (inverse) Quantum Fourier Transform for period finding. Together, these elements equip readers to analyze problems, prototype algorithms, and execute meaningful experiments on today’s platforms while preparing for tomorrow’s larger devices.

Circuit diagram created using Qiskit’s draw() method.
CH12 F01 gonciulea
Histogram of the quasi-probability distribution.
CH12 F02 gonciulea
Asking the assistant to solve the example knapsack problem.
CH12 F03 gonciulea
The output is the optimal solution.
CH12 F04 gonciulea
Butterfly diagrams for a three-qubit system and targets 0, 1 and 2.
CH12 F05 gonciulea
A three-qubit quantum state (top) and a four-qubit quantum state (bottom) visualized as an array of pixels.
CH12 F06 gonciulea
A three-qubit quantum state (top) and a four-qubit quantum state (bottom) visualized as a two-dimensional array of pixels.
CH12 F07 gonciulea
Visualizations of quantum transformations on different target qubits.
CH12 F08 gonciulea
Pixel grid visualizations of each step of a simulated quantum computation.
CH12 F09 gonciulea
Quantum state encoding the function \(f(k) = 0.4 k^2 - 2.3\) for \(0 \le k < 4\).
CH12 F10 gonciulea
Shor’s algorithm circuit diagram.
CH12 F11 gonciulea

Summary

  • At the most basic level, the state of a qubit system changes according to a butterfly pattern, which occurs in several other classical computing contexts.
  • Large unitary matrices are useful in theoretical research, but for practical quantum computing, developers need to understand elementary quantum gates.
  • The state of a qubit system can be thought of as an image whose pixels change by recombining rows or columns of the image.
  • There is a lot more to be learned about quantum computing. This book has laid the foundation for readers to continue their learning journey into more advanced topics.

FAQ

What does it mean to be “quantum ready,” and why does it matter?Being quantum ready means identifying technical and business problems that could benefit from quantum approaches and building the skills, code, and workflows to act when hardware matures. Like early deep-learning adopters who prepared before large-scale GPUs were common, teams that prototype now (with simulators and hybrid workflows) will be positioned to capture value as quantum hardware scales.
Where does quantum advantage come from, and what are its limitations?Two superpowers drive advantage: quantum parallelism (structured, massive linear-algebra operations) and measurement (efficient sampling from probability distributions). The structure required by quantum parallelism limits which problems benefit. Examples include the Quantum Fourier Transform (QFT) and amplitude amplification (e.g., Grover). Solutions must align to these structures; otherwise, quantum won’t outperform classical methods.
What are the three main quantum computing patterns reviewed in this chapter?- Sampling from probability distributions: building truly random samplers (e.g., binomial, raised-cosine, normal approximations).
- Searching for specific outcomes: amplitude amplification for unstructured search (e.g., Grover), knapsack, and min/max finding.
- Estimating probabilities: Quantum Amplitude Estimation to estimate success probabilities more efficiently than classical Monte Carlo.
Why is a fast, flexible simulator important, and what shortcuts does the book use?A flexible simulator accelerates learning, experimentation, and algorithm design. Classical simulation is expensive, so targeted shortcuts help: phase oracles can directly flip selected amplitudes without gate-by-gate simulation, and QFT can be simulated via the classical Fast Fourier Transform (FFT). These reduce time and memory while preserving algorithmic behavior.
How does Hume stay source-level compatible with Qiskit, and how do I switch between them?Hume mirrors Qiskit’s circuit-building syntax and extends Qiskit’s QuantumCircuit with a few convenience methods (e.g., run, c_append for controlled appends, qft, iqft, a basic measure). A single config flag (SIMULATOR = 'hume' or 'qiskit') toggles implementations while keeping your circuit code unchanged. Utilities like to_qiskit/hume_to_qiskit convert circuits between Hume and Qiskit representations.
How do I run the book’s circuits on real IBM Quantum hardware?- Create an IBM Quantum account and save your API key with QiskitRuntimeService.save_account.
- Initialize QiskitRuntimeService() and select a backend (e.g., service.least_busy).
- Convert your Hume circuit to Qiskit, add measurements, and transpile for the backend.
- Run with the Qiskit Runtime Sampler (shots as needed) and analyze quasi_dists (quasi-probabilities) with plot_histogram. Note: IBM offerings evolve; refer to the book’s repo for updates.
What is the butterfly computing pattern, and how do single-qubit gates implement it?Single-qubit gates recombine pairs of amplitudes determined by the target qubit, governed by a 2×2 unitary. Controlled versions restrict which pairs are affected. These pairwise recombinations form “butterfly” diagrams—similar to classical FFT butterflies—and quantum parallelism lets many such pair operations occur simultaneously across the state.
How can quantum states be visualized as images, and what does measurement mean in that view?Map each amplitude to a pixel: hue encodes phase, intensity encodes magnitude. Arrange qubits into a prefix/suffix to form rows/columns. A gate on a prefix qubit recombines columns; on a suffix qubit, rows. Measurement reveals a single pixel’s coordinates; the chance of picking that pixel equals the squared intensity. The simulator’s run_and_yield can expose state snapshots after each transformation for step-by-step visualizations.
What optimization problems are addressed, and how does QAOA compare to Grover-based methods?The book covers Constrained Polynomial Binary Optimization (CPBO) with emphasis on Quadratic Unconstrained Binary Optimization (QUBO), whose objective has linear and pairwise (quadratic) terms. Grover-based optimizers use amplitude amplification and can require deep circuits. QAOA is a hybrid, physics-inspired alternative that typically uses shallower circuits but requires iterative classical optimization between quantum runs.
What additional topics are previewed (non-integer coefficients and Shor’s algorithm), and how do they fit the framework?- Non-integer coefficients: function encodings extend by representing outputs with discrete-sinc-like distributions rather than single integer values, enabling optimization over real-valued objectives.
- Shor’s algorithm: framed via period finding of f(k) = a^k mod N using two registers, Hadamards, modular-exponentiation operator U, and an IQFT—structurally akin to the book’s function-encoding circuits. It threatens RSA by enabling efficient integer factorization on sufficiently large, fault-tolerant quantum hardware.

pro $24.99 per month

  • access to all Manning books, MEAPs, liveVideos, liveProjects, and audiobooks!
  • choose one free eBook per month to keep
  • exclusive 50% discount on all purchases
  • renews monthly, pause or cancel renewal anytime

lite $19.99 per month

  • access to all Manning books, including MEAPs!

team

5, 10 or 20 seats+ for your team - learn more


choose your plan

team

monthly
annual
$49.99
$499.99
only $41.67 per month
  • five seats for your team
  • access to all Manning books, MEAPs, liveVideos, liveProjects, and audiobooks!
  • choose another free product every time you renew
  • choose twelve free products per year
  • exclusive 50% discount on all purchases
  • renews monthly, pause or cancel renewal anytime
  • renews annually, pause or cancel renewal anytime
  • Building Quantum Software with Python ebook for free
choose your plan

team

monthly
annual
$49.99
$499.99
only $41.67 per month
  • five seats for your team
  • access to all Manning books, MEAPs, liveVideos, liveProjects, and audiobooks!
  • choose another free product every time you renew
  • choose twelve free products per year
  • exclusive 50% discount on all purchases
  • renews monthly, pause or cancel renewal anytime
  • renews annually, pause or cancel renewal anytime
  • Building Quantum Software with Python ebook for free
choose your plan

team

monthly
annual
$49.99
$499.99
only $41.67 per month
  • five seats for your team
  • access to all Manning books, MEAPs, liveVideos, liveProjects, and audiobooks!
  • choose another free product every time you renew
  • choose twelve free products per year
  • exclusive 50% discount on all purchases
  • renews monthly, pause or cancel renewal anytime
  • renews annually, pause or cancel renewal anytime
  • Building Quantum Software with Python ebook for free