Download as pdf or txt
Download as pdf or txt
You are on page 1of 35

The University of Birmingham

School of Computer Science

A Constant Complexity Algorithm for Solving


the Boolean Satisfiability Problem on
Quantum Computers

(A Hybrid Quantum Search Engine)

Ahmed Younes – Julian Miller – Jon Rowe

October 2003 1
Outline

n Intro. to Satisfiability Problem.


n Representation of Boolean Functions on QC.
n The Algorithm.
n Algorithm Performance.
n Iterating the Algorithm.
n Performance of Iterating the Algorithm.
n Conclusion.
n References.

2
Satisfiability Problem-1

n Satisfiability problem is one of the famous NP-


complete problems of special interest in theory
of computation, artificial intelligence and the
study of mathematical logic.

n It can be understood as follows: We have an n


variable Boolean expression and we need to
know if there are any possible variable
assignments within the 2n possible variable
assignments that will make the expression
evaluate to TRUE.

3
Satisfiability Problem-2

n Solving an arbitrary Satisfiability Problem can be


understood as a search problem within search
space of size N=2 n with one or more matching
solutions within the search space.
n Classically, It was shown that this problem can be
solved in O ( N / M ) where M is the number of
solutions.
n Grover’s Algorithm was shown to solve this
problem in O( N / M ) on quantum computers.
n It was shown that number of iterations required by
Grover’s Algorithm increases for M ≥ N / 2 .

4
Satisfiability Problem-3

Grover's Probability Distribution after one iteration. 5


Representation of Boolean Functions on QC -1

n There are two well developed paradigms


of Boolean logic. The first uses the
{AND,OR,NOT} operations and called
Canonical Boolean Logic. The second uses
the {AND,XOR,NOT} operations and
called Reed-Muller logic (RM). It means
that any arbitrary Boolean expression
(SAT or K-SAT) can be represented in RM
form.

6
Representation of Boolean Functions on QC -2

n Consider the following Boolean expression:

n In previous work, we showed that any Boolean


function represented in RM can be implemented as
a reversible Boolean quantum circuit, so RM
expression for the above Boolean expression takes
this form:

7
Representation of Boolean Functions on QC -3

n The Boolean Quantum Circuit that represents


this expression for Positive Polarity RM is as
follows :

8
Representation of Boolean Functions on QC -4

9
Representation of Boolean Functions on QC -5

n The meaning of circuit optimality [5] has many constraints, for


e.g.:
1.The interaction between qubits in the circuit. It may be
difficult to involve certain qubits on the same CNOT gates.
2.The number of control qubits per CNOT gate should be
minimum.
3.The total number of CNOT gates should be kept to a
minimum so it is possible to maintain coherence during the
operation of the circuit.
n Optimization algorithms is required/can be found to optimize
quantum circuits represented as RM similar to that found on
classical computers

10
The Algorithm -1

11
The Algorithm -2
1-Register Preparation:

2-Register Initialization:

3- Boolean Function Evaluation:

12
The Algorithm -3
4- Completing Superposition and Changing Sign :

13
The Algorithm -4
n Let M be the number of possible
variable assignments that will make
the Boolean expression evaluate to
TRUE.

n : no solution: f(i) = 0
n : there exist at least one
solution within the superposition.

14
The Algorithm -5
Case 1:

−1
(M) states with amplitude : P

(P-M) states with amplitude: 1


P

'
(2M) states represent the solutions.
(P-2M) states represent non-solutions. ∑''
15
The Algorithm -6
Case 2:

P states with amplitude: 1


P

16
The Algorithm -7
5- Inversion About the Mean: Apply Diffusion
Operator D on the n+1 qubit system:

n Applying D on general state gives:

n In the case we have:

17
The Algorithm -8
nFor the case where:
Applying D will transform amplitudes as follows:

The state of the system after applying D can be


written as follows:

18
The Algorithm -9
nFor the case where:
Applying D will not change the amplitudes:

6- Measurement: Apply measurement on


the first n qubits.

19
Algorithm Performance - 1

20
Algorithm Performance - 2
n To verify this results, the average
probability that the algorithm can find a
solution can be calculated as follows:

21
Algorithm Performance - 3
n The average probability that the
algorithm will find non-solution can be
calculated as follows:

22
Algorithm Performance - 4
n Classically if we tried to guess the solution,
we may succeed with probability M/N, so the
average probability by guessing can be
calculated as follows:

23
Algorithm Performance - 5
n Similarly, The average probability that
Grover’s algorithm can find a solution after
any arbitrary t of iterations can be
calculated as follows:

24
Algorithm Performance - 6

25
Algorithm Performance - 7

One Iteration Probability Distribution of Grover’s Algorithm


vs.Proposed Algorithm .
26
Iterating the Algorithm - 1

27
Iterating the Algorithm - Performance-1

Probability Distribution for 1,2,..6 iterations. 28


Iterating the Algorithm – Performance-2

Five Iterations Probability Distribution of Grover’s Algorithm


vs.Proposed Algorithm . 29
Iterating the Algorithm – Performance-3
n The Probability of finding a solution
after q steps can be calculated as
follows:

n The number of iterations q required to


get probability at least one-half:

30
Iterating the Algorithm – Performance-4
n It means the algorithm has the following
behaviour:
N
* O(1) : ≤M ≤N
8 N
*O(N/M) : 1≤ M <
8

n It means there is no big gain from


iterating the algorithm.

31
Conclusion-1
n We propose a hybrid quantum search
engine which works as follows:
n If the number of solutions M is known in
advance, so we can pick which algorithm
to use as follows:
• If N / 8 ≤ M ≤ N : We use the proposed
algorithm in O (1) .
• If 1 ≤ M < N / 8 : We use Grover’s algorithm
in O( N / M ) .

32
Conclusion - 2
n If the number of solutions M is unknown,
so the proposed algorithm may succeed
to solve the problem with probability
87.5% after one iteration.
n Special cases:
n If M = N / 2 : The proposed algorithm
with find a solution with certainty.
n If M = N / 4 : Grover’s algorithm with find
a solution with certainty after one
iteration.
33
Conclusion - 3
n It would be better to have a single
quantum algorithm which combines
both behaviours (Grover’s for few
number of solutions and the
proposed algorithm here):
i.e.
n If N / 8 ≤ M ≤ N : It runs in O (1) .
n If 1 ≤ M < N / 8 : It runs in O ( N / M ).
(current research)

34
References

[1] L. K. Grover (1996). A Fast Quantum Mechanical Algorithm for Database Search.
Search.
Proceedings of the Twenty-
Twenty-Eighth Annual ACM Symposium on the Theory of Computing,
212--219.
212
[2] M.Boyer, G. Brassard, P. H øyer and A. Tapp(1998), Tight Bounds on Quantum Searching.
Searching.
Fortschritte der Physik
Physik,, vol. 46(4-
46(4-5), pp. 493-
493- 505.
[3] M. Nielsen and I. Chuang (2000), Quantum Computation and Quantum Information.
Information .
Cambridge University Press, Cambridge, United Kingdom.
[4] A. Younes, J. Miller (2003), Automated Method for Building CNOT Based Quantum Circuits
for Boolean Function.
Function . Los Alamos Physics preprint archive, quant-
quant-ph/0304099.
[5] A. Younes, and J. Miller (2003), Representation of Boolean Quantum Circuits as Reed-
Reed-
Muller Expansions.
Expansions. Los Alamos Physics preprint archive,quant-
archive,quant-ph/0305134.
[6] A. Younes, and J. Miller (2003), A Constant Complexity Algorithm for Solving the Boolean
Satisfiability Problem on Quantum Computers.
Computers. Los Alamos Physics preprint archive,quant-
archive,quant-
ph/0305134.

35

You might also like