This post is meant as a companion to an introductory post I wrote on the blog of Caltech’s IQIM (Institute for Quantum Information and Matter), of which I am a member. The post describes a “summer cluster” on quantum computation that I co-organized with Andrew Childs, Ignacio Cirac, and Umesh Vazirani at the Simons Institute in Berkeley over the past couple months. The IQIM post also describes one of the highlights of the workshop we organized as part of this program: the recent result by Mahadev on classical verification of quantum computation. The present post is a continuation of that one, so that I would encourage you to read it first. In this post my goal is to give additional detail on Mahadev’s result. For the real thing you should of course read the paper (you may want to start by watching the author’s beautiful talk at our workshop). What follows is my attempt at an introduction, in great part written for the sake of clarifying my own understanding. I am indebted to Urmila for multiple conversations in which she indefatigably answered my questions and cleared my confusions — of course, any remaining inaccuracies in this post are entirely mine.

**The result **

Let’s start by recalling Mahadev’s result. She shows that from any quantum computation, specified by a polynomial-size quantum circuit , it is possible to efficiently compute a *classical-verifier quantum-prover protocol*, i.e.~a prescription for the actions of a classical probabilistic polynomial-time verifier interacting with a quantum prover, that has the following properties. For simplicity, assume that produces a deterministic outcome when it is executed on qubits initialized in the state (any input can be hard-coded in the circuit). At the end of the protocol, the verifier always makes one of three possible decisions: “reject”; “accept, 0”; “accept, 1”. The *completeness* property states that for any circuit there is a “honest” behavior for the prover that can be implemented by a polynomial-time quantum device and that will result in the verifier making the decision “accept, ”, where is the correct outcome, with probability . The *soundness* property states that for any behavior of the quantum prover in the protocol, either the probability that the verifier returns the outcome “accept, ” is negligibly small, or the quantum prover has the ability to break a post-quantum cryptographic scheme with non-negligible advantage. Specifically, the proof of the soundness property demonstrates that a prover that manages to mislead the verifier into making the wrong decision (for any circuit) can be turned into an efficient attack on the learning with errors (LWE) problem (with superpolynomial noise ratio).

The fact that the protocol is only sound against computationally bounded provers sets it apart from previous approaches, which increased the power of the verifier by allowing her to dispose of a miniature quantum computer, but established soundness against computationally unbounded provers. The magic of Mahadev’s result is that she manages to leverage this sole assumption, computational boundnedness of the prover, to tie a very tight “leash” around its neck, by purely classical means. My use of the word “leash” is not innocent: informally, it seems that the cryptographic assumption allows Mahadev to achieve the kind of feats that were previously known, for classical verifiers, in the model where there are two quantum provers sharing entanglement. I am not sure how far the analogy extends, and would like to explore it further; this has already started with a collaboration with Brakerski, Christiano, Mahadev and Vazirani that led to a single-prover protocol for certifiable randomness expansion. Nevertheless, the main open question left open by Mahadev’s work remains whether the computational assumption is even necessary: could a similar result hold, where the honest prover can perform the required actions in quantum polynomial-time, but the protocol remains sound against arbitrarily powerful provers? (Experts will have recognized that the existence of a protocol where the honest prover is as powerful as PSPACE follows from the classical results that BQP is in PSPACE, and that PSPACE=IP. Unfortunately, we currently don’t expect even a supercharged AWS cloud to be able to implement PSPACE-complete computations.)

** Encoding computation in ground states **

Let’s get to business: how does this work? Fix a quantum circuit that the verifier is interested in. Assume the description of known to both the verifier and the prover. As earlier, assume further that when is executed on a state initialized to a measurement of the output qubit of the circuit returns either the outcome or the outcome , deterministically. The verifier wishes to determine which case holds.

The first step that the verifier performs is a classical polynomial-time reduction from this *circuit output decision problem* to the following *Hamiltonian energy decision problem*. In the Hamiltonian energy decision problem the input is the description of a pair of classical polynomial-time randomized circuits. The first circuit, , takes as input a random string , and returns a string . The second circuit, , takes as input a string of the kind returned by the first circuit, as well as an -bit string , and returns a “decision bit” . The goal of the verifier is to distinguish between the following two cases. Either there exists an -qubit state such that, when a string is sampled according to (choosing a uniformly random as input), the qubits of are measured in the bases specified by (i.e.~the -th qubit is measured in the computational basis in case , and in the Hadamard basis in case ), the resulting -bit outcome satisfies with probability at least . Or, for any state , the same procedure results in with probability at most .

I called this problem the Hamiltonian energy decision problem because the circuits and implicitly specify a Hamiltonian, whose minimal energy the verifier aims to approximate. Note that the Hamiltonian is not required to be local, and furthermore it may involve an average of exponentially many terms (as many as there are random strings ). The problem is still in QMA, because the verifier is efficient. It is not hard to show that the problem is QMA-hard. What the formulation above buys us, compared to using the usual QMA-complete formulation of the local Hamiltonian problem, is the constant energy gap — which comes at the cost of exponentially many terms and loss of locality. (Open question: I would like to know if it is possible to achieve a constant gap with only one of these caveats: local with exponentially many terms, or nonlocal with polynomially terms.) Of course here we only care that the problem is BQP-hard, and that the witness can be computed by a BQP prover; this is indeed the case. We also don’t really care that there is a constant gap – the soundness of the final protocol could be amplified by other means – but it is convenient that we are able to assume it.

The reduction that achieves this is a combination of Kitaev’s history state construction with some gadgetry from perturbation theory and an amplification trick. The first step reduces the verification that returns outcome (resp. ) on input to the verification that a local Hamiltonian (computed from ) has ground state energy exponentially close to (resp. at least some positive inverse polynomial). The second step consists in applying perturbation theory to reduce to the case where is a weighted linear combination of terms of the form and , where , are the Pauli and operators on the -th and -th qubit respectively. The final step is an amplification trick, that produces a nonlocal Hamiltonian whose each term is a tensor product of single-qubit and observables and has ground state energy either less than or larger than (when the Hamiltonian is scaled to be non-negative with norm at most ).

These steps are fairly standard. The first two are combined in a paper by Fitzsimons and Morimae to obtain a protocol for “post-hoc” verification of quantum computation: the prover prepares the ground state of an local Hamiltonian whose energy encodes the outcome of the computation, and sends it to the verifier one qubit at a time; the verifier only needs to perform single-qubit and measurements to estimate the energy. The last step, amplification, is described in a paper with Natarajan, where we use it to obtain a multi-prover interactive proof system for QMA.

For the remainder of this post, I take the reduction for granted and focus on the core of Mahadev’s result, a verification protocol for the following problem: given a Hamiltonian of the form described in the previous paragraph, decide whether the ground state energy of is smaller than , or larger than .

** Stitching distributions into a qubit **

In fact, for the sake of presentation I’ll make one further drastic simplification, which is that the verifier’s goal has been reduced to verifying the existence of a *single-qubit* state , whose existence is claimed by the prover. Specifically, suppose that the prover claims that it has the ability to prepare a state such that , and , for real parameters . In other words, that the Hamiltonian has minimal energy at most . How can one verify this claim? (Of course we could do it analytically\ldots{}but that approach would break apart as soon as expectation values on larger sets of qubits are considered.)

We could ask the prover to measure in the basis, or the basis, repeatedly on identical copies of , and report the outcomes. But how do we know that all these measurements were performed on the same state, and that the prover didn’t choose e.g. to report the -basis outcomes, and to report the -basis outcomes? We need to find a way to prevent the prover from measuring a different state depending on the basis it is asked for — as well as to ensure the measurement is performed in the right basis.

** Committing to a qubit **

The key idea in Mahadev’s protocol is to use cryptographic techniques to force the prover to “commit” to the state in a way that, once the commitment has been performed, the prover no longer has the liberty to “decide” which measurement it performs on the commited qubit (unless it breaks the cryptographic assumption).

I described the commitment scheme in the companion post here. For convenience, let me quote from that post. Recall that the scheme is based on a pair of trapdoor permutations that is *claw-free*. Informally, this means that it is hard to produce any pair such that .

The commitment phase of the protocol works as follows. Starting from a state of its choice, the prover is supposed to perform the following steps. First, the prover creates a uniform superposition over the common domain of and . Then it evaluates either function, or , in an additional register, by controlling on the qubit of . Finally, the prover measures the register that contains the image of or . This achieves the following sequence of transformations:

where is the measured image. The string is the prover’s *commitment string*, that it reports the verifier.

The intuition for this commitment procedure is that it introduces asymmetry between prover and verifier: the prover knows (it had to report it to the verifier) but not and (this is the claw-free assumption on the pair ), which seems to prevent it from recovering the original state , since it does not have the ability to “uncompute” and . In contrast, the verifier can use the trapdoor information to recover both preimages.

In a little more detail, how is this used? Note that at this point, from the verifier’s point of view the only information that has been received is the prover’s commitment string . In general there are multiple ways a prover could have come up with a value : for example, by selecting an and returning . Or, by directly selecting an arbitrary string . At this stage of the protocol, any of these strategies look fine.

Let’s modify the commitment phase by adding a little test. With some probability, the verifier, upon receiving the commitment string , decides to challenge the prover by asking it to report a valid preimage of , either under or under (to the prover’s choice). Since both and are presumed to be hard to invert, the only way the prover can answer this challenge is if it already “knows” a valid preimage — or at a minimum, if it has a superposition on preimages that it can measure when tested. Thus the fact that the prover is required to succeed in the commitment test, when it is performed, guarantees that after the prover has returned the commitment string we may without loss of generality assume that the prover’s state can be written as

where we have purposefully spelled out the two possible preimages that the prover could return if challenged. Note that aside from the fact that it gives the ability to obtain or , this format does not make any assumption on ; in particular the register containing the preimage can be entangled with other private registers of the prover.

We have defined a four-message commitment protocol: the verifier sends the security parameters to prover; the prover sends a commitment string back; an optional one-round preimage test is executed. Now is the time to give a first definition for the single qubit to which the prover has “committed” by returning . This *committed qubit* is the state that we ultimately aim to show has the claimed expectation values under and measurements.

Let be the qubit obtained from by erasing and (which is possible given knowledge of ) and returning the first qubit of the resulting state. (Later we will slightly modify this definition, but it is a good placeholder to get us started.) Note that the verifier does not know the state ; in fact, strictly speaking is not present on the prover’s workspace either. The point is that exists, and this is all we need. Our remaining task is to find a way for the verifier to extract from the prover measurement outcomes that are distributed as would be a measurement of in the or basis, without the prover having the ability to deviate. If the verifier can do this, for a basis of her choice, she can choose a basis at random, estimate the expectation value, and check the prover’s claim (the values or ).

As already mentioned, the key point that we’ll use in order to achieve this is that at the end of the commitment phase, the verifier has obtained some leverage over the prover: given and the trapdoor information, the verifier can recover both and . In contrast, the prover, while it holds the state , is not able to freely operate on it. Without the trapdoor, it can no longer uncompute and to recover the initial state , and so it can’t obviously apply, say, the unitary on that would amount to performing a single-qubit rotation on .

** Measuring in the computational basis **

We need to explain how the verifier extracts measurement outcomes in the X (Hadamard) or Z (computational) basis from the prover. For each basis there is a small sub-protocol. At the end of the sub-protocol the verifier records a single bit, that it considers is the outcome obtained by a measurement of the committed qubit, , in the corresponding basis. We call this bit the verifier’s “decoded bit” for that basis.

The protocol for extracting the outcome of a measurement in the computational basis is straightforward. Recall that by definition the prover’s state after the commitment phase has ended is the state in (1). Moreover, recall that we made a choice of basis for the provers’ space such that when the prover is challenged for a preimage of , it measures the first qubits of in the computational basis and returns the outcome. Now observe that the first bit of this outcome is with probability , and with probability . This is exactly the distribution of the outcome of a measurement of the committed qubit in the computational basis, by definition! Thus to extract a measurement outcome in the computational basis the verifier simply executes the preimage test and records the first bit returned by the prover as the decoded bit.

** Measuring in the Hadamard basis **

Extracting a measurement outcome in the Hadamard basis is more delicate. Recall the form of the prover’s state in (1). Given our definition of the committed qubit , the natural way to obtain a measurement of in the Hadamard basis, starting from , is to first erase the register containing and , and then perform a Hadamard measurement of the first qubit. But even an honest prover cannot accomplish this, as it does not have the trapdoor information that would allow to erase and (of course we purposefully set things up this way). What the prover *can* do, however, is measure all qubits of the register containing and in the Hadamard basis. The result of this measurement is an -bit string . The corresponding post-measurement state is, up to global phase,

where the addition is taken bitwise, modulo . Observe that this state is almost exactly the committed qubit — except for a phase flip, , applied on the first qubit. If the prover measures the remaining qubit in the Hadamard basis, the phase flip leads to a bit flip on the outcome of the measurement. So the verifier can ask the prover to report both and ; if she recourds the decoded bit then this bit matches the outcome of a measurement of in the Hadamard basis.

This completes the description of the measurement sub-protocol for the Hadamard basis. It is clear that a honest prover, performing the actions described above, will induce the verifier into recording the correct outcome. Now of course in general the prover may act in an arbitrary way! It could report any values for : the verifier accepts any outcomes on faith. How could this possibly work out? There is magic in Mahadev’s proof.

** Malicious provers **

Let’s assume, as we already have, that the prover is arbitrary but that, if tested in the commitment phase, it succeeds with certainty. According to the discussion around (1) this implies that at the end of the commitment phase the prover holds a state of the form . Moreover, by definition, when asked for a computational basis measurement the prover measures the first qubits of in the computational basis and reports the outcome; the verifier records the first bit as its decoded bit.

As we already argued, our earlier definition of the committed qubit ensures that the verifier’s decoded bit for the case of a computational basis measurement matches the outcome of a measurement of in the computational basis. Unfortunately for the case of a Hadamard basis measurement we are in trouble. Since the prover may in principle report an arbitrary pair there is no chance to argue that this matches (in distribution) the outcome of a measurement of in the Hadamard basis. To find a state that is consistent with the verifier’s decoded bit in both bases we need to change our definition of the committed qubit to take into account the prover’s action in the case it is asked for a Hadamard measurement.

Recall that the main leverage that the verifier has over the prover is that, while the prover does have the possibility of reporting arbitrary outcomes , it *does not* have control over the verifier’s decoding, i.e.~the operation . Let’s work a little bit and spell out the distribution of the verifier’s Hadamard basis decoded bit, . Towards this it is convenient to think of the prover in the following way: the prover first applies an arbitrary unitary “attack” on , then “honestly” measures the first qubits in the Hadamard basis, and finally reports the -bit outcome . An arbitrary -bit-outcome measurement can always be expressed in this way. With this setup we can write the probability that the decoded bit is some value as

Before we can proceed we should say a little more about the computational assumptions that are placed on the pair of functions . Earlier we mentioned this pair of functions should be claw-free, but in fact a little more is needed — though all requirements can ultimately be met by a construction based on the Learning With Errors problem. Rather than state the exact assumptions, I will mention two important consequences. The first is that the pair of functions is “collapsing”, a notion introduced by Unruh in his investigations of collision-resistance against quantum attacks. In our context this property implies that it is computationally hard to distinguish between an arbitrary superposition over preimages, as in , and the “collapsed” state obtained by measuring the control register (the first qubit). The second is that for any -bit string that can be obtained as the outcome of an arbitrary, but computationally efficient, measurement on the collapsed state, the bit is computationally indistinguishable from uniform. (This is analogous to a “hardcore bit” property, since encodes information about both preimages simultaneously, and such information should not be accessible if the pair is claw-free.)

These two assumptions taken together justify the following two modifications to the expression for in (2), that will lead to a computationally indistinguishable distribution. First, we can “collapse” the first qubits of by measuring them in the computational basis. Second, we can replace the bit by a uniformly random bit . Using that , the expression simplifies to

where the outermost were inserted thanks to the first assumption (the collapsing property), and the innermost come from commuting past the Hadamard. I should clarify that obtaining (3) formally requires more care. In particular, I made use of computational indistinguishability in an expression that involves a quantity that is hard to compute (the parity ). This is illegal, and to work around the difficulty Mahadev has to introduce some additional ingenious manipulations that I am skipping here.

Note the key effect that the random operator has in (3): it effectively trivializes the action of the prover’s “attack” on the first qubit *with respect to the computational basis*. Thus the result of this argument is that we have managed to argue that the verifier’s decoded bit associated with the Hadamard basis is *computationally indistinguishable* from the outcome of a Hadamard measurement on the state

where we expanded the first qubit of the unitary as , and represents all registers except the first qubit. Note that the second term involves an on the first qubit, which has no effect on a measurement in the Hadamard basis. Thus, can be updated to a state where we have “erased” the operator on the first qubit. Moreover, by definition, a measurement of the first (and only) qubit of in the computational basis yields an outcome distributed exactly as it would on . In particular, it is consistent with the verifier’s decoded bit in the computational basis measurement protocol.

We are done! The state is a well-defined single-qubit state such that the distribution of decoded bits recorded by the verifier for either basis is computationally indistinguishable from the distribution of outcomes of a measurement of in the same basis. Note that may not “exist” at any point of the protocol. But this is besides the point: as long as is a well-defined quantum state, and the verifier correctly records decoded measurement outcomes, this eventually leads to a valid certificate for the prover’s claim that the XZ Hamiltonian that encodes the computation has low enough energy.

Phew. Catch your breath, read this post again (and please do ask for clarifications as needed), and then move on to the beautiful paper, whose introduction already has more depth than I could provide here, and whose body fills in all the remaining gaps. (This includes how to deal with states that are more than a single qubit, an issue that my presentation of the single-qubit case may make seem more thorny than it is — in fact, it is possible to express the argument given here in a way that makes it relatively straightforward to extend to multiple qubits, though there are some technical issues, explained in Mahadev’s paper.) And then – use the idea to prove something!