I Introduction
Quantum computing is recognized as a promising scheme being superior to the classical computing for its exponential speedup by executing multiple computational tasks parallelly in different quantum channels [1, 2, 3]. With the fast growth of the number of controllable qubits, efficient compiling of the quantum algorithms to the physicallyexecutable forms becomes increasingly important. A mainstream compiling scheme is to transform the circuit into the product of executable elementary gates, which are the quantum version of the instruction set [4, 5, 6, 7, 8]. The instruction set should be constructed according to the physical mechanism of the hardware. For instance, a quantum computer formed by the superconducting circuits can use the QuMIS [9] as the instructive set. For the quantum photonic circuits, the elementary gates represent certain basic operations on single photons [10, 11]. The efficiency of compiling a given quantum algorithm with a chosen instruction set can be characterized by the depth of the compiled circuit.
Another important approach of quantum computing is by controlling the dynamics of quantum systems. A representative platform is the nuclear magnetic resonance system, where quantum gates or algorithms [12, 13, 14, 15], such as the quantum factoring [16] and search [17, 18, 19] algorithms, have been realized by the radiofrequency pulse sequences. The efficiency can be characterized by the time cost for the controlling. For the twoqubit gates, such as the controllednot (CNOT) gate, the time costs with optimal control have theoretically given bounds [20, 21, 22]. For the qubit gates with
, such bounds are not rigorously given in most cases, and variational methods including the machine learning (ML) techniques are used in the optimalcontrol problems
[23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33]. Besides, the quantum manybody systems have also been used to implement the measurementbased quantum computation [34, 35, 36, 37, 38, 39, 40]. However, the utilizations of the manybody dynamics for quantum computing [25, 28, 29] are much less explored, where more valid schemes are desired.For all known quantum computing platforms, severe challenges are caused by the inevitable noises. The noises might induce computational errors, making the results unstable or unreliable. One way of fighting against the errors is to add the error correction codes [41], such as Toric codes [42], which will further increase the complexity of the circuits. Noises will also lead to decoherence, meaning that the qubits will gradually become less entangled and lose the superiority over the classical computing. Prolonging the coherence time and reducing the time cost so that the quantum computing is executed within the coherence duration belong to the significant and challenging issues for quantum computing (see, e.g., Refs. [43, 44, 45, 46]).
Concerning the quantum computing based on the controlled manybody dynamics, we here propose the quantum circuit encapsulation (QCE) to optimize the magnetic fields for efficient implementation of quantum circuits. Considering a target unitary (dubbed as quantum capsule, Qcap in short) that might be formed by one or multiple gates, the idea is to optimize the magnetic fields so that the timeevolution operator realizes the unitary. In the QCE, a quantum circuit can be considered as one Qcap or divided into multiple Qcaps, corresponding to different encapsulation ways. As the intermediate processes given by the gates within a Qcap will not appear in the time evolution, different encapsulation ways result in different flexibilities. A key issue in the QCE is thus the balance between the efficiency and flexibility.
We compare four different ways of encapsulation for the realization of the qubit quantum Fourier transformation (QFT) [47, 48, 49], and demonstrate the scaling behaviors of the errors and time costs against the number of controlled gates. Specifically, we show a slow linear growth of the time cost with wellcontrolled errors up to , by considering the whole circuit as one Qcap. For lager ’s, the blockwise encapsulation is speculated to be a proper choice, where we expect moderate linear growths of the time costs and errors.
Ii Quantum circuit encapsulation
Consider a quantum circuit that consists of gates () with . We here propose to find the timedependent Hamiltonian , and its evolution operator for the time duration optimally gives the unitary transformation of the target circuit , i.e.,
(1) 
We take the Plank constant for simplicity.
We constrain that the adjustable parameters of the Hamiltonian only concerns the onebody terms, i.e., the magnetic fields. Specifically, we take the quantum Ising model as an example, where the Hamiltonian reads
(2) 
with the spin operator in the direction (), the coupling strength between the th and th spins, and the magnetic field along the direction on the th spin at the time . We assume to be constant and to be adjustable with time.
The goal becomes optimizing the magnetic fields to minimize the difference between the timeevolution operator and the target unitary
. To this end, a simplest choice is to minimize the following loss function defined as
(3) 
The magnetic fields are optimized using the gradient descent as
(4) 
with the gradient step or learning rate. Since such an optimization cares about the distance between the unitary given by the whole circuit and the evolution operator at the final time , the evolution at will not give any intermediate results from the gates within the circuit. We dub such a circuit encapsulation (CE) way as allCE.
In the numerical simulation, we take the TrotterSuzuki form [50, 51] and discretize the total time to identical slices. The evolution operator can be approximated as
(5)  
with that controls the TrotterSuzuki error. For varying the magnetic fields, we introduce with a positive integer, and assume to take the constant value during the time of (with and ). In other words, the magnetic fields are allowed to change for times. The magnetic fields are updated as
(6) 
where the gradients
are obtained by the automatic differentiation in Pytorch
[52]. We use the optimizer Adam [53] to dynamically control the learning rate .We employ two algorithms to implement the optimizations, namely the global time optimization (GTO) and finegrained time optimization (FGTO) [32]. GTO is a simple gradientdescent method, where the strengths of the magnetic fields for all time slices are updated simultaneously by Eq. (6). For the simple cases such as the twoqubit unitaries, GTO shows high accuracy. However, for more complicated cases such as the qubit QFT with a large , GTO could be trapped in a local minimum. The FGTO is thus employed, where the key idea is to asymptotically finegrain the time discretization (characterized by ) to avoid the possible local minimums. See more details in Ref. [32].
The way of encapsulation is flexible. In general, we consider to separate the gates in the circuit into groups as
(7) 
The unitary consists of gates from the target circuit and is named as a quantum capsule (Qcap). We have . We optimize the magnetic fields independently for each Qcap, where we define the loss function for as
(8) 
wth the evolution duration for realizing and the total time . The magnetic fields during are optmized by minimizing .
As a natural encapsulation way, the main advantage of the allCE (meaning to treat the whole circuit as one Qcap) is straightforward, which is to reduce the time cost and error by directly finding the path to the final unitary. One may compare, for instance, with a naive way by considering each gate in the circuit as a Qcap (naiveCE). First, the errors of sequentially realizing each gate would in general accumulate. We expect much less errors by directly minimizing the difference between the target and the final evolution operator in the allCE, which is similar to the endtoend optimization strategy widely used in the field of ML and MLassisted physical approaches (see, e.g., Ref. [27]).
Second, a unitary can be compiled into different circuits by applying different quantum instruction sets. One may use the depth of the circuit to characterize the efficiency of the compilation. The depth would usually change if one turns to a different instruction set. From the perspective of QCE, the efficiency should be characterized by the total time cost for reaching the preset error. An obvious drawback of allCE is that one cannot extract the relevant information of the intermediate process from the gates within the circuit (i.e., Qcap). Therefore, a proper encapsulation should balance between the efficiency and the ability of extracting the intermediate information, according to the specific computational tasks or purposes. For example, the frequentlyuse circuits, such as the QFT applied in many quantum algorithms including Shor’s [54] and Grover search [55] algorithms, can be encapsulated into Qcaps for the convenience of the future use.
Iii Results of quantum circuit encapsulation
Below, we take Hamiltonian for the time evolution as the nearestneighbor Ising chain, where the coupling constants satisfy
(9) 
We set the magnetic fields along the spinz direction as zero, and allow to adjust the fields only along the spinx and y directions. Such a restriction often appears in the controlling by the radiofrequency pulses [56].
As a simple example, we consider the twoqubit controlledR (CR) gate that satisfies
(10) 
with the factor of phase shift. A normal treatment is to decompose a CR into the product of singlequbit rotations and CNOT as
(11) 
satisfying [57] and a phase factor.
Taking , and , Fig. 2 compares the error [ in Eq. (3)] by encapsulating the CR (allCE) and that by encapsulating gate by gate after decomposing it into the elementary gates [Eq. (11)] (named as the decomposed CE, decompCE in short). Since only the twoqubit gates are involved, we choose GTO to optimize the magnetic fields. The dashed lines (decompCE) and solid lines with triangles (allCE) show the timedependent error . Note in all cases, the magnetic fields are always optimized according to the definitions of the Qcaps. The time costs of realizing different elementary gates in the decompCE are illustrated by the colored shadows. The time cost of the allCE is indicated by the xcoordinate of the last triangle, which is about five times shorter than the decompCE. For a singlequbit rotation , it can be written as the onebody evolution operator with the magnetic field along the corresponding direction, i.e.,
(12) 
Therefore, the time cost of
is estimated as
. Without losing generality, we here take to estimate the time costs of the singlequbit rotations.An important observation is that even the time cost of a single CNOT is larger than that of the CR by the allCE. The allCE of CR also leads to much lower errors with . For the decompCE, the error accumulates and finally reaches that is about ten times larger than that by the allCE. Therefore, from the perspective of QCE, it is not a wise choice to decompose the CR into the product of CNOT and the singlequbit rotations.
Fig. 2 shows how the error varies with the total evolution duration for realizing the CNOT and CR() by the allCE. In all cases, decreases with as expected, meaning that higher accuracy can be reached by increasing the evolution time. Below, the time cost of a Qcap is determined by the when the reaches about . Again, we show that CR() requires much shorter time than CNOT to obtain a similar accuracy. For the CR(), the time cost increases with for all ’s.
Fig. 3(a) demonstrates the error [Eq. (3)] of realizing the qubit QFT by allCE with different total time duration , for . The inset illustrates the circuit with as an example. In general, one can obtain lower by increasing . Longer evolution time is required to reach a preset error if increases.
We further compare the errors () and the corresponding time costs () using different encapsulation ways. The blockCE of the QFT circuit is illustrated by the dashed hollow squares in the inset of Fig. 3(a). The circuit is divided into several blocks according to the positions of the Hadamard gates . Each block is treated as a Qcap for optimizing the magnetic fields. The blockCE possesses certain flexibility. For instance, the last () blocks form the circuit of the qubit QFT. We also try the naiveCE, where we treat each gate in the QFT circuit as a Qcap for the optimization of the magnetic fields. For the decompCE, we decompose each CR gate to the product of the CNOT and singlequbit rotations following Eq. (11), and then treat each gate as a Qcap for optimization.
There is an important detail we shall stress. For the qubit QFT, if a Qcap only concerns qubits with , we use the quantum Ising model of just the qubits to implement the time evolution. It means that the irrelevant couplings outside such a qubit quantum Ising model are turned off. Surely we can keep all the couplings in the qubit system and find the optimal magnetic fields to realize the unitary acting on the qubit subsystem. This, however, will lead to much lower accuracies than those by turning off the irrelevant couplings. We therefore choose to turn off the irrelevant couplings in the blockCE, naiveCE, and decompCE, as the baselines compared with the allCE.
Fig. 3(b) shows how the error of realizing the QFT increases with the number of the CR gates using different encapsulation ways. As we require [Eq. (8)] for the optimization of each Qcap, we have for the allCE as there is only one Qcap [red squares in Fig. 3(b)]. For other encapsulation ways, there exist multiple Qcaps, where the errors accumulate. Consequently, we observe that increases linearly with as
(13) 
with the slope , , and for the blockCE, naiveCE, and decompCE, respectively. We have the coefficient of the determinant that characterizes the error of a linear fitting as , , and , respectively.
The corresponding time costs for reaching the errors in Fig. 3(b) are given in Fig. 3(c). The linear dependence of on is observed for all four kinds of encapsulation ways with
(14) 
The naiveCE gives the smallest slope with with . This is possibly because we allow to turn off the irrelevant couplings, then only need to deal with twoqubit evolution gates as the Qcaps in the naiveCE. If partially turning off the couplings in the evolution is not possible in the experimental setting, the allCE obviously give the best results with (). The slopes from the blockCE and decompCE are close to each other with () and (), respectively, which are obviously larger than that of the allCE. By considering both and , as well as the possible restrictions on the controlling of the couplings, we conclude that the allCE provides the most proper way to realize the qubit QFT for , where the error remains approximately constant and the time cost increases linearly in a moderate speed with .
We speculate that the above conclusions will hold if we further increase . But be aware that one loses flexibility when encapsulating larger circuits into Qcaps. A natural choice for a larger circuit is to use the blockCE, where we may restrict the number of qubits in each Qcap to be maximally with, say, . The proper value of for different kinds of circuits or algorithms is to be explored in the future. Considering the computational cost of the FGTO algorithm increases exponentially with
, tensor network methods
[58, 59, 60, 61] can be applied to lower the exponential cost to be polynomial in order to access larger ’s.Iv Summary
We have proposed the quantum circuit encapsulation (QCE) for the efficient quantum computing based on the dynamics of the interacting spin systems controlled by magnetic fields. The key idea of QCE is to define the quantum capsule (Qcap) formed by multiple gates (e.g., the whole circuit or a part of it), where we ignore the intermediate processes therein but optimize the magnetic fields by directly targeting on the unitary represented by the Qcap. Wellcontrolled errors and time costs are demonstrated by taking the qubit quantum Fourier transformation as an example. Besides the conventional compiling ways using the elementary gates, QCE provides an alternative of translating the quantum circuits into a physicallyexecutable form, and brings new prospects on the quantum computing on the interacting spin systems.
Acknowledgment
This work was supported by NSFC (Grant No. 12004266, No. 11834014, No. 12075159, and No. 12171044), Beijing Natural Science Foundation (No. Z180013 and No. Z190005), Foundation of Beijing Education Committees (No. KM202010028013), the key research project of Academy for Multidisciplinary Studies, Capital Normal University, Shenzhen Institute for Quantum Science and Engineering, Southern University of Science and Technology (Grant No. SIQSE202001), and the Academician Innovation Platform of Hainan Province.
References
 Buhrman et al. [1998] Harry Buhrman, Richard Cleve, and Avi Wigderson, “Quantum vs. classical communication and computation,” in Proceedings of the thirtieth annual ACM symposium on Theory of computing (1998) pp. 63–68.
 Raz [1999] Ran Raz, “Exponential separation of quantum and classical communication complexity,” in Proceedings of the thirtyfirst annual ACM symposium on Theory of computing (1999) pp. 358–367.
 Nielsen and Chuang [2002] Michael A Nielsen and Isaac Chuang, “Quantum computation and quantum information,” (2002).
 Green et al. [2013] Alexander S Green, Peter LeFanu Lumsdaine, Neil J Ross, Peter Selinger, and Benoît Valiron, “Quipper: a scalable quantum programming language,” in Proceedings of the 34th ACM SIGPLAN conference on Programming language design and implementation (2013) pp. 333–342.
 Wecker and Svore [2014] Dave Wecker and Krysta M Svore, “Liqui: A software design architecture and domainspecific language for quantum computing,” arXiv preprint arXiv:1402.4467 (2014), https://doi.org/10.48550/arXiv.1402.4467.
 JavadiAbhari et al. [2015] Ali JavadiAbhari, Shruti Patil, Daniel Kudrow, Jeff Heckey, Alexey Lvov, Frederic T Chong, and Margaret Martonosi, “Scaffcc: Scalable compilation and analysis of quantum programs,” Parallel Computing 45, 2–17 (2015).
 Chong et al. [2017] Frederic T Chong, Diana Franklin, and Margaret Martonosi, “Programming languages and compiler design for realistic quantum hardware,” Nature 549, 180–187 (2017).
 Häner et al. [2018] Thomas Häner, Damian S Steiger, Krysta Svore, and Matthias Troyer, “A software methodology for compiling quantum programs,” Quantum Science and Technology 3, 020501 (2018).
 Fu et al. [2017] Xiang Fu, Michiel Adriaan Rol, Cornelis Christiaan Bultink, J Van Someren, Nader Khammassi, Imran Ashraf, RFL Vermeulen, JC De Sterke, WJ Vlothuizen, RN Schouten, et al., “An experimental microarchitecture for a superconducting quantum processor,” in Proceedings of the 50th Annual IEEE/ACM International Symposium on Microarchitecture (2017) pp. 813–825.
 O’brien et al. [2009] Jeremy L O’brien, Akira Furusawa, and Jelena Vučković, “Photonic quantum technologies,” Nature Photonics 3, 687–695 (2009).
 AspuruGuzik and Walther [2012] Alán AspuruGuzik and Philip Walther, “Photonic quantum simulators,” Nature physics 8, 285–291 (2012).
 Cory et al. [1998] David G. Cory, Mark D. Price, and Timothy F. Havel, “Nuclear magnetic resonance spectroscopy: An experimentally accessible paradigm for quantum computing,” Physica D: Nonlinear Phenomena 120, 82–101 (1998), proceedings of the Fourth Workshop on Physics and Consumption.
 Jones et al. [1998] Jonathan A Jones, RH Hansen, and Michael Mosca, “Quantum logic gates and nuclear magnetic resonance pulse sequences,” Journal of Magnetic Resonance 135, 353–360 (1998).
 Jones and Mosca [1998] Jonathan A Jones and Michele Mosca, “Implementation of a quantum algorithm on a nuclear magnetic resonance quantum computer,” The Journal of chemical physics 109, 1648–1653 (1998).
 Bian et al. [2017] Ji Bian, Min Jiang, Jiangyu Cui, Xiaomei Liu, Botao Chen, Yunlan Ji, Bo Zhang, John Blanchard, Xinhua Peng, and Jiangfeng Du, “Universal quantum control in zerofield nuclear magnetic resonance,” Phys. Rev. A 95, 052342 (2017).
 Vandersypen et al. [2001] Lieven MK Vandersypen, Matthias Steffen, Gregory Breyta, Costantino S Yannoni, Mark H Sherwood, and Isaac L Chuang, “Experimental realization of shor’s quantum factoring algorithm using nuclear magnetic resonance,” Nature 414, 883–887 (2001).
 Chuang et al. [1998] Isaac L. Chuang, Neil Gershenfeld, and Mark Kubinec, “Experimental implementation of fast quantum searching,” Phys. Rev. Lett. 80, 3408–3411 (1998).
 Jones [1998] Jonathan A Jones, “Fast searches with nuclear magnetic resonance computers,” Science 280, 229–229 (1998).
 Zhang et al. [2002] Jingfu Zhang, Zhiheng Lu, Lu Shan, and Zhiwei Deng, “Realization of generalized quantum searching using nuclear magnetic resonance,” Phys. Rev. A 65, 034301 (2002).
 Khaneja et al. [2001] Navin Khaneja, Roger Brockett, and Steffen J. Glaser, “Time optimal control in spin systems,” Phys. Rev. A 63, 032308 (2001).
 Li et al. [2013] Bin Li, ZuHuan Yu, ShaoMing Fei, and XianQing LiJost, “Time optimal quantum control of twoqubit systems,” Science China Physics, Mechanics and Astronomy 56, 2116–2121 (2013).
 Sun et al. [2020] BaoZhi Sun, ShaoMing Fei, Naihuan Jing, and Xianqing LiJost, “Time optimal control based on classification of quantum gates,” Quantum Information Processing 19, 1–12 (2020).
 Kim and Girardeau [1995] K. G. Kim and M. D. Girardeau, “Optimal control of strongly driven quantum systems: Fully variational formulation and nonlinear eigenfields,” Phys. Rev. A 52, R891–R894 (1995).
 Leung et al. [2017] Nelson Leung, Mohamed Abdelhafez, Jens Koch, and David Schuster, “Speedup for quantum optimal control from automatic differentiation based on graphics processing units,” Phys. Rev. A 95, 042318 (2017).
 Yang et al. [2017] ZhiCheng Yang, Armin Rahmani, Alireza Shabani, Hartmut Neven, and Claudio Chamon, “Optimizing variational quantum algorithms using pontryagin’s minimum principle,” Phys. Rev. X 7, 021027 (2017).
 Cavina et al. [2018] Vasco Cavina, Andrea Mari, Alberto Carlini, and Vittorio Giovannetti, “Variational approach to the optimal control of coherently driven, open quantum system dynamics,” Phys. Rev. A 98, 052125 (2018).
 Wu et al. [2020] ReBing Wu, Xi Cao, Pinchen Xie, and Yuxi Liu, “Endtoend quantum machine learning implemented with controlled quantum dynamics,” Physical Review Applied 14, 064020 (2020).
 Choquette et al. [2021] Alexandre Choquette, Agustin Di Paolo, Panagiotis Kl. Barkoutsos, David Sénéchal, Ivano Tavernelli, and Alexandre Blais, “Quantumoptimalcontrolinspired ansatz for variational quantum algorithms,” Phys. Rev. Research 3, 023092 (2021).
 Magann et al. [2021] Alicia B. Magann, Christian Arenz, Matthew D. Grace, TakSan Ho, Robert L. Kosut, Jarrod R. McClean, Herschel A. Rabitz, and Mohan Sarovar, “From pulses to circuits and back again: A quantum optimal control perspective on variational quantum algorithms,” PRX Quantum 2, 010101 (2021).
 Castaldo et al. [2021] Davide Castaldo, Marta Rosa, and Stefano Corni, “Quantum optimal control with quantum computers: A hybrid algorithm featuring machine learning optimization,” Phys. Rev. A 103, 022613 (2021).

An et al. [2021]
Zheng An, HaiJing Song, QiKai He, and D. L. Zhou, “Quantum optimal control of multilevel dissipative quantum systems with reinforcement learning,”
Phys. Rev. A 103, 012404 (2021).  Lu et al. [2021] Ying Lu, YueMin Li, PengFei Zhou, and ShiJu Ran, “Preparation of manybody ground states by time evolution with variational microscopic magnetic fields and incomplete interactions,” Physical Review A 104, 052413 (2021).
 Khait et al. [2022] Ilia Khait, Juan Carrasquilla, and Dvira Segal, “Optimal control of quantum thermal machines using machine learning,” Phys. Rev. Research 4, L012029 (2022).
 Brennen and Miyake [2008] Gavin K. Brennen and Akimasa Miyake, “Measurementbased quantum computer in the gapped ground state of a twobody hamiltonian,” Phys. Rev. Lett. 101, 010502 (2008).
 Benjamin et al. [2009] S.C. Benjamin, B.W. Lovett, and J.M. Smith, “Prospects for measurementbased quantum computing with solid state spins,” Laser & Photonics Reviews 3, 556–574 (2009).
 Else et al. [2012] Dominic V. Else, Ilai Schwarz, Stephen D. Bartlett, and Andrew C. Doherty, “Symmetryprotected phases for measurementbased quantum computation,” Phys. Rev. Lett. 108, 240505 (2012).
 Fujii and Morimae [2012] Keisuke Fujii and Tomoyuki Morimae, “Topologically protected measurementbased quantum computation on the thermal state of a nearestneighbor twobody hamiltonian with spin3/2 particles,” Phys. Rev. A 85, 010304 (2012).
 Darmawan et al. [2012] Andrew S Darmawan, Gavin K Brennen, and Stephen D Bartlett, “Measurementbased quantum computation in a twodimensional phase of matter,” New Journal of Physics 14, 013023 (2012).
 Wei and Raussendorf [2015] TzuChieh Wei and Robert Raussendorf, “Universal measurementbased quantum computation with spin2 affleckkennedyliebtasaki states,” Phys. Rev. A 92, 012310 (2015).
 Wei and Huang [2017] TzuChieh Wei and ChingYu Huang, “Universal measurementbased quantum computation in twodimensional symmetryprotected topological phases,” Phys. Rev. A 96, 032317 (2017).
 Lidar and Brun [2013] Daniel A Lidar and Todd A Brun, Quantum error correction (Cambridge university press, New York, 2013).
 Kitaev [2003] A.Yu. Kitaev, “Faulttolerant quantum computation by anyons,” Annals of Physics 303, 2–30 (2003).
 Shor [1995] Peter W. Shor, “Scheme for reducing decoherence in quantum computer memory,” Phys. Rev. A 52, R2493–R2496 (1995).
 Chuang et al. [1995] I. L. Chuang, R. Laflamme, P. W. Shor, and W. H. Zurek, “Quantum computers, factoring, and decoherence,” Science 270, 1633–1635 (1995).
 Duan and Guo [1998] LuMing Duan and GuangCan Guo, “Reducing decoherence in quantumcomputer memory with all quantum bits coupling to the same environment,” Phys. Rev. A 57, 737–741 (1998).
 Beige et al. [2000] Almut Beige, Daniel Braun, Ben Tregenna, and Peter L. Knight, “Quantum computing using dissipation to remain in a decoherencefree subspace,” Phys. Rev. Lett. 85, 1762–1765 (2000).
 Ekert and Jozsa [1996] Artur Ekert and Richard Jozsa, “Quantum computation and shor’s factoring algorithm,” Rev. Mod. Phys. 68, 733–753 (1996).
 Jozsa [1998] Richard Jozsa, “Quantum algorithms and the fourier transform,” Proceedings of the Royal Society of London. Series A: Mathematical, Physical and Engineering Sciences 454, 323–337 (1998).
 Weinstein et al. [2001] Y. S. Weinstein, M. A. Pravia, E. M. Fortunato, S. Lloyd, and D. G. Cory, “Implementation of the quantum fourier transform,” Phys. Rev. Lett. 86, 1889–1891 (2001).
 Trotter [1959] Hale F Trotter, “On the product of semigroups of operators,” Proceedings of the American Mathematical Society 10, 545–551 (1959).
 Suzuki [1976] Masuo Suzuki, “Generalized trotter’s formula and systematic approximants of exponential operators and inner derivations with applications to manybody problems,” Communications in Mathematical Physics 51, 183–190 (1976).
 [52] See the official website of Pytorch at https://pytorch.org/.
 Kingma and Ba [2015] Diederik P. Kingma and Jimmy Ba, “Adam: A method for stochastic optimization,” in 3rd International Conference on Learning Representations, ICLR 2015, San Diego, CA, USA, May 79, 2015, Conference Track Proceedings, edited by Yoshua Bengio and Yann LeCun (2015).
 Shor [1994] P.W. Shor, “Algorithms for quantum computation: discrete logarithms and factoring,” in Proceedings 35th Annual Symposium on Foundations of Computer Science (1994) pp. 124–134.
 Grover [1997] Lov K. Grover, “Quantum mechanics helps in searching for a needle in a haystack,” Phys. Rev. Lett. 79, 325–328 (1997).
 Li et al. [2017] Jun Li, Ruihua Fan, Hengyan Wang, Bingtian Ye, Bei Zeng, Hui Zhai, Xinhua Peng, and Jiangfeng Du, “Measuring outoftimeorder correlators on a nuclear magnetic resonance quantum simulator,” Phys. Rev. X 7, 031011 (2017).
 Barenco et al. [1995] Adriano Barenco, Charles H. Bennett, Richard Cleve, David P. DiVincenzo, Norman Margolus, Peter Shor, Tycho Sleator, John A. Smolin, and Harald Weinfurter, “Elementary gates for quantum computation,” Phys. Rev. A 52, 3457–3467 (1995).
 Vidal [2004] Guifré Vidal, “Efficient simulation of onedimensional quantum manybody systems,” Phys. Rev. Lett. 93, 040502 (2004).
 Markov and Shi [2008] Igor L. Markov and Yaoyun Shi, “Simulating quantum computation by contracting tensor networks,” SIAM Journal on Computing 38, 963–981 (2008).
 Zhou et al. [2021] PengFei Zhou, Rui Hong, and ShiJu Ran, “Automatically differentiable quantum circuit for manyqubit state preparation,” Phys. Rev. A 104, 042601 (2021).
 Huang et al. [2021] Cupjin Huang, Fang Zhang, Michael Newman, Xiaotong Ni, Dawei Ding, Junjie Cai, Xun Gao, Tenghui Wang, Feng Wu, Gengyan Zhang, et al., “Efficient parallelization of tensor network contraction for simulating quantum computation,” Nature Computational Science 1, 578–587 (2021).