1. Introduction
Quantum physics emerged from Albert Einstein’s efforts to explain the “Photoelectric effect”, which suggested that light can behave like a particle. Other scientists explored the alternative idea that particles such as electrons can behave like waves [
1], and this wave-like behavior of particles was later mathematically formulated by Erwin Schrödinger. Schrödinger’s equation provides a theoretical foundation for quantum mechanics, but when it comes to making measurements and interpreting experimental data, statistical tools are essential. One of these tools is quantum state tomography (QST), which is briefly explained in the next section.
In quantum computing and quantum information theory, QST is one crucial step in determining the state of a quantum system, which is essential for understanding and controlling a given quantum system. It uses many identical particles, each measured in a slightly different way. By piecing together these measurements, scientists can build a picture of the original quantum state. In QST, projections are the results of measurements on the quantum system, expressed as probabilities and expectation values.
It is worth noting that QST is a general concept that can be applied to any quantum system, including digital quantum computers [
2] and analog quantum simulators (computers) [
3]. In [
3], a tomography approach (described in terms of Positive Operator-Valued Measures (POVMs) formalism) that is implementable on analog quantum simulators, including ultra-cold atoms, is proposed. Additionally, since quantum sensing and imaging technologies have a lot of exciting applications in optical measurements, using entanglement with applications in quantum lithography [
4], one of the applications of QST is in quantum sensing [
5].
The QST problem can be formulated as a smooth optimization problem, and as a result, gradient-based methods [
6] can be used to solve the problem. If we denote the value of the objective function of the optimization (minimization) problem at point
by
, the gradient descent uses
, where
is the gradient of
at
, which is a vector consisting of the first-order partial derivatives of
with respect to the decision variables, and
is a small number and represents the step size. However, while gradient-based methods are easy to implement and highly scalable, they are very slow to converge.
Another approach is to generalize the iteration procedure by using , where is a square matrix. Note that if we set to be equal to the identity matrix then we will arrive at , as in gradient descent.
If we set
, then we will have the Newton method [
6], which is very fast to converge in terms of the number of iterations, but
is not only challenging and time-consuming to compute, but also requires a lot of memory (RAM). Now, one solution is to use less idealistic but more practical choices of
. For instance, L-BFGS [
7] tries to directly approximate the vector
using a limited number of previous gradients stored in RAM. However, another class of methods that are less demanding in terms of memory (RAM) usage are Accelerated Gradient Descent (AGD) methods [
8,
9,
10], which are based on running two iterative procedures simultaneously. The advantages of this method are its ease of implementation, relatively fast convergence, and being less memory-intensive compared to L-BFGS.
To solve the QST problem, a solver based on Accelerated Gradient Descent (AGD) followed by the singular value decomposition (SVD) projection step is proposed in [
2]. A MATLAB implementation is available on GitHub [
11]. In [
12], compressed sensing (CS) is proposed for QST. In [
13], AGD is applied again; SVD projection is bypassed by introducing a non-convex programming formulation of the QST problem, and the Python code is made available [
14]. A neural network-based method is presented in [
15], and the code is available on GitHub [
16]. In [
17], a combination of CS and projected least squares (PLS) is proposed, and the code is available in [
18]. In [
19], attention mechanisms are used in neural networks on informationally complete POVMs. For digital quantum computers, the complexity of tomography scales exponentially with the number of qubits. To address the challenge of exponential scaling, in [
20], POVMs are approximated with low-rank approximation (rank-1 projectors of the K = 6 eigenstates of the Pauli matrices), which is similar to the approach that we use for generating simulated data to validate the proposed method. The authors in [
5] performed QST on pure tomography sensing using singular value decomposition (SVD) techniques for a 2-qubit system to come up with a robust method.
In this paper, we propose a new method based on the modification of AGD for a non-convex programming formulation. In our approach, one of two step sizes is adaptively chosen which increases the speed of convergence, as demonstrated in the numerical evaluations carried out. A comparison of similarities and differences between the proposed method and the top two most similar methods is presented in
Table 1. The proposed method combines Momentum-inspired Factorized Gradient Descent (MiFGD) with an adaptive step length. The novel contribution of the proposed method is the introduction of a closed-form solution for locally optimal step length in AGD, significantly enhancing the convergence speed of the original MiFGD.
2. Introduction to Quantum Tomography
Quantum physics began with Albert Einstein’s attempts to explain the “Photoelectric effect”. Einstein’s theory suggested that the energy carried by each single energy packet (quantum) of light can be computed as follows:
where
is the frequency of the light and
is Planck’s constant. In 1924, Louis de Broglie suggested that particles such as electrons can behave like waves [
1], and the equation for such wavy behavior was then proposed by Erwin Schrödinger:
for matter particles with mass
, where
is the potential. Indeed, physical quantities that physicists are interested in measuring, such as position, energy, momentum, and spin, are represented by Hermitian operators (acting on a Hilbert space), which are called observables. Since these operators are Hermitian, their eigenvalues are real, corresponding to the possible measurement outcomes of their corresponding observable. For example, the eigenvalues of the Hamiltonian operator
are real numbers that correspond to the energy of the particle.
Indeed, it can be shown that if is an eigenvalue with the corresponding eigenfunction , which is to say that , then is a solution for (2), which is called a wave function.
It can be shown that with some assumptions in Ket–Bra notation, we have the following:
Also, the general solution of (2) is the following:
where
are complex numbers.
Now, it is easy to see that
It is assumed that .
Max Born (1882–1970) suggested that the set of possible outcomes is exclusively restricted to but with different probabilities. These probabilities are proportional to , , ….
Now, if we define
, then it is easy to see that
Equation (7) means that projects onto , and for this reason is called a projector.
Another property which immediately follows from (5) and (7) is the following:
which says that
, where
I is the identity operator.
Also, note that is a positive semi-definite (PSD) matrix.
Now, if we define
, then it is obvious that
is PSD and
As a result, , and therefore + + + … = 1.
Now, if
denotes the probability of outcome
, then
For this reason, ϱ is called a density operator. The projection operators can be generalized to PSD matrices , such that . In this case, they are referred to as POVMs.
Now, given the statistical data and the POVMs , the goal is to find a PSD density operator that best fits the measurement data .
In other words, we want to solve the following optimization problem:
Optimization (11) is called quantum state tomography (QST) [
2]. In quantum computing and quantum information theory, quantum state tomography (QST) is one of the key steps in determining the state of the quantum system, which is crucial as this is key to understanding and controlling the quantum system. The term “tomography” comes from the ancient Greek words “tomos” (“slice” or “section”) and “grapho” (“to draw” or “to write”) [
21]. Regular X-ray tomography (such as CT scans in medicine) performs a 3D reconstruction of an object (which cannot be directly seen) by piecing together 2D X-ray images (measurements) taken from different angles or sections to build up a 3D picture of the original unknown object in the body. QST, to a large extent, is similar, but instead of 2D X-ray images (2D X-ray projections) taken from different angles or perspectives, QST uses multiple measurements on many identical copies of the same quantum system, each measured in a slightly different way (by projecting the state onto various bases). The outcomes of these measurements are gathered as statistical data. Again, like X-ray tomography, in which complex algorithms are used to process 2D X-ray data to reconstruct a 3D image in QST, mathematical optimization based on linear algebra, like (11), is used to reconstruct the density matrix
(which fully describes the quantum state). Having gathered the statistical data
, what these optimization techniques (for instance, least squares fitting) do is to fit a model (the density matrix
) that best fits the measurement data
. Here, we must deal with statistical noise from quantum measurements and reconstruct the most probable quantum state, despite measurement imperfections. The main difference here is that while 3D reconstruction in X-ray tomography can be undertaken via a series of measurements on the same (classical) object, in the case of a single quantum particle, measurement perturbs the state of the quantum particle, often making its further investigation uninformative [
21]. We use a source that creates many identical particles in the same unknown quantum state. So, tomography uses many identical particles, each measured in a slightly different way. By piecing together these measurements, scientists can build a picture of the original quantum state.
3. Proposed Adaptive Method for QST
As problem (11) does not have a closed-form solution, we need to use an iterative approach to solve it.
In [
13], problem (11) is formulated as follows:
in which the matrix
is assumed to be low rank. Also,
is the Frobenius norm of
, which means that
Then, an Accelerated Gradient Descent (AGD) method called MiFGD is proposed [
8], as follows:
in which
and
are two fixed step sizes.
In this paper, we present a method for finding a closed-form solution for the greedy optimal choice of
, which means choosing
in a way that results in the biggest decrease in the objective function in that iteration. A description of the proposed method is given below and in
Figure 1.
Here, it is worth mentioning that we keep the other step size constant, which is set to .
For this reason, in two consecutive steps, there is a possibility that while
is chosen to result in a lower error in the next iteration, the step size
will remain out of our control and may push the iterative approach away from what we hope to see for the next run. However, the method still performs much better than MiFGD overall. This is something that we will verify in our experiments (see
Section 4).
Let us start with rewriting (15) as follows:
Now, if we plug in
from (14), we arrive at the following:
in which
and
As we want
to be normalized, we need to minimize
Also, note that
and
are real numbers independent of
; therefore, if we set
, and
, then
Now, if we define vectors
and Y to be vectors whose
’th entries are
and
, respectively, then from (20) and (23), we have
It is worth noting that while and Y are vectors, and are all real numbers independent of .
Now, from (22) and (24), we can conclude that we have to minimize the following 4th-order polynomial with respect to
:
This attains a minimum where the derivative with respect to
is zero:
Now, by solving (26), which is a humble cubic equation with respect to , the optimal step size for the th step is obtained.
Note that computing
, and
at each step is the most time-consuming operation, which makes the proposed method almost three times slower at each iteration compared to MiFGD, but as we choose a much more optimized step size, our approach becomes faster overall. The numerical results are presented in
Section 5.
4. Numerical Results
While what we have explained in the previous section applies to general quantum systems, in this section, we apply it to multi-qubit spin-half systems.
Suppose that we have a particle that only has two states, and the state of the particle has two entries:
where α and β are two complex numbers and
and
are the probabilities of being at each of the two states. The discretization of the Hamiltonian is a 2 by 2 matrix. On the other hand, since the Hamiltonian as an operator is expected to be Hermitian, which guarantees that the eigenvalues are real (and as a result, they correspond to the possible measurement outcomes of their corresponding observable), physicists investigate the space of all possible 2 by 2 Hamiltonians that satisfy the following equations:
As a result, both
and
should be real numbers, and
should be the conjugate of
. After straightforward calculation, physicists arrive at the following as the general formula for the Hamiltonian in the aforementioned binary state.
in which
which are called Pauli matrices.
Additionally, the following matrices can be defined:
These satisfy the following properties:
The above three equalities remind physicists of angular momentum. For this reason, they relate them to the spin system. They call the system “spin-1/2” because of the coefficient (in Equation (33)), which is the component of angular momentum. These spin-1/2 systems are interesting since they have two states and are the building blocks for qubits (in digital quantum computers).
Now, if we assume that, for example, the density operator in the case of a single qubit is
then
and from (10) we can calculate
from our measurement data. Similarly, we can calculate from our measurement data the other coefficients,
and
, which allows us to identify the density matrix
. This is the simplest form of QST. But for more complicated cases (multi-qubit systems), more has to be undertaken.
Here, is called spin-up and is denoted by . Also, is called spin down and is denoted by .
Therefore, Equations (39) and (40) are sometimes expressed as follows:
which indicates that the eigenstates of
are
and
, with the corresponding eigenvalues
and
, respectively. Also, it can be seen that the following two vectors are the eigenvectors for
:
and the following two are the eigenvectors for
:
Furthermore, the real three-dimensional space that we live in relates to the two-dimensional complex vector space within which a qubit sits by rewriting Equation (27) as follows. Suppose that
where
. Using polar coordinates, we have
But since
, we can write
, and therefore
And if we ignore
, we end up with the following:
which is called the Bloch sphere representation of the quantum state.
The Bloch sphere representation (50) is important as it helps us to figure out the state of a qubit on the surface of a unit sphere in real 3D space rather than complex 2D space. Now, in this coordinate system state, “z” (when
) is equivalent to
and “−z” (when
,
= 0) is equivalent to
, which means that while in complex vector space
and
are orthogonal states, once we represent them on the Block sphere they are antipodal states that point in opposite directions. Indeed, angle
is the angle between the unit vector representing the state of a qubit in 3D space and the axis z, and angle
is the angle between the projection of the unit vector on the
x-
y plane and the x axis. Now,
and
are equivalent to
, and if
and
, we arrive at
, and the last two vectors lie on the
x and –
x axes, respectively. Also,
,
corresponds to
, which is in the direction of the
y axis and,
,
corresponds to
, which is in the direction of the –
y axis. Moreover, as we have
in [
13], the following three bases are used for QST:
However, in [
11], more complicated bases are introduced, as follows:
where
are the rows of the following matrix:
Now, again, similar to (51)–(53), we have
To obtain the above formulas, remember that, for example, what we mean by is , not .
We create our data according to the procedure explained in [
11]. As mentioned in [
2], the reason for choosing this kind of procedure is that it allows for applications in which the measurement matrices are ill conditioned [
22,
23,
24].
To be more specific, the proposed procedure selects (with repetitions) rows of matrix in different ways, and for each of these choices we compute the tensor products of the selected rows. Then, we come up with different row vectors, , each of which with entries. Now, for an -qubit system, the POVMs are . Also, a random PSD matrix is created and the simulated generated data are constructed by the relation , where is a Gaussian noise term. Now, given the POVMs and the simulated measurement data , the QST algorithm should be able to find a PSD matrix such that , for which we solve (12) using the proposed method. As our simulated data are constructed by , we expect that the optimal value of the problem (12) will be , which is around 0.003 in all our experiments. So, we can approximately measure the optimality gap.
As an illustrative example of how POVMs are created, let us take n = 3. Also, suppose that
. Therefore, the matrix
is as follows:
It is easy to check that (61)–(63) are verified.
Now, we have
different ways to select (with repetitions)
rows of matrix
, which we denote by the following 216 rows:
Then, for example, for the 9th row, which is [1 2 3], we have to pick the corresponding rows in
W, which are
Now, as the tensor product of two row vectors is defined as
we have
and therefore
In a similar way, are constructed. Now, for a -qubit system, the POVMs are , consisting of 216 matrices of dimensions of 8 by 8.
We apply the proposed method on a n-qubit system, where in our case n = 6, 7, 8 each with and rank() = 10 or rank() = d.
As a result, we will report the comparison of our method with MiFGD for 12 different configurations.
For n = 6, we compare the performance of the two algorithms for four different configurations,
,
,
, and
, as shown in
Figure 2,
Figure 3,
Figure 4 and
Figure 5. As it can be seen, our algorithm reaches the same accuracy of MiFGD approximately 25 times faster.
To be more specific, for instance, in the first configuration (as seen in
Figure 2), after 3480 iterations and spending 318 s, MiFGD reaches a normalized error of 0.0082, while our method after just 61 iterations in 15 s reaches a normalized error of 0.0080.
As can be seen, the proposed method takes 0.24 s per iteration, while MiFGD takes 0.09 s, which means that the proposed method is 2.7 times slower per iteration, but overall much faster thanks to a very well-optimized step length.
A summary of the results is presented in
Table 2. As it can be seen, although the elapsed time per iteration when using the proposed method is higher due to the fact that the number of expensive operations (computing
and
) is tripled compared to MiFGD (in which the only expensive operation is the calculation of
), both the number of iterations and the elapsed time have decreased in the proposed method.
In the case of n = 7, for the first configuration, MiFGD performed 3229 iterations in 3488 s, which is approximately 1 s per iteration, while the proposed method completed 74 iterations in 225 s, which is 3 s per iteration. However, overall, it performed much better, as can be seen from
Figure 6,
Figure 7,
Figure 8 and
Figure 9. Indeed, in the proposed method, in each step, we have to perform three expensive operations to calculate
and
(as opposed to MiFGD, in which the only expensive operation is the calculation of
), yet the elapsed time decreased. This is because once
and
are computed, due to the optimal choice of
, we have a better value for
, which can be calculated from the following equation (Equation (23)):
which approximates the experimental measurement data
(see Equation (12)).
A summary of the results is presented in
Table 3. As can be seen from both the table and the figures, when we restrict the rank of the matrix
to 10, MiFGD struggles more noticeably to converge.
For n = 8, in the first configuration, MiFGD took 617.5 s for each iteration while the proposed method took 1596 s per iteration. This means the proposed algorithm is approximately 2.6 times slower per iteration, as it performs more calculations to avoid an uneducated step, but overall it is much faster to converge, as can be seen from both
Table 4 and
Figure 10,
Figure 11,
Figure 12 and
Figure 13.
Again, as can be seen from both the table and the figures, when we restrict the rank of the matrix to 10, MiFGD struggles more noticeably to converge compared to the case in which rank( = d.
Another interesting thing is that while the proposed method is supposed to choose the optimal step size, we can see some oscillation noticeably at the beginning. The reason for the oscillation is that, in equations and (Equations (14) and (15)), two different step lengths, and , are involved. What we have undertaken so far in the proposed method is finding the optimal , while the other one is fixed (. Indeed, the computation of will be influenced not only by , but also by from the previous steps. Intuitively, determines to what extent the method “remembers” the past iterations (for instance, means no “memories” from the past iterations). As a result, while the random starting point might be very far from optimal, it gets reflected in the “memory” of the method and it takes a while before it fades away and gets overshadowed by the accumulation of new memories. As a result, we cannot expect a strictly decreasing error. This issue is something that we will address shortly.
In all the previous experiments, we considered . The main reason was that this keeps the number of expensive operations small, but we could have merged (17) and (19) as follows: . This way, by having computed and , and by having a fixed , we can quickly (without much calculation) compute and then compute and , and then we can calculate the linear combinations of and and plug them into (23) to find the optimal step length , as before. This means that by increasing the number of expensive operations per iteration from 3 to 6, we will be able to use grid search (for instance, varying from 0.01 to 0.99 by increments of 0.01) to adaptively obtain a good choice of for every iteration. Below, we compare this new version of adaptively selecting versus fixed () for the case of n = 8.
As can be seen from the
Figure 14,
Figure 15,
Figure 16 and
Figure 17, with this slight modification, we no longer have the oscillatory behavior, and the convergence is slightly faster. Also, note that the computational cost per iteration for the case of adaptive
is two times the cost for the case of fixed
, resulting in faster convergence. However, still, it seems that
has the main crucial role compared to
.