Lecture 6
Lecture 6
Quantum algorithms
A quantum algorithm consists of
three basic steps:
• Encoding of the data, which could
be classical or quantum, into the
state of a set of input qubits.
• A sequence of quantum gates
applied to this set of input qubits.
• Measurements of one or more of
the qubits at the end to obtain a
classically interpretable result.
Using a real quantum computer
There are several issues to consider when implementing an algorithm
on real quantum computers, for example:
• What is the available gate set with which the user can state their algorithm?
• What physical gates are actually implemented?
• What is the qubit connectivity (i.e., which pairs of qubits can two-qubit gates
be applied to)?
• What are the sources of noise (i.e., errors)?
These are not the gates that are physically implemented by their quantum computer.
IBM has a compiler that translates the gates into products of gates from a physical gate set.
User-programmed gates are usually decomposed into multiple physical
gates, and hence could lead to a longer physical algorithm.
Examples:
𝑈𝑈𝑈 𝜋𝜋, 0, 𝜋𝜋
𝑈𝑈𝑈 0, 𝜋𝜋
• Textbook algorithms
are typically written
for a fully-connected
hardware, which
means that one can
apply a two-qubit gate
to any two qubits.
• Real quantum
computers may not
have full connectivity.
Algorithmic Paradigms:
• Quantum Fourier Transform (QFT)
• Grover Operator (GO)
• Harrow-Hassidim-Lloyd (HHL)
• Variational Quantum Eigenvalue solver (VQE)
• Hamiltonian simulation (SIM)
Oracles/Deutsch
Quantum Oracles
• Boolean Functions: A Boolean function is a function that has one or
more binary digits (0 or 1) as input, and one binary digit as output.
• From Unary Gates to Boolean Functions:
A classical unary gate takes a single classical bit in and produces a
single classical bit out. In the language of functions, it is nothing other
than a Boolean function of one bit
mod-2 applies
• Negation Operator (Reversible Operation):
using this black box with certain fundamental quantum gates one can build a new
gate that:
Classically we use the black box function f twice in order to determine its nature
• 𝑈𝑈𝑓𝑓 is typically represented by a black box that has n input wire leads and m output wire leads. The
black box in a reversible quantum circuit must represent a unitary operator, and so should have
an equal number of input and output leads.
𝑇𝑇0 :The two-qubit register is in the 𝑇𝑇1 :State |𝜓𝜓(𝑡𝑡1 )⟩ is processed by Uf ,
direct product state and because it is a linear operator
Measuring Device is
in Upper wire
Two outcomes are possible. If f (0) = f (1) Regardless of the value f (0), we find that