0% found this document useful (0 votes)
1 views25 pages

Quantum Computing Unit - 3

The document discusses Quantum Parallelism and Deutsch's Algorithm, highlighting the efficiency of quantum computing in solving classically intractable problems through parallel operations. It also introduces Deutsch's Jozsa Algorithm, which extends Deutsch's Algorithm to multiple qubits, demonstrating the advantages of quantum algorithms over classical ones. Additionally, the Quantum Fourier Transform (QFT) is presented as a crucial component of quantum algorithms, offering exponential speedup and a change of basis from computational to Fourier basis.

Uploaded by

Vaishnavi A
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
1 views25 pages

Quantum Computing Unit - 3

The document discusses Quantum Parallelism and Deutsch's Algorithm, highlighting the efficiency of quantum computing in solving classically intractable problems through parallel operations. It also introduces Deutsch's Jozsa Algorithm, which extends Deutsch's Algorithm to multiple qubits, demonstrating the advantages of quantum algorithms over classical ones. Additionally, the Quantum Fourier Transform (QFT) is presented as a crucial component of quantum algorithms, offering exponential speedup and a change of basis from computational to Fourier basis.

Uploaded by

Vaishnavi A
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 25

Lecture Notes Template

22AI029 - QUANTUM COMPUTING


UNIT 3 & LP 9
Quantum Parallelism, Deutsch’s Algorithm
1. Quantum Parallelism
Quantum Parallelism: is the possibility of performing a large number of operations in
parallel, which represents its key difference from classical information processing and computing.
Namely, in classical computing, it is possible to know the internal status of the computer.
1.1 Applications of Quantum Parallelism
Quantum computers are remarkably inefficient at solving simple problems. However, they
can be remarkably efficient at solving classically intractable problems – problems that cannot be
solved efficiently with classical computers. This means that the applications of quantum computing
are going to be limited to extremely challenging problems. Examples of such
challenging-to-intractable problems include:

●​ Speed: Problems that grow in complexity exponentially may be solvable with exponentially
greater efficiency, resulting in exponential speedups in computation time.
●​ Scale: Problems that grow in memory requirements, such as simulating molecules in quantum
chemistry, beyond the capacities of supercomputers, can be solved with relatively small
quantum computers.
●​ Randomness: Problems that require humanlike decision making – such as generating art,
language, and music – are already being prototyped.
●​ Search: Problems with massive search spaces can have all possible solutions found at the
same time and with mathematically-proven optimality.
●​ Security: Cryptographic schemes that rely on the multiplication of prime numbers will
become vulnerable to decryption.
A good rule of thumb is that most applications that are possible today will continue to be
solved classically in the future. The applications that are not possible today, or otherwise require
tremendous time and classical resources, are the applications fueling investments into quantum
computing.
1
1.3 Challenges of Quantum Parallelism
Although quantum computation has the potential to disrupt entire industries, the path to
achieving such breakthroughs is not a simple one. Just a few of the challenges that must be
addressed along the way include:
●​ Control: Achieving quantum computational advantages is going to require large numbers of
qubits, and yet controlling relatively small numbers of qubits is currently difficult.
●​ Timing: Realizing accurate results will require the precise timing of quantum operations, to a
degree of precision beyond the capabilities of traditional clocks.
●​ Coherence: Realizing accurate results will require qubits that maintain their quantum states
without errors for much longer durations than is currently possible.
●​ Efficiency: Quantum algorithms, such as amplitude encoding, need to become classically
feasible to implement, due to their complexity and memory requirements.
Solutions to all of these problems are currently being researched. And while the road to
fault-tolerant quantum computing is a long one, steps toward this goal are happening every day.
2. Deutsch’s Algorithm

Deutsch algorithm, which was proposed by David Deutsch. Deutsch’s Algorithm: addresses the
question — Given a function f:0,1⟶0,1 and without knowing anything more than that, determine
whether f is a constant or a balanced function with the minimum number of function evaluations.
The classical algorithm requires two function calls to figure out the answer.

2
Example:
Consider a function that accepts a single bit as input and produces a single bit as output. As
x∈{0,1}, there are only 4 options that can act on this set and give us a single bit as output.
1) Identity Function: f(x) = 0 for x= 0 and f(x) = 1 for x = 1.
2) Bit-Flip Function: f(x) = 1 for x=0 and f(x) = 0 for x = 1.
3) f(x)=0, for x=0, 1
4) f(x)=1 for x=0, 1.
Option 1, 2 are examples of balanced function and 3, 4 are examples of constant function.‍
●​ Deutsch’s algorithm addresses the question — Given a function f:0,1⟶0,1 and without knowing
anything more than that, determine whether f is a constant or a balanced function with the
minimum number of function evaluations.
●​ The classical algorithm requires two function calls to figure out the answer. Instead of one bit as
input, if we have n bits as input then we need minimum 2 calls to maximum (2**(n-1) +1) calls
to be certain that f(x) is constant or balanced.
●​ But a quantum computer can solve this problem using only one call to the function f(x),
provided we have the function f implemented as a quantum oracle, which maps the |x⟩ |y⟩ state
to |x⟩ |f(x) ⊕ y⟩.

2.1 Steps of Deutsch Algorithm:


●​ Deutsch algorithm which determines whether a one bit domain and range function (f: {0, 1}
→ {0, 1}) is balanced or constant. Consider a 2 qubit quantum computer which starts in
state |x, y⟩. Since |x⟩ can be in superposition state as a qubit, we can do that by applying H
gate. Then an unitary operation U_f as follows:

●​ If apply this unitary operator to our input state which is now in |+⟩ |0⟩ state, will get:

●​ Expression above is important as we can note that with a single query we can get
information about every possible value of f(x) in a single step (x∈0,1).
●​ Note that 0⊕ f(0) = f(0) and 0⊕ f(1) = f(1).

3
●​ Can think of this state as evaluating f(x) for two values of x simultaneously, which is known
as ‘quantum parallelism’.
●​ Deutsch algorithm exploits this superposition state to find the global property of the
function f, whether it is balanced or constant by calculating the expression below:

●​ Will go step by step to do the math and understand what we expect at the output.
2.3 Step by Step Process:
2.3.1 Hadamard Gates in Parallel:
●​ Already know the action of H gates in parallel from a previous post on uniform
superposition. H⊗ H |0⟩|1⟩ = |+⟩|-⟩ = 0.5(|00⟩ -|01⟩+|10⟩-|11⟩).
2.3.2 Action of Unitary Operator:
●​ Now we need to apply the unitary operator U_f to this state. Let’s apply term by term and
below is the action of this operator on state |00⟩

●​ From the expression above, depending on whether f(0)=1 or f(0)=0, we have either |00⟩ or
|01⟩. Can combine this as — |0, 0⊕ f(0)⟩ = |0, f(0)⟩. Similarly, action of U_f on the
remaining terms can be summarized as below:

●​ Combining all of these terms we get the expression below:

●​ From here, consider the Constant function case i.e. f(0) = f(1). In this case Eq. 4 reduces to:

●​ In case of a balanced function we have f(0)≠f(1), Since f(x) is a binary function, will have
1⊕f(0)=f(1); 1⊕f(1)=f(0). Using these, eq. 4 can be reduced to:

4
2.3.3 Apply the Final Hadamard Gate:
●​ Now, left with only one step i.e. apply H⊗ I to eq. 5.1 and eq. 5.2 respectively to find the
output of constant and balanced cases. Since H gate is its own inverse, we recall H|0⟩ = |+⟩
and H|+⟩ = |0⟩; Using this from eq. 5.1, will get:

●​ Here, note that the first qubit is in state |0⟩, compare this with the balanced function case
where it will get first qubit in state |1⟩ as below:

●​ Thus, it can clearly depend upon the measurement result on the first qubit whether the
function is balanced or constant.

DISCUSSION QUESTIONS:
1.​ What is meant by quantum parallelism?
2.​ List the steps involved in Deutsch's algorithm.
3.​ Mention the demerits of Deutsch's algorithm.

5
Lecture Notes Template

22AI029 - QUANTUM COMPUTING


UNIT 3 & LP 10
Deutsch’s Jozse Algorithm
1. Deutsch’s Jozse Algorithm
Deutsch-Jozsa algorithm, which was proposed by David Deutsch and Richard Jozsa in 1992
and really showed the power of quantum algorithms over the classical ones.
To discuss the Deutsch-Jozsa algorithm, it is better to start from Deutsch algorithm where
instead of n qubits, we just consider a single qubit.

Deutsch’s Algorithm:
●​ Addresses the question — Given a function f:0,1⟶0,1 and without knowing anything more
than that, determine whether f is a constant or a balanced function with the minimum
number of function evaluations.
●​ The classical algorithm requires two function calls to figure out the answer.

1
Deutsch-Jozsa algorithm: is the n-bit extension of the single bit Deutsch algorithm. The circuit
for this particular problem is as below:

Now, it will be for n qubits. To make the underlying mathematics relatively simpler we will
introduce a very commonly used trick — Phase Kickback trick.
1.1 Phase Kickback Trick:
●​ Consider for any x∈{0,1}, action of U_f on the state |x⟩|−⟩, We will get the expression
below

●​ For f(x)=0, U_f (|x⟩|−⟩)=|x⟩|−⟩; For f(x)=1, U_f (|x⟩|−⟩)=−|x⟩|−⟩, i.e. -1 global phase factor
has been produced. These 2 cases can be combined in a single expression as below

will make use of the expression above later to simplify the calculation of Deutsch-Jozsa algorithm.
1.2 Hadamard Gates in Parallel:
●​ We have n qubits intitialized to |0⟩ and another one initialized to |1⟩. Hadamard gates are
applied to each input. We already know the result of action of n H gates in parallel to n
inputs initialized to |0⟩ which is described in a previous post in detail. The result is as below

2
●​ Since we have n inputs initialized to |0⟩ and one single qubit to |1⟩, combining with the
previous expression we get

●​ apply U_f which turns |x, y⟩ to |x, y⊕f(x)⟩. Important to note that |0⊕f(x)⟩=|f(x)⟩. After
applying U_f we have

●​ In the equation above we have used the phase kickback trick that we discussed in previous
section. After the unitary operation with U_f, applying H gate to n qubit state |x⟩ gives

●​ So the final output is

●​ Here x⋅y is sum of bitwise product i.e. x0y0⊕x1y1⊕x2y2……etc. Let’s consider the
probability of measuring |0⟩⊗n (all outputs in state |0⟩), which is actually our state |y⟩. Here,
if f(x) is balanced then for half the terms it is 0 and for half it is 1. Thus, we will get zero
amplitude of getting output |0⟩⊗n. We will only get an outcome of |0⟩⊗n when f(x) is
constant.
DISCUSSION QUESTIONS:
1.​ Define DJ algorithm.
2.​ What is the need of the DJ algorithm for quantum problems?
3.​ Define Hadamard gate of DJ algorithm.

3
Lecture Notes Template

22AI029 - QUANTUM COMPUTING


UNIT 3 & LP 11
QUANTUM FOURIER TRANSFORM AND ITS APPLICATIONS
1. Quantum Fourier Transform(QFT)
Quantum Fourier Transform(QFT) is the quantum equivalent of the classical Fast Fourier
Transform(FFT). QFT is an integral part of quantum algorithms like Shor’s algorithm and quantum
phase estimation. It offers exponential speedup and can be evaluated in polynomial time on a
quantum computer.
QFT is essentially a change of basis from a computational basis to a Fourier basis. In the
case of a single qubit system, applying QFT on it is equivalent to applying a Hadamard gate on it.

Shows operation of Hadamard gate on |0⟩ and |1⟩


1.1 QFT on n qubit system
In case of an n qubit system, QFT converts it from computational basis to Fourier basis. For
n=1, The Fourier basis is the Hadamard basis, as demonstrated in the previous section.
Similarly, for all values of n, there are corresponding Fourier bases. The formula for
converting an n-qubit system from computational to Fourier basis is given below.

1
Result when QFT is applied on an n qubit system |x⟩.
There are two equivalent representations of QFT as shown in the figure given above, but the
second one is more useful in understanding how the quantum circuit is built.
1.2 QFT on Bloch sphere

Fundamentals and Frontiers of the Josephson Effect


In the computational basis, each qubit is in a superposition of states, |0⟩ or |1⟩, represented along
the z axis.

Refer to: https://docs.google.com/document/d/1rholWWVxnwY4ZiS2SpJk7Pfo4SSvXd_v/edit


2
In Fig 5, a 4 qubit system is represented using 4 Bloch spheres. The leftmost sphere
represents the least significant qubit and the rightmost sphere represents the most significant qubit.
It shows how the different qubits change on counting from 0 to 15 in the computational state.
The qubits flip between |0⟩ and |1⟩ with different frequencies, the leftmost flips every
increment and the right most with every 8 increments.

Fig 7 represents the same 4 qubit system after QFT has been applied to it. Each qubit is
represented as a rotation about the z axis, therefore, it will lie on the x-y plane. Qubit 0 rotates π/8
radians every increment and this angle increases by two times as we move the qubits to the right.
Qubit 1 rotates π/4 radians, qubit 2 rotates π/2 radians and qubit 3 rotates π radians with every
increment.
1.3 Components necessary for QFT circuit
1.3.1 Hadamard Gate:
The Hadamard gate introduces superposition in a qubit. When applied on a qubit in computational
basis, it converts it into Hadamard basis and vice versa.

matrix representation of Hadamard gate


1.3.2 UROT Gate : The Unitary rotation gate applies a phase to a state

matrix representation of UROT gate


3
1.3.3 CROT Gate : The controlled Unitary rotation gate applies a phase only if the control bit is 1

1.4 QFT Circuit


Given below is the QFT circuit of a 3 qubit system.

Here H represents Hadamard gate and R2 represents UROT gate with k=2
Step 1: Apply H gate on first qubit, which is |j1⟩.
Step 2: Apply CROT gate on |j1⟩ with k=2 and |j2⟩ as control qubit.
Step 3: Apply CROT gate on |j1⟩ with k=3 and |j3⟩ as control qubit.
After these 3 steps, we obtain the final state of |j1⟩ as

Now, we move on to the second qubit |j2⟩.


Step 4: Apply H gate on second qubit, which is |j2⟩.
Step 5: Apply CROT gate on |j2⟩ with k=2 and |j3⟩ as control qubit.
After steps 4 and 5, we obtain final state of |j2⟩ as

4
Step 6: Apply H gate on |j3⟩.

After this steps, we get |j3⟩ as

On comparing these final states obtained above to the QFT formula on n-qubits discussed earlier, it
is clear that the order of the qubits have been reversed. The final result of |j1⟩ should be the final
state of |j3⟩ according to the QFT equation. On extending this circuit to n qubit systems, we can see
that we have to swap the values of kth qubit and the (n+1-k)th qubit to get the correct answer.

1.5 Applications of Fourier Transform in Signal and Image Processing


Fourier transform is an indispensable part of signal processing. Taking the example of
RADAR, the echo it receives back after sending out electromagnetic waves, is in the time domain.
Applying Fourier transform on this time-domain signal allows us to extract its frequency content.
The frequency-domain signal is easier to use in computer aided signal processing.
In image processing, the usual images we see are in the spatial domain. In the spatial
domain, an image is represented as a 2-D matrix where each element represents the intensity of the
pixel at that position in space. The image can be converted to frequency domain using Fourier
transform. This domain represents the rate of change of intensity of pixels.
Therefore, the edges or boundaries in an image have higher frequency than the smooth
inner regions. The frequency domain makes it easy for us to extract additional features of the image
and do operations on it like blurring and sharpening. Due to its usefulness, a quantum equivalent of
the Fourier transform has great applications.

Shows how a signal(right) is composed of many signals of different frequencies(left)

5
Shows conversion of a signal between time and frequency domain
Fourier transform is an important mathematical operation that has applications in a wide
variety of fields. It allows us to transform signals between domains, most commonly time and
frequency domains. It essentially allows us to do a basis transformation.
Every signal can be decomposed into a collection of complex exponential signals of certain
frequencies. To find out the amplitudes of signals of each frequency. This allows us to find out how
much each frequency contributes to the total signal. This can be done using Fourier transform. It
converts amplitude vs time graph to amplitude vs frequency graph. It has applications in signal and
image.

DISCUSSION QUESTIONS:
1.​ What is meant by QFT?
2.​ What is the purpose of QFT in QC?
3.​ List the applications of QFT.

6
Lecture Notes Template

22AI029 - QUANTUM COMPUTING


UNIT 3 & LP 12
GROVER’S ALGORITHM
1. Grover’s Algorithm
Grover’s algorithm is a quantum algorithm that solves the unstructured search problem. In
an unstructured search problem, we are given a set of N elements and we want to find a single
marked element.
A classical computer would need to search through all N elements in order to find the
marked element, which would take time O(N). Grover’s algorithm, on the other hand, can find the
marked element in time O(√ N).
Grover’s algorithm is a powerful tool that can be used to solve a variety of problems. For
example, it can be used to find patterns in data, break cryptographic keys, and solve optimization
problems. As quantum computers become more powerful, Grover’s algorithm will become
increasingly important.
1.1 Algorithm
The algorithm works by applying a series of quantum operations to the input state, which is
initialized as a superposition of all possible search states. The key idea behind Grover’s algorithm
is to amplify the amplitude of the marked state (i.e., the state containing the item that we are
searching for) by iteratively applying a quantum operation known as the Grover operator.
The Grover operator has two quantum operations:
●​ The reflection on the mean
●​ The inversion of the marked state.
Here is a more detailed explanation of how Grover’s algorithm works:
1.1.1 Initial state:
The algorithm starts in a state that is a superposition of all N elements. This state can be written as:

1
where ∣x⟩ is the state corresponding to the element x.
1.1.2 Diffusion operator:
The diffusion operator is a quantum operation that amplifies the amplitudes of the states that
correspond to the marked element. The diffusion operator can be written as

where I is the identity operator.


1.1.3 Measurement:
The algorithm measures the state of the system. This collapses the superposition and gives us the
marked element. The repeated use of this operator increases the scope of the specified condition,
making it easier to measure. Once the specified state is reached, the algorithm returns the index of
the object corresponding to that state.
1.1.4 Proof of correctness:
The proof of the correctness of Grover’s algorithm can be shown through the following steps:
●​ Initialization: The algorithm begins with an input state, which is initialised as a
superposition of all possible search states. The superposition state is given by: |s⟩ =
(1/√N)∑x|x⟩, where |x⟩ represents the state of a particular item in the database, and N is the
total number of items.
●​ Marking the state: The algorithm then applies an oracle function, which marks the state
containing the item that we are searching for. The oracle function flips the sign of the
amplitude of the marked state:

where f(x) = 1 if x is the marked state, and f(x) = 0 otherwise.


●​ Applying the Grover operator: The Grover operator is then applied iteratively to the state
|s’⟩. The Grover operator consists of two quantum operations: the reflection about the mean
2
and the inversion about the marked state. The operator is applied O(sqrt(N)) times to
amplify the amplitude of the marked state and decrease the amplitudes of the other states.
●​ Measuring the state: Finally, the state is measured, and the algorithm returns the index of
the marked state.
○​ The correctness of the algorithm can be shown by analyzing the probability of
measuring the marked state at the end of the algorithm. The probability of
measuring the marked state after k iterations of the Grover operator is given by:

where θ = arcsin(1/√N) is the angle between the initial state and the marked state.
As k increases, the probability of measuring the marked state approaches 1.
○​ Therefore, Grover’s algorithm can be shown to correctly find the marked state in
O(sqrt(N)) time complexity with high probability.
1.1.5 Pseudo Code:
Input: N: number of items in the list, oracle(x): a function that returns true if x is the target item,
and false otherwise
Step 1: Initialize state
Hadamard transform on all qubits
Step 2: Iterate over Grover’s algorithm
for k = 1 to sqrt(N) do
# Step 2a: Apply the oracle
Apply the oracle to the state
# Step 2b: Apply the diffusion operator
Hadamard transform on all qubits
Apply an X gate on all qubits
Apply a multi-controlled Z gate (which flips the sign of the state only if all qubits are in the state
|1>)
Apply an X gate on all qubits
Hadamard transform on all qubits
end for
Step 3: Measure the state and output the result
Measure the state and output the result

3
1.1.6 Code
from qiskit import QuantumCircuit, ClassicalRegister, QuantumRegister, Aer, execute
# Define the black box function
def oracle(circuit, register, marked_state):
for i in range(len(marked_state)):
if marked_state[i] == '1':
circuit.x(register[i])
circuit.cz(register[0], register[1])
for i in range(len(marked_state)):
if marked_state[i] == '1':
circuit.x(register[i])
# Define the Grover diffusion operator
def grover_diffusion(circuit, register):
circuit.h(register)
circuit.x(register)
circuit.h(register[1])
circuit.cx(register[0], register[1])
circuit.h(register[1])
circuit.x(register)
circuit.h(register)
# Define the Grover algorithm
def grover(marked_state):
# Initialize a quantum register
# of n qubits
n = len(marked_state)
qr = QuantumRegister(n)
cr = ClassicalRegister(n)
circuit = QuantumCircuit(qr, cr)
# Apply the Hadamard gate
# to each qubit
circuit.h(qr)
# Repeat the following procedure
# O(sqrt(2 ^ n)) times
num_iterations = int(round((2 ** n) ** 0.5))
4
for i in range(num_iterations):
# Apply the black box function f
# to the current state to mark
# the solution
oracle(circuit, qr, marked_state)
# Apply the Grover diffusion
# operator to amplify the amplitude
# of the marked solution
grover_diffusion(circuit, qr)
# Measure the state to obtain
# a solution x
circuit.measure(qr, cr)
# Run the circuit on a simulator
backend = Aer.get_backend('qasm_simulator')
job = execute(circuit, backend, shots = 1)
result = job.result()
counts = result.get_counts()
x = list(counts.keys())[0]
return x
# Test the Grover algorithm
marked_state = '101'
result = grover(marked_state)
print(f"The marked state is {result}")
OUTPUT:

1.2 Applications of Grover’s Algorithm:


●​ Data mining: Grover’s algorithm can be used to find patterns in large datasets that would
be impossible to find with a classical computer. For example, it could be used to find
fraudulent transactions in a financial database or to identify cancer cells in a medical image.
●​ Cryptography: Grover’s algorithm can be used to break cryptographic keys that are
currently considered secure. This could have a major impact on the security of online
communications and transactions.
5
●​ Optimization: Grover’s algorithm can be used to solve optimization problems that are
difficult or impossible to solve with a classical computer. For example, it could be used to
find the shortest route between two points or to find the optimal investment portfolio..
1.3 Limitations of Grover’s Algorithm:
●​ Quadratic speedup: Grover’s algorithm gives a quadratic speedup compared to classical
algorithms, which means that it can only provide a significant speedup for some problems
that have a large search space. For problems with smaller search spaces, the speedup may
not be good enough to justify the use of this algorithm.
●​ Limited by hardware: Grover’s algorithm requires the use of a large number of qubits to
achieve a significant speedup, which is currently beyond the capabilities of most quantum
hardware. This means that the algorithm may not be practical for many real-world
applications until more powerful quantum hardware is developed.
●​ Limited to unstructured search: Grover’s algorithm is designed for unstructured search
problems, which means that it may not be applicable to other types of problems such as
optimization or simulation.
●​ Error-prone: Grover’s algorithm, like all quantum algorithms, is susceptible to errors due
to noise and decoherence. These errors can affect the accuracy and reliability of the
algorithm, which can limit its practical use in real-world applications.
●​ Limited applicability in cryptography: Although Grover’s algorithm can be used to break
certain cryptographic algorithms, it is not applicable to all types of encryption. For
example, public-key encryption is not vulnerable to Grover’s algorithm due to its use of
mathematical problems that are not efficiently solvable by quantum computers.

https://learning.quantum.ibm.com/course/fundamentals-of-quantum-algorithms/grovers-algorithm

DISCUSSION QUESTIONS:
1.​ What is meant by Grover’s algorithm?
2.​ List the various applications used by Grover's algorithm.
3.​ Mention the limitation of Grover's algorithm.

6
7
Lecture Notes Template

22AI029 - QUANTUM COMPUTING


UNIT 3 & LP 13
Quantum Simulation & Quantum Counting
1. Quantum Simulation
Quantum simulators permit the study of a quantum system in a programmable fashion. In
this instance, simulators are special purpose devices designed to provide insight about specific
physics problems. Quantum simulators may be contrasted with generally programmable "digital"
quantum computers, which would be capable of solving a wider class of quantum problems.
A universal quantum simulator is a quantum computer proposed by Yuri Manin in 1980 and
Richard Feynman in 1982. Feynman showed that a classical Turing machine would not be able to
simulate a quantum effect, while his hypothetical universal quantum computer would be able to
mimic needed quantum effects.
A quantum system of many particles could be simulated by a quantum computer using a
number of quantum bits similar to the number of particles in the original system. This has been
extended to much larger classes of quantum systems.
Quantum simulators have been realized on a number of experimental platforms, including
systems of ultracold quantum gases, polar molecules, trapped ions, photonic systems, quantum
dots, and superconducting circuits.
2. Quantum Counting
Quantum counting algorithm is a quantum algorithm for efficiently counting the number of
solutions for a given search problem. The algorithm is based on the quantum phase estimation
algorithm and on Grover's search algorithm.
Counting problems are common in diverse fields such as statistical estimation, statistical
physics, networking, etc. As for quantum computing, the ability to perform quantum counting
efficiently is needed in order to use Grover's search algorithm (because running Grover's search
algorithm requires knowing how many solutions exist).
Moreover, this algorithm solves the quantum existence problem (namely, deciding whether
any solution exists) as a special case. The algorithm was devised by Gilles Brassard, Peter Høyer
and Alain Tapp in 1998.
1
2.1 Problem:
𝑛 𝑛 𝑛
Consider a finite set {0, 1} of size N=2 and a set B of “Solution” (that is a subset of {0, 1} ,
define:

In other words, f is the indicator function of B


−1
Calculate the number of solutions M=|𝑓 (1)| = |B|
2.2 Classical Solutions
Without any prior knowledge on the set of solutions B (or the structure of the function f) a classical
𝑛
deterministic solution cannot perform better than Ω(N). Because all the N elements of {0, 1} must
be inspected (consider a case where the last element to be inspected is a solution).

2.3 Algorithm
2.3.1 Setup
The input consists of two registers (namely, two parts): the upper p qubits comprise the first
register, and the lower n qubits are the second register.

2.3.2 Create superposition


⊗𝑛 ⊗𝑛
The initial state of the system is |0⟩ |0⟩ After applying multiple bit Hadamard gate operation
on each of the registers separately, the state of the first register is

and the state of the second register is


2
an equal superposition state in the computational basis.
2.3.3 Grover operator
𝑛 𝑛
Because the size of the space is |{0, 1} | = 2 = 𝑁 and the number of solutions is |B| = M, define
the normalized states.

which is the state of the second register after the Hadamard transform
Geometric visualization of Grover's algorithm shows that in the two-dimensional space spanned by
|α⟩ and |β⟩, the Grover operator is a counterclockwise rotation; hence, it can be expressed as

in the orthonormal basis {|α⟩, |β⟩}


From the properties of rotation matrices we know that G is a unitary matrix with the two
±𝑖θ
eigenvalues 𝑒
2.3.4 Estimating the value of θ
From here onwards, we follow the quantum phase estimation algorithm scheme: we apply
controlled Grover operations followed by inverse quantum Fourier transform; and according to the
analysis, we will find the best p-bit approximation to the real number θ (belonging to the
±𝑖θ 4
eigenvalues 𝑒 of the Grover operator) with probability higher than 2
π

Note that the second register is actually in a superposition of the eigenvectors of the Grover
operator (while in the original quantum phase estimation algorithm, the second register is the
required eigenvector). This means that with some probability, we approximate θ and with some
probability, we approximate 2π - θ. Those two approximations are equivalent.

3
is determined by the error within estimation of the value of θ. The quantum phase estimation
algorithm finds, with high probability, the best p-bit approximation of θ this means that if p is large
enough, we will have ∆ ≈ 0, hence |∆𝑀| ≈ 0.

DISCUSSION QUESTIONS:
1.​ Define Quantum search algorithm.
2.​ What is meant by quantum counting?
3.​ Mention the Steps to evaluate quantum counting.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy