Abstract
Universal compilation is a training process that compiles a trainable unitary into a target unitary. It has vast potential applications from depth-circuit compressing to device benchmarking and quantum error mitigation. Here we propose a universal compilation algorithm for quantum state tomography in low-depth quantum circuits. We apply the Fubini-Study distance as a trainable cost function and employ various gradient-based optimizations. We evaluate the performance of various trainable unitary topologies and the trainability of different optimizers for getting high efficiency and reveal the crucial role of the circuit depth in robust fidelity. The results are comparable with the shadow tomography method, a similar fashion in the field. Our work expresses the adequate capability of the universal compilation algorithm to maximize the efficiency in the quantum state tomography. Further, it promises applications in quantum metrology and sensing and is applicable in the near-term quantum computers for various quantum computing tasks.
Similar content being viewed by others
Introduction
Quantum computers promise an excellent computational capacity that is intractable for classical computers to solve challenging problems, including materials science1,2,3, information science4,5, computer science6,7, mathematical science8,9,10, and others. However, there are two major challenges to bringing quantum computers to materialize2: (1) it is difficult to access full information from entangled systems because of the state collapse upon measurements, and (2) it is difficult to build, control, and measure quantum states with arbitrarily high accuracy. In this regard, even though the current state-of-the-art quantum computers rely on the noisy intermediate-scale (NISQ devices,) which usually prevent high efficiency11, various hybrid quantum-classical algorithms were proposed and actively studied recently12, and that could be promising for quantum speedup in the regime of NISQ devices. Massive applications including variational quantum eigensolvers13,14,15,16,17, quantum approximate optimization algorithms18, new frontiers in quantum foundations19,20,21,22, and others, were reported.
Beyond the actively studied VQAs, the universal compilation has drawn tremendous interest recently. Its core idea relies on a training process to transform a trainable unitary into a target unitary23,24. It was demonstrated in different applications from gate optimization23, to quantum-assisted compiling process24, continuous-variable quantum learning25, and robust quantum compilation26. The future of universal quantum compiling could be circuits depth-compression, black-box compiling, error mitigation, gate-fidelity benchmarking, and efficient gate synthesis.
In another aspect, quantum state tomography (QST) is a measurement process performed on numerous identical copies of a system to extract its stateâs information27. In general, for a given unknown quantum state \(|\psi \rangle \) in a complex Hilbert space of d-dimension, it requires an exponentially growing \(2^d-1\) measurements on different bases to completely reproduce the state, which is intractable for large systems. Numerous methods were proposed for improving the standard QST in terms of efficiency28,29,30,31, methodology32,33,34,35,36,37,38, quantum dynamic39,40,41, and so on. Recently, the quantum circuits-based QST has attracted significant attention owing to the incredible advantages of the quantum device42,43,44, which allows to efficiently prepare quantum states with high confidence, fully control the Hamiltonian for the state evolution, and directly access the measurement results. A variational approach45 and single-shot measurements46,47 to name a few, were investigated.
Despite recent achievements on the QST, it is still challenging to implement in the NISQ devices. In this work, we introduce a promising application of the universal compilation on the QST. Our main idea is to use a trainable unitary acting upon a known fiducial state to reconstruct an unknown state, which is created by using a Haar random target unitary acting upon the fiducial state. The advantage of this method is that it requires low-depth trainable unitaries and few measurements to realize the target state, which significantly reduces the complexity and allows for tractability of large systems. Furthermore, the flexibility of the trainable unitaries is more elevated than that of the target unitaries, resulting in a better fault-tolerant capacity and thus allowing high efficiency for the trainable quantum circuits.
Concretely, we first introduce the general framework of the universal compilation-based quantum state tomography (UC-QST) We also introduce several gradient-based optimizers, including the standard gradient descent (SGD), the Adam, and the quantum natural gradient descent (QNG). We discuss the numerical experiment results for a representative case of single-qubit tomography, and then evaluate the reconstructing efficiency of unknown Haar random states via various popular circuit ansatzes. We find that the circuit depth plays a crucial role in the robust fidelity, i.e., by choosing a proper circuit depth via the number of layers in the quantum circuit, we get high fidelity at any qubit numbers. We finally compare the results with the shadow tomography method48,49, a similar fashion in the field.
The study reveals that the accuracy mainly relies on (1) the ansatz topologies with the optimal circuit depth and (2) the significant impact of different optimizers. Our study can further promise applications in quantum metrology and sensing, and new frontier foundation aspects. Moreover, it is possible to implement the algorithm on near-term quantum computers, and thus it could be a valuable technique for verifying the fidelity of quantum circuits and studying various quantum computing tasks. These are also benefits that overcome the standard QST, which requires the set-up of traditional experiments, consumes heavy post-processing calculations to reproduce the quantum state, and the accuracy depends on the estimators, such as the Maximum-Likelihood and Least-Squares27.
Results
We introduce a universal compilation scheme23,24,25,26 to translate a given state into another one and apply it to quantum state tomography.
Universal compilation-based quantum state tomography (UC-QST)
A universal compilation scheme consists of a quantum part and a classical part, as shown in Fig. 1a. The quantum part is a circuit with parameterizable ansatzes. Let \(\varvec{U}\) is a fixed target unitary and \(\varvec{V}^\dagger (\varvec{\theta })\) is a trainable unitary ansatz (sets of quantum gates with some parameters \(\varvec{\theta }\)) that act sequentially onto the circuit and transform an initial state \(|\psi _0\rangle \) into a final state \(|\psi _f\rangle \) as
The transition probability yields
Our task is to maximize the transition probability \(p_{\mathrm{max}}(\psi _0\rightarrow \psi _f)\), such that a state \(|\psi \rangle \equiv \varvec{U}|\psi _0\rangle \) is compiled to \(|\phi (\varvec{\theta })\rangle \equiv \varvec{V}(\varvec{\theta })|\psi _0\rangle \). The maximization of the transition probability, i.e., \(p(\psi _0\rightarrow \psi _f) = 1\), implies \(|\psi \rangle = |\phi (\varvec{\theta })\rangle \), which can be applied to the QST as we will describe below.
Concretely for the QST, let \(|\psi _0\rangle \equiv |\varvec{0}\rangle = |0\rangle ^{\otimes N}\), where N is the number of qubits, we transform it into a random (unknown) quantum state \(|\psi \rangle = \varvec{U}|\varvec{0}\rangle ,\) via a Haar random unitary \(\varvec{U}\)50. To reconstruct this state, we apply a trainable unitary evolution \(\varvec{V}^\dagger (\varvec{\theta })\) that can learn the role of \(\varvec{U}\), i.e., a reconstructed state \(|\phi (\varvec{\theta })\rangle = \varvec{V}(\varvec{\theta })|\varvec{0}\rangle \) resembles to the unknown state \(|\psi \rangle \), where \(\varvec{\theta }= \{\theta _1, \theta _2,\ldots , \theta _M\}\) can be adaptively updated during a training process, M is the number of trainable parameters. There is no free lunch for the choice of \(\varvec{V}^\dagger (\varvec{\theta })\)25. However, it can break out into a sequence of single-qubit and multi-qubit gates as
as shown in Fig. 1b, wherein \(\mathcal {W}_l\) includes the chain, alternating, and all-to-all structures51 as shown in Fig. 1c. We emphasize that the entangled gates \(\mathcal {W}\) consist of two-qubit controlled y-rotation gates, which differs from previous works51. We refer to these gates as parameter-dependent entanglement gate. They are useful for preparing variational states metrology21 and rapid entangled circuits52, for testing of the expressibility and entangling capability53, and so on.
To qualify how closed the two states are, we consider the Fubini-Study distance as54
where \(p_0(\varvec{\theta }) = |\langle \phi (\varvec{\theta })|\psi \rangle |^2 = |\langle \varvec{0}|\varvec{V}^\dagger (\varvec{\theta }) \varvec{U}|\varvec{0}\rangle |^2\) is the probability for getting the outcome \(|\varvec{0}\rangle \). In the quantum circuit, we apply a sequence of \(\varvec{U}\) followed by \(\varvec{V}^\dagger (\varvec{\theta })\) onto the initial state \(|\varvec{0}\rangle \) to get the final state \(\varvec{V}^\dagger (\varvec{\theta }) \varvec{U} |\varvec{0}\rangle \) and then measure a projective operator \(\varvec{P}_0 = |\varvec{0}\rangle \langle \varvec{0}|\), which yields the probability \(p_0(\varvec{\theta })\).
The variational (reconstructed) state becomes the target (unknown) state if the distance reaches zero. In the classical part, we thus use the Fubini-Study distance as a cost function that needs to minimize, i.e., \(\mathcal {C(\varvec{\theta }}) = d(\psi ,\phi (\varvec{\theta }))\), such that
By training the variational circuit until it converges, we obtain the optimal \(\varvec{\theta }^*\) and the reconstructed state yields \(|\phi (\varvec{\theta }^*)\rangle = \varvec{V}(\varvec{\theta }^*)|\varvec{0}\rangle \). This is a normalized pure state because \(\varvec{V}(\varvec{\theta }^*)\) is a unitary ansatz, i.e., \(\varvec{V}^\dagger (\varvec{\theta }^*)\varvec{V}(\varvec{\theta }^*)=\varvec{I}\).
For the training process, we apply gradient-based optimizations to iteratively update the parameters \(\varvec{\theta }\) and minimize the cost function. We first compute the derivative \(\partial _{\theta _j}\mathcal {C}(\varvec{\theta })\) for all \(\theta _j\in \varvec{\theta }\) and then compute new parameters via various appropriate optimizers, including the Standard gradient descent (SGD), Adam gradient descent55, and Quantum natural gradient (QNG)56. See âMethodsâ section for details.
Numerical results
Single-qubit QST
We first consider reconstructing an abstract single-qubit state encodes in a quantum circuit as shown in the inset Fig. 2. We randomly generate an unknown quantum state \(|\psi \rangle = \varvec{U}_3|0\rangle \), where
where we set random with Haar measure \(\sin (\theta )/2\), \(\phi \), and \(\lambda \). To reconstruct \(|\psi \rangle \), we set the unitary \(\varvec{V}^\dagger (\varvec{\theta }) = R_z(\theta _3)R_x(\theta _2)R_z(\theta _1)\). Indeed, a single-qubit rotation is \(R_j(\theta ) = \exp (-i\frac{\theta }{2}\varvec{\sigma }_j), \ j\in \{x, y, z\},\) and \(\varvec{\sigma }_j\) is a Pauli matrix applied on the qubit. We train the scheme with 100 iterations using various optimizers and show the cost function versus iteration in the main (Fig. 2). Here, the QNG optimizer gives the best optimization. In the inset figure, we show the trajectory in the Bloch sphere of the reconstructed state \(|\phi (\varvec{\theta })\rangle \) under the updated of \(\varvec{\theta }\) for two cases of SGD and QNG optimizers. The former needs around 60 iterations for the reconstructed state to reach the true state, while the latter only requires around 6 iterations to reach the same accuracy.
Haar random state QST
Now, we focus on a general random Haar state i.e., \(|\psi \rangle = \varvec{U}_\mathrm{Haar}|\varvec{0}\rangle \), as shown in Fig. 1b. To reconstruct the state, we use several ansatzes for the entangled gate \(\mathcal {W}\) in \(\varvec{V}^\dagger (\varvec{\theta })\), including the \(\mathcal {W}_\mathrm{chain}, \mathcal {W}_\mathrm{alternating}\), and \(\mathcal {W}_\mathrm{all-to-all}\) structures. Refer Fig. 1c for the detailes of these structures, where we used the parameter-dependent controlled y-rotation gates to construct them. The circuitâs depth for these structures are \((N+3)L, 4L,\) and \((N+2)L\), respectively. The trainable parameters are \(M = 4NL, \lfloor NL/2 \rfloor + 3NL\), and \(N(N+5)L/2\), respectively, which are grown linearly with N. This is suitable for NISQ devices even for the large number of qubits.
The results are shown in Fig. 3. Let us consider the fidelity between the true Haar state and the reconstructed state as
which is the overlap between these two states. In Fig. 3aâc, we show the fidelities for different structures of \(\mathcal {W}\). For each case, we fix \(L = 2\) and examine the three optimizers SGD (blue circle), Adam (yellow square), and QNG (green triangle). We first observe that the SGD optimizer is not good for all \(\mathcal {W}\) structures and needs to choose an appropriate learning rate. The fidelities reduce with the increasing N and nearly vanish at \(N = 6\). In contrast, the Adam optimizer exhibit high fidelities up to \(N = 4\) for \(\mathcal {W}_\mathrm{chain}\) (a), \(N = 5\) for \(\mathcal {W}_\mathrm{all-to-all}\) (c), and gradually reduces from \(N = 2\) for \(\mathcal {W}_\mathrm{alternating}\) (b). Even though it is not stable near the optimal point, the Adam is remarkable for achieving high accuracy in the QST. Furthermore, the QNG optimizer also allows for getting such high accuracy up to \(N = 4\) for \(\mathcal {W}_\mathrm{chain}\) (a) and even better than the Adam for \(\mathcal {W}_\mathrm{alternating}\) (b), while it gradually reduces for \(\mathcal {W}_\mathrm{all-to-all}\) (c). This observation can be explained by these own structures: the \(\mathcal {W}_\mathrm{all-to-all}\) contains the most number of parameters via the controlled y-rotation gates compared to the others, which results in the low accuracy. It is apparent that the QNG optimizer is sensitive to the controlled y-rotation gates, where the more controlled y-rotation gates, the less efficient QNG optimizer.
Next, to achieve high accuracy for any qubit numbers N, we increase the number of layers L, while paying attention to the barren plateau57,58,59,60,61, i.e., the accuracy of the training process reduces when increasing the parameters space. Figure 3dâf plot the fidelities versus N, where for each N, the corresponding L is shown in the colored parenthesis (blue star, yellow dagger, green double dagger), for the SGD, Adam, and QNG, respectively. The number of layers shown in the parenthesis is the smallest (optimal) L required for achieving such high accuracy before it goes down due to the barren plateau. As can be seen from the figure, the Adam method allows for reaching the maximum fidelity (results are shown up to \(N = 5\) for all \(\mathcal {W}\) structures) with a suitable L as shown in the middle position of the parenthesis. Similarly, we can reach high accuracy with the QNG optimizer up to \(N = 4\) when choosing an appropriate L as shown in the last position of the parenthesis. For the SGD, it is intractable for achieving high accuracy, such as for \(\mathcal {W}_\mathrm{alternating}\). Even though the relation between N and the required L is not clear, interestingly, we can see from the results up to \(N = 5\), the required L is also around 5 (more L is redundancy or may reduce the accuracy due to the barren plateau, see details in âMethodsâ section).
We only simulate up to \(N = 5\). However, for larger N, the scheme still works well. Evidently, in Fig. 3dâf, we enhance high fidelity with an appropriate optimizer for every N up to 5. Following the procedure in âMethodsâ section, we can entirely expand to a larger N while still maintaining high fidelity.
Compare to the shadow tomography protocol
Finally, we address the merit of our UC-QST approach and the shadow tomography protocol48,49, a recent promising method in this regime. A shadow tomography protocol is given as follows49: (1) initially prepare a random unknown quantum state \(\rho \), and the task ahead is to predict a target function underlying the state from its shadow, (2) randomly pick up a unitary \(\varvec{U}_k\) in a T-tuple \(\mathcal {U}\), i.e., \(\mathcal {U} = \{\varvec{U}_1, \varvec{U}_2, \ldots , \varvec{U}_T\}\) then apply it to the initial state to transform \(\rho \mapsto \varvec{U} \rho \varvec{U}^\dagger \), (3) measure the evolved state in the computational basis \(|b\rangle = \{|0\rangle , |1\rangle \}^N\). Steps (2) and (3) are repeated for a certain number of measurements. For each measurement, we get a random classical snapshot
We then define an invertible channel matrix
where \(\mathbb {E}_k\) is the average over \(\varvec{U}_k\), with a corresponding pick-up probability. Let \(\mathcal {M}^{-1}\) exists, and let \(p_k\) is the probability of picking up a unitary \(\varvec{U}_k\), then we can reconstruct a (non-normalized) state as
which is the classical shadow of the original unknown state \(\rho \). For the transformation \(\varvec{U}\) belongs to a family of the global Clifford gates, i.e., \(\varvec{U}\in \mathcal {U}_{C} = \{ \mathrm{CNOT, Hadamard, S\_gate, T\_gate}\}\), refer to Random Clifford measurements, the reconstructed state explicitly yields49
For the transformation \(\varvec{U}\) belongs to the random Pauli gates, such as \(\varvec{U} \in \mathcal {U}_P = \{\varvec{\sigma }_x, \varvec{\sigma }_y, \varvec{\sigma }_z, \ldots \}\), refer to Random Pauli measurements, it straightforwardly yields49
for \(b = (b_1, \ldots , b_N) \in \{0,1\}^N\).
For comparing the shadow tomography with the UC-QST scheme, we apply the Random Pauli measurements and consider the prediction of a linear function as a figure of merit for the accuracy. A global observable \(\mathcal {\varvec{Z}} \equiv \varvec{\sigma }_z^{\otimes N}\), gives the predicted (linear) expectation value as
The fluctuation (distribution around the true expectation value) of the predicted expectation value is given by the variance Var\([\check{z}]\) as
In Fig. 4a, we show the variance Var\([\check{z}]\) as a function of the number of measurements for the shadow tomography. The variance slightly decreases when increasing the number of measurements from \(10^2\) to \(10^5\). See the inset figure for the detailed zoom-in. The result is compared with the standard quantum limit (SQL), i.e., SQL = 1/ #measurement, and the Heisenberg limit (HL), i.e., HL = 1/ (#measurement)\(^2\). Here, the variance does not beat the SQL nor HL.
In Fig. 4b, we compare the variances obtained from the shadow tomography and the UC-QST for the different number of qubits N. For the shadow tomography, we fix #measurement \(= 10^5\). For the UC-QST, we consider the \(\mathcal {W}_\mathrm{chain}\) structure with the Adam optimizer as an example. The number of shots is fixed at \(10^4\). It can be seen that the UC-QST offers a better result over 100 times than the resulting shadow tomography.
Discussion
We discuss some features of the UC-QST and shadow tomography in the previous section. The shadow tomography only allows predicting target functions, such as expectation values, entanglement entropies, correlation functions, and so on49, while maintaining the precision. Whereas the UC-QST allows for reconstructing the entire quantum state up to a phase shift. Both schemes allow for predicting properties of quantum states or quantum states with fewer measurements compared to standard quantum tomography. Another remarkable feature is that the efficiency of the shadow tomography protocol depends on the random choice of the unitaries in an ensemble \(\mathcal {U}\), while the efficiency of the UC-QST scheme relies on the choice of different ansatzes and optimizes. Finally, we emphasize that the comparison in this section only provides a very first glance about the two approaches. We need to further characterize these features in future works for more concrete evaluation.
Furthermore, the idea of UC-QST resembles the self-guided quantum tomography (SGQT)62 and single-shot measurement (SSM)46,47. These previous approaches also iteratively search the estimated state to converge to the true state. However, the trainable unitary topologies and optimization algorithms are different. The SGQT uses a simultaneous perturbation stochastic approximation63 to optimize the cost function, while the SSM trains a learning unitary to be a fiducial (known) state that converges to the true state. Here, we apply the universal compilation technique to train a learning unitary to be the target unitary.
Finally, we emphasize that the current method is suitable only for pure-state tomography and not for general mixed-state tomography.
Methods
Training process
The training process is a hybrid protocol as illustrated in Fig. 1a: a set of unitary gates \(\varvec{U}\) followed by \(\varvec{V}^\dagger \) are applied onto the circuit and the final state is measured afterwards. The results are sent to the classical counterpart to compute the corresponding cost function and then update new parameters \(\varvec{\theta }\) using a suitable optimizer protocol until it reaches convergence.
We use gradient-based optimizations to iteratively update the parameters \(\varvec{\theta }\) and minimize the cost function. To do that, we need to calculate the derivative \(\partial \mathcal {C}(\varvec{\theta })/ \partial \theta _{j}\) w.r.t \(\theta _j\) in the jth gate for every \(\theta _j\in \varvec{\theta }\). We compute two cases as follows. First, if the jth gate is a single-qubit rotation gate, i.e., \(\exp (-i\theta _j\varvec{\sigma }_k/2), k \in \{x,y,z\}\), then using the standard (two-term) parameter-shift rule64,65, we have
where s denotes an arbitrary shift, and \(\varvec{e}_j\) is the jth unit vector, or in other words, we only add s to \(\theta _j\). Second, if the jth gate is a controlled rotation gate, i.e., \(CR_y(\theta _j)\), then using the four-term parameter-shift rule66, we partially compute
where \(d_\pm = (\sqrt{2}\pm 1)/4\sqrt{2};\ a= \pi /2;\ b = 3\pi /2\). Then, we get \(\frac{\partial \mathcal {C}(\varvec{\theta })}{ \partial \theta _j} = -\frac{1}{2\mathcal {C}(\varvec{\theta })} \frac{\partial p_{0}(\varvec{\theta })}{\partial \theta _j}\).
To compute new parameters, we use several optimizers in all experiments: Standard gradient descent (SGD), Adam gradient descent55, and Quantum natural gradient (QNG)56.
The formula for SGD reads
where \(\nabla _{\varvec{\theta }} \mathcal {C}(\varvec{\theta }) = \big ( \partial _{\theta _1}\mathcal {C}(\varvec{\theta }), \partial _{\theta _2}\mathcal {C}(\varvec{\theta }), \cdots , \partial _{\theta _M}\mathcal {C}(\varvec{\theta }) \big )^\mathrm{T}\) for M training parameters, and \(\alpha \) is the learning rate. In comparison, Adam is a non-local averaging optimizer that allows adapting the learning rate but requires more steps than the SGD
where \(m_{t}=\beta _{1} m_{t-1} +\left( 1-\beta _{1}\right) \nabla _{\varvec{\theta }}\mathcal {C}(\varvec{\theta }), v_{t}=\beta _{2} v_{t-1}+(1-\beta _{2}) \nabla _{\varvec{\theta }}^2\mathcal {C}(\varvec{\theta }), \hat{m}_{t}=m_{t} /\left( 1-\beta _{1}^{t}\right) , \hat{v}_{t}=v_{t} /\left( 1-\beta _{2}^{t}\right) , \) with the hyper-parameters are chosen as \(\alpha = 0.2, \beta _1 = 0.8, \beta _2 = 0.999\) and \(\epsilon = 10^{-8}\). Finally, the QNG is defined by
where \(g^+\) is the pseudo-inverse of a Fubini-Study metric tensor g67. Assume that we can group \(\varvec{\theta }\) into \(\mathcal {L}\) layers, i.e., \(\varvec{\theta }= \varvec{\theta }^{(1)}\oplus \varvec{\theta }^{(2)}\oplus \cdots \oplus \varvec{\theta }^{(\mathcal {L})}\), so that in each layer \(\varvec{\theta }^{(\ell )} = \{\theta ^{(\ell )}_1, \theta ^{(\ell )}_2,\ldots ,\theta ^{(\ell )}_{M^{(\ell )}} \big |\ \sum _\ell M^{(\ell )} = M\}\), any two of unitaries satisfy \([\varvec{G}_i^{(\ell )}, \varvec{G}_j^{(\ell )}]=\delta _{ij}\). Then, the metric tensor g gives68
where an element \(g_{ij}^{(\ell )}\) of \(g^{(\ell )}\) reads
where \(|\psi _{\ell }\rangle \) is the quantum state at the \(\ell \)th layer. For unitary \(\varvec{G}_i^{(\ell )} = e^{-i\theta _i^{(\ell )} \varvec{K}_i^{(\ell )}}\), e.g., a rotation gate, such that \([\varvec{G}_i^{(\ell )}, \varvec{K}_i^{(\ell )}] = 0\), then \(g_{i j}^{(\ell )}\) is recast as68
See a detailed example of computing a tensor metric g below.
Each optimizer has its own pros and cons: (1) the SGD is simple but low coverage, one must choose a proper learning rate to achieve the best result, (2) the Adam allows to automatically adapt the learning rate and fast coverage but it is noisy near the optimal point, and (3) the QNG is better than other optimizers but also requires more computational cost regards to quantum circuits. While the SGD and Adam do not depend on quantum states and work for any classical data types, including the probabilities, the QNG optimizes the parameters towards the geometry of evolved quantum states and is thus expected to offer better and faster optimization. We conduct these optimizers based on their advantages and disadvantages and compare the results. They also serve as a test bed and reference for future works.
This work implements the numerical experiments using various configurations described above to train the variational models and compare them together. The numerical results are executed by Qiskit open-source package, version 0.24.0, which is available to run on all platforms. For each experiment, to get the probability \(p_0\) we execute \(10^4\) shots using the qasm simulator backend. The number of iterations for every training process is fixed at 400, except for others shown in the text. It is sufficient for the cost function to converge for all data shown in the text. The experiments are then scaled up to 6 qubits for quantum state tomography to demonstrate the scalability. Furthermore, after the training process, we can reproduce the unknown state by applying \(\varvec{V}(\varvec{\theta }^*)\) into the initial state \(|\varvec{0}\rangle \), and use it for further applications and other statistical computations.
Complexity
In terms of complexity, to execute the parameter-shift rule in Eq. (15), the quantum circuit executes \(2M + 1\) times, one M times to compute \(p_0(\varvec{\theta }+ s\varvec{e}_i)\), one M times to compute \(p_0(\varvec{\theta }- s\varvec{e}_i)\), and one time to compute \(p_0(\varvec{\theta })\). Furthermore, a single evaluation requires executing the circuit for a constant number of shots to reach a certain precision, and each execution involves around G gate operations. So, the complexity of each iteration is \(\mathcal {O}[(2M+1)G]\). Similarly, the complexity for an iteration with four-term parameter-shift rule is \(\mathcal {O}[(4M+1)G]\).
Ideally, after each step, the cost function will decrease with a linear or logarithmic speed regarding the number of iterations. However, the variational circuit always offers a lower bound of the cost function during the training process. In particular, this bound increases by the number of qubits N, which means the problem will be harder according to the size of the system
The complexity of the ansatz \(\varvec{V}(\varvec{\theta })\) is another challenge. Its current structure is fixed into the chain, alternating, and all-to-all. However, the structure also needs to optimize in future works, e.g., using Genetic Algorithms for generating a compressed ansatz \(\varvec{V}(\varvec{\theta })\) that can work well on the current NISQ devices for the large number of qubits.
Fubini-Study tensor metric
We provide a practical example of how to compute a Fubini-Study tensor metric. Let us consider a concrete circuit as shown in Fig. 5. It consists of \(R_x = \exp (-i\frac{\theta _x}{2}\varvec{\sigma }_x)\), \(R_z = \exp (-i\frac{\theta _z}{2}\varvec{\sigma }_z)\), and \(CR_y = |0\rangle \langle 0|\otimes \varvec{I}_2 + |1\rangle \langle 1|\otimes \exp (-i\frac{\theta _y}{2}\varvec{\sigma }_y)\). Since \([R_x, R_z] = 0\) (because they act on different qubits), we can group them into one layer (layer 1), with \(\varvec{\theta }^{(1)} = \{\theta ^{(1)}_0, \theta ^{(1)}_1\} = \{\theta _x, \theta _z\}\), and put \(CR_y\) into another layer (layer 2), with \(\varvec{\theta }^{(2)} = \{\theta ^{(2)}_0\} = \{\theta _y\}\). The tensor metric g explicitly yields
The quantum states are explicitly expressed as
The elements \(g^{(1)}_{ij}\) is given through Eq. (22) as
where \(\varvec{K}_x = \frac{\varvec{\sigma }_x\otimes \varvec{I}_2}{2}\) and \(\varvec{K}_z = \frac{\varvec{I}_2\otimes \varvec{\sigma }_z}{2}\).
Next, we calculate \(g^{(2)}_{yy}\). Starting from Eq. (21) in the main text, we derive
Then, we get
where \(\varvec{K}_y = |1\rangle \langle 1|\otimes \frac{\varvec{\sigma }_y}{2}\). To derive expectation values in Eq. (29), we prepare \(|\psi _1\rangle \) as in Fig. 5, then measure \(\langle \psi _1|\varvec{K}_y^2|\psi _1\rangle = \frac{1}{4}\langle \psi _1|\big (|1\rangle \langle 1 |\otimes \varvec{I}_2\big )|\psi _1\rangle \) and \(\langle \psi _1|\varvec{K}_y|\psi _1\rangle = \frac{1}{2}\langle \psi _1|\big (|1\rangle \langle 1 |\otimes \varvec{\sigma }_y\big )|\psi _1\rangle \). Finally, we obtain the tensor metric g
Supported data for QST
We discuss more data supporting the results in Fig. 3dâf in the main text. As we discussed above, the accuracy can be improved when increasing the number of layers L. However, we cannot increase L arbitrarily large and need to stop at an optimal point. We define the optimal L as the smallest number of layers that, at the next layer, the accuracy saturates or starts to reduce. In Fig. 6 below, we discuss the optimal L for various cases, where we mark the optimal L with colored arrows. See also Table 1 below.
From the results here, we trace out the optimal L as shown in Fig. 3 in the main text.
Data availability
Data are available from the corresponding authors upon reasonable request.
Code availability
All codes used to produce the findings of this study are available at: https://github.com/vutuanhai237/UC-VQA.
References
de Leon, N. P. et al. Materials challenges and opportunities for quantum computing hardware. Science 372, eabb2823. https://doi.org/10.1126/science.abb2823 (2021).
Alexeev, Y. et al. Quantum computer systems for scientific discovery. PRX Quantum 2, 017001. https://doi.org/10.1103/PRXQuantum.2.017001 (2021).
Ebadi, S. et al. Quantum phases of matter on a 256-atom programmable quantum simulator. Nature 595, 227â232. https://doi.org/10.1038/s41586-021-03582-4 (2021).
Pirandola, S., Eisert, J., Weedbrook, C., Furusawa, A. & Braunstein, S. L. Advances in quantum teleportation. Nat. Photon. 9, 641â652. https://doi.org/10.1038/nphoton.2015.154 (2015).
Spiller, T. P. Quantum information technology. Mater. Today 6, 30â36. https://doi.org/10.1016/S1369-7021(03)00130-5 (2003).
Shor, P. Algorithms for quantum computation: Discrete logarithms and factoring. In Proceedings 35th Annual Symposium on Foundations of Computer Science, 124â134. https://doi.org/10.1109/SFCS.1994.365700 (1994).
Grover, L. K. A fast quantum mechanical algorithm for database search. In Proceedings of the Twenty-Eighth Annual ACM Symposium on Theory of Computing, 212â219 (1996).
Harrow, A. W., Hassidim, A. & Lloyd, S. Quantum algorithm for linear systems of equations. Phys. Rev. Lett. 103, 150502. https://doi.org/10.1103/PhysRevLett.103.150502 (2009).
Xu, X., Benjamin, S. C. & Yuan, X. Variational circuit compiler for quantum error correction. Phys. Rev. Appl. 15, 034068. https://doi.org/10.1103/PhysRevApplied.15.034068 (2021).
Lubasch, M., Joo, J., Moinier, P., Kiffner, M. & Jaksch, D. Variational quantum algorithms for nonlinear problems. Phys. Rev. A 101, 010301. https://doi.org/10.1103/PhysRevA.101.010301 (2020).
Preskill, J. Quantum computing in the NISQ era and beyond. Quantum 2, 79. https://doi.org/10.22331/q-2018-08-06-79 (2018).
Cerezo, M. et al. Variational quantum algorithms. Nat. Rev. Phys. 3, 625â644. https://doi.org/10.1038/s42254-021-00348-9 (2021).
Peruzzo, A. et al. A variational eigenvalue solver on a photonic quantum processor. Nat. Commun. 5, 4213. https://doi.org/10.1038/ncomms5213 (2014).
Nakanishi, K. M., Mitarai, K. & Fujii, K. Subspace-search variational quantum eigensolver for excited states. Phys. Rev. Res. 1, 033062. https://doi.org/10.1103/PhysRevResearch.1.033062 (2019).
Kirby, W. M., Tranter, A. & Love, P. J. Contextual subspace variational quantum eigensolver. Quantum 5, 456. https://doi.org/10.22331/q-2021-05-14-456 (2021).
Gard, B. T. et al. Efficient symmetry-preserving state preparation circuits for the variational quantum eigensolver algorithm. NPJ Quantum Inf. 6, 10. https://doi.org/10.1038/s41534-019-0240-1 (2020).
Tkachenko, N. V. et al. Correlation-informed permutation of qubits for reducing ansatz depth in the variational quantum eigensolver. PRX Quantum 2, 020337. https://doi.org/10.1103/PRXQuantum.2.020337 (2021).
Zhou, L., Wang, S.-T., Choi, S., Pichler, H. & Lukin, M. D. Quantum approximate optimization algorithm: Performance, mechanism, and implementation on near-term devices. Phys. Rev. X 10, 021067. https://doi.org/10.1103/PhysRevX.10.021067 (2020).
Arrasmith, A., Cincio, L., Sornborger, A. T., Zurek, W. H. & Coles, P. J. Variational consistent histories as a hybrid algorithm for quantum foundations. Nat. Commun. 10, 3438. https://doi.org/10.1038/s41467-019-11417-0 (2019).
Kaubruegger, R. et al. Variational spin-squeezing algorithms on programmable quantum sensors. Phys. Rev. Lett. 123, 260505. https://doi.org/10.1103/PhysRevLett.123.260505 (2019).
Koczor, B., Endo, S., Jones, T., Matsuzaki, Y. & Benjamin, S. C. Variational-state quantum metrology. New J. Phys. 22, 083038. https://doi.org/10.1088/1367-2630/ab965e (2020).
Meyer, J. J., Borregaard, J. & Eisert, J. A variational toolbox for quantum multi-parameter estimation. NPJ Quantum Inf. 7, 89. https://doi.org/10.1038/s41534-021-00425-y (2021).
Heya, K., Suzuki, Y., Nakamura, Y. & Fujii, K. Variational quantum gate optimization. arXiv:1810.12745 (arXiv preprint) (2018).
Khatri, S. et al. Quantum-assisted quantum compiling. Quantum 3, 140. https://doi.org/10.22331/q-2019-05-13-140 (2019).
Volkoff, T., Holmes, Z. & Sornborger, A. Universal compiling and (no-)free-lunch theorems for continuous-variable quantum learning. PRX Quantum 2, 040327. https://doi.org/10.1103/PRXQuantum.2.040327 (2021).
Jones, T. & Benjamin, S. C. Robust quantum compilation and circuit optimisation via energy minimisation. Quantum 6, 628. https://doi.org/10.22331/q-2022-01-24-628 (2022).
Paris, M. & Rehacek, J. Quantum State Estimation Vol. 649 (Springer, 2004).
Palmieri, A. M. et al. Experimental neural network enhanced quantum tomography. NPJ Quantum Inf. 6, 20. https://doi.org/10.1038/s41534-020-0248-6 (2020).
Cramer, M. et al. Efficient quantum state tomography. Nat. Commun. 1, 149. https://doi.org/10.1038/ncomms1147 (2010).
Jackson, C. & van Enk, S. J. Detecting correlated errors in state-preparation-and-measurement tomography. Phys. Rev. A 92, 042312. https://doi.org/10.1103/PhysRevA.92.042312 (2015).
Moroder, T. et al. Permutationally invariant state reconstruction. New J. Phys. 14, 105001. https://doi.org/10.1088/1367-2630/14/10/105001 (2012).
Ahmed, S., Sánchez Muñoz, C., Nori, F. & Kockum, A. F. Classification and reconstruction of optical quantum states with deep neural networks. Phys. Rev. Res. 3, 033278. https://doi.org/10.1103/PhysRevResearch.3.033278 (2021).
Tóth, G. et al. Permutationally invariant quantum tomography. Phys. Rev. Lett. 105, 250403. https://doi.org/10.1103/PhysRevLett.105.250403 (2010).
Torlai, G. et al. Neural-network quantum state tomography. Nat. Phys. 14, 447â450 (2018).
Blume-Kohout, R. Optimal, reliable estimation of quantum states. New J. Phys. 12, 043034. https://doi.org/10.1088/1367-2630/12/4/043034 (2010).
Fiderer, L. J., Schuff, J. & Braun, D. Neural-network heuristics for adaptive Bayesian quantum estimation. PRX Quantum 2, 020303. https://doi.org/10.1103/PRXQuantum.2.020303 (2021).
Gross, D., Liu, Y.-K., Flammia, S. T., Becker, S. & Eisert, J. Quantum state tomography via compressed sensing. Phys. Rev. Lett. 105, 150401. https://doi.org/10.1103/PhysRevLett.105.150401 (2010).
Flammia, S. T., Gross, D., Liu, Y.-K. & Eisert, J. Quantum tomography via compressed sensing: Error bounds, sample complexity and efficient estimators. New J. Phys. 14, 095022. https://doi.org/10.1088/1367-2630/14/9/095022 (2012).
Czerwinski, A. Dynamic state reconstruction of quantum systems subject to pure decoherence. Int. J. Theor. Phys. 59, 3646â3661. https://doi.org/10.1007/s10773-020-04625-8 (2020).
Flurin, E., Martin, L. S., Hacohen-Gourgy, S. & Siddiqi, I. Using a recurrent neural network to reconstruct quantum dynamics of a superconducting qubit from physical observations. Phys. Rev. X 10, 011006. https://doi.org/10.1103/PhysRevX.10.011006 (2020).
Mäkinen, A., Ikonen, J., Partanen, M. & Möttönen, M. Reconstruction approach to quantum dynamics of bosonic systems. Phys. Rev. A 100, 042109. https://doi.org/10.1103/PhysRevA.100.042109 (2019).
Lvovsky, A. I. & Raymer, M. G. Continuous-variable optical quantum-state tomography. Rev. Mod. Phys. 81, 299 (2009).
DâAriano, G. M., De Laurentis, M., Paris, M. G., Porzio, A. & Solimeno, S. Quantum tomography as a tool for the characterization of optical devices. J. Opt. B Quantum Semiclassical Opt. 4, S127 (2002).
Takeda, K. et al. Quantum tomography of an entangled three-qubit state in silicon. Nat. Nanotechnol. 20, 1â5 (2021).
Liu, Y. et al. Variational quantum circuits for quantum state tomography. Phys. Rev. A 101, 052316. https://doi.org/10.1103/PhysRevA.101.052316 (2020).
Lee, S. M., Lee, J. & Bang, J. Learning unknown pure quantum states. Phys. Rev. A 98, 052302. https://doi.org/10.1103/PhysRevA.98.052302 (2018).
Lee, S. M., Park, H. S., Lee, J., Kim, J. & Bang, J. Quantum state learning via single-shot measurements. Phys. Rev. Lett. 126, 170504. https://doi.org/10.1103/PhysRevLett.126.170504 (2021).
Aaronson, S. Shadow tomography of quantum states. https://doi.org/10.48550/ARXIV.1711.01053 (2017).
Huang, H.-Y., Kueng, R. & Preskill, J. Predicting many properties of a quantum system from very few measurements. Nat. Phys. 16, 1050â1057. https://doi.org/10.1038/s41567-020-0932-7 (2020).
White, C. D. & Wilson, J. H. Mana in haar-random states. arXiv:2011.13937 (arXiv preprint) (2020).
Haug, T., Bharti, K. & Kim, M. Capacity and quantum geometry of parametrized quantum circuits. PRX Quantum 2, 040309. https://doi.org/10.1103/PRXQuantum.2.040309 (2021).
Schuld, M., Bocharov, A., Svore, K. M. & Wiebe, N. Circuit-centric quantum classifiers. Phys. Rev. Ahttps://doi.org/10.1103/physreva.101.032308 (2020).
Sim, S., Johnson, P. D. & Aspuru-Guzik, A. Expressibility and entangling capability of parameterized quantum circuits for hybrid quantum-classical algorithms. Adv. Quantum Technol. 2, 1900070 (2019).
Kuzmak, A. R. Measuring distance between quantum states on a quantum computer. Quantum Inf. Process. 20, 269. https://doi.org/10.1007/s11128-021-03196-9 (2021).
Kingma, D. P. & Ba, J. Adam: A method for stochastic optimization. arXiv:1412.6980 (arXiv preprint) (2014).
Stokes, J., Izaac, J., Killoran, N. & Carleo, G. Quantum natural gradient. Quantum 4, 269 (2020).
McClean, J. R., Boixo, S., Smelyanskiy, V. N., Babbush, R. & Neven, H. Barren plateaus in quantum neural network training landscapes. Nat. Commun. 9, 4812. https://doi.org/10.1038/s41467-018-07090-4 (2018).
Cerezo, M., Sone, A., Volkoff, T., Cincio, L. & Coles, P. J. Cost function dependent barren plateaus in shallow parametrized quantum circuits. Nat. Commun. 12, 1791. https://doi.org/10.1038/s41467-021-21728-w (2021).
Holmes, Z., Sharma, K., Cerezo, M. & Coles, P. J. Connecting ansatz expressibility to gradient magnitudes and barren plateaus. PRX Quantum 3, 010313. https://doi.org/10.1103/PRXQuantum.3.010313 (2022).
Ortiz Marrero, C., Kieferová, M. & Wiebe, N. Entanglement-induced barren plateaus. PRX Quantum 2, 040316. https://doi.org/10.1103/PRXQuantum.2.040316 (2021).
Wang, S. et al. Noise-induced barren plateaus in variational quantum algorithms. Nat. Commun. 12, 6961. https://doi.org/10.1038/s41467-021-27045-6 (2021).
Ferrie, C. Self-guided quantum tomography. Phys. Rev. Lett. 113, 190404. https://doi.org/10.1103/PhysRevLett.113.190404 (2014).
Spall, J. Multivariate stochastic approximation using a simultaneous perturbation gradient approximation. IEEE Trans. Autom. Control 37, 332â341. https://doi.org/10.1109/9.119632 (1992).
Mitarai, K., Negoro, M., Kitagawa, M. & Fujii, K. Quantum circuit learning. Phys. Rev. A 98, 032309 (2018).
Schuld, M., Bergholm, V., Gogolin, C., Izaac, J. & Killoran, N. Evaluating analytic gradients on quantum hardware. Phys. Rev. A 99, 032331 (2019).
Anselmetti, G.-L.R., Wierichs, D., Gogolin, C. & Parrish, R. M. Local, expressive, quantum-number-preserving VQE ansätze for fermionic systems. New J. Phys. 23, 113010. https://doi.org/10.1088/1367-2630/ac2cb3 (2021).
Harrow, A. W. & Napp, J. C. Low-depth gradient measurements can improve convergence in variational hybrid quantum-classical algorithms. Phys. Rev. Lett. 126, 140502 (2021).
Stokes, J., Izaac, J., Killoran, N. & Carleo, G. Quantum natural gradient. Quantum 4, 269. https://doi.org/10.22331/q-2020-05-25-269 (2020).
Acknowledgements
This work is supported by the VNUHCM-University of Information Technologyâs Scientific Research Support Fund.
Author information
Authors and Affiliations
Contributions
V.T.H. implemented the algorithms and performed numerical analysis. L.B.H. derived the theoretical framework. All authors wrote the manuscript.
Corresponding author
Ethics declarations
Competing interests
The authors declare no competing interests.
Additional information
Publisher's note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Rights and permissions
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/.
About this article
Cite this article
Hai, V.T., Ho, L.B. Universal compilation for quantum state tomography. Sci Rep 13, 3750 (2023). https://doi.org/10.1038/s41598-023-30983-4
Received:
Accepted:
Published:
DOI: https://doi.org/10.1038/s41598-023-30983-4
This article is cited by
-
Quantum state tomography using quantum machine learning
Quantum Machine Intelligence (2024)
-
Enhancing quantum state tomography: utilizing advanced statistical techniques for optimized quantum state reconstructions
Journal of the Korean Physical Society (2024)