• No results found

Box 6.2: Deutsch’s algorithm

In document The physics of Quantum Mechanics (Page 158-162)

Given a function f (x) that takes an n-bit argument and returns either 0 or 1, the exercise is to determine whether f is a constant or ‘balanced’

function. To this end we build a computer with an n-qubit control register and a single-qubit data register. We set the control register to |0i and the data register to |1i and operate on every qubit with the Hadamard operator UH. Then the computer’s state is

1

Now we evaluate the function f in the usual way, after which the computer’s state is

Given that f (x) = 0, 1, it is straightforward to convince oneself that (|f(x)i − |1 + f(x)i) = (−1)f (x)(|0i − |1i) so the computer’s state can

We now operate on every qubit with UH for a second time. The data register returns to |1i because UH is its own inverse, while the control register only returns to |0i if we can take the factor (−1)f (x) out of the sum over x, making the state of the control register a multiple of P

x|xi; if f is ‘balanced’, half of the factors (−1)f (x) are +1 and half −1 and in this case UH moves the control register to a state |yi for y 6= 0 (Problem 6.6). Hence by measuring the state of the control register, we discover whether f is constant or balanced: if the control register is set to zero, f is constant, and if it holds any other number, f is balanced.

have collapsed from that given on the right of (6.60) to |Xi|f(X)i, so f(X) can be determined by inspecting each of the qubits of the data register.

The trouble with this strategy is that it only returns one value of f , and that for a random argument X. Hence if our quantum computer is to outperform a classical computer, we must avoid collapsing the computer’s state by reading its registers. Instead we should try to answer questions about f that have simple answers but ones that involve all the values taken by f .

For example, suppose we know that f (x) only takes the values 0 and 1, and that it is either a constant function (i.e., either f (x) = 1 for all x, or f (x) = 0 for all x) or it is a ‘balanced function’ in the sense that f (x) = 0 for half of the possible values of x and 1 for the remaining values.

The question we have to answer is “is f constant or balanced?” With a

classical computer you would have to keep evaluating f on different values of x until either you got two different values (which would establish that f was balanced) or more than half of the possible values of x had been tried (which would establish that f was constant). In Box 6.2 we show that from (6.60) we can discover whether f is constant or balanced with only a handful of machine cycles.

The algorithm given in Box 6.2 is an extension of one invented by Deutsch,9 which was an early example of how the parallel-computing po-tential of a quantum computer could be harnessed. Subsequently algo-rithms were developed that dramatically accelerate database searches10 and the decomposition of large numbers into their prime factors. The usefulness of the Internet depends on effective cryptography, which cur-rently relies on the difficulty of prime-number decomposition. Hence by rendering existing cryptographic systems ineffective, the successful con-struction of a quantum computer would have a big impact on the world economy.

Notwithstanding strenuous efforts around the world, quantum com-puting remains a dream that will not be realised very soon. Its central idea is that the integers up to 2N− 1 can be mapped into the base states of an N -qubit quantum register, so a general state of such a register is associated with all representable integers, and the time evolution of the register involves massively parallel computing. The field is challenging both experimentally and theoretically. The challenge for theorists is to devise algorithms that extract information from a quantum register given that any measurement of the register collapses its state and thus erases much of the information that was encoded in it before a measurement was made. Experimentally, the challenge is to isolate quantum registers from their environment sufficiently well that they do not become significantly entangled with the environment during a computation. We discuss the process of becoming entangled with the environment in the next section.

6.3 The density operator

To this point in this book we have assumed that we know what quantum state our system is in. For macroscopic objects this assumption is com-pletely unrealistic, for how can we possibly discover the quantum states of the ∼ 1023 carbon atoms in a diamond, or even the ∼ 105 atoms in a protein molecule? To achieve this goal for a diamond, at least 1023 observables would have to be measured, and the number would in reality be vastly greater because individual atoms would be entangled with one another, making the state of the diamond a linear combination of basis states of the form |a1i|a2i . . . |aNi, where |aii denotes a state of the ith atom. It is time we squared up to the reality of our ignorance of the quantum states of macro- and mesoscopic objects.

9D. Deutsch, Proc. R. Soc., 400, 97 (1985).

10L. K. Grover, STOC’96, 212 (1996)

Actually, we need to be cautious even when asserting that we know the quantum state of atomic-scale objects. The claim that the state of a system is known is generally justified by the assertion that a measure-ment has just been made, with the result that the system’s state has been collapsed into a known eigenstate of the operator of the given observable.

This procedure for establishing the quantum state of a system is unrealis-tic in that it makes no allowance for experimental error, which we all know to be endemic in real laboratories: real experiments lead to the conclusion that the value of an observable is x ± y, which is shorthand for “the prob-ability distribution for the value of the observable is centred on x and has a width of the order y.” Since the measurement leaves the value of the observable uncertain, it does not determine the quantum state precisely either.

Let us admit that we don’t know what state our system is in, but conjecture that the system is in one of a complete set of states {|ni}, and for each value of n assign a probability pn that it’s in the state |ni.11 It’s important to be clear that we are not saying that the system is in the state

|φi =X

n

√pn|ni. (6.61)

That is a well-defined quantum state, and we are admitting that we don’t know the system’s state. What we are saying is that the system may be in state |1i, or in state |2i, or state |3i, and assigning probabilities p1, p2, . . . to each of these possibilities.

Given this incomplete information, the expectation value of measur-ing some observable Q will be p1times the expectation value that Q will have if the system is in the state |1i, plus p2times the expectation value for the case that the system is in the state |2i, etc. That is

Q =X

n

pnhn|Q|ni, (6.62)

where we have introduced a new notation Q to denote the expectation value of Q when we have incomplete knowledge. When our knowledge of a system is incomplete, we say that the system is in an impure state, and correspondingly we sometimes refer to a regular state |ψi as a pure state. This terminology is unfortunate because a system in an ‘impure state’ is in a perfectly good quantum state; the problem is that we are uncertain what state it is in – it is our knowledge of the system that’s impure, not the system’s state.

It is instructive to rewrite equation (6.62) by inserting either side of Q identity operators I =P

j|qjihqj| that are made out of the eigenkets of Q. Then we have

Q =X

nkj

pnhn|qkihqk|Q|qjihqj|ni =X

nj

qjpn|hqj|ni|2, (6.63)

11See Problem 6.9 for a different and more physically plausible physical assumption.

where the second equality follows from Q|qji = qj|qji and the orthonor-mality of the kets |qji. Equation (6.63) states that the expectation value of Q is the sum of the possible measurement values qjtimes the probability pn|hqj|ni|2of obtaining this value, which is the product of the probability of the system being in the state |ni and the probability of obtaining qj in the case that it is.

Now consider the density operator ρ ≡X

n

pn|nihn|, (6.64)

where the pn are the probabilities introduced above. This definition is reminiscent of the definition

Q =X

j

qj|qjihqj| (6.65)

of the operator associated with an observable (eq. 2.9). In particular, ρ is a Hermitian operator because the pnare real. It should not be considered an observable, however, because the pnare subjective not objective: they quantify our state of knowledge rather than hard physical reality. For example, if our records of the results of measurements become scrambled, perhaps through some failure of electronics in the data-acquisition sys-tem, our values of the pnwill change but the system will not. By contrast the spectrum {qj} of Q is determined by the laws of nature and is inde-pendent of the completeness of our knowledge. Thus the density operator introduces a qualitatively new feature into the theory: subjectivity.

To see the point of the density operator, we use equations (6.64) and (6.65) to rewrite the operator product ρQ:

ρQ =X

nj

pnqj|nihn|qjihqj|. (6.66)

When this equation is pre-multiplied by hm| and post-multiplied by |mi and the result summed over m, the right side becomes the same as the right side of equation (6.63) for Q. That is,

Tr(ρQ) ≡X

m

hm|ρQ|mi = Q, (6.67)

where ‘Tr’ is short for ‘trace’ because the sum over m is of the diagonal elements of the matrix for ρQ in the basis {|ni}. Box 6.3 derives two important properties of the trace operator.

Equation (6.64) defines the density operator in terms of the basis {|ni}. What do we get if we express ρ in terms of some other basis {|qji}? To find out we replace |ni byP

jhqj|ni|qji and obtain ρ =X

njk

pnhqj|nihn|qki |qjihqk|

=X

jk

pjk|qjihqk| where pjk≡X

n

pnhqj|nihn|qki. (6.68)

In document The physics of Quantum Mechanics (Page 158-162)