sat problem: a quantum approach

43
SAT PROBLEM:AQUANTUM APPROACH Supervised by: M. R. Hooshmand Asl Advised by: S. A. Shahzade Fazeli Presented by: A. Shakiba University of Yazd [email protected] February 19, 2012 1 / 43 SAT PROBLEM:AQUANTUM APPROACH

Upload: yazd-university

Post on 11-May-2015

531 views

Category:

Technology


1 download

DESCRIPTION

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.

TRANSCRIPT

Page 1: SAT problem: A Quantum Approach

SAT PROBLEM: A QUANTUM APPROACH

Supervised by:M. R. Hooshmand Asl

Advised by:S. A. Shahzade Fazeli

Presented by:A. Shakiba

University of [email protected]

February 19, 2012

1 / 43SAT PROBLEM: A QUANTUM APPROACH

Page 2: SAT problem: A Quantum Approach

Quantum Complexity Theory Evolution

Over the past three decades, Quantum Computing has attractedextensive attention in the academic community.

History

1973 Bennett proved any given Turing machine can becomputed efficiently by a reversible one.

1980 Benioff described a microscopic Turing machine usingQuantum Mechanics.

1982 Feynman suggested that computers behave quantummechanically may be more powerful than classical ones.

1985 Deutsch formalized the ideas of Benioff and Feynmanand proposed Quantum Turing machines.

1993 Yao demonstrated the equivalence between QuantumTuring machines and Quantum Circuits.

2 / 43SAT PROBLEM: A QUANTUM APPROACH

Page 3: SAT problem: A Quantum Approach

A big bang!

But just after pioneering work of Shor’s and Grover’s, QuantumComputing has intrigued more and more people.

Some Big Bangs of Quantum Computing

1994 Shor discovered a polynomial-time algorithm forfactoring problem;

1996 Grover found an algorithm for searching through adatabase in square root time.

3 / 43SAT PROBLEM: A QUANTUM APPROACH

Page 4: SAT problem: A Quantum Approach

NP-completeness and Quantum Computing

Following the works of Shor and Grover, it is natural to ask whether allthe NP can be computed efficiently using a Quantum computer.

By consulting Garey and Johnson’s book onintractability, let us choose Satisfiability Problemfrom NP-complete to start attack, since it is acore of a large family of computationallyintractable NP-complete problems.

4 / 43SAT PROBLEM: A QUANTUM APPROACH

Page 5: SAT problem: A Quantum Approach

SAT ProblemA SAT problem tries to answer that is there any assignment of truthvalues to boolean variables, x1, . . . ,xn, such that f (x1, . . . ,xn) = 1 forf : {0,1}n 7→ {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 eachclause is disjunction of some literals.

SAT problem tries to find out whether there exists any assignment oftruth values to the variables which makes the following true

C1∧C2∧ . . .∧Cm

5 / 43SAT PROBLEM: A QUANTUM APPROACH

Page 6: SAT problem: A Quantum Approach

Solving a SAT problem

Throughout this presentation, the following instance of SAT problem isbeing 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 Letus do it . . .

6 / 43SAT PROBLEM: A QUANTUM APPROACH

Page 7: SAT problem: A Quantum Approach

How to Quantum Compute?

In classical world,LOAD-RUN-READ

cycle is followed.

But in Quantumworld, it is PREPARE-EVOLVE-MEASURE

cycle.

7 / 43SAT PROBLEM: A QUANTUM APPROACH

Page 8: SAT problem: A Quantum Approach

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 downsimultaneously.

It is possible to prepare exponentially many inputs in the same amountof time.

8 / 43SAT PROBLEM: A QUANTUM APPROACH

Page 9: SAT problem: A Quantum Approach

Quantum Computing 101: Evolve

Evolve

A small number of qubits in superposition state can carry an enormousamount of information:

A mere 1,000 particles all in superposition state can represent everynumber 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.

9 / 43SAT PROBLEM: A QUANTUM APPROACH

Page 10: SAT problem: A Quantum Approach

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 certainproblems very rapidly, such as factoring a large number.

10 / 43SAT PROBLEM: A QUANTUM APPROACH

Page 11: SAT problem: A Quantum Approach

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 bea reversible, norm-preserving computation.

By this constraint, we need to compile the classic circuit of SATproblem into an equivalent quantum one.Let’s use the results of Benioff’s(1980) and Bennett’s(1973) works.

11 / 43SAT PROBLEM: A QUANTUM APPROACH

Page 12: SAT problem: A Quantum Approach

Reversible classical gates

DefinitionNOT gate (UNOT )

u u0 11 0

|u〉 X |u〉

1

12 / 43SAT PROBLEM: A QUANTUM APPROACH

Page 13: SAT problem: A Quantum Approach

Reversible classical gates (Cont’d)

DefinitionControlled-NOT gate (UCN )

u v u u⊕ v0 0 0 00 1 0 11 0 1 11 1 1 0

|u〉 • |u〉|v〉 |u⊕ v〉

1

13 / 43SAT PROBLEM: A QUANTUM APPROACH

Page 14: SAT problem: A Quantum Approach

Reversible classical gates (Cont’d)

DefinitionToffoli gate (UToffoli )

u v w u v w⊕uv0 0 0 0 0 00 0 1 0 0 10 1 0 0 1 00 1 1 0 1 11 0 0 1 0 01 0 1 1 0 11 1 0 1 1 11 1 1 1 1 0

|u〉 • |u〉|v〉 • |v〉|w〉 |w ⊕ uv〉

1

14 / 43SAT PROBLEM: A QUANTUM APPROACH

Page 15: SAT problem: A Quantum Approach

A few words on notation

Some Notation

To represent a gate, e.g. AND gate acting on bits u and v and savingthe result in bit w , we use UAND(u,v ,w).

Circuits are represented, without loss of generality, as a product ofgates acting on bits.

The priority of gates to apply in a circuit is from right to left. In otherwords, the rightmost gate is applied first and so on.

15 / 43SAT PROBLEM: A QUANTUM APPROACH

Page 16: SAT problem: A Quantum Approach

Now constructing reversible AND and OR gates

Using reversible gates; UNOT ,UCNOT ,andUToffoli ; it is possible toconstruct 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〉

OR

|u〉|v〉 |v〉|w〉 |w ⊕ uv〉

1

|u〉

AND

|u〉|v〉 |v〉|w〉 |w ⊕ uv〉

1

16 / 43SAT PROBLEM: A QUANTUM APPROACH

Page 17: SAT problem: A Quantum Approach

What else do we need?

Dust bitsTo do reversible computation, we should not destroy even a single bitof information. So to save the result of a gate, there is a need for dustbit(s).

Moreover, another gate to copy the value of an input bit to a dust bit forclauses with just one literal is needed.

UCOPY (u,v) = UCNOT (u,v)|u〉

COPY|u〉

|v〉 |u〉

1

17 / 43SAT PROBLEM: A QUANTUM APPROACH

Page 18: SAT problem: A Quantum Approach

Figuring out the size of workspace

TheoremFor a SAT problem with m clauses in n variables, the maximumnumber of dust qubits is no more than nm

But to construct the circuit, the total number of dust qubits should beknown:

ProblemHow many dust bits do we need to construct a reversible circuit forsome SAT problem?

18 / 43SAT PROBLEM: A QUANTUM APPROACH

Page 19: SAT problem: A Quantum Approach

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 tothe 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 + µ

19 / 43SAT PROBLEM: A QUANTUM APPROACH

Page 20: SAT problem: A Quantum Approach

Exact counting of dust bits

Assume the series s1,s2, . . . ,sm which represents index of the firstdust 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 i ′k represents thenumber 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

20 / 43SAT PROBLEM: A QUANTUM APPROACH

Page 21: SAT problem: A Quantum Approach

Size of WorkspaceFor the instance of SAT problem we are solving, the workspace isconsisted of 10 dust bits.

ProblemAssume x1,x2,x3,x4 asvariables and clauses

C1 = {x1,x4,x2} ,C2 = {x2,x3,x4} ,C3 = {x1,x3} ,C4 = {x3,x1,x2} ,

for SAT problem.

s1 = n +1 = 5,

s2 = s1 +card(C1)+δ1,card(C1)−1

= 7

s3 = s2 +card(C2)+δ1,card(C2)

= 10

s4 = s3 +card(C3)+δcard(C3)

= 12

sf = s4 +card(C4)+δcard(C4)−1

= 14

µ = 14 21 / 43SAT PROBLEM: A QUANTUM APPROACH

Page 22: SAT problem: A Quantum Approach

Reversible Circuit for SAT Problem

To evaluate a SAT corresponding to a truth assignment, first we needto 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.

22 / 43SAT PROBLEM: A QUANTUM APPROACH

Page 23: SAT problem: A Quantum Approach

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.

23 / 43SAT PROBLEM: A QUANTUM APPROACH

Page 24: SAT problem: A Quantum Approach

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.

24 / 43SAT PROBLEM: A QUANTUM APPROACH

Page 25: SAT problem: A Quantum Approach

Quantum Mechanics Enters!Instead of workspace of R bits, a Hilbert space, H ⊗R , of dimension Ris defined.

Example

Let |vin〉 be defined as |04,09,0〉.

By applying the Hadamard transform to |vin〉, all the values 0 . . .24−1are came to existence uniformly.

|v〉 ≡ U(14)H (4)|vin〉

=1

(√

2)4

24−1

∑i=0|ei ,0

9,0〉

=1

(√

2)4 ∑

ε1,ε2,ε3,ε4∈{0,1}|ε1,ε2,ε3,ε4,0

9,0〉

25 / 43SAT PROBLEM: A QUANTUM APPROACH

Page 26: SAT problem: A Quantum Approach

Computing the ORs

By applying U(14)OR (1), U(14)

OR (2), U(14)OR (3), and U(14)

OR (4) in order,

U(14)OR (1)U(14)

OR (2)U(14)OR (3)U(14)

OR (4)|v〉

=1

(√

2)4U(14)

OR (1)U(14)OR (2)U(14)

OR (3)U(14)OR (4) ∑

ε1,ε2,ε3,ε4∈{0,1}|ε1,ε2,ε3,ε4,0

9,0〉

=1

(√

2)4 ∑ε1,ε2,ε3,ε4∈{0,1}

|ε1,ε2,ε3,ε4,ε1∨ ε4,ε1∨ ε4∨ ε2,ε2∨ ε3,ε2∨ ε3∨ ε4,

0,ε1∨ ε3,0,ε3∨ ε1,ε3∨ ε1∨ ε2,0〉 ≡ |v ′〉

is obtained.

26 / 43SAT PROBLEM: A QUANTUM APPROACH

Page 27: SAT problem: A Quantum Approach

Applying ANDs

By applying AND to state |v ′〉, we obtain

U(14)AND(11,13,14)U(14)

AND(9,10,11)U(14)AND(6,8,9)|v ′〉

=1

(√

2)4 ∑ε1,ε2,ε3,ε4∈{0,1}

|ε1,ε2,ε3,ε4,ε1∨ ε4,ε1∨ ε4∨ ε2,ε2∨ ε3,ε2∨ ε3∨ ε4,

t(C1)∧ t(C2),ε1∨ ε3, t(C1)∧ t(C2)∧ t(C3),ε3∨ ε1,ε3∨ ε1∨ ε2, tε(C)〉≡ |v ′′〉

27 / 43SAT PROBLEM: A QUANTUM APPROACH

Page 28: SAT problem: A Quantum Approach

Computational Complexity of Quantum SAT

TheoremFor a SAT problem with n boolean varibles and m clauses, theQuantum Computational Complexity is

T (UC) = m−1+m

∑k=1

(|Ck |+2i ′k −1

)≤ 4mn−1

where i ′k is the number of negations in clause Ck .

28 / 43SAT PROBLEM: A QUANTUM APPROACH

Page 29: SAT problem: A Quantum Approach

Measure

By measuring the final qubit, the final state is obtained as a densitymatrix,

ρ′ =

716|1〉〈1|+ 9

16|0〉〈0|

716 is less than a half. It means the probability that the state 1 ismeasured, is 7

16 .

29 / 43SAT PROBLEM: A QUANTUM APPROACH

Page 30: SAT problem: A Quantum Approach

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 itwas generalized by Boyer et. al. to Quantum Amplification technique.

Theorem

Let f : {0,1}n 7→ {0,1} be a function with a unique x ∈ {0,1} suchthat f (x) = 1. By repeating Grover’s iterator for k times, x is found byprobability of 1−O( 1

2n ) where k = b π

4θ− 1

2c ≈ π

4

√N.

30 / 43SAT PROBLEM: A QUANTUM APPROACH

Page 31: SAT problem: A Quantum Approach

Why not Grover’s?

Using Grover’s amplification technique, can lead into a quadraticreduction in complexity, reducing from O(2n) to O(

√2n).

It’s obviously not polynomial.

Today, there are two approaches known against NP-completeproblems in Quantum World:

Exploiting the NP-complete problem’s structure to develop polynomialtime algorithms.

Developing new amplitude amplification techniques.

Cerf et. al. (2003) developed a Quantum algorithm based on exploitingthe structure of SAT and using nested Grover’s search algorithm whichachieved

√2nx queries, where x < 1.

31 / 43SAT PROBLEM: A QUANTUM APPROACH

Page 32: SAT problem: A Quantum Approach

Chaotic Amplitude Amplification

DefinitionA logistic map is defined as

xn = fa(xn−1) = axn−1(1− xn−1)

where x ∈ [0,1] and a ∈ [1,4].

0 0.5 1 1.5 2 2.5 3 3.5 40

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

32 / 43SAT PROBLEM: A QUANTUM APPROACH

Page 33: SAT problem: A Quantum Approach

Using the Right Chaos

Theorem

For logistic map with a = 3.71 and x0 = 12n , there exists k ∈ J such

that xk > 12 where

J = {0,1, . . . ,n, . . . ,2n}

3.4 3.5 3.6 3.7 3.8 3.9 40

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

33 / 43SAT PROBLEM: A QUANTUM APPROACH

Page 34: SAT problem: A Quantum Approach

Exploiting Chaos with Interference

For logistic map fa(x), m times composition of fa(x) is denoted byf ma (x).

The amplifier is defined as

ρm =I− f m

a (ρ0)σ3

2

where σ3 is the pauli-z matrix,(1 00 −1

)The probability of getting |1〉, if one exists, is equal to

Mm ≡ trP1ρm

34 / 43SAT PROBLEM: A QUANTUM APPROACH

Page 35: SAT problem: A Quantum Approach

Sum up!

Using a quantum computer, a SAT problem is solvable in polynomialtime, but the probability of measuring the satisfiable assignment is verylow, 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 quadraticspeed-up for SAT problem,

Chaotic amplification technique proposed by Ohya et. al. makes thepossibility of polynomial speed-up.

35 / 43SAT PROBLEM: A QUANTUM APPROACH

Page 36: SAT problem: A Quantum Approach

Sum up! (Cont’d)

But all the nice apparatus mentioned here are on the paper! So whatdo they mean?

Since implausible kinds of Physics seemsnecessary for constructing a computer able tosolve NP-complete problems quickly, it’s not toofar-fetched that some day one adopt n newprinciple

“NP-complete problems are hard!”

36 / 43SAT PROBLEM: A QUANTUM APPROACH

Page 37: SAT problem: A Quantum Approach

Future of Quantum Computing

Simulating Quantum Physics: a fundamentalproblem for Chemistry, Nano-technology, andother fields.

As transistors in microchips approach the atomicscale, ideas from quantum computing are likelyto become relevant for classical computing aswell.

The most exciting possible outcome of quantumcomputing research would be to discover afundamental reason why quantum computersare not possible. Such a failure would overturnour current picture of the physical world,whereas success would merely confirm it.

37 / 43SAT PROBLEM: A QUANTUM APPROACH

Page 38: SAT problem: A Quantum Approach

References

General references for Quantum Mechanics and Computing

NIELSEN, M., AND CHUANG, I.Quantum computation and quantum information.Cambridge Series on Information and the Natural Sciences. CambridgeUniversity Press, 2000.

KAYE, PHILLIP; LAFLAMME, PHILLIP AND MOSCA, MICHELEAn introduction to quantum computing.Oxford University Press, 2007.

BERNSTEIN, 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).

38 / 43SAT PROBLEM: A QUANTUM APPROACH

Page 39: SAT problem: A Quantum Approach

References (Cont’d)

Literature on Classic and Quantum Complexity

DEUTSCH, D.Quantum theory, the church-turing principle and the universal quantumcomputer.Proceedings of the Royal Society of London A 400 (1985), 97–117.

CLEVE, R.An Introduction to Quantum Complexity Theory.eprint arXiv:quant-ph/9906111 (June 1999).

WATROUS, J.Quantum Computational Complexity.ArXiv e-prints (Apr. 2008).

39 / 43SAT PROBLEM: A QUANTUM APPROACH

Page 40: SAT problem: A Quantum Approach

References (Cont’d)

Quantum Algorithms

SHOR, P. W.Algorithms for quantum computation: Discrete logarithms and factoring.

In Proceeding SFCS ’94 Proceedings of the 35th Annual Symposiumon Foundations of Computer Science (1994), , pp. 124–134.

GROVER, L. K.A fast quantum mechanical algorithm for database search.In ANNUAL ACM SYMPOSIUM ON THEORY OF COMPUTING (1996),ACM, pp. 212–219.

CERF, N. J., GROVER, L. K., AND WILLIAMS, C. P.Nested quantum search and structured problems.61, 3 (Mar. 2000), 032303.

40 / 43SAT PROBLEM: A QUANTUM APPROACH

Page 41: SAT problem: A Quantum Approach

References (Cont’d)

Chaos Amplification

OHYA, M., AND MASUDA, N.NP problem in quantum algorithm.eprint arXiv:quant-ph/9809075 (Sept. 1998).

OHYA, M., AND VOLOVICH, I. V.New quantum algorithm for studying np-complete problems.Reports on Mathematical Physics 52, 1 (2003), 25 – 33.

41 / 43SAT PROBLEM: A QUANTUM APPROACH

Page 42: SAT problem: A Quantum Approach

References (Cont’d)

Linear Algebraic References

HORN, R. A., AND JOHNSON, C. R.Matrix Analysis.Cambridge University Press, 1985.

ZHANG, F.Matrix theory: basic results and techniques.Springer, 1999.

42 / 43SAT PROBLEM: A QUANTUM APPROACH

Page 43: SAT problem: A Quantum Approach

Thanks for your attention

“If quantum states exhibit small nonlinearities during time evolution,then quantum computers can be used to solve NP-Complete problemsin polynomial time . . . we would like to note that we believe thatquantum mechanics is in all likelihood exactly linear, and that the aboveconclusions might be viewed most profitably as further evidence thatthis is indeed the case.”

Nonlinear Quantum Mechanics Implies Polynomial-Time Solution for NP-Complete and ]P Problems, Phys. Rev. Lett., Volume81 (1998) pp. 39923995 — Dan Abrams and Seth Lloyd

43 / 43SAT PROBLEM: A QUANTUM APPROACH