Skip to Content
Programming Quantum Computers
book

Programming Quantum Computers

by Eric R. Johnston, Nic Harrigan, Mercedes Gimeno-Segovia
July 2019
Intermediate to advanced content levelIntermediate to advanced
333 pages
8h 13m
English
O'Reilly Media, Inc.
Content preview from Programming Quantum Computers

Chapter 9. Real Data

Fully fledged QPU applications are built to operate on genuine, unaccommodating data. Real data won’t necessarily be as simple to represent as the basic integer inputs we’ve been satisfied with up until now. Thinking of how to represent more complex data within QPUs is thus well worth our effort, and a good data structure can be just as important as a good algorithm. This chapter sets out to answer two questions that we’ve previously sidestepped:

  1. How should we represent complicated data types in a QPU register? A positive integer can be represented with simple binary encoding. What should we do with irrational, or even compound types of data, such as a vectors or matrices? This question takes on more depth when considering that superposition and relative phase might allow entirely quantum ways of encoding such data types.

  2. How can we read stored data into a QPU register? So far we’ve been initializing our input registers by hand, using WRITE operations to manually set a register’s qubits to binary integers of interest. If we’re ever to employ quantum applications on large swathes of data we’ll need to read that data into QPU registers from memory. This is a nontrivial requirement as we may want to initialize a QPU register with a superposition of values—something that conventional RAM isn’t cut out for.

We’ll start by addressing the first of these questions. As we describe QPU representations for increasingly complex types of data, we’ll be led to introduce ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Quantum Computing Fundamentals

Quantum Computing Fundamentals

Chuck Easttom
Algorithms, 4th Edition

Algorithms, 4th Edition

Robert Sedgewick, Kevin Wayne

Publisher Resources

ISBN: 9781492039679Errata PageSupplemental Content