LLow-depth Quantum State Preparation
Xiao-Ming Zhang, Man-Hong Yung, β and Xiao Yuan β Department of Physics, City University of Hong Kong, Tat Chee Avenue, Kowloon, Hong Kong SAR, China Institute for Quantum Science and Engineering, and Department of Physics,Southern University of Science and Technology, Shenzhen, 518055, China Center on Frontiers of Computing Studies, Department of Computer Science, Peking University, BeΔ³ing 100871, China
A crucial subroutine in quantum computing is to load the classical data of π complex numbers into theamplitude of a superposed π = (cid:100) log π (cid:101) -qubit state. It has been proven that any algorithm universally implementsthis subroutine would need at least O( π ) constant weight operations. However, the proof assumes that theoperations only act on the π qubits and the circuit depth could be reduced by extending the space and allowingancillary qubits. Here we investigate this space-time tradeoο¬ in quantum state preparation with classical data. Weproposed quantum algorithms with O(( log π ) ) circuit depth to encode an arbitrary π -bit classical data usingonly single-, two-qubit gates and local measurements with ancillary qubits. Diο¬erent variances are proposedwith diο¬erent space and time complexities. In particular, we present a scheme with the number of ancillary qubits O( π ) , the circuit depth O(( log π ) ) , and the average runtime O(( log π ) ) , which exponentially improvesthe conventional bound. While the algorithm requires more ancillary qubits, it consists of quantum circuit blocksthat only simultaneously act on constant number of qubits and we only need to maintain entanglement of atmost O( log π ) qubits. The algorithms are expected to have wide applications in both near-term and universalquantum computing. Various quantum algorithms have been designed for solvingdiο¬erent types of problems. A critical subroutine of manyquantum algorithms is to encode classical data into a super-posed quantum state [1β7]. Speciο¬cally, it corresponds topreparing a general muti-qubit state with classically given am-plitudes. An eο¬cient state preparation scheme is the prereq-uisite of many algorithms, including quantum linear systemalgorithms [8, 9], quantum versions of data ο¬tting [10], prin-cipal component analysis [11], support vector machine [12],Hamiltonian simulation algorithms [13β15], etc. Theoreti-cally, the minimal number of constant-weight operations toprepare an arbitrary π -dimensional or π = (cid:100) log π (cid:101) qubitstate is lower bounded by O ( π / log π ) [16]. For instance, onemay construct a unitary to transform | (cid:105) β π to the target statewith only single-qubit and CNOT gates, and existing algo-rithms [3, 4, 6, 7] require O ( π ) circuit depth, which is closeto the fundamental limit. Since the complexity is linear tothe dimension π or exponential to the number of qubits π , itrequires a deep circuit for large π . For example, the circuitdepth is already challenging for the current technology when π β or π = π qubits, and one may trade the circuit depth (time)with ancillary qubits (space). Along this line, quantum cir-cuits with O ( π ) depth have been proposed to encode binaryvectors [17] and general non-binary vectors [18] into a specialtype of entangled states. The key idea is to apply operationson π qubits in parallel so that the circuit depth is polylogarith-mic to π . Nevertheless, the output quantum state is encodedwith π qubits, which is exponentially larger than π , and it is ina complicated entangled basis, which may not be universallyusable as the input to other quantum algorithms. Therefore, itremains an open question whether it is possible to more eο¬-ciently and directly prepare a general π -dimensional ( π -qubit)quantum state with a shallow circuit depth. In this work, we address this problem by considering anextension of probabilistic of quantum state preparation. Weconsider the task of preparing an π -dimensional ( π -qubit)state and introduce several quantum algorithms that usecircuits with polylogarithmic depth O ( π ) . With diο¬erentnumbers of ancillary qubits, the algorithms have diο¬erentsuccess probabilities, which could be enhanced to O ( ) witha time complexity that is inverse proportional to the successprobability. As a result, the sequential algorithm uses O ( π ) ancillary qubits with time complexity O ( π ) and the parallelalgorithms uses more ancillary qubits with a smaller timecomplexity. Speciο¬cally, the extreme parallel algorithm has atime complexity of O ( π ) with O ( π ) ancillary qubits. Notethat for all the proposed algorithm, one only need to maintainentanglement of at most O ( π ) qubits. Our results thus showthe space-time trade-oο¬ in quantum state preparation. Framework.
We ο¬rst introduce the task of quantum statepreparation. Given a vector π : = [ π’ , π’ , Β· Β· Β· , π’ π β ] β C π of π complex numbers satisfying (cid:107) π (cid:107) =
1, we consider thepreparation of the π -qubit state | π ( π )(cid:105) : = π β βοΈ π = π’ π | π, π (cid:105) , (1)where | π, π (cid:105) is the π -qubit binary representation of π . For exam-ple, | , (cid:105) = | (cid:105) , | , (cid:105) = | (cid:105) and | , (cid:105) = | (cid:105) . Here,the state | π ( π )(cid:105) is also called the amplitude encoding [19β24]of the vector π and serves as our target state.To prepare | π ( π )(cid:105) , we consider a resized vector π : = π / max (| π’ π |) and deο¬ne the label encoding state of π with π + a r X i v : . [ qu a n t - ph ] F e b to a normalization factor) | π (cid:105) : = π β βοΈ π = | π, π (cid:105)| π£ π (cid:105) = π β βοΈ π = | π, π (cid:105) [ π£ π | (cid:105) + ( β π£ π )| (cid:105)] , (2)where | π, π (cid:105) and | π£ π (cid:105) = π£ π | (cid:105) + ( β π£ π )| (cid:105) represents the π -qubit label and the value single qubit, respectively. Notethat if we project the value qubit to | (cid:105) and trace it out, we canprobabilistically obtain the target state | π ( π )(cid:105) . Thus we ο¬rstfocus on the preparation of the label encoding state. Positive label state preparation.
We ο¬rst consider the spe-cial case with positive amplitudes π β [ , ] π . Our algorithmis based on the following theorem about concatenating twolabel encoding states. Result 1.
Given two quantum states | π ( π ) (cid:105) and | π ( π ) (cid:105) with π ( π ) , π ( π ) β [ , ] π , there exist an O ( π ) depth concatenationcircuit, such that the state | π ( π ) β π ( π ) (cid:105) can be obtained withprobability larger than / . The concatenation circuit is shown in Fig 1, where we performa joint controlled-swap operation on each pair of the qubits for | π ( π ) (cid:105) and | π ( π ) (cid:105) with a control ancillary qubit initialized in |+(cid:105) = /β (| (cid:105) + | (cid:105)) .The state then becomes1 β (cid:16) | (cid:105)| π ( π ) (cid:105) β | π ( π ) (cid:105) + | (cid:105)| π ( π ) (cid:105) β | π ( π ) (cid:105) (cid:17) . (3)Next, the key step is to disentangle the last ( π + ) qubits byprojecting the last value qubit to |+(cid:105) . The success probabilityof the projection satisο¬es π + (cid:62) / π + π + (cid:16) | (cid:105)| π ( π ) (cid:105) + | (cid:105)| π ( π ) (cid:105) (cid:17) β | π uni (cid:105) = | π ( π ) β π ( π ) (cid:105) β | π uni (cid:105) , swap xiaomingJanuary 2020 | + i v ( a ) v ( b ) β΅ v ( a ) β΅ | n, i i v ( a ) i β΅ v ( b ) β΅ | n, j i v ( b ) j β΅ | + i v ( a ) v ( b ) β΅ v ( a ) β΅ v ( b ) β΅ | i + i | ip | i | ip | ( v ) i| i + i | ip =
2, we have π pos ( π ) (cid:54) [ π pos ( π β ) + π π + π ] .Here, π characterize the runtime for single control swap gate,and π characterize the runtime for processes that are indepen-dent on π , such as detection time and latent time. We show that π pos ( π ) β€ O ( π ) .The runtime can be improved by parallelization. Firstly,two input states of the concatenation circuit (see Fig. 1), canbe prepared in parallel. Secondly, one can prepare suο¬cientnumber of input state copies, and then perform the concate-nation circuit for multiple pairs of input states in parallel. Inthis way, the success probability of the projection (with atleast one successful transformation) will be much higher, andthe total runtime could be reduced dramatically. In Fig. 2(c),we show the parallel concatenation circuit π΅ (cid:48) π for preparing ( π + ) -qubit label encoding states. The block receives state | π ( π ) (cid:105) β π π β | π ( π ) (cid:105) β π π . One performs π min = min { π π , π π } timesof concatenation circuit in parallel, with totally π (cid:48) successfultrials and obtain the output state | π ( π ) β π ( π ) (cid:105) β π (cid:48) . Note that π (cid:48) follows Binomial distribution π (cid:48) βΌ B ( π min , π + ) with π + > / ( π + ) -qubit label encod-ing state is shown in Fig. 2(b), where we have denoted π π : π = [ π£ π , π£ π + , . . . , π£ π ] . We prepare π copies of the low di-mensional label encoding states, i.e. | π (cid:105) β π , | π (cid:105) β π , . . . ,which are concatenated recursively to state | π (cid:105) . Whenever theparallel concatenation circuit has zero copies of output, werepeat the preparation of the input state of the correspond-ing block [see Algorithm. 2 in [25] for details]. The averageruntime and space complexity depends on π . For example,when π = πΎ ( π + π / ) ( πΎ is a constant), the ancillary qubitnumber scales as O ( π ) , while π pos ( π ) scales polylogarithmicas O ( π ) . When π =
1, we need
O ( π ) ancillary qubits, andwe numerically ο¬nd that π pos ( π ) = O ( π . ) [25] in the worstcase, i.e. π + = .
5. We note that although more ancillaryqubits are needed in the parallel schemes, only the entangle-ment among at most ( π + ) qubtis is required, and all ancillaryqubits can be reused after the preparation.With the label encoding state, the amplitude encoding state | π ( π )(cid:105) can be obtained by projecting the value qubit to | (cid:105) | v i :4 i +1 i
With probability π π , an arbitrary π -qubit quantumstate with real amplitudes can be prepared via the sequentialand parallel algorithms with O ( π ) depth of single-qubit gates,two-qubit gates and local measurements. We note that the runtime π of deterministically preparing thestate is O ( π pos / π π ) , and we will shortly discuss how to boundit in the general case.The sequential and parallel algorithms also work for thegeneral case with complex amplitudes. However, the successprobability of the concatenation circuit with two arbitraryvectors can only be lower bounded by π + (cid:62) /
10, instead of π + (cid:62) / Arbitrary state preparation.
Now we propose an alterna-tive strategy to prepare the label encoding state with arbitrarycomplex amplitudes. We rewrite π as the combination of four positive vectors, π = π π β π π + π π π β π π π , whose elements are de-ο¬ned as π£ ππ = max ( Re ( π£ π ) , ) , π£ ππ = max (β Re ( π£ π ) , ) , π£ ππ = max ( Im ( π£ π ) , ) , and π£ ππ = max (β Im ( π£ π ) , ) , respectively.First, the four positive label encoding states | π π (cid:105) , | π π (cid:105) , | π π (cid:105) and | π π (cid:105) could be prepared with the above scheme. Then, weintroduce two ancillary qubits prepared in states (| (cid:105)+ π | (cid:105))/β (| (cid:105) β | (cid:105))/β
2. The entire system is described by (| (cid:105) β | (cid:105) + π | (cid:105) β π | (cid:105)) β | π ππππ (cid:105) , (4)where we have used the abbreviation | π ππππ (cid:105) β‘ | π π (cid:105) β | π π (cid:105) β| π π (cid:105) β | π π (cid:105) . To obtain | π (cid:105) , we perform three sets of controlled-controlled-swap gates, which swap | π π (cid:105) and one of the statesamong | π π (cid:105) , | π π (cid:105) and | π π (cid:105) , with two ancillary qubits as controlqubits. The corresponding quantum circuit is shown in Fig. 2(d), where the hollow nodes represents controlled on | (cid:105) , andthe solid nodes represents controlled on | (cid:105) . The state thenbecomes | (cid:105)| π ππππ (cid:105) β | (cid:105)| π ππππ (cid:105) + π | (cid:105)| π ππππ (cid:105) β π | (cid:105)| π π πππ (cid:105) . (5)The above operations require totally 3 ( π + ) control-control-swap gates, where each of which can be decomposed to con-stant numbers of single- and two-qubit gates, so the corre-sponding circuit depth is O ( π ) .In the next step, we project two ancillary qubits and thelabel qubits of the last three label encoding states to |+(cid:105) . Ifthe projection succeeds (the success probability π (cid:48) π will bediscussed later), the quantum state becomes |+(cid:105) β (| π π (cid:105) β | π π (cid:105) + π | π π (cid:105) β π | π π (cid:105)) β | π uni (cid:105) β . (6)Since | π π (cid:105) β | π π (cid:105) + π | π π (cid:105) β π | π π (cid:105) = β | π ( π )(cid:105) β |β(cid:105) , we cantrace out |+(cid:105) β and |β(cid:105) β | π uni (cid:105) β to have the target state | π ( π )(cid:105) .Together with Result 2, we have the following result. Result 3.
With probability π (cid:48) π , an arbitrary π -qubit quantumstate can be prepared via the sequential and parallel algo-rithms with O ( π ) depth of single-qubit gates, two-qubit gatesand local measurements. We note that the time complexity is proportional to the π pos for preparing each | π π (cid:105) , | π π (cid:105) , | π π (cid:105) or | π π (cid:105) , divided by theprojection success probability π (cid:48) π , i.e., O ( π pos / π (cid:48) π ) . Next weshow how to estimate the success probabilities. Projection success probability.
To exactly prepare the am-plitude encoding state | π ( π )(cid:105) , the projection probabilities π π and π (cid:48) π are both lower bounded by O ( (cid:205) π | π’ π | / max (| π’ π | ) π ) .The worse case lower bound is O ( / π ) and it could be tight-ened with a detailed analysis. Denote π’ π = π π π ππ π / βοΈ(cid:205) π | π π | ,we consider that the classical data π is randomly generated intwo ways.1. For the ο¬rst way, we uniformly generate each π π from [β , ] and π π from [ , π ] . TABLE I: Comparison of diο¬erent state preparation methods.Depth - circuit depth; Runtime - circuit runtime Γ repetitions; Qubits- total number of qubits; Parallel-1 and -2 corresponds to parallelpreparation with π = πΎ ( π + π / ) and π =
1. The average runtimefor parallel-2 method is estimated with numerical simulation.
Depth Runtime QubitsUnitary [3, 4] O (cid:0) π (cid:1) O (cid:0) π (cid:1) O (cid:0) π (cid:1) Sequential π (cid:0) π (cid:1) π (cid:0) π (cid:1) π (cid:0) π (cid:1) Parallel-1 π (cid:0) π (cid:1) π (cid:0) π (cid:1) π (cid:0) π (cid:1) Parallel-2 π (cid:0) π (cid:1) π (cid:0) π . (cid:1) π (cid:0) π (cid:1)
2. For the second way, we generate each π π according to thestandard normal distribution N ( , ) and π π uniformlyfrom [ , π ] .The ο¬rst way corresponds to the case where the classical data,i.e., each π’ π , is uniformly random; And the second way corre-sponds to the case where the state vector | π ( π )(cid:105) is uniformlyrandom in the Hilbert space. Then we can lower bound theprojection probability as follows. Result 4.
There exists Ξ < β , such that with failure probabil-ity πΏ β ( , ) , and π (cid:62) Ξ / πΏ , the projection probabilities arelower bounded bycase 1 : π π = π (cid:48) π β₯ / (cid:16) β /β ππΏ (cid:17) , case 2 : π π = π (cid:48) π β₯ O ( / log ( π / πΏ )) . (7)Therefore, the projection probabilities could be lower boundedby a constant for case 1 and by 1 / π for case 2 given suο¬cientlylarge π .We can further improve the projection probabilities for case2 by allowing approximate state preparation. We introducea cut-oο¬ value π’ cut and deο¬ne Λ π£ π β‘ arg ( π’ π ) min (| π’ π |/ π’ cut , ) .After preparing | π ( Λ π )(cid:105) with Λ π = [ Λ π£ , Λ π£ , Β· Β· Β· , Λ π£ π β ] , we canachieve the preparation ο¬delity πΉ β‘ |(cid:104) π ( Λ π )| π ( π )(cid:105)| (cid:62) β π th by appropriately choosing the cutoο¬ π’ cut . Note that a per-fect preparation πΉ = π’ cut = max (| π’ π |) .In the worst cases, we have π π (cid:62) mean (| Λ π£ π | ) and π (cid:48) π (cid:62) mean (| Λ π£ π | )/
64. These values decreases with π’ cut , whereas thepreparation ο¬delity πΉ increases with π’ cut , indicating a trade-oο¬ between projection probability and ο¬delity [25]. By setting π’ cut appropriately, π π ( π (cid:48) π ) has logarithmic relation with π th and πΏ . We summarize our results as follows. Result 5.
There exists Ξ < β , πΏ > , π > , such thatwith failure probability πΏ β ( , πΏ ) , inο¬delity π th β ( , π ) and π > Ξ / πΏ , the projection probabilities are lower bounded bycase 2 : π π = π (cid:48) π β₯ O (cid:16) / log (cid:16) /β πΏπ th (cid:17)(cid:17) . (8)Recall that the total runtime π scales as O ( π pos / π π ) or O ( π pos / π (cid:48) π ) . Combining the above results, we summarize thecircuit depth, runtime, number of qubits in Table I. - q - t FIG. 3: Space-time trade-oο¬ in state preparation. The relation be-tween time (cid:6) π π½ π‘ (cid:7) with exponent π½ π‘ and space π ( π π½ π ) with exponent π½ π for diο¬erent parallel preparation schemes. When π½ π = π nolonger follow polynomial scaling. Space-time trade-oο¬.
We note that all the three listed al-gorithms have circuit depth
O ( π ) with diο¬erent runtime andnumber of qubits. We can see that the runtime decreases withmore qubits, indicating a space-time tradeoο¬ in quantum statepreparation. Furthermore, we change π for parallel prepara-tion such that there are totally (cid:6) π π½ π‘ (cid:7) qubits with 1 (cid:54) π½ π < π = π ( π π½ π ) .We numerically estimate the exponents π½ π‘ for diο¬erent π½ π . Asshown in Fig. 3, the the exponents π½ π‘ decreases rapidly withlarger π½ π . Note that when π½ π , π does not follow the polynomialscaling, which is consistent with our analytical estimation.The circuit depth of state preparation can be further im-proved if quantum random access memories (QRAMs) [26, 27]are available. One can store the information of the target stateinto π memory cells, and QRAM prepares any π -dimensionalquantum state in O ( polylog π ) steps [28]. However, QRAMrequires highly non-local interactions, and the address qubitsshould have the ability to control totally O ( π ) routerssimultaneously, which is challenging for state-of-the-artquantum technologies. Conclusions and outlooks.
We have demonstrated severalprotocols to prepare an arbitrary π -dimensional quantum statewith O ( π ) circuit depth, diο¬erent number of ancillary qubits,and diο¬erent runtime. A comparison of our methods to existedpreparation ones has been summarized in Table I. We alsodiscuss the trade-oο¬ between our state preparation methodsand unitary preparation. Besides the low-depth nature, thereare other advantages of our work. First, our methods onlyrequire to simultaneously maintain entangled states of at most O ( π ) and the rest ancillary qubits prepared in a separate state.Second, our methods have a much weaker requirement on thecircuit programmability, as most parts of the circuit are ο¬xedexcept for the ο¬rst few layers. Moreover, our methods donot require heavy classical computation to compile the circuit,which typically takes time of O ( π ) for unitary preparation.There are several open questions to be addressed. First, inworse cases, the preparation time could be much longer. Forexample, if π is a sparse vector with only a constant number ofnonzero elements and bounded values, the success rate π (cid:48) π ofthe projection from Eq. (5) and Eq. (6) decreases linearly with π and the total runtime will be π times larger. When having atoo small success rate, an interesting future work is to designalternative state preparation methods that exploits the sparsityand the structure of the amplitudes. Second, it is currentlyunclear if our methods are optimal in terms of either circuitdepth or runtime. Proof of its optimality or ο¬nding moreeο¬cient methods would be compelling for both theoreticaland practical purposes. Finally, it is interesting to investigateapplications of our methods in existing quantum algorithmsand study their performance with noisy intermediate-scaledquantum hardware [29β32]. β Electronic address: [email protected] β Electronic address: [email protected][1] P. Kaye and M. Mosca, in
International Conference on QuantumInformation (Optical Society of America, 2001) p. PB28.[2] L. Grover and T. Rudolph, arXiv preprint quant-ph/0208112(2002).[3] M. MΓΆttΓΆnen, J. J. Vartiainen, V. Bergholm, and M. M. Salomaa,Quantum. Inf. Comput. , 467 (2005).[4] M. Plesch and Δ. Brukner, Phy. Rev. A , 032302 (2011).[5] M.-H. Yung, J. D. Whitο¬eld, S. Boixo, D. G. Tempel, andA. Aspuru-Guzik, Adv. Chem. Phys , 154 (2014).[6] R. Iten, R. Colbeck, I. Kukuljan, J. Home, and M. Christandl,Phys. Rev. A , 032318 (2016).[7] J. Zhao, Y.-C. Wu, G.-C. Guo, and G.-P. Guo, arXiv preprintarXiv:1912.05335 (2019).[8] A. W. Harrow, A. Hassidim, and S. Lloyd, Phys. Rev. Lett. ,150502 (2009).[9] L. Wossnig, Z. Zhao, and A. Prakash, Phys. Rev. Lett. ,050502 (2018).[10] N. Wiebe, D. Braun, and S. Lloyd, Phys. Rev. Lett. , 050505(2012).[11] S. Lloyd, M. Mohseni, and P. Rebentrost, Nat. Phys. , 631(2014).[12] P. Rebentrost, M. Mohseni, and S. Lloyd, Phys. Rev. Lett. ,130503 (2014).[13] S. Lloyd, Science , 1073 (1996).[14] D. Aharonov and A. Ta-Shma, in Proceedings of the thirty-ο¬fthannual ACM symposium on Theory of computing (2003) pp.20β29.[15] G. H. Low and I. L. Chuang, Phys. Rev. Lett. , 010501(2017).[16] M. A. Nielsen and I. Chuang,
Quantum computation andquantum information (Cambridge University Press, Cambridge,2000).[17] J. A. Cortese and T. M. Braje, arXiv preprint arXiv:1803.01958(2018).[18] I. F. Araujo, D. K. Park, F. Petruccione, and A. J. da Silva,arXiv preprint arXiv:2008.01511 (2020).[19] S. Lloyd, M. Mohseni, and P. Rebentrost, arXiv preprintarXiv:1307.0411 (2013).[20] S. Lloyd and C. Weedbrook, Phys. Rev. Lett. , 040502(2018).[21] P.-L. Dallaire-Demers and N. Killoran, Phys. Rev. A , 012324 (2018).[22] M. Schuld and N. Killoran, Phys. Rev. Lett. , 040504 (2019).[23] M. Schuld, A. Bocharov, K. M. Svore, and N. Wiebe, Phys.Rev. A , 032308 (2020).[24] S. Lu, L.-M. Duan, and D.-L. Deng, Phys. Rev. Res. , 033212(2020).[25] Supplemental Material in preparation.[26] V. Giovannetti, S. Lloyd, and L. Maccone, Phys. Rev. Lett. ,160501 (2008).[27] V. Giovannetti, S. Lloyd, and L. Maccone, Phys. Rev. A ,052310 (2008).[28] P. A. M. Casares, arXiv preprint arXiv:2006.11761 (2020).[29] J. Preskill, Quantum , 79 (2018).[30] F. Arute, K. Arya, R. Babbush, D. Bacon, J. C. Bardin,R. Barends, R. Biswas, S. Boixo, F. G. Brandao, D. A. Buell, et al. , Nature , 505 (2019).[31] Google AI Quantum et al. , Science , 1084 (2020).[32] M. Gong et al.et al.