Efficient simulation of random states and random unitaries
Abstract
We consider the problem of efficiently simulating random quantum states and random unitary operators, in a manner which is convincing to unbounded adversaries with black-box oracle access.
This problem has previously only been considered for restricted adversaries. Against adversaries with an a priori bound on the number of queries, it is well-known that -designs suffice. Against polynomial-time adversaries, one can use pseudorandom states (PRS) and pseudorandom unitaries (PRU), as defined in a recent work of Ji, Liu, and Song; unfortunately, no provably secure construction is known for PRUs.
In our setting, we are concerned with unbounded adversaries. Nonetheless, we are able to give stateful quantum algorithms which simulate the ideal object in both settings of interest. In the case of Haar-random states, our simulator is polynomial-time, has negligible error, and can also simulate verification and reflection through the simulated state. This yields an immediate application to quantum money: a money scheme which is information-theoretically unforgeable and untraceable. In the case of Haar-random unitaries, our simulator takes polynomial space, but simulates both forward and inverse access with zero error.
These results can be seen as the first significant steps in developing a theory of lazy sampling for random quantum objects.
1 Introduction
1.1 Motivation
Efficient simulation of randomness is a task with countless applications, ranging from cryptography to derandomization. In the setting of classical probabilistic computation, such simulation is straightforward in many settings. For example, a random function which will only be queried an a priori bounded number of times can be perfectly simulated using a -wise independent function [31]. In the case of unbounded queries, one can use pseudorandom functions (PRFs), provided the queries are made by a polynomial-time algorithm [16]. These are examples of stateless simulation methods, in the sense that the internal memory of the simulator is initialized once (e.g., with the PRF key) and then remains fixed regardless of how the simulator is queried. Against arbitrary adversaries, one must typically pass to stateful simulation. For example, the straightforward and well-known technique of lazy sampling suffices to perfectly simulate a random function against arbitrary adversaries; however, the simulator must maintain a list of responses to all previous queries.
Each of these techniques for simulating random classical primitives has a plethora of applications in theoretical cryptography, both as a proof tool and for cryptographic constructions. These range from constructing secure cryptosystems for encryption and authentication, to proving security reductions in a wide range of settings, to establishing security in idealized models such as the Random Oracle Model [6].
1.1.1 Quantum randomness.
As is well-known, quantum sources of randomness exhibit dramatically different properties from their classical counterparts [23, 7]. Compare, for example, uniformly random -bit classical states (i.e., -bit strings) and uniformly random -qubit (pure) quantum states. A random string is obviously trivial to sample perfectly given probabilistic classical (or quantum) computation, and can be copied and distributed arbitrarily. However, it is also (just as obviously) deterministic to all parties who have examined it before. By contrast, a random state would take an unbounded amount of information to describe perfectly. Even if one manages to procure such a state, it is then impossible to copy due to the no-cloning theorem. On the other hand, parties who have examined many times before, can still extract almost exactly bits of randomness from any fresh copy of they receive – even if they use the exact same measurement procedure each time.
The differences between random classical and random quantum maps are even more stark. The outputs of a classical random function are of course classical random strings, with all of the aforementioned properties. Outputs which have already been examined become effectively deterministic, while the rest remain uniformly random and independent. This is precisely what makes efficient simulation possible via lazy sampling. A Haar-random unitary queried on two inputs and also produces (almost) independent and uniformly random states when queried, but only if the queries are orthogonal, i.e., . Unitarity implies that overlapping queries must be answered consistently, i.e., if then . This possibility of querying with a distinct pure state which is not linearly independent from previous queries simply doesn’t exist for classical functions.
We emphasize that the above differences should not be interpreted as quantum random objects simply being “stronger” than their classical counterparts. In the case of classical states, i.e. strings, the ability to copy is quite useful, e.g., in setting down basic security definitions [8, 3, 2] or when rewinding an algorithm [29, 30, 14]. In the case of maps, determinism is also quite useful, e.g., for verification in message authentication.
1.2 The problem: efficient simulation
Given the dramatic differences between classical and quantum randomness, and the usefulness of both, it is reasonable to ask if there exist quantum analogues of the aforementioned efficient simulators of classical random functions. In fact, given the discussion above, it is clear that we should begin by asking if there even exist efficient simulators of random quantum states.
1.2.1 Simulating random states.
The first problem of interest is thus to efficiently simulate the following ideal object: an oracle which contains a description of a perfectly Haar-random -qubit pure state , and which outputs a copy of whenever it is invoked. We first make an obvious observation: the classical analogue, which is simply to generate a random bitstring and then produce a copy whenever asked, is completely trivial. In the quantum case, efficient simulation is only known against limited query algorithms (henceforth, adversaries.)
If the adversary has an a priori bound on the number of queries, then state -designs suffice. These are indexed families of pure states which perfectly emulate the standard uniform “Haar” measure on pure states, up to the first moments. State -designs can be sampled efficiently, and thus yield a stateless simulator for this case [4]. A recent work of Ji, Liu and Song considered the case of polynomial-time adversaries [18]. They defined a notion of pseudorandom states (PRS), which appear Haar-random to polynomial-time adversaries who are allowed as many copies of the state as they wish. They also showed how to construct PRS efficiently, thus yielding a stateless simulator for this class of constrained adversaries [18]; see also [9].
The case of arbitrary adversaries is, to our knowledge, completely unexplored. In particular, before this work it was not known whether simulating against adversaries with no a priori bound on query or time complexity is possible, even if given polynomial space (in and the number of queries) and unlimited time. Note that, while the state family constructions from [18, 9] could be lifted to the unconditional security setting by instantiating them with random instead of pseudorandom functions, this would require space exponential in regardless of the number of queries.
1.2.2 Simulating random unitaries.
In the case of simulating random unitaries, the ideal object is an oracle (n) which contains a description of a perfectly Haar-random -qubit unitary operator , and applies to its input whenever it is invoked. The classical analogue is the well-known Random Oracle, and can be simulated perfectly using the aforementioned technique of lazy sampling. In the quantum case, the situation is even less well-understood than in the case of states.
For the case of query-limited adversaries, we can again rely on design techniques: (approximate) unitary -designs can be sampled efficiently, and suffice for the task [10, 21]. Against polynomial-time adversaries, Ji, Liu and Song defined the natural notion of a pseudorandom unitary (or PRU) and described candidate constructions [18]. Unfortunately, at this time there are no provably secure constructions of PRUs. As in the case of states, the case of arbitrary adversaries is completely unexplored. Moreover, one could a priori plausibly conjecture that simulating might even be impossible. The no-cloning property seems to rule out examining input states, which in turn seems to make it quite difficult for a simulator to correctly identify the overlap between multiple queries, and then answer correspondingly.
1.2.3 Extensions.
While the above problems already appear quite challenging, we mention several natural extensions that one might consider. First, for the case of repeatedly sampling a random state , one would ideally want some additional features, such as the ability to apply the two-outcome measurement (verification) or the reflection . In the case of pseudorandom simulation, these additional features can be used to create a (computationally secure) quantum money scheme [18]. For the case of simulating random unitaries, we might naturally ask that the simulator for a unitary also has the ability to respond to queries to .
1.3 This work
In this work, we make significant progress on the above problems, by giving the first simulators for both random states and random unitaries, which are convincing to arbitrary adversaries. We also give an application of our sampling ideas: the construction of a new quantum money scheme, which provides information-theoretic security guarantees against both forging and tracing.
We begin by remarking that our desired simulators must necessarily be stateful, for both states and unitaries. Indeed, since approximate -designs have elements (see, e.g., [26] which provides a more fine-grained lower bound), a stateless approach would require superpolynomial space simply to store an index from a set of size for all polynomials .
In the following, we give a high-level overview of our approach for each of the two simulation problems of interest.
1.3.1 Simulating random states.
As discussed above, we wish to construct an efficient simulator for the ideal oracle . For now we focus on simulating the procedure which generates copies of the fixed Haar-random state; we call this . We first note that the mixed state observed by the adversary after queries to is the expectation of the projector onto copies of . Equivalently, it is the (normalized) projector onto the symmetric subspace of :
(1) |
Recall that is the subspace of of vectors which are invariant under permutations of the tensor factors. Our goal will be to maintain an entangled state between the adversary and our oracle simulator such that the reduced state on the side of is after queries. Specifically, the joint state will be the maximally entangled state between the subspace of the query output registers received by , and the subspace of registers held by . If we can maintain this for the first queries, then it’s not hard to see that there exists an isometry which, by acting only on the state of , implements the extension from the -fold to the -fold joint state.
The main technical obstacle, which we resolve, is showing that can be performed efficiently. To achieve this, we develop some new algorithmic tools for working with symmetric subspaces, including an algorithm for coherent preparation of its basis states. We let denote an -qubit register, its indexed copies, and -many indexed copies (and likewise for .) We also let denote a particular orthonormal basis set for , indexed by some set (see Section 3 for definitions of these objects.)
Theorem 1.1
For each and , there exists a polynomial-time quantum algorithm which implements an isometry from to such that, up to negligible trace distance,
Above, is an operator defined to apply to a specific subset of registers of a state. When no confusion can arise, in such settings we will abbreviate —the application of this operator on the entire state—as simply .
It will be helpful to view as first preparing and then applying a unitary on . Theorem 1.1 then gives us a way to answer queries efficiently, as follows. For the first query, we prepare a maximally entangled state across two -qubit registers and , and reply with register . Note that . For the second query, we prepare two fresh registers and , both in the state, apply on , return , and keep . For the -th query, we proceed similarly, preparing fresh blank registers , applying , and then outputting the register .
With this approach, as it turns out, there is also a natural way to respond to verification queries and reflection queries . The ideal functionality . is to apply the two-outcome measurement corresponding to the Haar-random state . To simulate this after producing samples, we apply the inverse of , apply the measurement to , reapply , and then return together with the measurement outcome (i.e., yes/no). For ., the ideal functionality is to apply the reflection through the state. To simulate this, we perform a sequence of operations analogous to , but apply a phase of on the state of instead of measuring.
Our main result on simulating random states is to establish that this collection of algorithms correctly simulates the ideal object , in the following sense.
Theorem 1.2
There exists a stateful quantum algorithm which runs in time polynomial in , , and the number of queries submitted to it, and satisfies the following. For all oracle algorithms ,
A complete description of our construction, together with the proofs of Theorem 1.1 and Theorem 1.2, are given in Section 3.
1.3.2 Application: untraceable quantum money.
To see that the efficient state sampler leads to a powerful quantum money scheme, consider building a scheme where the bank holds the ideal object The bank can mint bills by , and verify them using . As each bill is guaranteed to be an identical and Haar-random state, it is clear that this scheme should satisfy perfect unforgeability and untraceability, under quite strong notions of security.
By Theorem 3.2, the same properties should carry over for a money scheme built on , provided is sufficiently small. We call the resulting scheme Haar money. Haar money is an information-theoretically secure analogue of the scheme of [18], which is based on pseudorandom states. We remark that our scheme requires the bank to have quantum memory and to perform quantum communication with the customers. However, given that quantum money already requires customers to have large-scale, high-fidelity quantum storage, these additional requirements seem reasonable.
The notions of correctness and unforgeability (often called completeness and soundness) for quantum money are well-known (see, e.g., [1].) Correctness asks that honestly generated money schemes should verify, i.e., should always accept. Unforgeability states that an adversary with bills and oracle access to should not be able to produce a state on which accepts. In this work, we consider untraceable quantum money (also called “quantum coins” [24].) We give a formal security definition for untraceability, which states that an adversary with oracle access to and cannot do better than random guessing in the following experiment:
-
1.
outputs some candidate bill registers and a permutation ;
-
2.
is sampled, and if the registers are permuted by ; each candidate bill is verified and the failed ones are discarded;
-
3.
receives the rest of the bills and the entire internal state of the bank, and outputs a guess for .
Theorem 1.3
The Haar money scheme , defined by setting
-
1.
-
2.
is a correct quantum money scheme which satisfies information-theoretic unforgeability and untraceability.
One might reasonably ask if there are even stronger definitions of security for quantum money. Given its relationship to the ideal state sampler, we believe that Haar money should satisfy almost any notion of unforgeability and untraceability, including composable notions. We also remark that, based on the structure of the state simulator, which maintains an overall pure state supported on two copies of the symmetric subspace of banknote registers, it is straightforward to see that the scheme is also secure against an “honest but curious” or “specious” [27, 15] bank. We leave the formalization of these added security guarantees to future work.
1.3.3 Sampling Haar-random unitaries.
Next, we turn to the problem of simulating Haar-random unitary operators. In this case, the ideal object initially samples a description of a perfectly Haar-random -qubit unitary , and then responds to two types of queries: , which applies , and , which applies . In this case, we are able to construct a stateful simulator that runs in space polynomial in and the number of queries , and is exactly indistinguishable from to arbitrary adversaries. Our result can be viewed as a polynomial-space quantum analogue of the classical technique of lazy sampling for random oracles.
Our high-level approach is as follows. For now, suppose the adversary only makes parallel queries to . If the query count of is a priori bounded, we can simply sample an element of a unitary -design. We can also do this coherently: prepare a quantum register in uniform superposition over the index set of the -design, and then apply the -design controlled on . Call this efficient simulator . Observe that the effect of parallel queries is just the application of the -twirling channel to the input registers [10], and that simulates faithfully. What is more, it applies a Stinespring dilation111The Stinespring dilation of a quantum channel is an isometry with the property that the quantum channel can be implemented by applying the isometry and subsequently discarding an auxiliary register. [28] of with dilating register .
Now suppose makes an “extra” query, i.e., query number . Consider an alternative Stinespring dilation of , namely the one implemented by when queried times. Recall that all Stinespring dilations of a quantum channel are equivalent, up to a partial isometry on the dilating register. It follows that there is a partial isometry, acting on the private space of , that transforms the dilation of implemented by into the dilation of implemented by . If we implement this transformation, and then respond to as prescribed by , we have achieved perfect indistinguishability against the additional query. By iterating this process, we see that the a priori bound on the number of queries is no longer needed. We let denote the resulting simulator. The complete construction is described in Construction 4 below.
Our high-level discussion above did not take approximation into account. All currently known efficient constructions of -designs are approximate. Here, we take a different approach: we will implement our construction using exact -designs. This addresses the issue of adaptive queries: if there exists an adaptive-query distinguisher with nonzero distinguishing probability, then by post-selection there also exists a parallel-query one via probabilistic teleportation. This yields that the ideal and efficient unitary samplers are perfectly indistinguishable to arbitrary adversaries.
Theorem 1.4
For all oracle algorithms ,
The existence of exact unitary -designs for all is a fairly recent result. It follows as a special case of a result of Kane [19], who shows that designs exist for all finite-dimensional vector spaces of well-behaved functions on path-connected topological spaces. He also gives a simpler result for homogeneous spaces when the vector space of functions is invariant under the symmetry group action. Here, the number of elements of the smallest design is bounded just in terms of the dimension of the space of functions. The unitary group is an example of such a space, and the dimension of the space of homogeneous polynomials of degree in both and can be explicitly derived, see e.g. [26]. This yields the following.
Corollary 1
The space complexity of for queries is bounded from above by .
1.3.4 An alternative approach.
We now sketch another potential approach to lazy sampling of unitaries. Very briefly, this approach takes a representation-theoretic perspective and suggests that the Schur transform [5] could lead to a polynomial-time algorithm for lazy sampling Haar-random unitaries. The discussion below uses tools and language from quantum information theory and the representation theory of the unitary and symmetric groups to a much larger extent than the rest of the article, and is not required for understanding our main results.
We remark that the analogous problem of lazy sampling a quantum oracle for a random classical function was recently solved by Zhandry [32]. One of the advantages of Zhandry’s technique is that it partly recovers the ability to inspect previously made queries, an important feature of classical lazy sampling. The key insight is that the simulator can implement the Stinespring dilation of the oracle channel, and thus record the output of the complementary channel.222The complementary channel of a quantum channel maps the input to the auxiliary output of the Stinespring dilation isometry. As the classical function is computed via XOR, changing to the -Fourier basis makes the recording property explicit. It also allows for an efficient implementation.
In the case of Haar-random unitary oracles, we can make an analogous observation. Consider an algorithm that makes parallel queries to . The relevant Fourier transform is now over the unitary group, and is given by the Schur transform [5]. By Schur-Weyl duality (see e.g. [12]), the decomposition of into irreducible representations is given by
(2) |
Here means is any partition of into at most parts, is the Specht module of , and is the Weyl module of , corresponding to the partition , respectively. By Schur’s lemma, the -twirling channel acts as
(3) |
where is the identity channel, and with the maximally mixed state is the depolarizing channel. We therefore obtain a Stinespring dilation of the -twirling channel as follows. Let be registers with Hilbert spaces
(4) |
and denote the subregisters by and , respectively. Let further be the standard maximally entangled state on these registers, and let be a register whose dimension is the number of partitions of (into at most parts). Define the isometry
(5) |
In the above equation and are understood to be subspaces of , the identity operators on , are omitted and is the swap operator. By (3), a Stinespring dilation of the -twirling channel is then given by
(6) |
By the equivalence of all Stinespring dilations, the exists an isometry that transforms the state register of after parallel queries so that the global state is the same as if the Stinespring dilation above had been applied to the input registers. But now the quantum information that was contained in the subspace of the algorithm’s query registers can be found in register .
1.4 Organization
The remainder of the paper is organized as follows. In Section 2, we recall some basic notation and facts, and some lemmas concerning coherent preparation of certain generic families of quantum states. The proofs for these lemmas are given in Appendix 0.A. We also describe stateful machines, which will be our model for thinking about the aforementioned ideal objects and their efficient simulators. In Section 3 we describe our efficient simulator for Haar-random states, and in Section 4 we describe our polynomial-space simulator for Haar-random unitaries. We end by describing the Haar money scheme and establishing its security in Section 5.
1.5 Acknowledgments
The authors thank Yi-Kai Liu, Carl Miller, and Fang Song on helpful comments on an earlier draft. CM thanks Michael Walter for discussions about -designs. CM was funded by a NWO VIDI grant (Project No. 639.022.519) and a NWO VENI grant (Project No. VI.Veni.192.159). GA acknowledges support from NSF grant CCF-1763736.
2 Preliminaries
2.1 Some basics
Given a fixed-size (e.g., -qubit) register , we will use to denote indexed copies of . We will use to denote a register consisting of indexed copies of , i.e., . Unless stated otherwise, distances of quantum states are measured in the trace distance, i.e.,
Distances of unitary operators are measured in the operator norm.
We will frequently apply operators to some subset of a larger collection of registers. In that context, we will use register indexing to indicate which registers are being acted upon, and suppress identities to simplify notation. The register indexing will also be suppressed when it is clear from context. For example, given an operator and some state on registers and , we will write in place of to denote the state on resulting from applying to the register of .
We let denote the maximally entangled state on registers and . For a linear operator and some basis choice, we denote its transpose by .
Lemma 1 (Mirror lemma; see, e.g., [22])
For a linear operator,
2.2 Unitary designs
Let be the Haar measure on the unitary group . We define the Haar -twirling channel by
(7) |
For a finite subset , we define the -twirling map with respect to as
(8) |
An -qubit unitary -design is a finite set such that
(9) |
Another twirling channel is the mixed twirling channels with applications of the unitary and applications of it’s inverse,
(10) |
The mixed twirling channel for a finite set is also defined analogous to Equation (8). As our definition of unitary -designs is equivalent to one based on the expectation values of polynomials (see, e.g., [21]), we easily obtain the following.
Proposition 1
Let be an -qubit unitary -design and . Then
(11) |
Finite exact unitary -designs exist. In particular, one can apply the following theorem to obtain an upper bound on their minimal size. Here, a design for a function space on a topological space with measure is a finite set such that the expectation of a function is the same whether it is taken over according to or over the uniform distribution on .
Theorem 2.1 ([19], Theorem 10)
Let be a homogeneous space, an invariant measure on and a -dimensional vector subspace of the space of real functions on that is invariant under the symmetry group of , where . Then for any , there exists a -design for of size . Furthermore, there exists a design for of size at most .
The case of unitary -designs is the one where is acting on itself (e.g., on the left), is the Haar measure, and is the vector space of homogeneous polynomials of degree in both and 333The output of the twirling channel (7) is a matrix of such polynomials.. The dimension of this space is
(12) |
see e.g. [26]. We therefore get
Corollary 2
For all , there exists an exact -qubit unitary -design with a number of elements which is at most
2.3 Real and ideal stateful machines
We will frequently use stateful algorithms with multiple “interfaces” which allow a user to interact with the algorithm. We will refer to such objects as stateful machines. We will use stateful machines to describe functionalities (and implementations) of collections of oracles which relate to each other in some way. For example, one oracle might output a fixed state, while another oracle reflects about that state.
Definition 1 (Stateful machine)
A stateful machine consists of:
-
•
A finite set , whose elements are called interfaces. Each interface has two fixed parameters (input size) and (output size), and a variable initialized to (query counter.)
-
•
For each interface , a sequence of quantum algorithms . Each has an input register of qubits, an output register of qubits, and is allowed to act on an additional shared work register (including the ability to add/remove qubits in .) In addition, each increments the corresponding query counter by one.
The typical usage of a stateful machine is as follows. First, the work register is initialized to be empty, i.e., no qubits. After that, whenever a user invokes an interface and supplies qubits in an input register , the algorithm is invoked on registers and . The contents of the output register are returned to the user, and the new, updated work register remains for the next invocation. We emphasize that the work register is shared between all interfaces.
We remark that we will also sometimes define ideal machines, which behave outwardly like a stateful machine but are not constrained to apply only maps which are implementable in finite space or time. For example, an ideal machine can have an interface that implements a perfectly Haar-random unitary , and another interface which implements .
2.4 Some state preparation tools
We now describe some algorithms for efficient coherent preparation of certain quantum state families. The proofs for the following lemmas can be found in Appendix 0.A. We begin with state families with polynomial support.
Lemma 2
Let be a family of quantum states whose amplitudes have an efficient classical description , and such that . Then there exists a quantum algorithm which runs in time polynomial in and and satisfies
Given a set , we let
denote the states supported only on and its set complement , respectively. Provided that has polynomial size, we can perform coherent preparation of both state families efficiently: the former by Lemma 2 and the latter via the below.
Lemma 3
Let be a family of sets of size with efficient description , and let . There exists a quantum algorithm which runs in time polynomial in and and satisfies
Finally, we show that if two orthogonal quantum states can be prepared, then so can an arbitrary superposition of the two.
Lemma 4
Let be two familes of -qubit quantum states such that for all , and such that there exists a quantum algorithm which runs in time polynomial in and and satisfies for .
For such that , let denote a classical description of to precision at least . There exists a quantum algorithm which runs in time polynomial in and and satisfies
(13) |
3 Simulating a Haar-random state oracle
3.1 The problem, and our approach
We begin by defining the ideal object we’d like to emulate. Here we deviate slightly from the discussion above, in that we ask for the reflection oracle to also accept a (quantum) control bit.
Construction 1 (Ideal state sampler)
The ideal -qubit state sampler is an ideal machine with interfaces , defined as follows.
-
1.
takes no input; samples a description of an -qubit state from the Haar measure.
-
2.
takes no input; uses to prepare a copy of and outputs it.
-
3.
receives -qubit input; uses to apply the measurement ; return the post-measurement state and output in the first case and in the second.
-
4.
receives -qubit input; uses to implement the controlled reflection about .
We assume that is called first, and only once; the remaining oracles can then be called indefinitely many times, and in any order. If this is inconvenient for some application, one can easily adjust the remaining interfaces to invoke if that has not been done yet. We remark that can be implemented with a single query to .
Lemma 5
can be simulated with one application of .
Proof
Prepare an ancillary qubit in the state and apply the reflection on the input controlled on the ancillary qubit. Then apply to the ancilla qubit and measure it. Output all the qubits, with the ancilla interpreted as and . ∎
Our goal is to devise a stateful simulator for Construction 1 which is efficient. Efficient here means that, after total queries to all interfaces (i.e., , , , and ), the simulator has expended time polynomial in , , and .
As described in Section 1.3.1, our approach will be to ensure that, for every , the state shared between the adversary and our stateful oracle simulator will be maximally entangled between two copies of the -fold symmetric subspace : one held by , and the other by . The extension from the -fold to the -fold joint state will be performed by an isometry which acts only on the state of and two fresh -qubit registers and initialized by . After is applied, will be given to . As we will show, can be performed efficiently using some algorithmic tools for working with symmetric subspaces, which we will develop in the next section. This will yield an efficient way of simulating . Simulation of and will follow without much difficulty, as outlined in Section 1.3.1.
3.2 Some tools for symmetric subspaces
3.2.1 A basis for the symmetric subspace.
We recall an explicit orthonormal basis of the symmetric subspace (see, e.g., [18] or [17].) Let
(14) |
be the set of lexicographically-ordered -tuples of bit strings. For each , define the unit vector
(15) |
Here, is the number of times the string appears in the tuple . The set is an orthonormal basis for . We remark that the Schmidt decomposition of with respect to the bipartition formed by the -th register vs. the rest is given by
(16) |
where is the tuple with one copy of removed.
3.2.2 Some useful algorithms.
We now describe some algorithms for working in the above basis. Let and denote -qubit registers. Recall that denotes indexed copies of and that denotes , and likewise for . In our setting, the various copies of will be prepared by the oracle simulator and then handed to the query algorithm at query time. The copies of will be prepared by, and always remain with, the oracle simulator.
Proposition 2
For each , and , there exists an efficiently implementable unitary on such that for all , up to trace distance .
Proof
Clearly, the operation
(17) |
is efficiently implementable exactly, by XORing the classical sort function of the first register into the second register.
Let us now show that the operation is also efficiently implementable (up to the desirable error) by exhibiting an explicit algorithm. We define it recursively in , as follows. For , for all , so this case is simply the map . Suppose now the operation can be implemented for any . The -th level algorithm will begin by applying
Since is nonzero for only -many , this can be implemented efficiently by Lemma 2. Next, we perform . Using the algorithm for , we then apply , and uncompute . By (16), we have in total applied so far. To finish the -th level algorithm for approximating , we simply apply (17) to uncompute from the first register. ∎
Theorem 3.1 (Restatement of Theorem 1.1)
For each , and , there exists an efficiently implementable isometry from to such that, up to trace distance ,
Proof
We describe the algorithm assuming all steps can be implemented perfectly. It is straightforward to check that each step we use can in reality be performed to a sufficient accuracy that the accuracy of the entire algorithm is at least .
We will need a couple of simple subroutines. First, given and , we define to be the element of produced by inserting at the first position such that the result is still lexicographically ordered. One can perform this reversibly via .
Second, we will need to do coherent preparation of the state
(18) |
For any given , the state can be prepared by using the preparation circuit for the two orthogonal components of the state whose supports are and . These two components can also be prepared coherently using Lemma 2 and Lemma 3, respectively. Their superposition can be prepared with Lemma 4. Putting it all together, we get an algorithm for .
The complete algorithm is a composition of several efficient routines. We describe this below, explicitly calculating the result for the input states of interest. For readability, we omit overall normalization factors.
add working registers | ||||
apply to | ||||
insert into | ||||
apply to |
To see that the last line above is the desired result, we observe that we can index the sum in the last line above in a more symmetric fashion: the sum is just taken over all pairs such that the latter can be obtained from the former by adding one entry (i.e., the string ). But that is the same as summing over all pairs , such that the former can be obtained from the latter by removing one entry.
Here, the last equality is (16), and the prefactor is the square root of the quotient of the dimensions of the - and -copy symmetric subspaces, as required for a correct normalization of the final maximally entangled state.∎
3.3 State sampler construction and proof
Construction 2 (Efficient state sampler)
Let be a positive integer and a negligible function of . The efficient -qubit state sampler with precision is a stateful machine with interfaces , defined below. For convenience, we denote the query counters by and in the following.
-
1.
prepares the standard maximally entangled state on -qubit registers and , and stores both and .
-
2.
On the first query, outputs register . On query , takes as input registers and produces registers by applying the isometry from Theorem 3.1 with accuracy ; then it outputs and stores .
-
3.
On query with input registers , do the following controlled on the qubit register : apply , a unitary implementation of , with accuracy , in the sense that , with playing the role of . Subsequently, apply a phase on the all-zero state of the ancilla registers and , and reapply , this time with accuracy .
We omitted defining since it is trivial to build from , as described in Lemma 5. By Theorem 3.1, the runtime of is polynomial in , and the total number of queries that are made to its various interfaces.
We want to show that the above sampler is indistinguishable from the ideal sampler to any oracle algorithm, in the following sense. Given a stateful machine and a (not necessarily efficient) oracle algorithm , we define the process as follows:
-
1.
is called;
-
2.
receives oracle access to and ;
-
3.
outputs a bit .
Theorem 3.2
For all oracle algorithms and all that can depend on in an arbitrary way,
(19) |
Proof
During the execution of , the -th call of (for any ) incurs a trace distance error of at most . The trace distance between the outputs of and is therefore bounded by . It is thus sufficient to establish the theorem for .
For any fixed , there exists a stateful machine which is perfectly indistinguishable from to all adversaries who make a maximum total number of queries. The procedure of samples a random element from an exact unitary -design . Queries to are answered with a copy of , and is implemented by applying . It will be helpful to express in an equivalent isometric form. In this form, the initial oracle state is
(20) |
queries are answered using the -controlled isometry
(21) |
queries are answered by
(22) | ||||
(23) |
Now suppose is an arbitrary (i.e., not bounded-query) algorithm making only queries. We will show that after queries, the oracles and are equivalent, and that this holds for all . We emphasize that does not depend on ; as a result, we can apply the equivalence for the appropriate total query count after has produced its final state, even if is determined only at runtime. It will thus follow that is equivalent to .
To show the equivalence betwen and , we will demonstrate a partial isometry that transforms registers of (after queries and no queries) into the register of , in such a way that the corresponding global states on and are mapped to each other. The isometry is partial because its domain is the symmetric subspace of . It is defined as follows:
(24) |
To verify that this is indeed the desired isometry, we calculate:
(25) | ||||
(26) | ||||
(27) | ||||
(28) |
Here we have used the fact that is in the symmetric subspace in the second equality, and the third and forth equality are applications of the Mirror Lemma (Lemma 1) with , and , respectively.
We have hence proven the exact correctness of without the interface. Note that the global state after queries to is the maximally entangled state of two copies of the -fold symmetric subspace; of course, this is only true up to actions performed by the adversary, but those trivially commute with maps applied only to the oracle registers. As the global state is in the domain of , we obtain the equation
(29) |
More precisely, we observe that the two sides of the above have the same effect on the global state, and then conclude that they must be the same operator by the Choi-Jamoiłkowski isomorphism.
Recalling that is partial with the symmetric subspace as its domain, we see that Equation (29) is equivalent to
(30) | ||||
(31) |
By taking the above equality times its adjoint, we arrive at
(32) |
By Equation (29), the range of is contained in the range of . We can thus simplify as follows:
(33) |
Now observe that both sides of the above consist of a projection operator “sandwiched” by some operation. These two projection operators are precisely the projectors which define the reflection operators of (on the left-hand side) and (on the right-hand side.) We thus see that Equation (3.3) shows that applying is the same as switching to , applying , and then switching back to . The same holds for the controlled versions and .
This completes the proof of the exact equality between the stateful machines and . As argued at the start of the proof, the approximation case follows. ∎
4 Simulating a Haar-random unitary oracle
4.1 The problem, and our approach
We begin by defining the ideal object we’d like to emulate. This ideal object samples a Haar-random unitary , and then answers two types of queries: queries to , and queries to its inverse .
Construction 3 (Ideal unitary sampler)
Let be a positive integer. The ideal unitary sampler is an ideal machine with interfaces , defined as follows.
-
1.
takes no input; samples a description of a Haar-random -qubit unitary operator .
-
2.
takes -qubit register as input, applies and responds with the output;
-
3.
takes -qubit register as input, applies and responds with the output.
Below, we construct a stateful machine that runs in polynomial space (and the runtime of which we don’t characterize), and that is indistinguishable from for arbitrary query algorithms.
4.1.1 Our approach.
It turns out that the solution of a much easier task comes to our help, namely simulating a Haar random unitary for an algorithm that makes an a priori polynomially bounded number of queries. In this case we can just pick a unitary -design, sample an element from it and answer the up to queries using this element. As in the proof of Theorem 3.2, we can also construct an isometric stateful machine version of this strategy: Instead of sampling a random element from the -design, we can prepare a quantum register in a superposition, e.g. over the index set of the -design (), and then apply the -design element () or its inverse () controlled on that register.
Now consider an algorithm that makes parallel queries to a Haar random unitary (for ease of exposition let us assume here that the algorithm makes no inverse queries). The effect of these parallel queries is just the application of the -twirling channel (or the mixed twirling channel defined in Equation (10)) to the input registers. The -design-based isometric stateful machine simulates this -twirling channel faithfully. What is more, it applies a Stinespring dilation of the -twirling channel, the dilating register being the one created by initialization.
Now suppose we have answered queries using the -design-based machine, and are now asked to answer another, still parallel, query. Of course we cannot, in general, just answer it using the -design, as its guarantees only hold for applications of the unitary. But all Stinespring dilations of a quantum channel are equivalent in the sense that there exists a (possibly partial) isometry acting on the dilating register of one given dilation, that transforms it into another given dilation. So we can just apply an isometry that transforms our -design based Stinespring dilation into a -design based one, and subsequently answer the st query using a controlled unitary.
4.2 Construction and proof
We continue to describe a stateful machine that simulates exactly and has a state register of size polynomial in and the total number of queries that an algorithm makes to its and interfaces. The existence of the required unitary -designs is due to Corollary 2.
We recall our conventions for dealing with many copies of fixed-sized registers. We let denote an -qubit register, we let denote indexed copies of , and we let denote . In this case, the various copies of will be the input registers of the adversary, on which the simulator will act. The oracle will now hold a single register whose size will grow with the number of queries . This register holds an index of an element in a -design.
For the construction below, we need the following quantum states and operators. For a positive integer , choose a family of -qubit unitary designs , where is a unitary -design. Let be a register of dimension and define the uniform superposition over indices
(34) |
For nonnegative integers , define the unitaries
(35) |
These isometries perform the following: controlled on an index of a -design , apply to registers and to registers. For us it will always be the case that , since otherwise the -design property no longer makes the desired guarantees on the map .
We also let be an isometry such that
(36) |
for . The isometry always exists, as all Stinespring dilations are isometrically equivalent, and both and are Stinespring dilations of the mixed twirling channel by the -design property.
We are now ready to define the space-efficient unitary sampler.
Construction 4 (Space-efficient unitary sampler)
Let be a positive integer and a family of -qubit unitary -designs , with . Define a stateful machine with interfaces as follows. The machine will maintain counters (the number of queries), (the number of queries), and .
-
1.
Prepares the state and stores it.
-
2.
-
•
If , apply , where is the input register.
-
•
If , apply to the state register and subsequently apply , where is the input register.
-
•
-
3.
-
•
If , apply , where is the input register.
-
•
If , apply to the state register and subsequently apply , where is the input register.
-
•
We want to show that the above sampler is indistinguishable from the ideal sampler to any oracle algorithm, in the following sense. Given a stateful machine and a (not necessarily efficient) oracle algorithm , we define the process as follows:
-
1.
is called;
-
2.
receives oracle access to and ;
-
3.
outputs a bit .
Theorem 4.1
For all oracle algorithms
(37) |
Proof
We begin by proving the following claim by induction. The claim states that the theorem holds for adversaries who only make parallel queries.
Claim
For all , let be the isometry that is implemented by making parallel queries to , where the -th query is made to the interface if and to the interface if . Let further be a permutation such that , where the lower dot denotes the natural action of on strings of length . Then
(38) |
where acts by permuting the registers.
Proof
For , the claim trivially holds. Now suppose the claim holds for . By definition of the and interfaces,
(39) |
where . By the induction hypothesis, we have
(40) |
for an appropriate permutation . By the design property of for and the definition of we obtain
(41) |
Here we have used the fact that the permutation and commute because they act on disjoint sets of registers. Putting Equations (39), (40) and (41) together, it follows that
(42) |
But clearly
(43) |
For an appropriate permutation that consists of applying and then sorting in correctly.
The generalization to adaptive algorithms is done via post-selection: Given an algorithm , consider non-adaptive algorithm that first queries the and interfaces of the stateful machine it is interacting with on the first halves of a sufficient number of maximally entangled states. Subsequently the adaptive adversary is run, answering the queries by running quantum teleportation on the inputs together with the remaining halves of the maximally entangled states. This way, the query registers of the adaptive queries are teleported into the previously made non-adaptive queries, but of course they incur a random Pauli error on the way, that cannot be corrected.
As the output of is, however, exactly the same whether it interacts with or with , the same holds for the version of where we post-select, or condition, on the outcome that all the Pauli corrections in all the teleportation protocols are the identity. But this post-selected algorithm has the same output as no matter what oracles it is given. ∎
Using Corollary 2 and the above, we get the following upper bound on the space complexity of lazy sampling Haar random unitaries.
Corollary 3
The space complexity of simulating as a function of and the number of queries is bounded from above by the logarithm of number of elements in any family of exact -qubit unitary -designs, and hence
(44) |
Proof
According to Corollary 2, There exists an exact unitary -design such that qubits suffice to coherently store the index of an element from it. The only additional information that needs to store is how many direct and inverse queries have been answered, which can be done using bits.
Our results suggest two possible approaches to devise a time-efficient lazy sampler for Haar random unitaries. The most promising one is to use the same approach as for the state sampler and explicitly constructing the update isometry, possibly using explicit bases for the irreducible representations of , or using the Schur transform [5]. The other one would be to use the -design update method described above, but using efficient approximate -designs, e.g. the ones constructed in [10]. This would, however, likely require a generalization of the Stinespring dilation continuity result from [20] to so-called quantum combs [11]. In addition, we would need to show that the transition isometries, i.e. the approximate analogue of the isometries from Construction 4, are efficiently implementable. We leave the exploration of these approaches for future work.
5 Application: untraceable quantum money
5.1 Untraceable quantum money
Our definition of quantum money deviates somewhat from others in the literature [1, 18]. We allow the bank to maintain an internal quantum register, we do not require that the money states are pure, and we allow adversaries to apply arbitrary (i.e., not necessarily efficiently implementable) channels.
Definition 2 (Quantum money)
A quantum money scheme is a family of stateful machines indexed by a security parameter , and having two interfaces:
-
1.
: receives no input, outputs an -qubit register;
-
2.
: receives an -qubit register as input, outputs an -qubit register together with a flag ,
satisfying the following two properties:
-
•
correctness: ;444Note that it is understood that this inequality should hold no matter which interfaces have been called in between the relevant and calls
-
•
unforgeability: for all channels with oracle, and all ,
where denotes discarding all registers except flags.
It is implicit in the definition that is a fixed polynomial function of , and that all relevant algorithms are uniform in .
Next, we define untraceability for quantum money schemes.
Definition 3 (Untraceability game)
The untraceability game between an adversary and a quantum money scheme at security parameter proceeds as follows:
-
1.
set up the trace: receives oracle access to and , and outputs registers , , …, and a permutation ;
-
2.
permute and verify bills: is sampled, and if the registers are permuted by . is invoked on each ; the accepted registers are placed in a set while the rest are discarded;
-
3.
complete the trace: receives and the entire internal state of , and outputs a guess .
The output of is ; in the case , we say that wins.
Definition 4 (Untraceable quantum money)
A quantum money scheme is untraceable if, for every algorithm ,
The intuition behind the definition is as follows. In general, one might consider a complicated scenario involving many honest players and many adversaries, where the goal of the adversaries is to trace the movement of at least one bill in transactions involving at least one honest player. Tracing in transactions involving only adversaries is of course trivial. The first natural simplification is to view all the adversaries as a single adversarial party; if that party cannot trace, then neither can any individual adversary. Next, we assume that honest players will verify any bills they receive immediately; obviously, if they do not do this, and then participate in transactions with the adversary, then tracing is again trivial. We thus arrive at the situation described in the game: the adversary is first allowed to create candidate bills arbitrarily, including storing information about them and entangling them with additional registers, before handing them to honest players who may or may not perform some transactions; the goal of the adversary is to decide which is the case, with the help of the bank. Note that one round of this experiment is sufficient in the security game, as an adversary can always use the and oracles to simulate additional rounds.
One might reasonably ask if there are even stronger definitions of untraceability than the above. Given its relationship to the ideal state sampler, we believe that Haar money, defined below, should satisfy almost any notion of untraceability, including composable notions. We also remark that, based on the structure of the state simulator, which maintains an overall pure state supported on two copies of the symmetric subspace of banknote registers, it is straightforward to see that the scheme is also secure against an “honest but curious” or “specious” [27, 15] bank. We leave the formalization of these added security guarantees to future work.
5.2 Haar money
Next, we show how the lazy state sampler (Construction 2) yields untraceable quantum money. The construction follows the idea of [18] sample a single (pseudo)random quantum state and hand out copies of it as banknotes.
Construction 5 (Haar money)
Let be a positive integer and . The Haar scheme is defined as follows:
-
•
: on first invocation, instantiate by running . On all invocations, output result of ;
-
•
: apply ; in the case, call and output the result; in the case, output .
We remark that, while Construction 2 does not explicitly include a interface, one can easily be added by Lemma 5.
Proposition 3
Haar money is an untraceable quantum money scheme.
Proof
We need to show three properties: completeness, unforgeability, and untraceability. For the completeness and unforgeability properties, observe that Theorem 3.2 implies that the adversary’s view is indistinguishable (up to negligible terms) if we replace the efficient state sampler with the ideal . Once we’ve made that replacement, completeness follows from the definition of and , and unforgeability follows from the complexity-theoretic no-cloning theorem [1].
For untraceability, it is of course true that is obviously untraceable. However, we cannot simply invoke Theorem 3.2 to conclude the same about , since the adversary will receive the state of the bank at the end of the game. Instead, we argue as follows. Consider step (permute and verify bills) in the untraceability game . An equivalent way to perform this step is to (i.) verify all the registers first, (ii.) discard the ones that fail verification, and then (iii.) apply the permutation, conditioned on the challenge bit . Steps (i.) and (ii.) are applied always and in particular do not depend on . However, after (i.) and (ii.) have been applied, by the definition of the joint state of the bank and all the (and indeed all verified bills in existence) is negligibly far from the state , i.e., the maximally entangled state on the symmetric subspace. This state is clearly invariant under permutation of the money registers, and in particular under the permutation of the registers in selected by the adversary. We emphasize that this invariance holds for the entire state (including the bank.) As the remainder of the game experiment is simply some channel applied to that state, and this channel does not depend on , the result follows. ∎
While Haar money is an information-theoretically unforgeable and untraceable quantum money scheme, it is easy to see that the quantum money scheme devised in [18] is computationally unforgeable and untraceable.
References
- [1] Scott Aaronson and Paul Christiano. Quantum money from hidden subspaces. In Proceedings of the forty-fourth annual ACM symposium on Theory of computing, pages 41–60. ACM, 2012.
- [2] Gorjan Alagic, Tommaso Gagliardoni, and Christian Majenz. Can you sign a quantum state. Cryptology ePrint Archive, Report 2018/1164, 2018. https://eprint.iacr.org/2018/1164.
- [3] Gorjan Alagic, Tommaso Gagliardoni, and Christian Majenz. Unforgeable quantum encryption. In Jesper Buus Nielsen and Vincent Rijmen, editors, Advances in Cryptology – EUROCRYPT 2018, pages 489–519, Cham, 2018. Springer International Publishing.
- [4] Andris Ambainis and Joseph Emerson. Quantum t-designs: T-wise independence in the quantum world. In Proceedings of the Twenty-Second Annual IEEE Conference on Computational Complexity, CCC ’07, pages 129–140, Washington, DC, USA, 2007. IEEE Computer Society.
- [5] Dave Bacon, Isaac L. Chuang, and Aram W. Harrow. Efficient quantum circuits for schur and clebsch-gordan transforms. Phys. Rev. Lett., 97:170502, Oct 2006.
- [6] Mihir Bellare and Phillip Rogaway. Random oracles are practical: a paradigm for designing efficient protocols. In Proceedings of the 1st ACM conference on Computer and communications security, CCS ’93, pages 62–73, New York, NY, USA, 1993. ACM.
- [7] Charles Bennett and Gilles Brassard. Quantum cryptography: Public key distribution and coin tossing. In Proceedings of the International Conference on Computers, Systems, and Signal Processing, pages 175–179, 1984.
- [8] Dan Boneh and Mark Zhandry. Quantum-secure message authentication codes. In Advances in Cryptology - EUROCRYPT 2013, pages 592–608. Springer, 2013.
- [9] Zvika Brakerski and Omri Shmueli. (pseudo) random quantum states with binary phase. arXiv preprint arXiv:1906.10611, 2019.
- [10] Fernando G. S. L. Brandão, Aram W. Harrow, and Michał Horodecki. Local random quantum circuits are approximate polynomial-designs. Communications in Mathematical Physics, 346(2):397–434, 2016.
- [11] G. Chiribella, G. M. D’Ariano, and P. Perinotti. Quantum circuit architecture. Phys. Rev. Lett., 101:060401, Aug 2008.
- [12] Matthias Christandl. The structure of bipartite quantum states-Insights from group theory and cryptography. PhD thesis, University of Cambridge, 2006.
- [13] Christopher M Dawson and Michael A Nielsen. The solovay-kitaev algorithm. arXiv preprint quant-ph/0505030, 2005.
- [14] Jelle Don, Serge Fehr, Christian Majenz, and Christian Schaffner. Security of the fiat-shamir transformation in the quantum random-oracle model. In Alexandra Boldyreva and Daniele Micciancio, editors, Advances in Cryptology – CRYPTO 2019, pages 356–383, Cham, 2019. Springer International Publishing.
- [15] Frédéric Dupuis, Jesper Buus Nielsen, and Louis Salvail. Secure two-party quantum evaluation of unitaries against specious adversaries. In Advances in Cryptology–CRYPTO 2010, pages 685–706. Springer, 2010.
- [16] Oded Goldreich, Shafi Goldwasser, and Silvio Micali. How to construct random functions. Journal of the ACM, 33(4):792–807, 1986.
- [17] Aram W. Harrow. The Church of the Symmetric Subspace. arXiv e-prints, page arXiv:1308.6595, Aug 2013.
- [18] Zhengfeng Ji, Yi-Kai Liu, and Fang Song. Pseudorandom quantum states. In Hovav Shacham and Alexandra Boldyreva, editors, Advances in Cryptology – CRYPTO 2018, pages 126–152, Cham, 2018. Springer International Publishing.
- [19] Daniel Kane. Small designs for path-connected spaces and path-connected homogeneous spaces. Transactions of the American Mathematical Society, 367(9):6387–6414, 2015.
- [20] Dennis Kretschmann, Dirk Schlingemann, and Reinhard F. Werner. The information-disturbance tradeoff and the continuity of stinespring’s representation. IEEE transactions on information theory, 54(4):1708–1717, 2008.
- [21] Richard A Low. Pseudo-randomness and learning in quantum computation. arXiv preprint arXiv:1006.5227, 2010.
- [22] Christian Majenz. Entropy in Quantum Information Theory – Communication and Cryptography. arXiv e-prints, page arXiv:1810.10436, Oct 2018.
- [23] Dominic Mayers and Andrew Yao. Self testing quantum apparatus. Quantum Info. Comput., 4(4):273–286, July 2004.
- [24] Michele Mosca and Douglas Stebila. Quantum coins. Error-Correcting Codes, Finite Geometries and Cryptography, 523:35–47, 2010.
- [25] Michael A. Nielsen and Isaac L. Chuang. Quantum Computation and Quantum Information. Cambridge University Press, 2000.
- [26] Aidan Roy and A. J. Scott. Unitary designs and codes. Designs, Codes and Cryptography, 53(1):13–31, Oct 2009.
- [27] Louis Salvail, Christian Schaffner, and Miroslava Sotáková. On the power of two-party quantum cryptography. In Proceedings of the 15th International Conference on the Theory and Application of Cryptology and Information Security: Advances in Cryptology, ASIACRYPT ’09, pages 70–87, Berlin, Heidelberg, 2009. Springer-Verlag.
- [28] W Forrest Stinespring. Positive functions on c*-algebras. Proceedings of the American Mathematical Society, 6(2):211–216, 1955.
- [29] Dominique Unruh. Quantum proofs of knowledge. In David Pointcheval and Thomas Johansson, editors, Advances in Cryptology – EUROCRYPT 2012, pages 135–152, Berlin, Heidelberg, 2012. Springer Berlin Heidelberg.
- [30] John Watrous. Zero-Knowledge against Quantum Attacks. SIAM Journal on Computing, 39(1):25–58, 2009.
- [31] Mark N. Wegman and J.Lawrence Carter. New hash functions and their use in authentication and set equality. Journal of Computer and System Sciences, 22(3):265 – 279, 1981.
- [32] Mark Zhandry. How to record quantum queries, and applications to quantum indifferentiability. In Alexandra Boldyreva and Daniele Micciancio, editors, Advances in Cryptology – CRYPTO 2019, pages 239–268, Cham, 2019. Springer International Publishing.
Appendix 0.A State preparation lemma proofs
We now prove the state preparation lemmas from the preliminaries.
Lemma 6 (Restatement of Lemma 2)
Let be a family of quantum states whose amplitudes have an efficient classical description , and such that . Then there exists a quantum algorithm which runs in time polynomial in and and satisfies
Proof
Let , let and let be an indexing of , e.g., by lexicographic order. We first observe that, from the classical description , we can efficiently compute a circuit for a -qubit unitary , such that . In [25], Chapter 4, it is described how any -qubit unitary can be implemented up to precision using a quantum circuit of length for some universal constant , and how to compute such a circuit efficiently. The recipe consists of a decomposition into a circuit of CNOT and arbitrary single qubit gates, and an application of the Solovay-Kitaev theorem to implement the single-qubit gates using, say, the Clifford+T gate set. The former is easily verified to be efficiently computable, and an algorithmic version of the latter can be found in, e.g., [13]. We apply this algorithm to compute a circuit for from ; let denote its maximum length.
The total algorithm that, on input , produces the circuit for , can be written as a reversible circuit and implemented as a quantum circuit such that . Here, is the unitary implemented by a quantum circuit . We can then apply a universal quantum circuit to apply to a fresh ancilla register initialized in the state , and then again apply to uncompute the circuit description.
We are now ready to define the algorithm as follows. On input , we attach ancillas in the state and use the above to apply
Next, controlled on the first two registers being in state we apply to the last register. Finally, controlled on the first and last registers being in state and , respectively, we apply to the middle register if for some (and the identity otherwise), and discard the middle register.
Lemma 7 (Restatement of Lemma 3)
Let be a family of sets of size with efficient description , and let . There exists a quantum algorithm which runs in time polynomial in and and satisfies
Proof
We first observe that there is a quantum algorithm of size polynomial in and for the task of, given a classical description of a -size set , preparing the state with precision . This algorithm proceeds by repeatedly preparing the uniform superposition and then applying the two-outcome measurement defined by the projector . After
repetitions, one of the attempts will succeed with probability at least . Finally, the algorithm swaps the successful register into a fixed output register (or outputs some fixed state if all attempts failed.) Let be the quantum circuit for executing this entire algorithm, including measurements and conditional operations.
The algorithm will perform in a coherent (i.e., measurement-free) way, while uncomputing some garbage on the fly. In the end, the remaining garbage is uncomputed. The -th coherent iteration step is done as follows. Initialize a qubit and an n-qubit register , both in the all-zero state. Now, controlled on and using the convention that , apply to and coherently measure whether , storing the outcome in . Now, controlled on , swap and , and unprepare in register with precision using the algorithm form Lemma 2. After this procedure, is in the zero state and can be safely discarded. After iterations, the state is -close to
(45) |
But the state the -registers is in is a superposition of many computational basis states, so we can unprepare it using the algorithm from Lemma 2 with precision , so we have prepared up to error .
Lemma 8 (Restatement of Lemma 4)
Let be two familes of -qubit quantum states such that for all , and such that there exists a quantum algorithm which runs in time polynomial in and and satisfies for .
For such that , let denote a classical description of to precision at least . There exists a quantum algorithm which runs in time polynomial in and and satisfies
(46) |
Proof
We first use Lemma 2 to implement a unitary such that up to error . After attaching an ancillary qubit and applying this circuit, our total state is , where we have named some of the registers for easier reference. Note that any efficient quantum circuit has an efficient controlled version. We can thus next prepare (in register ) the state controlled on being in state , and subsequently prepare (also in ) the state controlled on being in state , both with accuracy . Now we apply the inverse of the circuit for the preparation of to register , without control. Controlled on being in state , we then apply to , after which the preparation circuit for is applied to again (note that orthogonality of the two state families is crucial for this step.) The register is now in the state and can be safely discarded.