










Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!











โI think I can safely say that nobody understands quan- tum mechanics.โ , Richard Feynman, 1965
โThe only difference between a probabilistic classical world and the equations of the quantum world is that somehow or other it appears as if the probabilities would have to go negativeโ , Richard Feynman, 1982
There were two schools of natural philosophy in ancient Greece. Aristotle believed that objects have an essence that explains their behav- ior, and a theory of the natural world has to refer to the reasons (or โfi- nal causeโ to use Aristotleโs language) as to why they exhibit certain phenomena. Democritus believed in a purely mechanistic explanation of the world. In his view, the universe was ultimately composed of elementary particles (or Atoms ) and our observed phenomena arise from the interactions between these particles according to some local rules. Modern science (arguably starting with Newton) has embraced Democritusโ point of view, of a mechanistic or โclockworkโ universe of particles and forces acting upon them. While the classification of particles and forces evolved with time, to a large extent the โbig pictureโ has not changed from Newton till Einstein. In particular it was held as an axiom that if we knew fully the current state of the universe (i.e., the particles and their properties such as location and velocity) then we could predict its future state at any point in time. In computational language, in all these theories the state of a system with ๐ particles could be stored in an array of ๐(๐) numbers, and predicting the evolution of the system can be done by running some efficient (e.g., ๐๐๐๐ฆ(๐) time) deterministic computation on this array.
Compiled on 11.17.2021 22:
346 an intensive introduction to cryptography
Figure 18.1 : In the โdouble baseball experimentโ we shoot baseballs from a gun at a soft wall through a hard barrier that has one or two slits open in it. There is only โconstructive interferenceโ in the sense that the dent in each position in the wall when both slits are open is the sum of the dents when each slit is open on its own. (^1) A nice illustrated description of the double slit experiment appears in this video.
Figure 18.2 : The setup of the double slit experiment in the case of photon or electron guns. We see also destructive interference in the sense that there are some positions on the wall that get fewer hits when both slits are open than they get when only one of the slits is open. Image credit: Wikipedia.
18.1 THE DOUBLE SLIT EXPERIMENT
Alas, in the beginning of the 20th century, several experimental re- sults were calling into question this โclockworkโ or โbilliard ballโ theory of the world. One such experiment is the famous double slit ex- periment. Here is one way to describe it. Suppose that we buy one of those baseball pitching machines, and aim it at a soft plastic wall, but put a metal barrier with a single slit between the machine and the plastic wall (see Fig. 18.1). If we shoot baseballs at the plastic wall, then some of the baseballs would bounce off the metal barrier, while some would make it through the slit and dent the wall. If we now carve out an ad- ditional slit in the metal barrier then more balls would get through, and so the plastic wall would be even more dented. So far this is pure common sense, and it is indeed (to my knowl- edge) an accurate description of what happens when we shoot base- balls at a plastic wall. However, this is not the same when we shoot photons. Amazingly, if we shoot with a โphoton gunโ (i.e., a laser) at a wall equipped with photon detectors through some barrier, then (as shown in Fig. 18.2) in some positions of the wall we will see fewer hits when the two slits are open than one only ones of them is!.^1 In particular there are positions in the wall that are hit when the first slit is open, hit when the second gun is open, but are not hit at all when both slits are open!. It seems as if each photon coming out of the gun is aware of the global setup of the experiment, and behaves differently if two slits are open than if only one is. If we try to โcatch the photon in the actโ and place a detector right next to each slit so we can see exactly the path each photon takes then something even more bizarre happens. The mere fact that we measure the path changes the photonโs behavior, and now this โdestructive interferenceโ pattern is gone and the number of times a position is hit when two slits are open is the sum of the number of times it is hit when each slit is open.
P You should read the paragraphs above more than once and make sure you appreciate how truly mind boggling these results are.
18.2 QUANTUM AMPLITUDES
The double slit and other experiments ultimately forced scientists to accept a very counterintuitive picture of the world. It is not merely about nature being randomized, but rather it is about the probabilities in some sense โgoing negativeโ and cancelling each other!
348 an intensive introduction to cryptography
Specifically, consider an event that can either occur or not (e.g. โde- tector number 17 was hit by a photonโ). In classical probability, we model this by a probability distribution over the two outcomes: a pair of non-negative numbers ๐ and ๐ such that ๐ + ๐ = 1, where ๐ corre- sponds to the probability that the event occurs and ๐ corresponds to the probability that the event does not occur. In quantum mechanics, we model this also by pair of numbers, which we call amplitudes. This is a pair of (potentially negative or even complex) numbers ๐ผ and ๐ฝ such that |๐ผ|^2 + |๐ฝ|^2 = 1. The probability that the event occurs is |๐ผ|^2 and the probability that it does not occur is |๐ฝ|^2. In isolation, these negative or complex numbers donโt matter much, since we anyway square them to obtain probabilities. But the interaction of positive and negative amplitudes can result in surprising cancellations where some- how combining two scenarios where an event happens with positive probability results in a scenario where it never does.
P If you donโt find the above description confusing and unintuitive, you probably didnโt get it. Please make sure to re-read the above paragraphs until you are thoroughly confused.
Quantum mechanics is a mathematical theory that allows us to calculate and predict the results of the double-slit and many other ex- periments. If you think of quantum mechanics as an explanation as to what โreallyโ goes on in the world, it can be rather confusing. How- ever, if you simply โshut up and calculateโ then it works amazingly well at predicting experimental results. In particular, in the double slit experiment, for any position in the wall, we can compute num- bers ๐ผ and ๐ฝ such that photons from the first and second slit hit that position with probabilities |๐ผ|^2 and |๐ฝ|^2 respectively. When we open both slits, the probability that the position will be hit is proportional to |๐ผ + ๐ฝ|^2 , and so in particular, if ๐ผ = โ๐ฝ then it will be the case that, despite being hit when either slit one or slit two are open, the position is not hit at all when they both are. If you are confused by quantum mechanics, you are not alone: for decades people have been trying to come up with explanations for โthe underlying realityโ behind quan- tum mechanics, including Bohmian Mechanics, Many Worlds and others. However, none of these interpretations have gained universal acceptance and all of those (by design) yield the same experimental predictions. Thus at this point many scientists prefer to just ignore the question of what is the โtrue realityโ and go back to simply โshutting up and calculatingโ.
quantum computing and cryptography i 349
Some of the counterintuitive properties that arise from amplitudes or โnegative probabilitiesโ include:
Again, as counter-intuitive as these concepts are, they have been experimentally confirmed, so we just have to live with them.
R Remark 18.1 โ Complex vs real, other simplifications. If (like the author) you are a bit intimidated by complex numbers, donโt worry: you can think of all ampli- tudes as real (though potentially negative ) numbers without loss of understanding. All the โmagicโ of quantum computing already arises in this case, and so we will often restrict attention to real amplitudes in this chapter. We will also only discuss so-called pure quantum states, and not the more general notion of mixed states. Pure states turn out to be sufficient for understanding the algorithmic aspects of quantum computing. More generally, this chapter is not meant to be a com- plete description of quantum mechanics, quantum information theory, or quantum computing, but rather illustrate the main points where these differ from classical computing.
18.2.1 Quantum computing and computation - an executive summary. One of the strange aspects of the quantum-mechanical picture of the world is that unlike in the billiard ball example, there is no obvious algorithm to simulate the evolution of ๐ particles over ๐ก time periods in ๐๐๐๐ฆ(๐, ๐ก) steps. In fact, the natural way to simulate ๐ quantum par- ticles will require a number of steps that is exponential in ๐. This is a
quantum computing and cryptography i 351
(^5) Of course, given that โexport gradeโ cryptography that was supposed to disappear with 1990โs took a long time to die, I imagine that weโll still have products running 1024 bit RSA when everyone has a quantum laptop.
been built that achieved tasks that are either not known to be achieved classically, or at least seem to require more resources classically than they do for these quantum computers. When and if such a computer is built that can break reasonable parameters of Diffie Hellman, RSA and elliptic curve cryptography is anybodyโs guess. It could also be a โself destroying prophecyโ whereby the existence of a small-scale quantum computer would cause everyone to shift away to lattice- based crypto which in turn will diminish the motivation to invest the huge resources needed to build a large scale quantum computer.^5 The above summary might be all that you need to know as a cryp- tographer, and enough motivation to study lattice-based cryptography as we do in this course. However, because quantum computing is such a beautiful and (like cryptography) counter-intuitive concept, we will try to give at least a hint of what it is about and how Shorโs algorithm works.
18.3 QUANTUM 101
We now present some of the basic notions in quantum information. It is very useful to contrast these notions to the setting of probabilistic systems and see how โnegative probabilitiesโ make a difference. This discussion is somewhat brief. The chapter on quantum computation in my book with Arora (see draft here) is one relatively short resource that contains essentially everything we discuss here. See also this blog post of Aaronson for a high level explanation of Shorโs algorithm which ends with links to several more detailed expositions. See also this lecture of Aaronson for a great discussion of the feasibility of quantum computing (Aaronsonโs course lecture notes and the book that they spawned are fantastic reads as well).
States: We will consider a simple quantum system that includes ๐ objects (e.g., electrons/photons/transistors/etc..) each of which can be in either an โonโ or โoffโ state - i.e., each of them can encode a single bit of information, but to emphasize the โquantumnessโ we will call it a qubit. A probability distribution over such a system can be described as a 2 ๐^ dimensional vector ๐ฃ with non-negative entries summing up to 1 , where for every ๐ฅ โ {0, 1}๐, ๐ฃ๐ฅ denotes the probability that the system is in state ๐ฅ. As we mentioned, quantum mechanics allows negative (in fact even complex) probabilities and so a quantum state of the system can be described as a 2 ๐^ dimensional vector ๐ฃ such that โ๐ฃโ^2 = โ๐ฅ |๐ฃ๐ฅ|^2 = 1.
Measurement: Suppose that we were in the classical probabilistic setting, and that the ๐ bits are simply random coins. Thus we can describe the state of the system by the 2 ๐-dimensional vector ๐ฃ such that ๐ฃ๐ฅ = 2โ๐^ for all ๐ฅ. If we measure the system and see what the coins
352 an intensive introduction to cryptography
came out, we will get the value ๐ฅ with probability ๐ฃ๐ฅ. Naturally, if we measure the system twice we will get the same result. Thus, after we see that the coin is ๐ฅ, the new state of the system collapses to a vector ๐ฃ such that ๐ฃ๐ฆ = 1 if ๐ฆ = ๐ฅ and ๐ฃ๐ฆ = 0 if ๐ฆ โ ๐ฅ. In a quantum state, we do the same thing: if we measure a vector ๐ฃ corresponds to turning it with probability |๐ฃ๐ฅ|^2 into a vector that has 1 on coordinate ๐ฅ and zero on all the other coordinates.
Operations: In the classical probabilistic setting, if we have a system in state ๐ฃ and we apply some function ๐ โถ {0, 1}๐^ โ {0, 1}๐^ then this transforms ๐ฃ to the state ๐ค such that ๐ค๐ฆ = โ๐ฅโถ๐(๐ฅ)=๐ฆ ๐ฃ๐ฅ. Another way to state this, is that ๐ค = ๐๐ where ๐๐ is the matrix such that ๐๐(๐ฅ),๐ฅ = 1 for all ๐ฅ and all other entries are 0. If we toss a coin and decide with probability 1/2 to apply ๐ and with probability 1/2 to apply ๐, this corresponds to the matrix (1/2)๐๐ + (1/2)๐๐. More generally, the set of operations that we can apply can be cap- tured as the set of convex combinations of all such matrices- this is simply the set of non-negative matrices whose columns all sum up to 1 - the stochastic matrices. In the quantum case, the operations we can apply to a quantum state are encoded as a unitary matrix, which is a matrix ๐ such that โ๐๐ฃโ = โ๐ฃโ for all vectors ๐ฃ.
Elementary operations: Of course, even in the probabilistic setting, not every function ๐ โถ {0, 1}๐^ โ {0, 1}๐^ is efficiently computable. We think of a function as efficiently computable if it is composed of poly- nomially many elementary operations, that involve at most 2 or 3 bits or so (i.e., Boolean gates ). That is, we say that a matrix ๐ is elemen- tary if it only modifies three bits. That is, ๐ is obtained by โliftingโ some 8 ร 8 matrix ๐โฒ^ that operates on three bits ๐, ๐, ๐, leaving all the rest of the bits intact. Formally, given an 8 ร 8 matrix ๐ โฒ^ (indexed by strings in {0, 1}^3 ) and three distinct indices ๐ < ๐ < ๐ โ {1, โฆ , ๐} we define the ๐ -lift of ๐ โฒ^ with indices ๐, ๐, ๐ to be the 2 ๐^ ร 2๐^ matrix ๐ such that for every strings ๐ฅ and ๐ฆ that agree with each other on all coordinates except possibly ๐, ๐, ๐, ๐๐ฅ,๐ฆ = ๐ (^) ๐ฅโฒ๐๐ฅ๐๐ฅ๐,๐ฆ๐๐ฆ๐๐ฆ๐ and other- wise ๐๐ฅ,๐ฆ = 0. Note that if ๐ โฒ^ is of the form ๐ (^) ๐โฒ for some function ๐ โถ {0, 1}^3 โ {0, 1}^3 then ๐ = ๐๐ where ๐ โถ {0, 1}๐^ โ {0, 1}๐^ is defined as ๐(๐ฅ) = ๐(๐ฅ๐๐ฅ๐๐ฅ๐). We define ๐ as an elementary stochastic matrix or a probabilistic gate if ๐ is equal to an ๐ lift of some stochas- tic 8 ร 8 matrix ๐ โฒ. The quantum case is similar: a quantum gate is a 2 ๐^ ร 2๐^ matrix that is an ๐ lift of some unitary 8 ร 8 matrix ๐โฒ. It is an exercise to prove that lifting preserves stochasticity and unitarity. That is, every probabilistic gate is a stochastic matrix and every quantum gate is a unitary matrix.
354 an intensive introduction to cryptography
(^7) It is a good exercise to show that if ๐ is a proba- bilistic process with ๐ (๐) โค ๐ then there exists a probabilistic circuit of size, say, 100๐ ๐^2 that approx- imately computes ๐ in the sense that for every input ๐ฅ, โ๐ฆโ{0,1}๐ โฃPr[๐ถ(๐ฅ) = ๐ฆ] โ ๐๐ฅ,๐ฆโฃ < 1/3.
where the the โ + ๐๐กโ^ bit of ๐(๐ฅ 1 , โฆ , ๐ฅ๐) is the result of applying the ๐๐กโ^ gate in the calculation of ๐(๐ฅ 1 , โฆ , ๐ฅ๐). So this is โalmostโ what we wanted except that we have this โextra junkโ that we need to get rid of. The idea is that we now simply run the same computation again which will basically we mean we XOR another copy of ๐(๐ฅ 1 , โฆ , ๐ฅ๐) to the last ๐ bits, but since ๐(๐ฅ) โ ๐(๐ฅ) = 0๐ ^ we get that we compute the map ๐ฅ โฆ ๐ฅ 1 โฏ ๐ฅ๐โ(๐(๐ฅ 1 , โฆ , ๐ฅ๐)0๐ ^ โ ๐ฅ๐+1 โฏ ๐ฅ๐+โ+๐ ) as desired.
The โobviously exponentialโ fallacy: A priori it might seem โobviousโ that quantum computing is exponentially powerful, since to com- pute a quantum computation on ๐ bits we need to maintain the 2 ๐ dimensional state vector and apply 2 ๐^ ร 2๐^ matrices to it. Indeed popular descriptions of quantum computing (too) often say some- thing along the lines that the difference between quantum and clas- sical computer is that a classic bit can either be zero or one while a qubit can be in both states at once, and so in many qubits a quantum computer can perform exponentially many computations at once. De- pending on how you interpret this, this description is either false or would apply equally well to probabilistic computation. However, for probabilistic computation it is a not too hard exercise to show that if ๐ โถ {0, 1}๐^ โ {0, 1}๐^ is an efficiently computable function then it has a polynomial size circuit of AND, OR and NOT gates.^7 Moreover, this โobviousโ approach for simulating a quantum computation will take not just exponential time but exponential space as well, while it is not hard to show that using a simple recursive formula one can calculate the final quantum state using polynomial space (in physics parlance this is known as โFeynman path integralsโ). So, the exponentially long vector description by itself does not imply that quantum computers are exponentially powerful. Indeed, we cannot prove that they are (since in particular we canโt prove that every polynomial space cal- culation can be done in polynomial time, in complexity parlance we donโt know how to rule out that ๐ = PSPACE ), but we do have some problems (integer factoring most prominently) for which they do provide exponential speedup over the currently best known classical (deterministic or probabilistic) algorithms.
18.3.1 Physically realizing quantum computation To realize quantum computation one needs to create a system with ๐ independent binary states (i.e., โqubitsโ), and be able to manipulate small subsets of two or three of these qubits to change their state. While by the way we defined operations above it might seem that one needs to be able to perform arbitrary unitary operations on these two or three qubits, it turns out that there several choices for universal sets - a small constant number of gates that generate all others. The
quantum computing and cryptography i 355
Figure 18.3 : Superconducting quantum computer prototype at Google. Image credit: Google / MIT Technology Review.
biggest challenge is how to keep the system from being measured and collapsing to a single classical combination of states. This is sometimes known as the coherence time of the system. The threshold theorem says that there is some absolute constant level of errors ๐ so that if errors are created at every gate at rate smaller than ๐ then we can recover from those and perform arbitrary long computations. (Of course there are different ways to model the errors and so there are actually several threshold theorems corresponding to various noise models). There have been several proposals to build quantum computers:
These approaches are not mutually exclusive and it could be that ultimately quantum computers are built by combining all of them together. At the moment, we have devices with about 100 qubits, and about 1% error per gate. Such restricted machines are sometimes called โNoisy Intermediate-Scale Quantum Computersโ or โNISQโ. See this article by John Preskil for some of the progress and applica- tions of such more restricted devices. If the number of qubits is in- creased and the error is decreased by one or two orders of magnitude, we could start seeing more applications.
18.3.2 Bra-ket notation Quantum computing is very confusing and counterintuitive for many reasons. But there is also a โculturalโ reason why people sometimes find quantum arguments hard to follow. Quantum folks follow their own special notation for vectors. Many non quantum people find it ugly and confusing, while quantum folks secretly wish they people used it all the time, not just for non-quantum linear algebra, but also for restaurant bills and elemntary school math classes.
quantum computing and cryptography i 357
(^10) This form of Bellโs game was shown by Clauser, Horne, Shimony, and Holt.
(^11) Theorem 18.2 below assumes that Alice and Bob use deterministic strategies ๐ and ๐ respectively. More generally, Alice and Bob could use a randomized strategy, or equivalently, each could choose ๐ and ๐ from some distributions โฑ and ๐ข respectively. However the averaging principle ( ?? ) implies that if all possible deterministic strategies succeed with probability at most 3/4, then the same is true for all randomized strategies.
(^12) More accurately, one either has to give up on a โbilliard ball typeโ theory of the universe or believe in telepathy (believe it or not, some scientists went for the latter option).
(^13) The strategy we show is not the best one. Alice and Bob can in fact succeed with probability cos^2 (๐/8) โผ 0.854.
response. We say that Alice and Bob win this experiment if ๐ โ ๐ = ๐ฅ โง ๐ฆ. In other words, Alice and Bob need to output two bits that disagree if ๐ฅ = ๐ฆ = 1 and agree otherwise.^10 Now if Alice and Bob are not telepathic, then they need to agree in advance on some strategy. Itโs not hard for Alice and Bob to succeed with probability 3/4: just always output the same bit. Moreover, by doing some case analysis, we can show that no matter what strategy they use, Alice and Bob cannot succeed with higher probability than that:^11
Theorem 18.2 โ Bellโs Inequality. For every two functions ๐, ๐ โถ {0, 1} โ {0, 1}, Pr๐ฅ,๐ฆโ{0,1}[๐(๐ฅ) โ ๐(๐ฆ) = ๐ฅ โง ๐ฆ] โค 3/4.
Proof. Since the probability is taken over all four choices of ๐ฅ, ๐ฆ โ {0, 1}, the only way the theorem can be violated if if there exist two functions ๐, ๐ that satisfy
๐(๐ฅ) โ ๐(๐ฆ) = ๐ฅ โง ๐ฆ for all the four choices of ๐ฅ, ๐ฆ โ {0, 1}^2. Letโs plug in all these four choices and see what we get (below we use the equalities ๐ง โ 0 = ๐ง, ๐ง โง 0 = 0 and ๐ง โง 1 = ๐ง):
๐(0) โ ๐(0) = 0 (plugging in ๐ฅ = 0, ๐ฆ = 0) ๐(0) โ ๐(1) = 0 (plugging in ๐ฅ = 0, ๐ฆ = 1) ๐(1) โ ๐(0) = 0 (plugging in ๐ฅ = 1, ๐ฆ = 0) ๐(1) โ ๐(1) = 1 (plugging in ๐ฅ = 1, ๐ฆ = 1) If we XOR together the first and second equalities we get ๐(0) โ ๐(1) = 0 while if we XOR together the third and fourth equalities we get ๐(0) โ ๐(1) = 1, thus obtaining a contradiction. โ
An amazing experimentally verified fact is that quantum mechanics allows for โtelepathyโ.^12 Specifically, it has been shown that using the weirdness of quantum mechanics, there is in fact a strategy for Alice and Bob to succeed in this game with probability larger than 3/4 (in fact, they can succeed with probability about 0.85, see Lemma 18.3).
18.5 ANALYSIS OF BELLโS INEQUALITY
Now that we have the notation in place, we can show a strategy for Alice and Bob to display โquantum telepathyโ in Bellโs Game. Re- call that in the classical case, Alice and Bob can succeed in the โBell Gameโ with probability at most 3/4 = 0.75. We now show that quan- tum mechanics allows them to succeed with probability at least 0.8.^13
358 an intensive introduction to cryptography
(^14) We are using the (not too hard) observation that the result of this experiment is the same regardless of the order in which Alice and Bob apply their rotations and measurements.
Lemma 18.3 There is a 2-qubit quantum state ๐ โ โ^4 so that if Alice has access to the first qubit of ๐, can manipulate and measure it and output ๐ โ {0, 1} and Bob has access to the second qubit of ๐ and can manipulate and measure it and output ๐ โ {0, 1} then Pr[๐ โ ๐ = ๐ฅ โง ๐ฆ] โฅ 0.8.
Proof. Alice and Bob will start by preparing a 2-qubit quantum system in the state
(this state is known as an EPR pair). Alice takes the first qubit of the system to her room, and Bob takes the qubit to his room. Now, when Alice receives ๐ฅ if ๐ฅ = 0 she does nothing and if ๐ฅ = 1 she ap-
plies the unitary map ๐ โ๐/8 to her qubit where ๐ ๐ = (๐๐๐ ๐^ โ^ sin^ ๐ sin ๐ cos ๐
is the unitary operation corresponding to rotation in the plane with angle ๐. When Bob receives ๐ฆ, if ๐ฆ = 0 he does nothing and if ๐ฆ = 1 he applies the unitary map ๐ ๐/8 to his qubit. Then each one of them measures their qubit and sends this as their response. Recall that to win the game Bob and Alice want their outputs to be more likely to differ if ๐ฅ = ๐ฆ = 1 and to be more likely to agree otherwise. We will split the analysis in one case for each of the four possible values of ๐ฅ and ๐ฆ. Case 1: ๐ฅ = 0 and ๐ฆ = 0. If ๐ฅ = ๐ฆ = 0 then the state does not change. * Because the state ๐ is proportional to |00โฉ + |11โฉ, the mea- surements of Bob and Alice will always agree (if Alice measures 0 then the state collapses to |00โฉ and so Bob measures 0 as well, and similarly for 1 ). Hence in the case ๐ฅ = ๐ฆ = 1, Alice and Bob always win. Case 2: ๐ฅ = 0 and ๐ฆ = 1. If ๐ฅ = 0 and ๐ฆ = 1 then after Alice measures her bit, if she gets 0 then the system collapses to the state |00โฉ, in which case after Bob performs his rotation, his qubit is in the state cos(๐/8)|0โฉ + sin(๐/8)|1โฉ. Thus, when Bob measures his qubit, he will get 0 (and hence agree with Alice) with probability cos^2 (๐/8) โฅ 0.85. Similarly, if Alice gets 1 then the system collapses to |11โฉ, in which case after rotation Bobโs qubit will be in the state โ sin(๐/8)|0โฉ + cos(๐/8)|1โฉ and so once again he will agree with Alice with probability cos^2 (๐/8). The analysis for Case 3 , where ๐ฅ = 1 and ๐ฆ = 0, is completely analogous to Case 2. Hence Alice and Bob will agree with probability cos^2 (๐/8) in this case as well.^14
360 an intensive introduction to cryptography
18.6 GROVERโS ALGORITHM
Shorโs Algorithm, which weโll see in the next lecture, is an amazing achievement, but it only applies to very particular problems. It does not seem to be relevant to breaking AES, lattice based cryptography, or problems not related to quantum computing at all such as schedul- ing, constraint satisfaction, traveling salesperson etc.. etc.. Indeed, for the most general form of these search problems, classically we donโt how to do anything much better than brute force search, which takes 2 ๐^ time over an ๐-bit domain. Lev Grover showed that quantum computers can obtain a quadratic improvement over this brute force search, solving SAT in 2 ๐/2^ time. The effect of Groverโs algorithm on cryptography is fairly mild: one essentially needs to double the key lengths of symmetric primitives. But beyond cryptography, if large scale quantum computers end up being built, Grover search and its variants might end up being some of the most useful computational problems they will tackle. Groverโs theorem is the following:
Theorem (Grover search , 1996): There is a quantum ๐(2๐/2๐๐๐๐ฆ(๐))- time algorithm that given a ๐๐๐๐ฆ(๐)-sized circuit computing a function ๐ โถ {0, 1}๐^ โ {0, 1} outputs a string ๐ฅโ^ โ {0, 1}๐^ such that ๐(๐ฅโ) = 1.
Proof sketch: The proof is not hard but we only sketch it here. The general idea can be illustrated in the case that there exists a single ๐ฅโ satisfying ๐(๐ฅโ) = 1. (There is a classical reduction from the general case to this problem.) As in Simonโs algorithm, we can efficiently ini- tialize an ๐-qubit system to the uniform state ๐ข = 2โ๐/2^ โ๐ฅโ{0,1}๐ |๐ฅโฉ
which has 2 โ๐/2^ dot product with |๐ฅโโฉ. Of course if we measure ๐ข, we only have probability (2โ๐/2)^2 = 2โ๐^ of obtaining the value ๐ฅโ. Our goal would be to use ๐(2๐/2) calls to the oracle to transform the sys- tem to a state ๐ฃ with dot product at least some constant ๐ > 0 with the state |๐ฅโโฉ. It is an exercise to show that using ๐ป๐๐ gets we can efficiently com- pute the unitary operator ๐ such that ๐ ๐ข = ๐ข and ๐ ๐ฃ = โ๐ฃ for every ๐ฃ orthogonal to ๐ข. Also, using the circuit for ๐, we can efficiently com- pute the unitary operator ๐ โ^ such that ๐ โ|๐ฅโฉ = |๐ฅโฉ for all ๐ฅ โ ๐ฅโ and ๐ โ|๐ฅโโฉ = โ|๐ฅโโฉ. It turns out that ๐(2๐/2) applications of UU โ to ๐ข yield a vector ๐ฃ with ฮฉ(1) inner product with |๐ฅโโฉ. To see why, consider what these operators do in the two dimensional linear sub- space spanned by ๐ข and |๐ฅโโฉ. (Note that the initial state ๐ข is in this subspace and all our operators preserve this property.) Let ๐ขโ be the unit vector orthogonal to ๐ข in this subspace and let ๐ฅโโ be the unit vec- tor orthogonal to |๐ฅโโฉ in this subspace. Restricted to this subspace, ๐ โ is a reflection along the axis ๐ฅโโ and ๐ is a reflection along the axis ๐ข.
quantum computing and cryptography i 361
Now, let ๐ be the angle between ๐ข and ๐ฅโโ. These vectors are very close to each other and so ๐ is very small but not zero - it is equal to sinโ1(2โ๐/2) which is roughly 2 โ๐/2. Now if our state ๐ฃ has angle ๐ผ โฅ 0 with ๐ข, then as long as ๐ผ is not too large (say ๐ผ < ๐/8) then this means that ๐ฃ has angle ๐ข + ๐ with ๐ฅโโ. That means that ๐ โ๐ฃ will have angle โ๐ผ โ ๐ with ๐ฅโโ or โ๐ผ โ 2๐ with ๐ข, and hence UU โ๐ฃ will have angle ๐ผ + 2๐ with ๐ข. Hence in one application from UU โ^ we move 2๐ radians away from ๐ข, and in ๐(2โ๐/2) steps the angle between ๐ข and our state will be at least some constant ๐ > 0. Since we live in the two dimensional space spanned by ๐ข and |๐ฅโฉ, it would mean that the dot product of our state and |๐ฅโฉ will be at least some constant as well. QED