Scalable Preparation of Matrix Product States with Sequential and Brick Wall Quantum Circuits Tomasz Szołdra, Rick Mukherjee, Peter Schmelcher Abstract Preparing arbitrary quantum states requires exponential resources. Matrix Product States (MPS) admit more efficient constructions, particularly when accuracy is traded for circuit complexity. Existing approaches to MPS preparation mostly rely on heuristic circuits that are deterministic but quickly saturate in accuracy, or on variational optimization methods that reach high fidelities but scale poorly. This work introduces an end-to-end MPS preparation framework that combines the strengths of both strategies within a single pipeline. Heuristic staircase-like and brick wall disentangler circuits provide warm-start initializations for variational optimization, enabling high-fidelity state preparation for large systems. Target MPSs are either specified as physical quantum states or constructed from classical datasets via amplitude encoding, using step-by-step singular value decompositions or tensor cross interpolation. The framework incorporates entanglement-based qubit reordering, reformulated as a quadratic assignment problem, and low-level optimizations that reduce depths by up to 50 % 50\% and CNOT counts by 33 % 33\% . We evaluate the full pipeline on datasets of varying complexity across systems of 19–50 qubits and identify trade-offs between fidelity, gate count, and circuit depth. Optimized brick wall circuits typically achieve the lowest depths, while the optimized staircase-like circuits minimize gate counts. Overall, our results provide principled and scalable protocols for preparing MPSs as quantum circuits, supporting utility-scale applications on near-term quantum devices. 1 Introduction Figure 1: Quantum state preparation pipeline. (1) \mathcal{O}(2^{N}) input probability amplitudes are compressed into an MPS using truncated singular value decomposition (SVD) or tensor cross interpolation (TCI), the latter requiring only \mathcal{O}(N\chi^{2}) values. (2) Qubits are reordered to minimize quantum mutual information between distant pairs; the optimal permutation solves a quadratic assignment problem (QAP) and defines a new MPS. (3) Heuristic circuits are built layer-by-layer from the MPS, giving either sequential (SMPD) or brick wall (BMPD) architectures. For SMPD, left-, right-, and mixed-canonical MPS forms yield different gate layouts. "Enhancements" of SMPD include isometric gate decompositions using 2 CNOTs (instead of 3 for a generic two-qubit unitary) and removal of gates not affecting the fidelity, reducing CNOT depth and count; the latter also applies to BMPD. (4) Fidelity with the target MPS is variationally optimized, initialized from the heuristic circuits, using the Evenbly-Vidal or Riemannian methods. The optimized circuit may be optionally fed back to the heuristic method to generate a new layer and continue with the optimization. The final circuit approximates the MPS. Efficient quantum state preparation ( QSP ) is essential for many applications of quantum algorithms with a potential quantum advantage over classical methods, including the Grover’s search algorithm [ 1 , 2 ] , quantum computational chemistry [ 3 , 4 ] , solving linear systems [ 5 , 6 ] , optimization [ 7 , 8 ] , and quantum machine learning [ 9 , 10 ] . On the other hand, it is known that preparation of an arbitrary quantum state requires resources scaling exponentially with the number of qubits [ 11 , 12 ] , which in some cases can even dominate the overall cost of the algorithm execution. Matrix Product States ( MPS ) [ 13 , 14 ] offer a way around the exponential computational bottleneck for physically relevant classes of states with limited (area-law) entanglement [ 15 ] , such as groundstates of one-dimensional local gapped Hamiltonians [ 16 ] , requiring storage of \mathcal{O}(N\chi^{2}) elements, where N is the number of qubits and \chi is a finite bond dimension. From a classical standpoint, smooth functions possess a low-rank MPS representation when encoded as quantum amplitudes [ 17 ] , with examples including \sin(x) represented by \chi=2 MPS [ 18 ] and d -th order polynomials exactly mapping to \chi=d+1 MPS [ 19 , 20 ] . The class of MPS is particularly useful in the context of QSP - any MPS can be exactly implemented by a quantum circuit of depth \mathcal{O}(4N\chi^{2}) [ 21 , 22 ] . Note that QSP based on Tree Tensor Networks ( TTN ), a more expressive generalization of MPS to tensor networks without closed loops, is also an active area of research [ 23 , 24 , 25 ] . Alternative approaches, such as Tucker Iterative Quantum State Preparation (Q-Tucker) [ 26 , 27 ] , likewise appear very promising for more general classes of states than MPS. The presence of noise in real quantum hardware [ 28 ] motivates the need for even shallower circuits and lower gate counts. Addressing this issue, several approximate schemes of MPS preparation have been developed [ 29 , 30 , 31 , 32 , 33 , 34 , 35 , 36 , 37 ] (see also [ 38 , 39 , 40 , 41 , 42 , 43 ] for experiments), and here we focus on two promising categories of such methods. (i) Heuristic schemes that aim to "distentangle" the MPS by applying gates that systematically drive it closer to a product state, referred to as Matrix Product Disentanglers ( MPD ). Inverse (hermitian conjugate) of such operations, applied to the initial product state of \ket{0}^{\otimes N} , yields an approximate state preparation circuit with e.g. a staircase-like sequential ( SMPD ) [ 29 ] or brick wall ( BMPD ) [ 35 ] architecture of nearest-neighbor gates. While deterministic and classically simulable, these constructions typically suffer from a quick saturation of fidelity with an increasing number of elementary layers. (ii) Circuits whose fidelity with the target MPS is variationally maximized, employing techniques such as the Evenbly-Vidal ( EV ) [ 44 , 45 ] and the Riemannian ( R ) [ 46 , 33 ] optimization on unitary manifolds. Although these schemes in principle permit arbitrarily high fidelities (provided the parametrized circuit is expressible enough), with random initialization they are affected by a fast growth of computational complexity with the system size, and vanishing gradients/barren plateaus in the loss landscape [ 47 ] , leading to severe problems with trainability and scalability. It has been shown that initializing the optimization from a pre-optimized circuit obtained with a heuristic method, and subsequently only refining the approximate solution, is a reliable practical way to mitigate barren plateaus and prepare the MPS [ 32 ] . However, to our knowledge, so far only the SMPD circuits and the EV optimization algorithm have been combined in such a way [ 31 , 32 , 48 , 49 , 22 ] . This work aims to fill the existing gaps by introducing and evaluating combinations of the sequential circuits with Riemannian optimizers (potentially increasing fidelity), as well as applying both optimization techniques also to the brick wall heuristic circuits offering better circuit depths. To that end, we introduce a QSP pipeline presented in Fig. 1 . 1.1 QSP pipeline overview The protocol in Fig. 1 starts either from a known target MPS, such as a physical groundstate from DMRG [ 50 , 51 ] , or by constructing an MPS from given probability amplitudes in Step 1, possibly from a classical dataset. This can be done by (a) reading all 2^{N} amplitudes and applying successive singular value decompositions ( SVD ) at \mathcal{O}(N\chi^{3}) cost [ 52 , 14 ] , or (b) using tensor cross interpolation ( TCI ) [ 53 ] to build the MPS with only \mathcal{O}(N\chi^{2}) probability amplitude queries. In Step 2, the qubits are permuted based on pairwise quantum mutual information ( QMI ) so that strongly correlated qubits are placed closer together in the MPS, improving the representation efficiency [ 30 , 54 , 55 , 56 , 57 , 58 ] , and Step 1 is repeated. In Step 3, we use the MPS for a heuristic preparation of an SMPD (top) [ 29 , 42 ] or BMPD (bottom) [ 35 ] circuit. Sequential circuits come in multiple variants, marked as left/right/mixed, which refer to the canonical form of the MPS they originate from, and which affect the circuit depth and preparation fidelity. As marked in the "Enhancements" box, each individual nearest-neighbor gate in SMPD circuits can be realized with only 2 CNOTs [ 59 , 60 , 42 ] (instead of 3 CNOTs required for a general 2-qubit unitary [ 61 ] ), and some gates can be reduced to single-body unitaries without affecting the fidelity but saving on the overall gate count [ 42 ] . The latter applies also to the BMPD circuits. Step 4 involves variational optimization of fidelity with the target MPS using the Evenbly-Vidal [ 44 , 45 ] (top) and Riemannian [ 46 , 33 ] (bottom) approaches. Optimization is initialized from heuristic circuits from Step 3 and after multiple iterations yields the final solution. In more advanced scenarios, Steps 3 and 4 are performed interchangeably in a loop - heuristic method produces a single new layer of the circuit, the whole circuit is optimized, the heuristic yields a new layer, and so on. 1.2 Contributions This work introduces an end-to-end MPS preparation pipeline, Fig. 1 , that combines heuristic methods of different origins and circuit structures, with variational optimization techniques, previously considered mostly in isolation. This provides access to highly efficient and scalable state preparation protocols, with the optimal choice of the methods depending on the properties of the target state, required fidelities, gate counts and circuit depths. The pipeline is evaulated on application-relevant classical datasets of varying complexity: Gaussian and Lévy probability distributions, the chaotic Lorenz attractor [ 62 ] , and S&P 500 stock market prices [ 63 ] . The pipeline incorporates an MPS qubit reordering procedure by placing strongly entangled pairs of qubits at short distances. We formulate this task as a combinatorial quadratic assignment problem ( QAP ) [ 64 ] . Heuristic sequential circuits from Ref. [ 29 ] are believed to require an exponentially large bond dimension \tilde{\chi}\sim\mathcal{O}(2^{L}) for a construction of L layers [ 29 ] (Fig. 4). We argue that the corresponding heuristic circuit can be reliably obtained with only {\tilde{\chi}\sim\mathcal{O}(\chi)\ll 2^{L}} , where \chi is the target MPS bond dimension. This sheds new light on the favorable scaling of the method not only for large systems, but also for many layers. Lastly, we implement various existing "enhancements" [ 42 ] for optimizing the depth and gate counts, see Sec. 2.5.1 for details, and investigate their interplay with the optimization methods. This article is organized as follows. Sec. 2 discusses the pipelines from Fig. 1 and its individual components. Sec. 3 shows the pipeline evaluations for various target states and the identification of the most efficient schemes. We conclude in Sec. 4 . 2 Methods The overview of the QSP pipeline from Fig. 1 is given in Sec. 1.1 . Here we motivate and describe each of its constituents in more details, starting with the notation. 2.1 Notation Our task is to prepare a quantum state of N qubits, defined by the fixed probability amplitudes {\psi_{s_{1}s_{2}\dots s_{N}}\in\mathbb{C}} , \ket{\psi}=\sum_{\{s\}}\psi_{s_{1}s_{2}\dots s_{N}}\ket{s_1 s_2 \dots s_N},\quad\bra{\psi}\ket{\psi}=1. (1) by finding a sequence of unitary gates U_{i} acting on the initial product state \ket{0}^{\otimes N} , \ket{\psi}=\left(\prod_{i}U_{i}\right)\ket{0}^{\otimes N}, (2) forming a corresponding quantum circuit. The construction of unitaries U_{i} is performed on a classical computer. 2.2 Matrix Product States The central object of our pipeline are quantum states in the MPS form, \ket{\psi}=\sum_{\{s\}}A^{(s_{1})}_{1}A^{(s_{2})}_{2}\dots A^{(s_{N})}_{N}\ket{s_1 s_2 \dots s_N}, (3) where A^{(s_{i})}_{i} are tensors of dimensions (2,\chi_{i},\chi_{i+1}) , and \chi=\max_{i}\chi_{i} . This class of states is chosen for two main reasons. Firstly, the one-dimensional tensor structure, along with the gauge freedom [ 14 ] , can be utilized to construct the heuristic approximate SMPD and BMPD circuits with simple two-body nearest-neighbor gates. Secondly, with a weak entanglement one can reach system sizes well beyond those of full state vector simulations. In a typical scenario, quantum hardware takes a classically tractable MPS as an input and increases the state complexity along the circuit execution, potentially exceeding the capabilities of classical computers, giving room for a quantum advantage [ 37 ] . Let us note that MPSs can be replaced by more expressive TTNs if one allows for long-range gates and more complex circuits [ 23 , 24 , 25 ] . 2.3 Step 1. Compression into MPS Construction of the MPS from the probability amplitudes is done in two ways. The standard way is to read all 2^{N} probability amplitudes into classical memory and perform successive truncated SVD site by site starting from left(right), yielding an MPS in the right(left) canonical form in \mathcal{O}(N\chi^{3}) computational complexity [ 52 , 14 ] . Alternatively, one can construct the MPS using the TCI algorithm [ 53 ] , which exploits the low-rank structure and calls for only \mathcal{O}(N\chi^{2}) adaptively chosen probability amplitudes. With TCI one can efficiently compress very large but low-rank classical datasets, such as smooth functions on finely discretized grids [ 17 ] . Appendix A contains a high-level introduction to TCI. Normalization of the MPS, if necessary, requires \mathcal{O}(N\chi^{3}) operations. 2.4 Step 2. Reordering qubits Figure 2: Analogy between a) the standard formulation of the quadratic assignment problem and b) qubit ordering in an MPS. Factories intensively exchanging materials between each other (large flow, marked by bold lines) such as 2 and 4 should be assigned to close cities on the right, just as correlated qubits (large quantum mutual information, marked by bold lines) should be placed close together in the MPS. Numbers enumerate facilities/qubits, capital letters enumerate locations/positions. When two qubits are strongly entangled but placed far apart in the MPS, their entanglement must be “passed” across all intermediate bonds. This affects the required maximal bond dimensions and bond truncation errors, as well as the entanglement at each bond, indicating that placing such a pair of qubits close to each other may yield a more efficient representation of the state, possibly leading to a more efficient QSP. In the context of QSP from MPS, this has been exploited in Refs. [ 30 , 54 ] , but both algorithms require exponentially many reconstructions of MPS, making the application to system sizes N\gtrapprox 10-20 numerically intractable. Interestingly, the problem of finding the optimal ordering of MPS (and other Ansätze) degrees of freedom was addressed earlier in the field of quantum chemistry [ 55 ] . Successful approaches are those of Refs. [ 56 , 57 ] , which propose to compute the quantum mutual information between all pairs of single degrees of freedom i,j , I_{ij}=\mathcal{S}_{\text{vN}}(\{i\})+\mathcal{S}_{\text{vN}}(\{j\})-\mathcal{S}_{\text{vN}}(\{i\}\cup\{j\}), (4) where \mathcal{S}_{\text{vN}}(\mathcal{A})=-\Tr\left(\rho_{\mathcal{A}}\ln\rho_{\mathcal{A}}\right) is the von Neumann entanglement entropy with \rho_{\mathcal{A}}=\Tr_{\mathcal{A}^{\prime}}\ket{\psi}\bra{\psi} being the reduced density matrix of subsystem \mathcal{A} , and \mathcal{A}^{\prime} denoting part of the system complementary to \mathcal{A} . Loosely speaking, the QMI measures how much uncertainty about subsystem \{i\} is reduced by knowing subsystem \{j\} , and vice versa; it quantifies the classical and quantum correlations between \{i\} and \{j\} . The QMI matrix can be efficiently computed for the MPS, see e.g. [ 65 ] for details. The cost function based on QMI and physical distances between degrees of freedom ( d.o.f. ), in this case orbitals, C(\pi)=\sum_{i,j}I_{ij}|\pi(i)-\pi(j)|^{\eta} (5) with \eta=1,2 in [ 57 ] and \eta=-2 in [ 56 ] , is used to find the optimal permutation \pi\in S_{N} of the N d.o.f., which finally leads to a more accurate groundstate energy in the DMRG [ 50 , 51 ] calculation. Notice that minimizing (for \eta>0 ) or maximizing (for \eta<0 ) the cost function amounts to placing orbitals with a large QMI close together. Throughout this work we always use \eta=1 . It has been rigorously shown that this heuristic directly relates to minimizing the entanglement entropy of MPS [ 58 ] . In contrast to Refs. [ 30 , 54 ] , this approach avoids repeated construction of MPS for different permutations with an excessive number of SVDs, requiring the calculation of QMI only once for a single MPS with a (possibly suboptimal) initial ordering of the d.o.f.. Afterwards, Ref. [ 56 ] uses simulated annealing, while Ref. [ 57 ] resorts to an approximate graph optimization method to find the optimal d.o.f. placement. The MPS is then constructed again but with reordered d.o.f.’s and a better groundstate energy in DMRG is achieved. Our observation is that the problem of optimizing the cost in Eq. ( 5 ) is exactly equivalent to the quadratic assignment problem [ 64 ] , a well-known NP-hard problem in combinatorial optimization. The QAP is naturally formulated as a facility location problem: given N facilities and N locations, one aims to assign each facility to a location in such a way that the total cost of operation, which depends both on the flow of products or supplies transported between facilities and the distance between locations, is minimized. Formally, the QAP is expressed as \min_{\pi\in S_{N}}\sum_{i,j}f_{ij}\,d_{\pi(i)\pi(j)}, (6) where f_{ij} is the flow between facilities i and j , not necessarily symmetric, and d_{\pi(i)\pi(j)} is the distance between assigned locations \pi(i) and \pi(j) . In our context, one may view the "facilities" as the qubits or other quantum degrees of freedom, and the "flows" f_{ij} as their correlations (e.g., quantified by the quantum mutual information I_{ij} ), see Fig. 2 . The "locations" correspond to the positions in the MPS chain, with the "distances" d_{\pi(i)\pi(j)}=|\pi(i)-\pi(j)|^{\eta} . This makes a direct mapping between the qubit reordering problem in MPS and the QAP, allowing us to use existing heuristic algorithms and software implementations developed over many decades for the latter, see e.g. the scipy library implementing the "Fast Approximate QAP" [ 66 ] and "2-opt" [ 67 ] optimizers, which we use throughout this work with default settings (in this order). Since I_{ij}=I_{ji} , one can use numerical methods specialized in instances of QAP with a symmetric flow. 2.5 Step 3. Heuristic initialization Heuristic methods of mapping the MPS to a quantum circuit are employed to ensure that at least a crude approximation will be found. This is not guaranteed for e.g. a parametrized variational circuit starting from random parameters, whose initial fidelity with the MPS is on average \mathcal{O}(2^{-N}) . Secondly, heuristic circuits allow for an MPS circuit simulation with an intermediate bond dimension \tilde{\chi} comparable to the MPS bond dimension \chi . Finally, if the achieved fidelity is too low, one can use the heuristic result as a warm start initialization for variational optimization. Starting close to a solution mitigates various problems with optimization [ 32 ] . Below we discuss two heuristic state preparation methods. 2.5.1 Sequential Matrix Product Disentangler (SMPD) Figure 3: Sequential Matrix Product Disentangler construction, example of the mixed gauge [ 42 ] . Initial state \ket{\psi_d} is truncated to \ket{\psi_{d,\chi=2}} and onsite tensors are isometries in the direction depending on the position and gauge (left/right/mixed), with the orthonormality direction denoted by arrows. Fourth "dummy" leg of dimension 1 , corresponding to \ket{0} , is added to each tensor with already three legs, giving onsite tensors of dimensions (1,2,2,2) , which are isometries when expressed as 2\times 4 matrices. One completes these matrices to 4\times 4 (2-qubit) unitaries U_{i} by adding two more orthogonal columns with a Gram-Schmidt or QR decomposition-based orthogonalization algorithm. Completing to unitary is not needed for U_{6,7} at both ends which are already 2\times 2 unitaries. Then, the quantum circuit on the right, created by arranging the gates into a layer \mathcal{L}[U]^{(k)} such that the input-output relations of tensors in the MPS are matching with those in the circuit, exactly realizes \ket{\psi_{d,\chi=2}} . For the next layer, one applies the inverse of the currently obtained layer to \ket{\psi_d} , yielding a new "disentangled" state. The operator U_{1} comes from a diagonal tensor \Lambda and can be realized with 1 CNOT and one R_{Y} rotation. Other two-body gates are isometries due to \ket{0} input on one qubit and can be decomposed into 2 CNOT gates and single qubit rotations. Analogous constructions for left- and right-canonical forms of MPS, which do not contain the \Lambda tensor, can be obtained [ 29 ] . This method of an approximate translation of MPS into quantum circuits was proposed by Ran in 2020 [ 29 ] and widely adopted afterwards [ 31 , 32 , 48 , 49 , 22 , 42 ] . The basic algorithm, a variant of which [ 42 ] is presented in Fig. 3 , is based on two observations: i) an MPS with a bond dimension \chi=2 , when expressed in a canonical gauge with isometric on-site tensors, defines a sequence of two-body nearest-neighbor quantum gates that realize it exactly, and ii) truncation of the bond dimension to \chi=2 gives the best rank-2 approximation of the MPS in terms of the Frobenius norm. To obtain the first layer of gates in the circuit, one uses the rank-2 approximation of the full MPS \ket{\psi} . Then, one can proceed iteratively and construct a next rank-2 representation of a new MPS resulting from the application of the inverse of the previous layer to the original \ket{\psi} , "disentangling" it, yielding the next layer of gates. After a maximal number of layers L or the desired fidelity with the product state \ket{0}^{\otimes N} is reached, the process terminates, see Alg. 1 . Layers applied in a reverse order, acting on \ket{0}^{\otimes N} , give an approximation of \ket{\psi} . Input : MPS \ket{\psi} , max. number of layers L , max. intermediate bond dimension \tilde{\chi} Output : Layers of QSP circuit \prod_{k=L}^{1}\mathcal{L}\left[U\right]^{(k)} k\leftarrow 1 ; \ket{\psi_d}\leftarrow\ket{\psi} - "disentangled state"; while k\leq L do Compute the norm \mathcal{N}=\left|\bra{\psi_d}\ket{\psi_d}\right|^{2} ; Truncate \mathcal{N}^{-1/2}\ket{\psi_d} to \ket{\psi_{d,\chi=2}} in left-, right- or mixed-canonical form with SVDs, renormalizing singular values to \lambda_{1}^{2}+\lambda_{2}^{2}=1 at each bond; Transform \ket{\psi_{d,\chi=2}} into a layer of gates \mathcal{L}\left[U\right]^{(k)} as in Fig. 3 ; Disentangle current state for the next step, keeping a maximal bond dimension \tilde{\chi} , \ket{\psi_d}\leftarrow\left(\mathcal{L}\left[U\right]^{(k)}\right)^{\dagger}\ket{\psi_d} ; k\leftarrow k+1 ; end while Algorithm 1 Sequential Matrix Product Disentangler (SMPD) The main advantage of this procedure is the deterministic formulation. At each layer, the unitary gates are uniquely determined by the truncation of MPS to \chi=2 , leading to a refined approximation. Only the nearest-neighbor gates are required, minimizing the need for SWAP operations on physical platforms with nearest-neighbor connectivity. Nevertheless, one can identify several potentially weak points. The most important one is the circuit depth scaling as \mathcal{O}(N) with the number of qubits N . It is better than the naive \mathcal{O}(2^{N}) scaling for a general QSP, but may still pose a challenge in a practical realization with 10 s of qubits. Another drawback is the empirical observation that after a few layers are applied, L\sim 5-10 , the fidelity of the circuit typically starts to saturate. Another potential drawback brought up in Ref. [ 29 ] is the need for an exponentially large bond dimension \tilde{\chi}\sim\mathcal{O}(2^{L}) for the construction of L -layer SMPDs, limiting classical calculations to a few layers only. In Sec. 3.1 we independently revisit the calculations of Ref. [ 29 ] and find that deep SMPD circuits are simulable with bond dimensions \tilde{\chi}\sim\mathcal{O}(\chi)\ll 2^{L} . Figure 4: Enhancements of the SMPD. a) Isometry is decomposed into 2 CNOTs and single-qubit gates. b) If the MPS bond is already disentangled, apply only single-qubit gates. c) Using the mixed-canonical gauge decreases depth in half. Building on the results of Ref. [ 42 ] , we employ three "enhancements" of the SMPD implementation that lead to either lower gate counts or shallower circuits, as illustrated in Fig. 4 . The first enhancement, Fig. 4 a), is based on the observation that every SMPD layer consists of two-body gates acting on one qubit in a fixed state \ket{0} , and the other qubit in an arbitrary state. Thus, the gate is defined by only 2 out of all 4 orthogonal columns of the 2-qubit unitary matrix, i.e. it is an isometry from 1 to 2 qubits. It is known that even though an exact decomposition of a 2-qubit unitary requires exactly 3 CNOT gates in the general case [ 61 ] , the decomposition of a 1-to-2 qubit isometry can be performed with only 2 CNOTs [ 60 ] . We implement a decomposition of both unitaries and isometries into elementary single-qubit rotations and CNOT gates using an Ansatz from Ref. [ 59 ] . We stress that the single-qubit rotation angles are deterministically calculated from the matrix elements of the decomposed operator, not variationally optimized, see Appendix C for details. The second enhancement, shown in Fig. 4 b), exploits the spatial structure of entanglement in the MPS. If a certain bond has already been disentangled after applying the disentangling operators, i.e. it reached a bond dimension of 1 after truncation at a desired singular value cutoff level \varepsilon_{\text{SVD}} , there is no need to apply a two-body gate around this bond. One can apply only a single qubit rotation, significantly reducing the overall number of two-body gates needed to construct the circuit. Finally, it is also beneficial to consider the SMPD for an MPS expressed in the mixed gauge, as in Figs. 3 . That is, one chooses a certain bond as a center of orthogonality, transforms all tensors to the left into right-orthogonal, and all tensors to the right into left-orthogonal form, and truncates the bond dimension to \chi=2 . This results in a circuit layer with gates in the "V"-shape, with a depth smaller by up to 50% than from the left- or right-canonical gauge, cf. Fig. 4 c). The central bond with two singular values \Lambda_{1}\geq\Lambda_{2}\geq 0 , normalized to \Lambda_{1}^{2}+\Lambda_{2}^{2}=1 , corresponds to an isometry from \ket{00} state to a 2-qubit state. Notice that the bond tensor with singular values is a diagonal gate U_{1}\equiv U_{\Lambda} defined by U_{\Lambda}\ket{00}=\Lambda_{1}\ket{00}+\Lambda_{2}\ket{11} . Such a gate can be realized with only a single R_{Y}(\theta) rotation and one CNOT gate. Specifically, assuming R_{Y}(\theta)=e^{-i\frac{\theta}{2}Y}=\begin{bmatrix}\cos\tfrac{\theta}{2}&-\sin\tfrac{\theta}{2}\\ \sin\tfrac{\theta}{2}&\cos\tfrac{\theta}{2}\end{bmatrix} (7) with Pauli gate Y\equiv\sigma^{y} , one can choose {\theta^{*}=2\arctan\left(\Lambda_{2}/\Lambda_{1}\right)} such that U_{\Lambda}=\text{CNOT}\cdot(R_{Y}(\theta^{*})\otimes\mathbb{1}). (8) This construction gives explicit parameters for an exact realization of the central gate, requires only a single CNOT, and avoids variational optimizations. This is in contrast to Ref. [ 42 ] , where the first disentangler layer also has U_{\Lambda} realized with a single CNOT, but for further layers it is optimized variationally from a 2-CNOT Ansatz with single qubit rotations to minimize the Rényi entropy at the central bond. Both other enhancements described in this section also apply to the mixed-gauge SMPD. For completeness, let’s note that an analogue of the SMPD for TTN was introduced in Ref. [ 23 ] , and an open source Python implementation of the basic version of the SMPD algorithm for qiskit is available [ 68 ] . 2.5.2 Brickwall Matrix Product Disentangler (BMPD) Figure 5: a) The MPS is transformed into the \Gamma - \Lambda gauge, also known as the Vidal’s gauge. Singular values stored at each bond allow for a direct entropy calculation. b) Application of a gate U_{i} which is supposed to decrease Rényi entanglement entropy at the i -th bond. Contraction of the network is followed by SVD of the resulting tensor across a dashed line. New \Gamma_{l,r}^{\prime} matrices are obtained as \Gamma_{l}^{\prime}=\Lambda_{l}^{-1}U_{l} and \Gamma_{r}^{\prime}=V_{r}\Lambda_{r}^{-1} . The MPS stays in the \Gamma - \Lambda canonical form and only the \Gamma_{l} , \Gamma_{r} , \Lambda_{i} tensors are affected by the gate application. c) Layer-by-layer disentangling of an MPS. Parameters of gates in a single column are variationally optimized in parallel to minimize Rényi entropy at each bond. After optimization, the gates are contracted with the MPS, resulting in a lower bond dimension on average, and the optimization proceeds to the next column of gates. The last layer consists of single-body rotations. Hermitian conjugate of this quantum circuit prepares an approximation of the MPS from the \ket{0}^{\otimes N} initial state. An alternative heuristic state preparation algorithm has been proposed by Mansuroglu and Schuch [ 35 ] . The construction is based on the MPS representation in the \Gamma - \Lambda gauge, first introduced by Vidal [ 69 ] , in which the singular values of the Schmidt decomposition are stored as diagonal \Lambda matrices at each bond, along with \Gamma tensors at each site, \ket{\psi}=\sum_{\{s\}}\Gamma_{1}\Lambda_{1}\Gamma_{2}\Lambda_{2}\dots\Gamma_{N-1}\Lambda_{N-1}\Gamma_{N}\ket{s_1 s_2 \dots s_N}, (9) see Fig. 5 a) for a graphical representation. This form can be obtained by first bringing the MPS into left- or right-canonical form, and then performing a sequence of SVDs [ 14 ] . 1 1 1 Bringing the MPS into left- or right-canonical form first is necessary when we start with an MPS not expressed in any of these two gauges. If we start from a dense state vector, the transformation into MPS in the \Gamma - \Lambda gauge can be performed directly, see [ 14 ] . The \Gamma - \Lambda gauge is chosen due the possibility to simultaneously access Schmidt values at each bond, which is not the case e.g. for the mixed gauge where Schmidt values only at a single bond can be read directly, and one has to move the center of orthogonality in order to access Schmidt values at different bonds. The core routine of the algorithm is the application of a two-body unitary U_{i,i+1} on sites i,(i+1) , which is supposed to decrease the entanglement entropy at the i -th bond. Parameters of the unitary are variationally optimized so that the \alpha -order Rényi entropy, \mathcal{S}_{R,\alpha,i}=\frac{1}{1-\alpha}\log\left(\sum_{k}(\Lambda_{i})_{k}^{2\alpha}\right) (10) where (\Lambda_{i})_{k} is the k -th singular value at bond i , is minimized. An Ansatz for a general disentangling unitary has the following form: \displaystyle U_{i,j} \displaystyle(\theta) \displaystyle=e^{-i\theta_{i,1}X_{i}X_{j}}e^{-i\theta_{i,2}Y_{i}Y_{j}}e^{-i\theta_{i,3}Z_{i}Z_{j}} (11) \displaystyle\times \displaystyle\left(e^{-i(\theta_{i,4}X_{j}+\theta_{i,5}Y_{j}+\theta_{i,6}Z_{j})}\right. \displaystyle\quad\otimes\left.e^{-i(\theta_{i,7}X_{i}+\theta_{i,8}Y_{i}+\theta_{i,9}Z_{i})}\right) which is a decomposition of a general two-qubit SU(4) matrix [ 70 ] without a pair of single-qubit gates at the end which do not influence the entanglement. Application of the disentangling unitary to an MPS is illustrated in Fig. 5 b). 2 2 2 In [ 35 ] the unitary U_{i} is first decomposed with SVD into two tensors for contraction efficiency, which we omit. Our implementation uses autodifferentiation instead of the parameter-shift rule for obtaining gradients, which requires 1 SVD and its backpropagation instead of 18 SVDs. Each gate application preserves the \Gamma - \Lambda gauge, and modifies only local tensors \Gamma_{l} , \Gamma_{r} , \Lambda_{i} . This allows for an efficient parallelization of the disentangling process over gates applied to pairs of neighboring qubits around every second bond. After disentangling the odd bonds, one proceeds with another set of unitary gates to disentangle the remaining even bonds. This gives two sublayers, which form a layer. Iterating the process gives a disentangling quantum circuit with a brickwall structure, see Fig. 5 c). After many such disentangling layers are applied, one is left with a state with a small Rényi entropy, i.e. approximately a product state. Then, a layer of single-body rotations allows one to reach the state \ket{0}^{\otimes N} . Parameters of these unitaries result from truncation of the final MPS to bond dimension \chi=1 . If the full disentangling circuit corresponds to a unitary U , the quantum state can be prepared by inverting it: \ket{\psi}\approx U^{\dagger}\ket{000\dots 0} . There are several major advantages of the BMPD, as underlined in [ 35 ] : i) Instead of optimizing all gates at once, which would be exponentially costly due to an expected increase of the MPS bond dimension after each layer, one performs a tractable layer-by-layer optimization, keeping the MPS form. After each layer, one is left with a less entangled state, so the MPS bond dimension decreases on average. This makes a classical simulation of deep circuits possible. ii) Since the variational optimization for each gate is strictly local the loss landscape provably doesn’t suffer from the usual problem of barren plateaus, making the method scalable to large systems. iii) The truncation error made during disentangling of the i -th bond affects only the tensors \Gamma_{i} , \Lambda_{i} , \Gamma_{i+1} . Theoretical guarantees for the total state preparation error assuming a fixed maximal bond dimension are provided in [ 35 ] . iv) In principle, the circuit depth is proportional to the number of disentangling layers and independent of the system size. However, our observation is that if we want to disentangle qubits separated by a distance \xi , since a single disentangler acts only on a pair of neighboring sites, we need a circuit depth of at least \xi/2 , i.e. linear in the system size and the same as SMPD in the mixed gauge if \xi\sim N . This is a consequence of the Lieb-Robinson bounds on the propagation of quantum correlations [ 71 ] , see also [ 72 ] (Sec. 3). v) The circuit Ansatz involves only nearest-neighbor gates, which is an advantage for many NISQ platforms such as those with trapped ions [ 73 ] or superconducting qubits [ 74 ] . vi) The Ansatz for a parametrized disentangling gate can be either a general disentangler, as in Eq. ( 11 ), or a hardware-efficient gate, depending on the native hardware capabilities. The hyperparameter {\alpha>0},{\alpha\neq 1} , the exponent in the Rényi entropy formula, Eq. ( 10 ), needs to be appropriately chosen. Small \alpha\rightarrow 0 favors minimization of the Schmidt values across many orders of magnitude, leading to an exploration of a large space of entangled states to find a superposition leading to small total Renyi entropy. On the contrary, for a large \alpha\rightarrow\infty , the entropy reads S_{\infty,i}=-\log( (\Lambda_i)_1^2) , and is dependent only on the leading singular value. In this case, the minimization leads to a domination of the leading singular value, asymptotically reaching 1 , and suppression of the other singular values. This decreases the maximal bond dimension, making the classical simulation more efficient. Thus, one needs to find a sweet spot between the exploration and numerical cost. Throughout this work we choose \alpha=2 as an intermediate case. Finally, having in mind the limitations of NISQ devices such as limited achievable gate counts, one can cease adding new disentangling gates if a desired small level of Rényi entropy and/or singular value magnitude at a given bond is reached. This is in full analogy to the enhancement applied to SMPD and depicted in Fig. 4 b). In this way, one avoids a physical implementation of gates possibly very close to an identity (up to single-qubit rotations) whose application unnecessarily takes up quantum resources and introduces errors. 2.6 Gate optimization algorithms Let us consider a quantum circuit which realizes a state U\ket{0}^{\otimes N} through a sequence of M few-body unitary gates, U=U_{M}U_{M-1}...U_{2}U_{1}. (12) Our goal is to find gates U_{i} that maximize the absolute value of the fidelity with a target state \ket{\psi} , F=\bra{000\dots 0}U^{\dagger}\ket{\psi}, (13) under constraint that the gates are unitary. 2.6.1 Evenbly-Vidal sweeping optimization algorithm Figure 6: Step of the Evenbly-Vidal optimization, maximizing fidelity of the circuit with the MPS. a) Environment \mathcal{F}_{m} calculation for m=8 . The entire tensor network is contracted except for the U_{8} gate. b) SVD of the environment tensor. c) Optimally updated gate U_{8} . One can simplify the problem and concentrate on finding a single optimal gate U_{m} while keeping the other gates fixed, with a method introduced in 2009 by Evenbly and Vidal [ 44 ] for isometric tensor networks, and later readapted by Shirakawa et al. for quantum circuits [ 45 ] . In order to compute an update for a single gate, one computes its environment tensor \mathcal{F}_{m} by contracting the tensor network representing fidelity with the target state with the gate of interest removed, see Fig. 6 . The new, optimally updated gate U_{m}^{\prime} is then given by the SVD of \mathcal{F}_{m} with singular values replaced by 1 , see Appendix B.1 for details. Visiting all U_{m} twice, going from the first gate to the last and back, makes a single sweep , which can be repeated n_{\text{swp,EV}} times until convergence. During the sweep, the state to the left and right of the current gate can be kept in the MPS form. As noticed in Ref. [ 32 ] , the EV optimizer gives a strong update, which can decrease the efficiency of the full circuit optimization. Therefore, it was proposed to apply a finite learning rate 0<\beta\leq 1 , so that the update U_{m}^{\prime\prime} reads U_{m}^{\prime\prime}=U_{m}(U_{m}^{\dagger}U_{m}^{\prime})^{\beta}. (14) In case \beta=1 , U_{m}^{\prime\prime}=U_{m}^{\prime} ; with decreasing \beta>0 the update becomes smaller. The matrix power can be computed numerically using the eigendecomposition of the matrix and a standard exponentiation of the diagonal eigenvalue matrix. In Appendix F we study the final fidelity of the optimized states for two different datasets and find a rather limited variation of the result in the range \beta\in[0.2,1] . Throughout this paper we choose an intermediate \beta=0.6 , same as in Ref. [ 32 ] . 2.6.2 Riemannian variational optimization A standard approach to variational quantum circuit optimization with classical computers is to parametrize the gates in terms of e.g. rotation angles \exp(-i \theta_{j,\alpha} \sigma_\alpha) and update parameters \theta until convergence of the cost function such as energy or fidelity. However, it is known that variational quantum circuits suffer from a problem of barren plateaus with parametrizations of this kind, i.e. the cost function is (approximately) constant almost everywhere in parameter space, except for exponentially (in the system size N ) narrow regions where it reaches a minimum. One of the ways to partially mitigate this effect is to avoid parametrizations in terms of angles in the exponential, and directly optimize the matrix elements of the K -body 2^{K}\times 2^{K} unitary gates (in our case, K\in\{1,2\} ), which imposes the unitarity constraint. In such a case of a constrained and curved variational manifold, one can apply Riemannian optimization techniques [ 46 , 33 ] . To stay on the manifold during gradient-based optimization and to perform updates in accordance with its local geometry, one projects the Euclidean gradient \nabla f(u) onto the tangent space to get the Riemannian gradient \nabla_{R}f(u) , and generalizes the Euclidean point and vector transport. Details are provided in Appendix B.2 . Here we use the Riemannian version of the Adaptive Moment Estimation (Adam) first-order gradient optimizer [ 75 ] implemented in the QGOpt software package [ 46 ] . The loss function is the fidelity of the circuit with the target MPS from Eq. ( 13 ), and we optimize over complex matrix elements of unitary gates U_{1},\dots U_{M} . Contraction of the corresponding tensor network defines a computational graph which allows for autodifferentiation to obtain gradients of variational parameters [ 76 ] . For tensor network contractions, which take the most of the computational time and are exponentially costly in general, we utilize the cotengra hyperoptimized contractions [ 77 ] . 3 Results We perform numerical evaluations s of different variants of the QSP pipeline described in Sec. 2 . We start in Sec. 3.1 by demonstrating that moderate bond dimensions \tilde{\chi}\ll 2^{L} in the classical simulation are sufficient to construct L -layer SMPD circuits, revisiting the results of Ref. [ 29 ] on the same input data. Then, in Sec. 3.2 we introduce four classical datasets which are amplitude-encoded as quantum states for QSP benchmarking. Sec. 3.4 is devoted to our qubit reordering algorithm analysis. Results from evaluating the QSP methods based on disentanglers are presented in Sec. 3.5 (only disentanglers) and Sec. 3.6 (disentanglers combined with optimization). 3.1 State preparation with deep layered SMPD A potential problem with the SMPD method brought up in Ref. [ 29 ] is the need for an exponentially large bond dimension \tilde{\chi}\sim\mathcal{O}(2^{L}) for the construction of L -layer disentanglers, limiting classical calculations to a few layers only, above which the fidelity rapidly decays. The argument is based on the opposite error propagation directions for obtaining the circuit and for executing it to prepare the state, and analogies to the TEBD time evolution algorithm. Here, using the same input data, we demonstrate no such decays of fidelity occur even for deep circuits. We consider the 1D transverse field Ising Hamiltonian with open boundary conditions, H=\sum_{n=1}^{N-1}S_{n}^{z}S_{n+1}^{z}-h_{x}\sum_{n}S_{n}^{x}, (15) with S_{n}^{x,y,z}=\sigma_{n}^{x,y,z}/2 denoting spin-1/2 operators and \sigma_{n}^{x,y,z} Pauli matrices at site n . We use the DMRG algorithm [ 50 , 51 ] to obtain the groundstate for N=48 spins close to the critical point at h_{x}=0.5 , with the absolute energy tolerance of 10^{-12} , SVD singular value cutoff \epsilon=10^{-13} (relative to the maximal singular value), maximal bond dimension \chi=64 and double floating point precision (complex128 data type), implemented in quimb [ 78 ] . The energy converges to E_{0}=-15.188704241243 after 10 DMRG sweeps, yielding an MPS with bond dimension \chi=25 . In [ 29 ] (Fig. 4) the same state is considered for state preparation with the SMPD algorithm. Through the negative logarithmic fidelity per site, F_{L}=-\frac{\ln|\bra{\psi}\prod_{k=L}^{1}\mathcal{L}\left[U\right]^{(k)}\ket{0}^{\otimes N}|}{N} (16) calculated for circuits with a varying number of layers L and bond dimensions used for their construction \tilde{\chi} , it is shown that F_{L} abruptly increases whenever L\gtrapprox\log_{2}\tilde{\chi} , reaching values on the order of F_{L}\approx 0.5 , which for this system size translates to a "global" infidelity \mathcal{I}=1-|\bra{\psi}U^{\dagger}_{L}\cdots U^{\dagger}_{2}U^{\dagger}_{1}\ket{0}|^{2}\approx 1-10^{-21} , i.e., failure to prepare the state. Figure 7: a) Infidelity of the 1D quantum Ising model groundstate preparation for a given number of SMPD layers. There is no abrupt increase of infidelity at L\approx\log_{2}\tilde{\chi} . For L>5 , the improvement with increeasing L is slow but noticeable (right inset). Truncation errors of the disentangled state \ket{\psi_d} result in a decreased state norm (left inset). The infidelities were computed using MPS simulator with bond dimension \tilde{\chi}^{\prime}=256 . b) Maximal bond entanglement of the prepared state after each gate application ( 49 gates per layer). Most entanglement is created in the last layer, so at early stages the circuit can be simulated efficiently with a small bond dimension. Inset shows error in the norm of the prepared state which stays exponentially small. Our calculation of infidelity \mathcal{I} as a function of the number of SMPD layers L for various choices of \tilde{\chi} is shown in Fig. 7 a). A single layer is enough to approximate the state with infidelity \mathcal{I}\approx 0.106 . A significant improvement when adding new layer is visible for the first 4-5 layers. Although extending the circuit further systematically decreases the infidelity, the improvement per layer slows down, see the right inset. The difference from the result of Ref. [ 29 ] is clear: there is no abrupt increase of the infidelity to \mathcal{I}\rightarrow 1 after the number of layers exceeds L\gtrsim\log_{2}\tilde{\chi} . In fact, even for \tilde{\chi}=16 , which does not allow the prepared state to reach the target \chi=25 , we still observe values of infidelity very close to those for \tilde{\chi}=256 . To ensure that the presented small infidelities did not result from the truncations in the QSP circuit MPS simulation, even though the disentangler circuits were constructed with \tilde{\chi} each, we used bond dimension \tilde{\chi}^{\prime}=256 to compute the infidelities. We verified that the change of the squared norm of the prepared state \ket{\psi_{\text{prep}}}=\prod_{k=L}^{1}\mathcal{L}\left[U\right]^{(k)}\ket{0}^{\otimes N} (17) did not exceed 1.5\times 10^{-7} in all cases. The plot was constructed for SMPD resulting from right-canonical MPS gauge to match Ref. [ 29 ] , but we observed the same behavior for both left- and mixed-canonical form-based SMPDs. Not aiming for an efficient preparation but for a comparison, we did not use any of the SMPD algorithm enhancements from Fig. 4 . The left inset of Fig. 7 a) shows the squared norm of the disentangled state \ket{\psi_d}=\left(\prod_{k=L}^{1}\mathcal{L}\left[U\right]^{(k)}\right)^{\dagger}\ket{\psi} (18) after L disentangling layers applied to the target MPS \ket{\psi} with a fixed \tilde{\chi} . It is clear that the norm drops noticeably from 1.0 to 0.93-0.95 for the deepest circuits due to truncation errors, and the drop starts to occur at roughly \tilde{\chi}\approx 2^{L} . Nevertheless, there is still enough "signal" in this truncated state to construct further layers because the state preparation infidelity is systematically improving, as demonstrated in the right inset. The improvement of infidelity per layer is very slow, but we attribute this effect to the specific choice of the target state. In one of the examples coming from classical datasets, we observe that infidelity can drop from \mathcal{I}=0.7 to \mathcal{I}=0.01 across L=300 SMPD layers, see further Sec. 3.5 and Fig. 10 . Fig. A3 b) demonstrates efficient classical simulability of the state preparation SMPD circuits. We compute the maximal entanglement entropy in the system after each gate application in the state preparation process. The system starts from a product state \ket{0}^{\otimes N} with zero entanglement. Then, the entanglement grows with each gate/layer, but the growth is very slow and the system is classically simulable with a small bond dimension, see the inset for the accumulated truncation error. Most of the entanglement is produced in the last few SMPD layers. On the one hand, this is a positive message about the classical simulability of SMPD circuits, making their state preparation circuit results verifiable on classical computers. On the other hand, the circuit spends most of the time applying very weakly entangling gates, signaling that the state preparation scheme is far from optimal. Concluding, we do not confirm the results of [ 29 ] (Fig. 4), implying that the required bond dimension for SMPD construction is exponential in the number of layers, {\tilde{\chi}=2^{L}} . We find that both the SMPD construction, and the following state preparation, are classically simulable with \tilde{\chi}\ll 2^{L} , making the method useful also for more demanding scenarios requiring L\gg 1 layers. Further study is performed in Appendix D , confirming that the rank-2 approximation is robust to truncation errors, there are no noticeable infidelity gains for \tilde{\chi}\geq 50 , and the conclusions made here also hold for more complex states such as random MPS. 3.2 Classical datasets Figure 8: Classical datasets used for benchmarking the quantum state preparation methods. Top row: Probability amplitudes encoded with an MPS on N qubits with bond dimension \chi , either with TCI (Gaussian, Lévy distributions) or with direct step-by-step SVD compression of a dense state vetctor (Lorenz attractor, S&P 500). Insets zoom into parts of the larger plots. In the S&P 500 case, gray dashed lines are put every 2^{10}=1024 points and distinguish the companies A, AAL, AAP, AAPL, etc. arranged in alphabetical order. Middle row: Entanglement entropy at MPS bonds. Exponential decay starting from an index k representing the relevant lengthscale of the problem \xi=1/2^{k} is observed, see text. Bottom row: Quantum mutual information between all pairs of qubits. For benchmarking the state preparation methods in the context of their future potential practical applications, we select four classical datasets, all presented in Fig. 8 . 3.2.1 Probability distributions We encode two continuous univariate probability distributions f(x) into quantum probability amplitudes {\psi(x)=\sqrt{f(x)}} . As a baseline, we choose the normal distribution f(x)=\frac{1}{\sqrt{2\pi\sigma^{2}}}e^{-(x-\mu)^{2}/(2\sigma^{2})} (19) which is a fundamental object in statistics due to the central limit theorem [ 79 ] . At the same time, as it later turns out, it is easy to prepare as a quantum circuit, so that we can check the convergence of our algorithms. We set \mu=0.5 and \sigma=0.1 . For an interested reader, we recommend Refs. [ 80 , 81 ] for an in-depth analysis of univariate normal distribution preparation on quantum computers, as well as [ 24 , 25 ] for recent advances on multivariate Gaussian preparation. The second example, inspired by Ref. [ 42 ] , is the Lévy distribution f(x)=\sqrt{\frac{c}{2\pi}}\frac{e^{-c/(2x)}}{x^{3/2}},\quad x>0 (20) where c>0 is a scale parameter. It is a heavy-tailed, scale-free distribution, resulting from additive contributions at multiple different scales. The Lévy distribution appears in anomalous diffusion processes like Lévy flights [ 82 ] , where occasional very long jumps distinguish the behavior from standard Brownian motion. It also emerges in critical phenomena near phase transitions, quantum mechanics with long-range interactions, as well as in biological systems [ 83 ] . Properties of financial data, especially in the context of risk management where rare but extreme events play an essential role, are also often captured by the Lévy distribution [ 84 ] . Nevertheless, sampling from this long-tailed distribution remains a challenge, so preparing it as a quantum state and sampling qubit configurations from it presents itself as a potential practical application of quantum computers. In this work, we set the scale parameter to c=32 . To map continuous probability distributions onto a discrete set of quantum probability amplitudes, we use the quantics representation [ 85 , 18 ] . First, we choose the interval x\in[0,\ell) over which we want to encode the function, and then rescale as \tilde{x}=x/\ell , so that \tilde{x}\in[0,1) . For the Gaussian Eq. ( 19 ), we set \ell=1 . For the Lévy distribution Eq. ( 20 ), in order to capture the long tail over multiple lengthscales, we choose \ell=2^{30} . Then, assuming we are dealing with N qubits, we discretize \tilde{x} with a resolution of 1/2^{N} , \tilde{x}=\sum_{i=1}^{N}s_{i}2^{-i}\quad s_{i}\in\{0,1\} (21) where s_{i} are the qubit configurations, with the first qubit encoding the coarsest lengthscale of 2^{-1} (i.e., determining whether we are in the left or right part of the interval), down to the last qubit representing the finest lengthscale of 2^{-N} . In this way, we can associate a qubit configuration (s_{1},s_{2},\dots s_{N}) with a position \tilde{x} in the interval with exponential accuracy 1/2^{N} , and interpret the probability amplitudes as an N -dimensional tensor F_{s_{1}sa_{2},\dots s_{N}} . Then, we use the tensor cross interpolation to construct an MPS representation of the Gaussian on N=30 qubits, and the Lévy distribution on N=50 qubits. Specifically, in the TCI of the Gaussian (Lévy) distributions we performed 2 ( 3 ) left-to-right and right-to-left sweeps, corresponding to 16020 ( 51244 ) function evaluations, and converged to a solution with a maximal error of \max_{i}\varepsilon_{i,i+1}=10^{-12} (see Appendix A ) and bond dimension \chi=13 in both cases. In this way we can construct accurate MPS representations of the considered functions without evaluating the functions on all 2^{N} arguments, which would be required for "standard" SVD-based tensor unfolding. After loading with TCI, the MPSs are normalized. 3.2.2 Lorenz attractor The next dataset comes from a multidimensional timeseries of the Lorenz system [ 62 ] , a classic example of a deterministic dynamical system leading to chaotic behavior. We generate the timeseries by integrating the equations of motion \displaystyle\frac{dx}{dt} \displaystyle= \displaystyle\sigma(y-x) \displaystyle\frac{dy}{dt} \displaystyle= \displaystyle x(\rho-z)-y \displaystyle\frac{dz}{dt} \displaystyle= \displaystyle xy-\beta z (22) with \sigma=10 , \rho=28 , \beta=2.667 , starting from the initial condition (x_{0},y_{0},z_{0})=(0,1,1.05) , for a total time T=2^{7}=128 , with the Euler integration scheme and timestep \Delta t=2^{-20} . This choice of parameters makes the evolution concentrate around a butterfly-shaped chaotic attractor in the x,y,z coordinates, see Fig. 8 (third column). In total, we produce T/\Delta t=2^{27} points for each of the x,y,z axes. To perform the amplitude encoding, we transform the data into 1-dimensional time series of length 2^{29} by stacking the x,y,z axes next to each other and padding the rest with zeros (adding a fictitious axis w with zero coordinate at all times), so that the configuration of the first 2 qubits determines the axis ( s_{1}s_{2}=00,01,10,11 denote axes x,y,z,w ), and the remaining 27 qubits enumerate timesteps. The data is then normalized and transformed into an MPS on N=29 qubits with a step-by-step SVD with a relative singular value cutoff \varepsilon_{\text{SVD}}=10^{-12} , yielding a state with maximal bond dimension \chi=92 . The transformation takes about 3 minutes on a consumer-grade Apple Silicon M3 8-core CPU. 3.2.3 S&P 500 stock prices Our last example is a publicly available financial dataset Standard&Poor’s 500 (S&P 500) [ 63 ] , which contains timeseries of real stock prices of 505 companies from the years 2013-2018. To encode it as a quantum state, we choose the first 1024=2^{10} day closing prices for each company and stack them next to each other, yielding a vector of length 505\times 1024 , which we normalize to zero mean. Padding this vector with zeros by adding 7 fictitious companies with zero price, we reach the size of 512\times 1024=2^{19} , which we encode as probability amplitudes of a quantum state of N=19 qubits. The first 9 qubits enumerate the companies, and the rest 10 qubits enumerate points in time. The state is transformed into MPS form with the same method and parameters as for the Lorenz attractor dataset. The final MPS has a bond dimension of \chi=512 , i.e. the maximal possible value for this system size. 3.3 Entanglement structure analysis As it is demonstrated in Ref. [ 42 ] , understanding the spatial entanglement structure of the states can be utilized to optimize their preparation as quantum circuits. Let us consider quantics encoding of function f(\tilde{x}) , \tilde{x}\in[0,1) , as an MPS. A theorem of [ 86 ] states that adding (N+1) -th qubit to a N -qubit state representing function f(\tilde{x}) can lead to a growth of the von Neumann entanglement entropy, but with an upper bound of \Delta\mathcal{S}_{\text{vN}}\leq\frac{\sqrt{\max\limits_{\tilde{x}\in[0,1]}\left|f^{\prime}(\tilde{x})\right|}}{2^{N/2-1}}\sim\mathcal{O}(2^{-N/2}) (23) which decays exponentially with the number of qubits provided the function derivatives are finite. This suggests that smooth functions typically have weakly entangled quantic representations, and therefore are easy to transform into MPS e.g. through TCI, and to further prepare as quantum circuits. Ref. [ 42 ] further studies the entanglement properties of smooth functions such as Gaussian and Lévy distributions. If the function has a characteristic lengthscale \xi , below which there are no significant changes in the function value, one can distinguish two separate parts of the corresponding MPS. The first j\approx\log_{2}\xi bonds, between the qubits corresponding to the largest lengthscales, are characterized by a non-universal entanglement structure, which is dependent on the choice of the function f and its large-scale variations. However, all further bonds k>j are described by an universal exponential decay of the von Neumann entanglement entropy, \mathcal{S}_{\text{vN}}(k)\sim\mathcal{O}(\frac{j}{4^{j}}),\quad\text{as}\quad j\rightarrow\infty, (24) for more details and formal definitions see [ 42 ] . This is not surprising - if the value of the function value stays the same irrespective of the state 0 or 1 of the k -th qubit encoding a small lengthscale 1/2^{k}\ll\xi , this qubit carries no information, so there is no entanglement introduced with it. 3 3 3 The reverse is of course not true - if we interpret a random rank-1 MPS as a function f(\tilde{x}) , the function will generically possess (highly structured) variations on the smallest lengthscale 1/2^{N} even though entanglement of the quantum state is trivially equal to zero everywhere. Fig. 8 (middle row) shows the entanglement entropy at each bond for the four classical datasets. It is evident that in all cases there is an exponential decay of entanglement for the bonds with high indices. For the Gaussian, one expects \xi=2\sigma=0.2\sim 1/2^{2} [ 42 ] , and indeed we observe an exponential decay after the first two qubits. For the Lévy distribution, due to the power-law tail, there is no natural characteristic lengthscale; \xi=2^{30} becomes the size of the support on which we consider the original function Eq. ( 20 ). For bonds 30 to 50 we observe an exponential decay entropy towards numerical zero, demonstrating that discretization of \tilde{x} up to \Delta\tilde{x}=1/2^{50} (correspondingly, x to \Delta x=1/2^{20} ) captures the behavior of f(\tilde{x}) exactly. The Lorenz attractor timeseries, except the "jumps" between parts of the data for different axes x,y,z , can also be treated as a smooth function and seems to have the same boundary around the 11 -th bond. The S&P 500 stock prices are numbered by the first 9 qubits, and the bonds in this area show a relatively large entanglement, \mathcal{S}_{\text{vN}}\sim\mathcal{O}(1) . There is still a slow exponential decay of entanglement on the remaining 10 qubits encoding timesteps, suggesting that the temporal correlations present in the data allow for its efficient representation as MPS (the largest timescales of years are only weakly entangled with the smallest timescales - days). Finally, Fig. 8 (bottom row) shows the matrices of quantum mutual information I_{ij} between all pairs of qubits. We find that in the Gaussian distribution case, most correlations in the system are restricted to the first 3 - 4 qubits, and decay fast with distance. In the Lévy distribution case, there are two disconnected clusters of strongly entangled qubits with a "regular" structure and the QMI decreases with the distance between qubits. The Lorenz attractor has a dominating (by an order of magnitude) QMI between qubits 1 and 2 , which corresponds to the choice of the axis x,y,z,w - this is fully expected as the fourth, "fictitious" w axis, numbered by s_{1}s_{2}=11 , has zero probability amplitudes which are very different from the remaining three configurations s_{1}s_{2}=00,01,10 . This induces a strong correlation between qubits 1 and 2 - the quantum system must always satisfy s_{1}=0 whenever s_{2}=1 and vice versa. The remaining structure of QMI between different timescales is complex and the correlations spread in an all-to-all manner up to roughly 12 qubits, above which the QMI decays to much smaller values. This happens due to the smoothness of the Lorenz attractor trajectory on a timescale below \xi\approx 2^{29-12-2}\times\Delta t=2^{-5} . In the S&P 500 dataset, there are two clusters of entangled qubits in two approximately disconnected blocks of the matrix: qubits 1-9 , corresponding to the choice of the company, and qubits 10-19 , corresponding to the choice of the timestep. Clearly, the alphabetical initial ordering of the companies introduces a strong correlation between some pairs of qubits, visible as bright spots. 3.4 MPS qubits reordering The MPS qubit reordering algorithm described in Sec. 2.4 is expected to bring qubits with a large QMI close together so that their entanglement does not need to be mediated by the MPS bonds inbetween. We apply this method to all datasets from Fig. 8 . We find that in the Gaussian distribution case, since the QMI is concentrated only on the first 3-4 qubits, the original qubit arrangement is already optimal; no better solutions are found. The same is true for the Lévy distribution data, for which the two clusters with a regular and seemingly optimal structure in the QMI are already formed in the standard quantics representation. In the Lorenz attractor case there is a group of approximately 10 all-to-all entangled qubits with similar QMI, except for a special pair of strongly correlated qubits 1,2 , see discussion in Sec. 3.2 . The optimizer keeps this pair of qubits 1,2 as neighbors, and moves the other qubits within the cluster, so that the cost function drops from C=47.07 to C=45.25 , i.e. by less than 4\% . Qualitatively, the structure of the QMI matrix remains the same (plot not shown). This is again not a good use case of the reordering algorithm because of the initially large all-to-all entanglement within the cluster, because after any reordering the cluster remains all-to-all correlated. A successful application of the MPS qubit reordering algorithm is encountered for the S&P 500 dataset. Since the QMI matrix has more pronounced high QMI isolated off-diagonal "peaks", we expect the reordering procedure to bring these peaks closer to the diagonal. To statistically verify the effectiveness of our method, we consider random permutations of an initially alphabetically ordered 505 companies. One example of the QMI matrix resulting from a permutation of companies is presented in Fig. 9 a), together with the result of an application of the reordering method to this state in Fig. 9 b), with the allowed permutations restricted only to qubits 1-9 . This subset of permutations does not affect the ordering of qubits enumerating timesteps. Clearly, the algorithm simplifies the QMI matrix by moving the off-diagonal high-QMI peaks closer to the diagonal, yielding a 28\% decrease of the cost function ( 5 ). In Fig. 9 c) the initial and final cost function values are plotted for 500 random permutations of the companies. We identify an improvement in the cost function in almost all realizations, on average reaching 30\% . We also verify that the algorithm is indeed basing the solution of the problem on the permutation of the companies - if we allow to perform permutations on all qubits, "mixing" the company-enumerating and timestep-enumerating qubits, the average cost function improvement changes to 27\% . It is smaller than for reordering restricted to qubits 1-9 because the search space increases from 9! to 19! , making the optimization harder. The final effect of qubit reordering can be measured e.g. by comparing the maximal von Neumann entanglement entropy on the original and reordered MPS bonds, see Fig. 9 d). Indeed, for a majority of random realizations of the dataset (companies permutations), the maximal entanglement drops by a significant amount, in extreme cases even by 20\% . The above results suggest that the qubit reordering algorithm can have a measurable effect on the bond entanglement whenever the QMI matrix is characterized by a "peaked", off-diagonal structure. Figure 9: Qubit reordering problem solved as a QAP for the S&P500 dataset. a) QMI between qubits for random realization of reshuffling the company indices. Qubits 1-9 , labeling the companies, show long-range correlations (off-diagonal peaks, upper-left rectangle). b) After the optimization, the cost C decreases and the strongly correlated qubits are brought closer to each other. c) Optimized cost C vs. pre-optimization cost for 500 random company permutations. Improvement is observed in nearly all cases. Colors indicate either unrestricted qubit permutations or fixed qubits 9-18 (timestep labels). Inset: histograms of relative cost improvement. d) Optimized maximal (over all MPS bonds) entanglement entropy \mathcal{S}_{\text{vN}} vs. pre-optimization maximal \mathcal{S}_{\text{vN}} . In the majority of the cases, a decrease in the entanglement entropy is observed, even up to 20\% , as shown in the inset. 3.5 Evaluation: SMPD/BMPD only Figure 10: Infidelity as a function of number of disentangler layers (upper row), number of CNOT gates (middle row), and the CNOT circuit depth (bottom row) for different datasets (in columns). Black line represents the BMPD, while other lines represent the SMPD constructed upon left/right/mixed canonical form of the MPS (see Fig. 1 ), as well as decomposition of isometries into two CNOT gates and single qubit unitaries (dotted lines) or no decomposition (2-qubit unitaries, solid lines). Insets show the real part of probability amplitudes, corresponding to preparation circuits with the worst (red, not shown for the Lorenz attractor) and best (blue) infidelity from the large plot, juxtaposed with the target amplitudes (black dashed line). For the S&P 500 dataset, only the first 4 companies ( 4096 amplitudes) are shown. Crosses represent an independent infidelity calculation with \tilde{\chi}^{\prime}=256 after the circuit is fully constructed. For the S&P 500 dataset, we also plot the values of infidelity after applying the MPS qubit reordering as "transparent" curves, see Sec. 3.4 for details. We start from the analysis and comparison of the baseline SMPD and BMPD algorithm without any subsequent gate optimizations. Fig. 10 shows the results of our calculations. Following the discussion in Sec. 3.1 , we choose the intermediate bond dimensions \tilde{\chi} as noted in the figures. We use the enhancement from Fig. 4 b) and cease to create SMPD or BMPD 2-body unitary gates around bonds that are of rank 1 at a relative SVD cutoff \varepsilon_{\text{SVD}}=10^{-8} (Gaussian, Lévy) or \varepsilon_{\text{SVD}}=10^{-4} (Lorenz attractor, S&P 500), based on the expected final fidelities computed separately without this enhancement. The orthogonality center position for the mixed canonical gauge SMPD is always N/2 to minimize the circuit depth, with an exception of the Gaussian for which we found it optimal to be at site 2 , see discussion in Appendix E . For the BMPD algorithm, we minimize the \alpha -Rényi entropy with \alpha=2 using the L-BFGS-B optimizer with at most 1000 iterations. CNOT depth of the circuits is computed with qiskit v2.0.0 [ 87 ] . The presented probability amplitudes are real - for presentation we remove the global phase based on the probability amplitude largest in magnitude and take the real part of the result. Calculations are performed with the help of quimb [ 78 ] library. The upper row shows the state preparation infidelity \mathcal{I} as a function of the number of layers of SMPD/BMPD 4 4 4 Note that the same symbol L is used for the number of layers of the SMPD and BMPD, but a ”layer” in both cases differ by gate arrangements and depth. . It is clear that in all cases increasing the number of layers decreases the infidelity. In the Gaussian case, already a single SMPD (BMPD) layer gives a reasonably good approximation of the state with infidelity \mathcal{I}=10^{-3}(10^{-2}) , the latter shown as a red curve in the inset. We observe that the BMPD algorithm saturates at around \mathcal{I}=10^{-4} for L\gtrapprox 10 layers, whereas the SMPD algorithm converges to a perfectly prepared state with \mathcal{I}<10^{-7} for L=30 layers (blue curve in the inset). Convergence of the MPS simulation is checked independently by computing the infidelity with bond dimension \tilde{\chi}^{\prime}=64,128,256 (only \tilde{\chi}^{\prime}=256 shown) after the QSP circuit is fully constructed with an intermediate \tilde{\chi}=32 , see black crosses in Fig. 10 which match the \tilde{\chi}=32 values. It is also evident that one has to be careful when choosing the canonical form of the MPS for SMPD - changing from the left canonical form to the right or mixed canonical form for this dataset improves the final infidelity by 2 orders of magnitude. The imbalance is caused by the concentration of entanglement around the first 3 - 4 sites, see Fig. 8 , and the opposite order of gate application in the left/right SMPD. Finally, the (analytical) decomposition of the two-body isometric gates into the form presented in Fig. 4 a), i.e., with 2 CNOT gates instead of 3 CNOT gates, does not negatively affect the overall state preparation efficiency. In fact, for the Gaussian distribution we observe a slight improvement of infidelity after turning on this enhancement, at the same time saving on 33\% CNOT gate number. Middle and bottom rows show the infidelity as a function of the number of CNOTs n_{\text{CNOT}} and the CNOT circuit depth d_{\text{CNOT}} . The right canonical SMPD with decomposed gates prepares the state with the smallest n_{\text{CNOT}} at a given fidelity. The mixed canonical SMPD with decomposition reaches comparable infidelities for the same number of CNOTs, but has a slightly smaller CNOT depth. Moreover, due to the architecture, a few layers of BMPD can prepare the state with a much lower d_{\text{CNOT}} than even a single layer of SMPD, but SMPD becomes more effective when depth exceeds d_{\text{CNOT}}\gtrapprox 30 . For the Lévy distribution, our calculations show qualitatively similar trends. Here, the SMPD yields an order of magnitude better infidelity than BMPD for a comparable n_{\text{CNOT}} and d_{\text{CNOT}} . With SMPD we do not reach infidelities better than \mathcal{I}\approx 6\times 10^{-4} for L=30 layers. As shown in the inset, the areas of the \tilde{x} axis where the probability amplitude is lower than 10^{-7} , for \tilde{x}\lessapprox 10^{-9} are not reconstructed faithfully, but this is expected, as their absolute contribution to the fidelity is very small, \mathcal{O}(10^{-14}) . On the contrary, the heavy tail is correctly reconstructed. This time, the left, mixed, and right canonical forms of the MPS do not yield infidelities differing by more than \Delta\mathcal{I}=0.002 . The remaining two examples, due to a much richer entanglement structure, see Fig. 8 , required deeper circuits of L=300 layers to reach \mathcal{I}\approx 10^{-2} . This value lets us visually distinguish the features of the prepared and shown Lorenz attractor, as well as a faithfully reproduce the prices in time for the S&P 500 dataset, see insets for both. Importantly, we demonstrate that in both cases the infidelities slowly but steadily improve for L=300 layers, also for circuits with decomposed 1-to-2 qubit isometries. Unlike for the previous two simpler states, here the BMPD yields a slightly better preparation infidelity than any variant of SMPD for the same d_{\text{CNOT}} , except for the shallowest circuits which are not achievable with SMPDs, and comparable infidelities for the same n_{\text{CNOT}} . Note that we were able to prepare both of these states with \tilde{\chi}=128 , even though their corresponding bond dimensions are \chi=92 and \chi=512 , respectively. For the S&P 500 dataset, this introduces a minimal value of the infidelity of \mathcal{I}=6.8\times 10^{-5} , resulting from its truncation to the closest \chi=128 state. We checked that the final infidelity does not change when calculated with \tilde{\chi}^{\prime}=512 . Another important observation is that the improvements of infidelity after the application of the MPS qubit reordering are very minor, see the "transparent" curves for the S&P 500 dataset in Fig. 10 . We find this rather surprising, as the qubits with the strongest correlations become nearest neighbors. Nevertheless, these results do not exclude potential gains after applying the reordering procedure to different target states, such as the groundstates of chemical molecules in quantum chemistry, for which computational gains after reordering have been confirmed [ 57 , 56 ] . Differences of infidelity between the SMPD variants with decomposed and not decomposed gates for the same other settings suggest an interesting avenue for future research. Since the decomposition of the isometry is in fact an alternative way to complete the isometric matrix to a unitary matrix by adding orthogonal columns, one could investigate different such methods, potentially taking into account the effect on the next layer, and find the one best suited for the problem. 3.6 Evaluation: SMPD/BMPD with optimization In Sec. 3.5 we have described the performance of SMPD and BMPD as a state preparation method. Although we have shown that both methods yield reasonably good solutions under moderate classical numerical cost for each dataset, we either run into a problem of infidelity saturating with the number of layers due to the heurstic nature of both methods, or an exceedingly high and impractical gate counts/depths. In this section we improve on the QSP methods from Sec. 3.5 by extending them with the Evenbly-Vidal (EV) optimization, as well as with the Riemannian (R) optimization. Inspired by the results of [ 32 ] , we follow two strategies in combining the two methods into a state preparation pipeline. The first strategy is to simply create a L -layer disentangler SMPD/BMPD and then optimize the unitary gates with the EV or Riemannian optimizer (referred to as SMPD-EV, SMPD-R, BMPD-EV, BMPD-R accordingly). The second strategy [ 32 ] is to create a single layer of SMPD/BMPD, optimize all gates with EV or Riemannian optimizer, create another layer with SMPD/BMPD, optimize all gates, and so on (referred to as SMPD-EV-SMPD-EV, SMPD-R-SMPD-R, etc.). For an improved readability, the results for the SMPD and BMPD optimization are analyzed separately in Figs. 11 , 12 . Their performance with respect to n_{\text{CNOT}} and d_{\text{CNOT}} is compared in Fig. 13 , where they are shown together. For each benchmarked configuration, we assume a maximal computational budget of 24 hours on 4 to 6 AMD Epyc 7443 CPU cores and 24 GB DDR4 RAM memory, i.e. we terminate the calculation after the time or memory limit is reached. For the Riemannian Adam optimizer we choose an initial learning rate lr=10^{-4} and perform n_{\text{iter,R}}=10^{4} iterations for the SMPD-R/BMPD-R case and n_{\text{iter,R}}=10^{3} iterations at each of L steps of the SMPD-R-SMPD-R/BMPD-R-BMPD-R case. In the EV optimization, we use the learning rate of \beta=0.6 , n_{\text{swp,EV}}=10^{2} sweeps for the SMPD-EV-SMPD-EV/BMPD-EV-BMPD-EV case and n_{\text{swp,EV}}=10^{3} sweeps for the SMPD-EV/BMPD-EV case. Before the EV/R optimization, we identify pairs of neighboring single-body and two-body gates on the same qubits, whose action can be absorbed into a single- or two-qubit gate. This applies whenever there are no other gates between them acting on the same qubits and can be understood as a simple and deterministic transpilation step that removes redundant operations without changing the final state produced by the circuit. In this way, we improve the performance of the EV/R optimizers by reducing the number of variational parameters, including the linearly dependent ones. 3.6.1 SMPD Figure 11: State preparation infidelity of SMPD circuits combined with Evenbly-Vidal or Riemannian optimization. Black crosses represent \tilde{\chi}^{\prime}=256 verification after circuit construction. Intermediate values between layers show infidelities at each optimization step (orange, red), or join neighboring points by a straight line for visibility (gray, blue, green). Isometry decomposition (dotted lines) gives a number of CNOT and CNOT depth benefit for shallow circuits, depending on the dataset. Fig. 11 shows the results of the SMPD circuits optimization. We have selected the mixed canonical gauge SMPDs from Fig. 10 to minimize the total depth of the circuit without sacrificing too much fidelity, both with and without isometry decomposition (gray lines). For optimization, the gates are kept as 2-qubit 4\times 4 unitary matrices in the standard case 5 5 5 If a certain bond has already been disentangled by the SMPD to a sufficient level, the gate in SMPD becomes a single-body unitary; it is also treated as variational gate. , and as a set of single-qubit 2\times 2 variational unitaries sandwiched between fixed CNOTs in the decomposed case. Note that this means a smaller number of free parameters per gate ( 4 vs 16 complex numbers) but roughly six times more variational gates in the decomposed case. Rotation gates such as R_{x} , R_{z} are "upgraded" to general unitaries. Between layers L , L+1 we plot the trajectory of the infidelity in the optimizations (SMPD-R-SMPD-R, SMPD-EV-SMPD-EV, etc.), or join the infidelity points by a straight line (SMPD-R, SMPD-EV). Figure 12: State preparation infidelity for the BMPD method (gray, baseline) combined with the EV/R optimization methods. Convergence is verified by computing infidelities with a higher bond dimension \tilde{\chi}=256 . Clearly, applying any optimization method leads to orders-of-magnitude decrease of infidelities in all cases. The BMPD-EV and BMPD-EV-BMPD-EV methods give the best infidelity for a given number of BMPD layers. In the top row of Fig. 11 we present the state preparation infidelity as a function of the number of layers. We ensure convergence with the bond dimension \tilde{\chi} - all final infidelities computed with an intermediate bond dimension \tilde{\chi}=32 or \tilde{\chi}=128 match with a later verification of the same circuits for \tilde{\chi}^{\prime}=256 (black crosses). Note that Riemannian optimization is not affected by this setting since the tensor network is contracted exactly. For all optimization configurations we observe an abrupt drop of infidelity starting from L=1 when compared to the baseline. However, there are orders-of-magnitude differences between methods depending on the dataset. In all cases, the SMPD-EV and SMPD-EV-SMPD-EV methods seem to be the most efficient. Moreover, using the decomposition is favorable only for the shallowest circuits of a few layers, with the number depending on the dataset, when the advantage of a roughly 33% CNOT count and depth outweighs potential problems with optimization of more single-qubit 2\times 2 unitaries instead of less two-qubit 4\times 4 unitaries. Due to the global nature of the Riemannian optimizer, updating all unitary gates at once, we expected it to outperform the EV optimization sweeping over individual gates [ 46 , 88 , 33 ] . At least for the four considered datasets we conclude that the EV sweeping optimization is generally more performant in terms of state preparation fidelity. The EV method is also more scalable because it keeps the circuit state in the MPS form throughout the calculation, so that we can reach up to L=200 optimized layers in the Lorenz attractor and the S&P 500 case (note, however, that no strict bounds on \tilde{\chi} can be given in general). Since the Riemannian optimizer deals with exact contractions of tensor networks with unitary gates as elements, we cannot go beyond L\approx\mathcal{O}(10-15) layers for the considered system sizes, because the sizes of intermediate tensors exceed our memory limitation of 24 GB and grow exponentially with the number of layers. We do not exclude that using higher-order optimizers for the Riemannian method, instead of Riemannian Adam, could lead to improvement in convergence, because Hessian could capture more information on the interactions between elements in different unitary matrices, see e.g. Ref. [ 88 ] for L-BFGS on Riemannian manifolds in the groundstate search context. Moreover, to deal with deep circuits and the Riemannian optimization, one could use a divide-and-conquer approach: optimize only \mathcal{O}(10-15) layers at once, and keep the intermediate states to the right and to the left of these gates in the MPS form. We leave tests of this variation of the method to future works. We notice problems with optimization in the Lévy distribution SMPD-EV-SMPD-EV case. After L=10 layers are reached, the infidelity "jumps" down after adding a new layer of SMPD, but increases back during the EV optimization. Decreasing the learning rate \beta of the EV optimizer does not resolve the issue. We find that this behavior is caused by a too small intermediate bond dimension \tilde{\chi}=32 . Even though the final infidelity computed with \tilde{\chi}^{\prime}=256 matches with the \tilde{\chi}=32 , so the result can be regarded as converged, the optimizer needed a larger intermediate \tilde{\chi} to explore a larger space on the way to solution. When computed with a higher \tilde{\chi}=128 , the "jumps" are much smaller and start to appear later, around L=18 . This leaves us with a useful additional diagnostic to determine what size of \tilde{\chi} is required. We observe a similar "spiking" behavior (but of different origin) in the SMPD-R-SMPD-R case for the Gaussian distribution with an initial learning rate of lr=10^{-4} . After setting lr=10^{-5} (shown in the plot), the "spikes" in infidelity disappear and the solution converges to a better final infidelity. For the Lorenz attractor and S&P 500 dataset, represented by highly entangled states, we observe that all optimization methods perform comparably well, approximately forming a universal curve in the \mathcal{I}(L) plot. This would suggest that for such states one is left with a choice between the smallest computational cost, in this case SMPD-EV, and the best infidelity for the same number of CNOTs and CNOT depth, here SMPD-EV supplemented with isometry decompositions. 3.6.2 BMPD Figure 13: Comparison of infidelities obtained with the BMPD (light colors) and SMPD (regular colors) circuits supplemented with EV and Riemannian optimization methods. If the CNOT gate count is a priority, typically the SMPD-EV and SMPD-EV-SMPD-EV methods are a good choice. To minimize the CNOT depth, one should resort to BMPD-EV and BMPD-EV-BMPD-EV methods, especially for the shallowest circuits made of a few disentangler layers. Analogously to the above SMPD case, we perform a study of the combination of BMPD with EV/R optimization techniques. Results are presented in Fig. 12 . Again, the results for the Riemannian optimizers cannot be obtained for more than L\approx\mathcal{O}(10) layers due to an increasing size of intermediate tensors in the tensor network contraction. The infidelities converge with the bond dimension \tilde{\chi} , as we confirm by computing them with \tilde{\chi}^{\prime}=256 for the circuits obtained with \tilde{\chi} . In general, in Fig. 12 we observe orders-of-magnitude better state preparation infidelities than with the bare BMPD method. Each gate in the heuristic BMPD circuit is constructed in such a way that it disentangles a single bond. When further optimization is applied, an update for a single gate results from its interplay also with other gates and bonds. Thus, by "cooperation" between gates, one can find the global solution with much less layers and to a higher fidelity. Nevertheless, our understanding is that a heuristic initialization with BMPD is indispensable, as it sets up an initial point not only in terms of a non-vanishing initial fidelity, giving non-zero gradients of the gate parameters at the initial stages of optimization, but also in terms of a "regular" layer-by-layer path to the solution through intermediate states with a smoothly decreasing entanglement, see e.g. [ 35 ] (Fig. 3), which is refined by the optimizer. We find that for a small number of layers, L<5 , the best two methods are BMPD-EV and BMPD-R, whose infidelity curves are barely distinguishable. The benefit of interleaved BMPD-EV-BMPD-EV starts to appear later, with this method overtaking BMPD-EV for the deepest circuits, although maximally by one order of magnitude of infidelity \mathcal{I} . Given a larger numerical cost of BMPD-EV-BMPD-EV, the default choice for the state preparation would be BMPD-EV. 3.6.3 Comparison Practical conclusions can be drawn from a comparison of the SMPD and BMPD supplemented with optimizers in terms of infidelities reached for the same CNOT count or CNOT depth, see Fig. 13 . We do not compare the performance for the same number of layers, as the SMPD and BMPD have different circuit architectures. We notice that the SMPD method almost always outperforms BMPD in terms of the CNOT count required to reach the same infidelity across all infidelity ranges (upper row). On the other hand, the BMPD circuits are advantageous whenever the CNOT depth of the circuit is a priority (bottom row). This occurs because the depth of SMPD is \approx\mathcal{O}(N/2+L) , and for small L\ll N and N\gg 1 it becomes larger than \approx\mathcal{O}(2L) for BMPD. This suggests that for each practical realization with noisy circuits, the tradeoff between the circuit depth and gate count has to be taken into account on a case-by-case basis. 4 Conclusions This work introduces an MPS-based pipeline for quantum state preparation (Fig. 1 ). The pipeline combines sequential and brick-wall disentangler circuits to generate an approximate initial state, which is subsequently refined using variational Evenbly–Vidal and Riemannian optimization techniques. In addition, we incorporate technical improvements aimed at reducing CNOT gate counts and circuit depth within a unified framework. A systematic study on systems of N=19 – 50 qubits demonstrates how the optimal choice of methods depends on the entanglement structure of the dataset and on the targeted performance metric, such as infidelity, gate count, or circuit depth. Starting from the bare SMPD/BMPD algorithms, we find that for simple states (Gaussian and Lévy distributions) the SMPD method outperforms BMPD in all aspects (CNOT depth and count for a given infidelity) except for the CNOT depth in the shallowest circuits. For more complex states (Lorenz attractor, S&P 500) we need L=300 layers to achieve fidelities close to \mathcal{F}=0.99 . In this case, BMPD gives circuits with a consistently smaller depth. We also identify a strong interplay between the entanglement structure and the MPS left/right/mixed canonical form chosen to construct the SMPD. A clever choice of the gauge for the specific state can lead to 2 orders of magnitude improvement of infidelity \mathcal{I} , as we observe for the Gaussian distribution. 1-to-2 qubit isometry decomposition does not spoil the performance of SMPD while decreasing the CNOT count and depth by 33%. We prepare the four states with infidelities ranging from \mathcal{I}=10^{-7} to \mathcal{I}=10^{-2} , but we also identify either large circuit depth requirement, or a saturation/slow convergence of the heuristic SMPD/BMPD methods with an increasing number of layers. Therefore, variational optimizers are employed to push for more efficient circuits. As expected, the use of EV/R optimizers on precomputed SMPD/BMPD circuit Ansätze leads to a significantly faster convergence of infidelity with the number of layers. Quite surprisingly, the EV sweeping optimization approach seems to outperform the global Riemannian optimizer in terms of the final infidelity for the same number of BMPD and SMPD layers. Due to the MPS form retained throughout the EV optimization, one can also optimize deep circuits (we demonstrate L=200 layers of SMPD with n_{\text{CNOT}}\sim\mathcal{O}(2\times 10^{3}) , d_{\text{CNOT}}\sim\mathcal{O}(10^{3}) for N=29 qubits for the Lorenz attractor), whereas the Riemannian optimization is restricted to relatively shallow circuits ( n_{\text{CNOT}}\sim\mathcal{O}(5\times 10^{2}) , d_{\text{CNOT}}\sim\mathcal{O}(10^{2}) , or L\sim\mathcal{O}(10-15) layers), which is caused by exponentially growing sizes of intermediate tensors in the tensor network contractions. Variational gate optimization can be combined with isometry decompositions saving 33% CNOTs, yielding better solutions especially for the shallowest circuits. However, for L\gg 1 layers, it negatively affects the optimization for simple target states. Finally, we identify the globally most performant combination of the presented methods across our datasets. We find that the SMPD-EV and SMPD-EV-SMPD-EV, potentially supplemented with isometry decompositons, are the optimal choices if the minimal CNOT gate count is a priority. For a minimal CNOT depth, one should rather resort to the BMPD-EV or BMPD-EV-BMPD-EV methods. We also provide an independent analysis of the SMPD classical simulability. Our results suggest that the minimal bond dimension \tilde{\chi} sufficient to construct L SMPD layers is on the order of the target MPS bond dimension, \tilde{\chi}\sim\mathcal{O}(\chi) , in contrast to the exponential complexity \tilde{\chi}\sim\mathcal{O}(2^{L}) postulated in Ref. [ 29 ] . The pipeline also incorporates an entanglement-based qubit reordering scheme. Our contribution here is a mapping of this task into an instance of the quadratic assignment problem. We find that the qubit reordering algorithm has a rather limited applicability for the first three benchmarked states. While the Gaussian and Lévy distribution MPSs already have their qubits arranged in the optimal order, the Lorenz attractor dataset shows significant and uniform all-to-all entanglement among a group of 12 neighboring qubits, which does not allow us to decrease bond entanglement. The stock market companies from the S&P 500 dataset, which give a "peaked" structure in the QMI matrix of the MPS, leads to a successful decrease of the maximal bond entanglement by up to 20%. However, we do not observe any significant improvements in state preparation, but expect them for other classes of target states such as groundstates of molecules [ 57 , 56 ] . Let us briefly identify possible extensions of our work. The described QSP algorithms for MPS can be readily used for pretraining variational quantum circuits with classical computers [ 89 ] , which is also intimately related to approximate quantum compilation from [ 37 ] . As already mentioned in Sec. 3.6 , the Riemannian optimization could potentially benefit from a second-order optimizer such as L-BFGS-B [ 88 , 90 ] . Moreover, we believe it would be an interesting path of future research to include noise into the optimization pipeline which could potentially lead to better fidelities of real hardware realizations.