Skip to Content
Building Quantum Software with Python
book

Building Quantum Software with Python

by Charlee Stefanski, Constantin Gonciulea
April 2025
Intermediate to advanced
376 pages
9h 41m
English
Manning Publications
Content preview from Building Quantum Software with Python

10 Encoding functions in quantum states

This chapter covers

  • Representing integer key–value pairs in quantum states
  • Extending frequency (value) encoding to (polynomial) function encoding
  • Using Grover’s algorithm to search for function values

In classical computing, we can use several data structures to represent pairs, such as attributes and corresponding values or the inputs and outputs of a function. One such data structure is a dictionary, where unique keys are mapped to specific values. In this chapter, we will learn how to represent such integer key–value pairs in a quantum state. We will use two qubit registers: one to represent keys and one to represent values. We will entangle the registers so that if a measurement is performed, ...

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 in Action

Quantum Computing in Action

Johan Vos
Deep Learning with PyTorch

Deep Learning with PyTorch

Eli Stevens, Thomas Viehmann, Luca Pietro Giovanni Antiga

Publisher Resources

ISBN: 9781633437630Supplemental ContentPublisher SupportOtherPublisher WebsiteSupplemental ContentPurchase Link