NB: This publication is a re-hash of part of the contents of [Bravyi, Smith, and Smolin, ‘Trading Classical and Quantum Computational Resources’], specifically of chapter III. Since I usually find scientific papers unapproachable, and because the idea therein contained seemed sufficiently simple and elegant, this post serves as an exercise to explain those ideas in (hopefully) a more approachable way.
I’m working in hybrid quantum computing — that is, in this context, the instances where you combine classical computing power with quantum computing power. There are plenty of interesting questions in this space, in part because addressing “hybrid computing” is fairly vague; my particular approach has been to look at what you can do with more or less computing time on the quantum side, but other authors have, for example, examined the classical overhead necessary to expand the working space of your quantum computer by a little bit: in this post, I’ll outline some of the ideas put forward by Bravyi, Smith and Smolin in 2016 about this.
Before we get into it, though, a forenote about quantum computing and what to make of it if you are unfamiliar with the topic: “quantum computing” has the misfortune of putting together two cool and sufficiently vague terms (i.e., “quantum” and “computing") to give rise to all sorts of related nonsense and misunderstanding2. On the other hand, and as with (I expect) any scientific area, there are many ways of “looking” at quantum computing. Personally, I am a big fan of Scott Aaronson’s "Quantum Computing Since Democritus", as it provides a lovely bird’s-eye view of the field, as described by someone who is both a great communicator and an important subject in the field.3 4
One of the reasons why we should look at quantum computing is that it is probably more powerful than the classical model of computation. Part of this can be understood to have to do with how many numbers you need to keep track of to fully describe a quantum circuit: whereas to describe a classical circuit of wires you need to keep track of bits, to describe an wire quantum circuit you need generally5 to keep track of values. However, by the end of the circuit, you want to produce a classical output that you can read — say, a single bit — and so you convolve these numbers in some particular way to fold them into that output.6
Ok, so now suppose that your quantum computer is very crummy. In particular, suppose that your quantum computer does, at most, qubits.7 Say also that you’re very interested in a procedure that requires qubits. Surely, you can do better than simulating those qubits classically!8 Turns out a positive answer to this statement (when asked in its full generality) is not obvious.
Bravyi et al. address a restricted version of this question: provided that each qubit (which is to say, each line in the circuit) participates in at most two-qubit gates9, what can you do about a circuit with lines, given access to a circuit with lines? Thus, they first give a name to such circuits:
Call an -qubit circuit -sparse if each qubit participates in at most two-qubit gates. Note that any circuit (composed of one- and two-qubit gates) that has depth is necessarily -sparse.
And then, per the discussion above, we’re not so much interested (necessarily) in these circuits themselves, but rather in the whole procedure that performs a measurement at the end of the circuit and distils the result into a single (classical) bit. So, Bravyi, Smith and Smolin give also a name to the full procedure:
A -Sparse Quantum Computation, or SQC for short, is a procedure that takes a -sparse circuit on qubits, performs measurements of the circuit, and produces a classical bit of output by performing classical processing on the measurements for time.1
With these two definitions in hand, what BS&S10 claim is the following:
For any -SQC, where , there exists another procedure that produces the same output with only qubits, but exponentially more classical time. In particular, this procedure is a -sparse circuit of qubits, measured times, and post-processed classically for time.
I.e., a -SQC.
Note how the overhead goes with , exponentially the amount of “extra” qubits we don’t have! That’s intuitively satisfying, I think. (Also, there’s an exponentially growing overhead, which is also intuitive, otherwise simulating an SQC shouldn’t be so hard after all.) But how might they prove this?
First, an assertion about operations on joint blocks of and qubits, respectively, is made:
A -sparse quantum circuit on qubits can be written as a sum of many circuits that act fully separately on two blocks of, respectively, and qubits — specifically, a sum of such circuits. Symbolically, this means there exists of family of circuits acting only on the first block, which we denote , and another acting only on the second block, denoted , and a number of weights , such that the full procedure, , can be written as
Why is this assertion true? Essentially, it is a fundamental result11 that two-qubit gates can be described as a sum of circuits, where each circuit is composed of two single-qubit gates. On the other hand, we are dealing with a -sparse circuit; therefore, at worst, there are gates connecting a qubit in block to block . If block has qubits (and block has qubits), there are therefore at most gates connecting the two blocks. By decomposing each of them into a sum of actions, and as sequential actions are multiplicative, we get a total of circuits.
Now, to move on, we need some symbolic description of a SQC. I’m just going to provide it to you now, and ask that you don’t panic:
Let be a function from into that represents the classical post-processing part of the SQC, and the quantum circuit of the SQC. Then, the final ouput may be written as where .
What’s going on here? Broadly speaking, the capital operation represents the different measurements we may obtain (thus every bit string from to ), but filtered according to our classical process (if , that bit string is ignored). is the quantum state our circuit produces, and “sandwiching” with the state gives us the expected value of over the probability distribution of the state: this is called Born’s rule.
Now, we can take , which, recall, represents a -sparse circuit, and apply our previous statement. This will give us a sum of many such “sandwiches” of states of only qubits:
( is a numeric factor we can calculate. Notice how in the definition of we write , where denotes concatenation. It’s as though we were running many circuits, and assuming for each one that the measurement of the qubits took a particular value.)
This puts us nearly there, because we have a sum of terms, where each term is a sandwich of -qubit states. We only need a prescription for an -qubit circuit to calculate those sandwiches. Fortunately, calculating such a sandwich is a fairly standard problem in quantum computing, and can be achieved with a so-called Hadamard test. For completeness, here are the circuits that do that:
Now, are these circuits sparse? Yes, they are -sparse! Why? Because, again due to the statement that gives us , we know that and differ by at most single qubit gates. This means that those controls need to affect these gates only; and so we have at most two-qubit gates between the first qubit and the rest of them. At the same time, and are -sparse, so all qubits except the control qubit participate in at most two qubit gates. There is, thus, a sort of special structure, where most of the circuit is much more sparse than the circuit is a whole; BS&S tell us that by shuffling qubits around we can take advantage of this (provided is sufficiently large, namely ), and create an equivalent circuit that is -sparse.
Since calculating these sandwiches is a well-studied task, we also know how many times we need to run the circuits: about .12
Thus, we have a procedure that involves -sparse circuits of qubits, requiring about samples, with polynomial time classical calculation for each sample, meaning -time classical calculation to add everything up. We can easily relable and to get the statement originally claimed! Well done.
As a concluding remark, note how deep a use we made of the fact that the original circuit was -sparse. It shouldn’t be surprising, thus, that making a similar statement about the generality of quantum circuits (which is to say, the generality of procedures) is non-obvious!
Why “measure times”? Cf. footnote 6; when you measure a quantum circuit you get a sample from a probability distribution, not the parameters of the distribution itself. So if you need to have an idea of the probability distribution — because, say, the relevant quantity is the mean of the distribution, which happens often — you need to measure multiple times. ↩
If you want to spot a fraudster, look out for promises of efficiently solving an NP-complete problem, like the travelling salesman problem. Or, for a more complete experience, try my QC nonsense bingo. ↩
Mr. Aaronson has a markedly computer-scientist approach to the field, which is also my favourite — and I’m supposedly a physicist! — but it must be acknowledged that it is not the only one. ↩
If, however, you’re looking for an even faster introduction to QC, here’s what I can give you: QC is essentially the computing model you get when you consider probability amplitudes, rather than probabilities, i.e., numbers that are in the range and that map to probabilities as . (It turns out such quantities are physical.) This is different from considering probabilities, because two objects with the same probability distribution may have different underlying probability amplitudes, such that they are mapped differently under the same operation. This has some strange implications for join probabilities. Got all that? ↩
As usual reality is much more interesting. ↩
Specifically how you convolve these numbers has to do with what each of the values is: namely, each value is a probability amplitude for each bit string in . The most natural way to produce an output, then, is to sample a bit string with corresponding probability and perform some polynomial-time classical processing of it that results in a single bit. ↩
I wish! Google currently holds the record (at the time of writing), with about qubits. ↩
You’d better hope so, as (for strong simulation) you’d need to keep track of a cool values. ↩
You can break down anything into single-qubit and two-qubit gates, which is why this requirement makes sense. ↩
I hate saying “first author et al.”, no matter how well-established it is. Attributing complex work to a single person and the myth of the lone genius are, in my humble opinion, exceedingly toxic. Thus, I’ll be referring to the three authors by their initials, as is also tradition. I think Bourbaki had the right idea. ↩
The Pauli matrices set tensor itself is a basis for . ↩
I’m trying to keep this light, but if you want to check it for yourself, you’ll need to see that the variance of the estimator you produce with the circuits is , which isn’t hard, and then use Hoeffding’s inequality. However, at that point I recommend just following the original publication :) ↩