In this talk, a quantum approach is taken into account to solve NP-complete problems efficiently. But this approach does a non-linear transformation in terms of channels.
Tata AIG General Insurance Company - Insurer Innovation Award 2024
SAT problem: A Quantum Approach
1. SAT P ROBLEM : A Q UANTUM A PPROACH
Supervised by:
M. R. Hooshmand Asl
Advised by:
S. A. Shahzade Fazeli
Presented by:
A. Shakiba
University of Yazd
ali.shakiba@stu.yazduni.ac.ir
February 19, 2012
SAT P ROBLEM : A Q UANTUM A PPROACH
1 / 43
2. Quantum Complexity Theory Evolution
Over the past three decades, Quantum Computing has attracted
extensive attention in the academic community.
History
1973 Bennett proved any given Turing machine can be
computed efficiently by a reversible one.
1980 Benioff described a microscopic Turing machine using
Quantum Mechanics.
1982 Feynman suggested that computers behave quantum
mechanically may be more powerful than classical ones.
1985 Deutsch formalized the ideas of Benioff and Feynman
and proposed Quantum Turing machines.
1993 Yao demonstrated the equivalence between Quantum
Turing machines and Quantum Circuits.
SAT P ROBLEM : A Q UANTUM A PPROACH
2 / 43
3. A big bang!
But just after pioneering work of Shor’s and Grover’s, Quantum
Computing has intrigued more and more people.
Some Big Bangs of Quantum Computing
1994 Shor discovered a polynomial-time algorithm for
factoring problem;
1996 Grover found an algorithm for searching through a
database in square root time.
SAT P ROBLEM : A Q UANTUM A PPROACH
3 / 43
4. NP-completeness and Quantum Computing
Following the works of Shor and Grover, it is natural to ask whether all
the NP can be computed efficiently using a Quantum computer.
By consulting Garey and Johnson’s book on
intractability, let us choose Satisfiability Problem
from NP-complete to start attack, since it is a
core of a large family of computationally
intractable NP-complete problems.
SAT P ROBLEM : A Q UANTUM A PPROACH
4 / 43
5. SAT Problem
A SAT problem tries to answer that is there any assignment of truth
values to boolean variables, x1 , . . . , xn , such that f (x1 , . . . , xn ) = 1 for
n
f : {0, 1} → {0, 1}.
SAT problem is consisted of
Variables a set of n boolean variables, x1 , x2 , . . . , xn ,
Literals a set of literals, a variable or its negation,
Clauses a set of m distinct clauses, C1 , C2 , . . . , Cm where each
clause is disjunction of some literals.
SAT problem tries to find out whether there exists any assignment of
truth values to the variables which makes the following true
C1 ∧ C2 ∧ . . . ∧ Cm
SAT P ROBLEM : A Q UANTUM A PPROACH
5 / 43
6. Solving a SAT problem
Throughout this presentation, the following instance of SAT problem is
being solved.
Assume
Variables x1 , x2 , x3 , x4 ,
Clauses C1 = {x1 , x4 , x2 } , C2 = {x2 , x3 , x4 } , C3 = {x1 , x3 } , C4 =
{x3 , x1 , x2 }.
It seems, finding a quantum circuit is just enough to do the job. So Let
us do it . . .
SAT P ROBLEM : A Q UANTUM A PPROACH
6 / 43
7. How to Quantum Compute?
In classical world,
L OAD -RUN -R EAD
cycle is followed.
But in Quantum
world, it is P REPARE -
E VOLVE -M EASURE
cycle.
SAT P ROBLEM : A Q UANTUM A PPROACH
7 / 43
8. Quantum Computing 101: Prepare
Prepare
Qubits are used instead of bits,
Qubit may be a particle such as an electron,
Spin up (blue) representing 1,
Spin down (red) representing 0,
Superposition (yellow) which involves spin up and spin down
simultaneously.
It is possible to prepare exponentially many inputs in the same amount
of time.
SAT P ROBLEM : A Q UANTUM A PPROACH
8 / 43
9. Quantum Computing 101: Evolve
Evolve
A small number of qubits in superposition state can carry an enormous
amount of information:
A mere 1, 000 particles all in superposition state can represent every
number from 0 to 21000 − 1 (about 10300 numbers).
A quantum computer would manipulate all those data in parallel,
For instance, by hitting the particles with laser pulses.
SAT P ROBLEM : A Q UANTUM A PPROACH
9 / 43
10. Quantum Computing 101: Measure
Measure
When the particles states are measured at the end of the computation,
all but one random version of the 10300 parallel states vanish.
Clever manipulation of the particles could nonetheless solve certain
problems very rapidly, such as factoring a large number.
SAT P ROBLEM : A Q UANTUM A PPROACH
10 / 43
11. Logical gates AND and OR are not reversible!
Reversibility is a Must
As the evolution of a quantum computer needs to be unitary, it must be
a reversible, norm-preserving computation.
By this constraint, we need to compile the classic circuit of SAT
problem into an equivalent quantum one.
Let’s use the results of Benioff’s(1980) and Bennett’s(1973) works.
SAT P ROBLEM : A Q UANTUM A PPROACH
11 / 43
13. Reversible classical gates (Cont’d)
Definition
Controlled-NOT gate (UCN )
u v u u⊕v |u • |u
0 0 0 0 |v |u ⊕ v
0 1 0 1
1 0 1 1
1 1 1 0
SAT P ROBLEM : A Q UANTUM A PPROACH
13 / 43
14. Reversible classical gates (Cont’d)
Definition
Toffoli gate (UToffoli )
u v w u v w ⊕ uv
0 0 0 0 0 0
0 0 1 0 0 1 |u • |u
0 1 0 0 1 0 |v • |v
0 1 1 0 1 1 |w |w ⊕ uv
1 0 0 1 0 0
1 0 1 1 0 1
1 1 0 1 1 1
1 1 1 1 1 0
SAT P ROBLEM : A Q UANTUM A PPROACH
14 / 43
15. A few words on notation
Some Notation
To represent a gate, e.g. AND gate acting on bits u and v and saving
the result in bit w, we use UAND (u , v , w ).
Circuits are represented, without loss of generality, as a product of
gates acting on bits.
The priority of gates to apply in a circuit is from right to left. In other
words, the rightmost gate is applied first and so on.
SAT P ROBLEM : A Q UANTUM A PPROACH
15 / 43
16. Now constructing reversible AND and OR gates
Using reversible gates; UNOT , UCNOT , andUToffoli ; it is possible to
construct reversible AND and OR gates.
UOR (u , v , w ) = UCNOT (u , w )UCNOT (v , w )UToffoli (u , v , w )
UAND (u , v , w ) = UToffoli (u , v , w )
|u |u |u |u
|v OR |v |v AN D |v
|w |w ⊕ uv |w |w ⊕ uv
SAT P ROBLEM : A Q UANTUM A PPROACH
16 / 43
17. What else do we need?
Dust bits
To do reversible computation, we should not destroy even a single bit
of information. So to save the result of a gate, there is a need for dust
bit(s).
Moreover, another gate to copy the value of an input bit to a dust bit for
clauses with just one literal is needed.
|u |u
UCOPY (u , v ) = UCNOT (u , v ) COP Y
|v |u
SAT P ROBLEM : A Q UANTUM A PPROACH
17 / 43
18. Figuring out the size of workspace
Theorem
For a SAT problem with m clauses in n variables, the maximum
number of dust qubits is no more than nm
But to construct the circuit, the total number of dust qubits should be
known:
Problem
How many dust bits do we need to construct a reversible circuit for
some SAT problem?
SAT P ROBLEM : A Q UANTUM A PPROACH
18 / 43
19. What’s the shape of the workspace?
The workspace is assumed as a register with R bits.
Definition
The truth assignment is represented by first n bits (INPUT),
For 1 ≤ i ≤ n, bit i represents boolean variable xi .
Dust bits are added at the end of the input bits, µ bits.
The last dust bit saves the truth value of SAT problem corresponding to
the truth assignment,
The rest of dust bits are used at the intermediate stages of computation.
Bits are indexed from 1 to R.
where R = n + µ
SAT P ROBLEM : A Q UANTUM A PPROACH
19 / 43
20. Exact counting of dust bits
Assume the series s1 , s2 , . . . , sm which represents index of the first
dust bit in workspace to compute t (Ci ), 1 ≤ i ≤ m.
s1 = n + 1
s2 = s1 + card(C1 ) + δ1,card(C1 ) − 1
sk = sk −1 + card(Ck −1 ) + δ1,card(Ck −1 ) 3 ≤ k ≤ m
where ik represents the number of literals in Ck and ik represents the
number of negations in Ck . Then the index of the last dust bit would be
sf = sm + card(Cm ) + δ1,card(Cm ) − 1
And the number of total dust bits is µ = sf − n
SAT P ROBLEM : A Q UANTUM A PPROACH
20 / 43
21. Size of Workspace
For the instance of SAT problem we are solving, the workspace is
consisted of 10 dust bits.
s1 = n + 1 = 5,
s2 = s1 + card(C1 ) + δ1,card(C1 ) − 1
Problem
=7
Assume x1 , x2 , x3 , x4 as
s3 = s2 + card(C2 ) + δ1,card(C2 )
variables and clauses
= 10
C1 = {x1 , x4 , x2 } , s4 = s3 + card(C3 ) + δcard(C3 )
C2 = {x2 , x3 , x4 } ,
= 12
C3 = {x1 , x3 } ,
sf = s4 + card(C4 ) + δcard(C4 ) − 1
C4 = {x3 , x1 , x2 } ,
= 14
for SAT problem.
SAT P ROBLEM : A Q UANTUM A PPROACH
µ = 14 21 / 43
22. Reversible Circuit for SAT Problem
To evaluate a SAT corresponding to a truth assignment, first we need
to evaluate each Ci ,
Example
UOR (1) = UNOT (2)UOR (2, 5, 6)UNOT (2)UOR (1, 4, 5),
UOR (2) = UOR (4, 7, 8)UOR (2, 3, 7),
UOR (3) = UNOT (3)UOR (1, 3, 10)UNOT (3),
UOR (4) = UNOT (2)UOR (2, 12, 13)UNOT (2)UNOT (1)
.UOR (3, 1, 12)UNOT (1).
where R = 14.
SAT P ROBLEM : A Q UANTUM A PPROACH
22 / 43
23. Reversible Circuit for SAT Problem (Cont’d)
The evaluation is at last obtained by
Example
C1 ∧ C2 : UAND (1) = UAND (6, 8, 9),
C1 ∧ C2 ∧ C3 : UAND (2) = UAND (9, 10, 11),
C1 ∧ C2 ∧ C3 ∧ C4 : UAND (3) = UAND (11, 13, 14).
where R = 14.
SAT P ROBLEM : A Q UANTUM A PPROACH
23 / 43
24. Reversible Circuit for SAT Problem (Cont’d)
Then the reversible circuit for evaluation becomes
UC =UAND (11, 13, 14)UAND (9, 10, 11)UAND (6, 8, 9)
.UNOT (2)UOR (2, 12, 13)UNOT (2)UNOT (1)UOR (3, 1, 12)UNOT (1)
.UNOT (3)UOR (1, 3, 10)UNOT (3)
.UOR (4, 7, 8)UOR (2, 3, 7)
.UNOT (2)UOR (2, 5, 6)UNOT (2)UOR (1, 4, 5)
where R = 14.
SAT P ROBLEM : A Q UANTUM A PPROACH
24 / 43
25. Quantum Mechanics Enters!
Instead of workspace of R bits, a Hilbert space, H ⊗R , of dimension R
is defined.
Example
Let |vin be defined as |04 , 09 , 0 .
By applying the Hadamard transform to |vin , all the values 0 . . . 24 − 1
are came to existence uniformly.
(14)
|v ≡ UH (4)|vin
24 −1
1
= √ 4 ∑ |ei , 09 , 0
( 2) i =0
1
= √ 4 ∑ |ε1 , ε2 , ε3 , ε4 , 09 , 0
( 2) ε1 ,ε2 ,ε3 ,ε4 ∈{0,1}
SAT P ROBLEM : A Q UANTUM A PPROACH
25 / 43
27. Applying ANDs
By applying AND to state |v , we obtain
(14) (14) (14)
UAND (11, 13, 14)UAND (9, 10, 11)UAND (6, 8, 9)|v
1
= √ ∑ |ε1 , ε2 , ε3 , ε4 , ε1 ∨ ε4 , ε1 ∨ ε4 ∨ ε2 , ε2 ∨ ε3 , ε2 ∨ ε3 ∨ ε4 ,
( 2)4 ε1 ,ε2 ,ε3 ,ε4 ∈{0,1}
t (C1 ) ∧ t (C2 ), ε1 ∨ ε3 , t (C1 ) ∧ t (C2 ) ∧ t (C3 ), ε3 ∨ ε1 , ε3 ∨ ε1 ∨ ε2 , tε (C )
≡ |v
SAT P ROBLEM : A Q UANTUM A PPROACH
27 / 43
28. Computational Complexity of Quantum SAT
Theorem
For a SAT problem with n boolean varibles and m clauses, the
Quantum Computational Complexity is
m
T (UC ) = m − 1 + ∑ |Ck | + 2ik − 1
k =1
≤ 4mn − 1
where ik is the number of negations in clause Ck .
SAT P ROBLEM : A Q UANTUM A PPROACH
28 / 43
29. Measure
By measuring the final qubit, the final state is obtained as a density
matrix,
7 9
ρ = |1 1| + |0 0|
16 16
7
16
is less than a half. It means the probability that the state 1 is
7
measured, is 16 .
SAT P ROBLEM : A Q UANTUM A PPROACH
29 / 43
30. Amplitude Amplification
Problem
How to increase the probability of getting |1 , if there is one, to near 1?
There is a technique, known as amplitude amplification.
It was first used by Grover(1996) to do a search in haystack. Soon it
was generalized by Boyer et. al. to Quantum Amplification technique.
Theorem
n
Let f : {0, 1} → {0, 1} be a function with a unique x ∈ {0, 1} such
that f (x ) = 1. By repeating Grover’s iterator for k √
times, x is found by
probability of 1 − O( 2n ) where k = 4θ − 1 ≈ π N.
1 π
2 4
SAT P ROBLEM : A Q UANTUM A PPROACH
30 / 43
31. Why not Grover’s?
Using Grover’s amplification technique, can lead into a quadratic
√
reduction in complexity, reducing from O(2n ) to O( 2n ).
It’s obviously not polynomial.
Today, there are two approaches known against NP-complete
problems in Quantum World:
Exploiting the NP-complete problem’s structure to develop polynomial
time algorithms.
Developing new amplitude amplification techniques.
Cerf et. al. (2003) developed a Quantum algorithm based on exploiting
the structure of SAT and using nested Grover’s search algorithm which
√
achieved 2n x queries, where x < 1.
SAT P ROBLEM : A Q UANTUM A PPROACH
31 / 43
32. Chaotic Amplitude Amplification
Definition
A logistic map is defined as
xn = fa (xn−1 ) = axn−1 (1 − xn−1 )
where x ∈ [0, 1] and a ∈ [1, 4].
1
0.9
0.8
0.7
0.6
0.5
0.4
0.3
0.2
0.1
0
0 0.5 1 1.5 2 2.5 3 3.5 4
SAT P ROBLEM : A Q UANTUM A PPROACH
32 / 43
33. Using the Right Chaos
Theorem
1
For logistic map with a = 3.71 and x0 = 2n , there exists k ∈ J such
that xk > 1 where
2
J = {0, 1, . . . , n, . . . , 2n}
1
0.9
0.8
0.7
0.6
0.5
0.4
0.3
0.2
0.1
0
3.4 3.5 3.6 3.7 3.8 3.9 4
SAT P ROBLEM : A Q UANTUM A PPROACH
33 / 43
34. Exploiting Chaos with Interference
For logistic map fa (x ), m times composition of fa (x ) is denoted by
m
fa (x ).
The amplifier is defined as
m
I − fa (ρ0 )σ3
ρm =
2
where σ3 is the pauli-z matrix,
1 0
0 −1
The probability of getting |1 , if one exists, is equal to
Mm ≡ trP1 ρm
SAT P ROBLEM : A Q UANTUM A PPROACH
34 / 43
35. Sum up!
Using a quantum computer, a SAT problem is solvable in polynomial
time, but the probability of measuring the satisfiable assignment is very
low, almost zero.
To make the satisfiable assignment measurable with a good probability,
it should be amplified.
Grover’s amplification technique makes no more than a quadratic
speed-up for SAT problem,
Chaotic amplification technique proposed by Ohya et. al. makes the
possibility of polynomial speed-up.
SAT P ROBLEM : A Q UANTUM A PPROACH
35 / 43
36. Sum up! (Cont’d)
But all the nice apparatus mentioned here are on the paper! So what
do they mean?
Since implausible kinds of Physics seems
necessary for constructing a computer able to
solve NP-complete problems quickly, it’s not too
far-fetched that some day one adopt n new
principle
“NP-complete problems are hard!”
SAT P ROBLEM : A Q UANTUM A PPROACH
36 / 43
37. Future of Quantum Computing
Simulating Quantum Physics: a fundamental
problem for Chemistry, Nano-technology, and
other fields.
As transistors in microchips approach the atomic
scale, ideas from quantum computing are likely
to become relevant for classical computing as
well.
The most exciting possible outcome of quantum
computing research would be to discover a
fundamental reason why quantum computers
are not possible. Such a failure would overturn
our current picture of the physical world,
whereas success would merely confirm it.
SAT P ROBLEM : A Q UANTUM A PPROACH
37 / 43
38. References
General references for Quantum Mechanics and Computing
N IELSEN , M., AND C HUANG , I.
Quantum computation and quantum information.
Cambridge Series on Information and the Natural Sciences. Cambridge
University Press, 2000.
K AYE , P HILLIP ; L AFLAMME , P HILLIP AND M OSCA , M ICHELE
An introduction to quantum computing.
Oxford University Press, 2007.
B ERNSTEIN , E. J.
Quantum complexity theory.
PhD thesis, University of California, Berkeley, 1997.
Retrieved October 22, 2011, from Dissertations & Theses:
A&I.(Publication No. AAT 9803127).
SAT P ROBLEM : A Q UANTUM A PPROACH
38 / 43
39. References (Cont’d)
Literature on Classic and Quantum Complexity
D EUTSCH , D.
Quantum theory, the church-turing principle and the universal quantum
computer.
Proceedings of the Royal Society of London A 400 (1985), 97–117.
C LEVE , R.
An Introduction to Quantum Complexity Theory.
eprint arXiv:quant-ph/9906111 (June 1999).
WATROUS , J.
Quantum Computational Complexity.
ArXiv e-prints (Apr. 2008).
SAT P ROBLEM : A Q UANTUM A PPROACH
39 / 43
40. References (Cont’d)
Quantum Algorithms
S HOR , P. W.
Algorithms for quantum computation: Discrete logarithms and factoring.
In Proceeding SFCS ’94 Proceedings of the 35th Annual Symposium
on Foundations of Computer Science (1994), , pp. 124–134.
G ROVER , L. K.
A fast quantum mechanical algorithm for database search.
In ANNUAL ACM SYMPOSIUM ON THEORY OF COMPUTING (1996),
ACM, pp. 212–219.
C ERF , N. J., G ROVER , L. K., AND W ILLIAMS , C. P.
Nested quantum search and structured problems.
61, 3 (Mar. 2000), 032303.
SAT P ROBLEM : A Q UANTUM A PPROACH
40 / 43
41. References (Cont’d)
Chaos Amplification
O HYA , M., AND M ASUDA , N.
NP problem in quantum algorithm.
eprint arXiv:quant-ph/9809075 (Sept. 1998).
O HYA , M., AND VOLOVICH , I. V.
New quantum algorithm for studying np-complete problems.
Reports on Mathematical Physics 52, 1 (2003), 25 – 33.
SAT P ROBLEM : A Q UANTUM A PPROACH
41 / 43
42. References (Cont’d)
Linear Algebraic References
H ORN , R. A., AND J OHNSON , C. R.
Matrix Analysis.
Cambridge University Press, 1985.
Z HANG , F.
Matrix theory: basic results and techniques.
Springer, 1999.
SAT P ROBLEM : A Q UANTUM A PPROACH
42 / 43
43. Thanks for your attention
“If quantum states exhibit small nonlinearities during time evolution,
then quantum computers can be used to solve NP-Complete problems
in polynomial time . . . we would like to note that we believe that
quantum mechanics is in all likelihood exactly linear, and that the above
conclusions might be viewed most profitably as further evidence that
this is indeed the case.”
Nonlinear Quantum Mechanics Implies Polynomial-Time Solution for NP-Complete and P Problems, Phys. Rev. Lett., Volume
81 (1998) pp. 39923995 — Dan Abrams and Seth Lloyd
SAT P ROBLEM : A Q UANTUM A PPROACH
43 / 43