Towards Pricing Financial Derivatives with an IBM Quantum Computer

Pricing interest-rate financial derivatives is a major problem in finance, in which it is crucial to accurately reproduce the time-evolution of interest rates. Several stochastic dynamics have been proposed in the literature to model either the instantaneous interest rate or the instantaneous forward rate. A successful approach to model the latter is the celebrated Heath-Jarrow-Morton framework, in which its dynamics is entirely specified by volatility factors. On its multifactor version, this model considers several noisy components to capture at best the dynamics of several time-maturing forward rates. However, as no general analytical solution is available, there is a trade-off between the number of noisy factors considered and the computational time to perform a numerical simulation. Here, we employ the quantum principal component analysis to reduce the number of noisy factors required to accurately simulate the time evolution of several time-maturing forward rates. The principal components are experimentally estimated with the $5$-qubit IBMQX2 quantum computer for $2\times 2$ and $3\times 3$ cross-correlation matrices, which are based on historical data for two and three time-maturing forward rates. This manuscript is a first step towards the design of a general quantum algorithm to fully simulate on quantum computers the Heath-Jarrow-Morton model for pricing interest-rate financial derivatives. It shows indeed that practical applications of quantum computers in finance will be achievable in the near future.


INTRODUCTION
In Finance, derivatives are contracts whose value derives from the value of an underlying financial asset or a set of assets, like an index, bonds, currency rates, stocks, market indices or interest rates.Typical financial derivatives contracts include forwards, futures, swaps (currency swaps or interest rate swaps), caps, floors, swaptions, among many others.They are typically used either to manage (mitigate) risk exposure (hedging), or for pure speculation.In case of pricing interest-rate financial derivatives under the risk neutral assumption [1,2], it is crucial to model accurately the time-evolution of interest rates.Several stochastic dynamics have been proposed in the literature to model either the instantaneous interest rate r(t) (also known as the instantaneous spot rate or, simply, as short rate) or the instantaneous forward rate, which is the forward rate at a future, infinitesimal period (T, T + δt) forecasted at a previous time t, denoted by f (t, T ) [1].Simple dynamics based on one or two noisy (random) factors for modeling both the short rate and the forward rates, have been proposed [1,[3][4][5].For short rates, oneand two-factor models became popular, such as the the Vasicek model, the Hull&White model, the CIR (Cox-Ingesroll-Ross) model and its CIR++ extension, as of one-factor mod-els, the Gaussian-Vasicek model and the Hull-White Two-Factor model, as of two-factor models.Furthermore, their corresponding algorithms are straightforward to implement.However, these models suffer from the strong requirements which arise from the necessity to calibrate to market data and to capture, at the same time, correlation and covariance structures from the time evolution of different forward rates.A highly successful approach proposed to overcome these constraints is the celebrated Heath-Jarrow-Morton (HJM) framework [6][7][8][9], which directly models the time evolution of forward rates.Indeed, the HJM model is a general family of models from which most of the aforementioned models may be derived [1].Here, the dynamics is entirely specified by its volatility factors.Although general, there is a trade-off between the number of noisy factors considered and the computational time when executing the algorithm.Therefore, the computational power limits the accuracy of the model.Quantum computing (QC) has emerged in the last years as one of the most exciting applications of quantum technologies [10], which promises to revolutionize the computational power at our disposal.In QC, entanglement, probably the most characteristic signature of quantum physics, is employed as an extra resource to speed up the performance of the computation, since it allows us to parallelize the calculations.Multiple algorithms with provable quantum speed up with respect to their best classical counterparts have been proposed for prime factorization [11], searching in a list [12], solving systems of linear equations [13] or finding the largest eigen-values and eigenvectors of a given matrix [14], among many others.A particularly relevant application are quantum simulations, in which a controllable quantum system simulates the dynamics of another quantum system of interest whose classical simulation would be highly inefficient.Examples of applications of quantum simulations can be found in spin systems [15,16], quantum chemistry [17][18][19][20], quantum field theories [21,22], fluid dynamics [23], or quantum artificial life [24][25][26].Some applications of quantum technologies to finances have already been proposed [27][28][29][30], but only few experiments have been carried out so far [31,32].State-of-the-art technology, however, only provides us with small noisy quantum chips, which limits the applicability of digital quantum simulations to toy models.
In this article, we employ an efficient quantum principal component analysis (qPCA) algorithm to effectively reduce the number of noisy factors needed to accurately simulate the joint dynamics of several time-maturing forward rates, according to the multi-factor HJM model.In addition, we implement this algorithm in the 5-qubit IBMQX2 superconducting quantum processor of IBM.The volatility factors are estimated from 2 × 2 and 3 × 3 cross-correlation matrices between different time-maturing forward rates based on historical data.This is, to our knowledge, both the first quantum computing experiment in financial option pricing and the largest implementation of the qPCA algorithm on a quantum platform.Although for small matrices the problem can be easily solved on a classical computer, this contribution represents a first promising attempt towards the quantum computation of large-scale financial problems which are today prohibitively expensive.In the present Noisy Intermediate-Scale Quantum (NISQ) technology era [22], we extend the applications of quantum computers to the field of finance, paving the way for achieving useful quantum supremacy/advantage in the following years.

Financial Derivatives
A T-maturity zero-coupon bond (also known as a pure discount bond) is a contract that ensures its investor to accrue one unit of currency at time T (its maturity), whose price at a previous time t is denoted by P(t, T ).From this definition, it is clear that at expiry of the contract we must have P(T, T ) = 1.This time-dependent curve represents a fundamental element in the theory of risk-neutral derivative pricing [1] and will extensively be used throughout this article.P(t, T ) is also known as the curve of discount factors, since it is employed to calculate the present value of future cash-flows.The inverse of this amount is called the capitalization factor, providing the capitalization of a present quantity to a future time.
In finance, the instantaneous interest rate r t (also known as the instantaneous spot rate, or simply as short rate) is the rate of return of a risk-free investment at time t (for example, a U.S. treasury bond) (see Ref. [1]).This is also the interest rate applied when borrowing money from the money market and it is given as an annual percentage.We denote by B(t) the time-t value B(t) of the money market account, defined as Of course, if today is the time t, the value of r(t) can be observed in the money market and therefore, it constitutes a known value.However, for future times T > t, r(T ) is uncertain and modeled through a stochastic process.In the riskneutral framework, when using the money market account B(t) as numéraire, the link between the short-rate and the zerocoupon is indeed materialized by the risk-neutral pricing formula where Q B is the equivalent martingale measure associated to the numraire B(t), and F t denotes the filtration of the information observed in the market until time t.Therefore, if today is the time t, then P(t, T ) is deterministic and it should match the information observed in the market.However, at any future time t f from today, t < t f < T , P(t f , T ) represents a random variable whose value is model dependent.Models for short-rate are typically classified depending upon the number of noisy factors that defines its dynamics.Popular one-factor short-rate models include the Vasicek, the Hull&White model, the CIR (Cox-Ingesroll-Ross) model and its CIR++ extension, among others.They fast became of lesser interest due to their limitation when pricing financial instruments whose pay-offs involve the joint distribution of several of such rates at different maturities, mainly due to its incapability to exhibit the intrinsic decorrelation among them.Motivated from this observation, multi-factor models appeared to enrich the correlation structure.As a result, several two factor models were proposed, such as the Gaussian-Vasicek model and the Hull-White Two-Factor model.
Despite the freedom when modeling the instantaneous short-rate in the models mentioned above, some limitations may appear when attempting to calibrate a particular model to the current (observed) market curve of discount factors and to capture, at the same time, the correlation and covariance structure of forward rates.The first sound alternative to shortrate models was introduced by Heath, Jarrow and Morton in 1992 [8], developing a general framework for modeling the instantaneous forward rates.In its multi-factor version, determining the number of noisy factors needed becomes a tradeoff between the ability, with increasing noisy factors, to better reproduce correlation and covariance structures while capturing market data, and the computational cost when performing a numerical simulation.
The connection between the forward rates f (t, T ) and the short rate r(t) is established through the bond price as When f (t, T ) is known for all T , we must have By differentiating Eq. ( 2) with respect to T we obtain By changing to the T −forward measure Q T associated to the bond price numéraire P(t, T ) we have and therefore, As such, in the HJM multi-factor model, the evolution of a risk-neutral zero-coupon bond price satisfies the following equation where dW i , i = 1, ..., N, are the uncorrelated Brownian increments associated to the volatilities σ i .Using the bond price dynamics ( 8) and (3), we have where This unique choice for α(t, T ) as a function of the volatility terms is what prevents arbitrage.As mentioned before, this is a general framework from which many short-rate models may be derived, upon the particular choices for the σ terms.However, not every choice generates a Markovian dynamics.They must also be carefully selected in order to derive practical algorithms that are efficient in terms of computational times.One possibility that ensures Markovianity is to assume that the volatility factors only depend on the time to maturity, so σ i = σi (T − t) = σi (τ).At this point, we can use time series data to calculate the functions σi .For this purpose, we build the covariance matrix between the changes in the forward rates for different time-maturities τ j (typically for maturities at 1m, 3m, 6m, 1y, 2y, ...).The result is a symmetric matrix whose diagonal terms are the variances of the rates, while the off-diagonal terms represent the covariances between each pair of rates.
Considering all possible time-maturing forwards is computationally costly for the numerical simulations.Using PCA we can obtain the most relevant eigenvectors and their associated eigenvalues.As seen in the literature, most of the evolution of the curve can be explained by considering 2 or 3 of such factors.Typically, it is observed that whenever the entries of the first principal component are all similar, then the dominant movement of the curve will be a parallel shift.Also, the second component typically account for a twist in the curve.In general, if the eigenvalues are λ i and the eigenvectors are v i , the volatility factors will be given by σi To illustrate our qPCA algorithm, we will apply this technique to the covariance matrix appearing in Fig. 19.3 in Ref. [33], based on historical data for one-, three-and sixmonth rates.The matrix is 0.000189 0.000097 0.000091 0.000097 0.000106 0.000101 0.000091 0.000101 0.000126

Quantum Principal Component Analysis
Principal component analysis (PCA) is a mathematical technique which allows us to find the optimal low-rank approximation of a given matrix by computing its spectral decomposition in eigenvalues and eigenvectors.Indeed, this approximation discards the smallest eigenvalues of the matrix, keeping only the principal components of the spectral decomposition.This technique is of paramount importance for a variety of applications but, unfortunately, the computational cost is too high when the size of the matrix is large.It is in this context in which quantum algorithms and quantum computers may play a relevant role.Indeed, in Ref. [14] the authors provided an elegant quantum algorithm to perform PCA with an exponential speed-up.The authors assume that the matrix can be represented by a quantum state, i.e. it is a nonnegative matrix with trace equal to one, which covers a wide range of interesting cases, including the case under study in this manuscript of covariance matrices associated to volatilities.In this manuscript, we implement a slightly modified version of the aforementioned algorithm, which is better adapted to be run in a small and noisy quantum chip, typical in this NISQ technology era [34].This allows us to reduce the number of noisy presented within the HJM model.This is the first step toward the construction of general Quantum Computing algorithm to fully simulate the HJM model on the IBM Quantum Computer for pricing interest rate financial derivatives.In the following Section, we briefly describe the algorithm.

QUANTUM CIRCUIT
Let us consider a non-negative matrix σ N ∈ R N × R N with tr[σ N ] = 1, which is the matrix whose principal components we want to compute.Let us assume that we can efficiently generate the unitary e itσ N .It has been proven in the literature that, under certain conditions such as sparsity of the matrix or the access to several copies of σ N , this is possible.This matrix admits a spectral decomposition σ N = N j=1 λ j |u j u j |, with 0 ≤ λ j ≤ 1 and N j=1 λ j = 1, and we assume that σ N can be very well approximated by a matrix ρ r = r j=1 λ j |u j u j | with rank r N. Therefore, the goal of the algorithm is the determination of the r largest eigenvalues of σ N and their corresponding eigenvectors.If we want to determine the eigenvalues with an n-bit precision, we will need n + log N qubits, as depicted in Fig. 1, which represents the gate decomposition of the algorithm.A priori, we do not know the eigenvectors of our algorithm.Hence, we cannot make use of quantum phase estimation to compute directly the corresponding eigenvalue.Consequently, we initialize our system in a random state |b whose (unknown) decomposition in terms of the eigenbasis is given by |b = N j=1 β j |u j .If we take a random vector, the probability that there exists a component β k = 0 is zero.The quantum state after the quantum Fourier transform can be written as |Ψ b = N j=1 β j |λ (n) j ⊗ |u j , so eigenvalues and eigenvectors are entangled.However, if our assumption that σ N is well approximated by the r-rank matrix ρ r is correct, then the highest eigenvalues should be around 1/r ≈ n k=1 y k 2 −k .Calling |y (n) = |y 1 y 2 . . .y n the vector of these components, it means that, by projecting the eigenvalue component |λ (n) j of the state |Ψ b around this component, one may obtain the eigenvector corresponding to the maximum eigenvalue, i.e. y (n) | ⊗ 1|Ψ b ≈ |u max .It is possible, especially when n is small, as may happen in the NISQ chips, that the n-bit approximation of the eigenvalue cannot be able to distinguish between two or more eigenvectors.In this case, the projection is not into the maximum eigenvalue, but into a K-dimensional subspace containing the indistinguishable components y (n) | ⊗ 1|Ψ b = K j=1 β j |u j , where the β j are the normalized β j in the subspace.As we do not know a priori whether K > 1 or not, we could start with a different random state |c = N j=1 γ j |u j , which leads to After projecting into |y (n) the expect state is a different superposition L j=1 γ j |u j with high probability, which helps us to check whether we have actually identified the eigenvector corresponding to the maximum eigenvalue.Otherwise, we must increase the n-bit precision until a unique eigenvalue is identified.
Let us assume now that the n-bit precision is sufficient to determine a unique eigenvector.Taking into account the con-straints due to the small number of qubits and the noise of the chip and the operations, we can sequentially improve the result of the eigenvector.As described above, we start the protocol with a random quantum state |b 0 , to which the noisy algorithm is applied and the projection into the |y (n) subspace is performed.Let us call the result |Ψ b 0 , which is an approximation for the eigenvector.If we employ now this state as initial state in the protocol, |Ψ b 0 = |b 1 , then one expects that the approximation for the eigenvector provided by |Ψ b 1 improves the fidelity due to the cancelation of coherent errors associated to the β components.Nonetheless, there is a limitation in this sequential improvement related to the decoherence of the qubits and the statistical error of the measurement.In any case, the result can be (slightly) further improved by performing measurements in different bases and averaging, since this cancels some systematic errors of the gates.

RESULTS
As described in the previous section, the protocol is divided into two parts.Firstly, we estimate the eigenvector |u max corresponding to the largest eigenvalue λ max .We start with a random state, apply the circuit implementation shown in Fig. 2, project on the binary n-bit estimation for the largest eigenvalue |y (n) , and use this state as initial state of the process, which sequentially approaches the exact eigenvector.Afterwards, we use this eigenvector to get a more accurate approximation for the eigenvalue λ max by means of quantum phase estimation.
For the estimation of the eigenvector, we start with a random state |b 0 .Hence, the initial state of the system is |0 ⊗ |0 ⊗ |b 0 .After the first iteration and projecting on the computational basis the eigenvector, we obtain a first estimation, which we will call |b 1 , and use it as the initial state of the system on the next iteration.This is: |0 ⊗ |0 ⊗ |b 1 .We will continue this process and iterate k times until |b k−1 ≈ |b k .Once we reach that point, we can say that |b k ≈ |u .
Let us now estimate the eigenvalue λ max .Once the first part is finished and we have an accurate approximation for |u max , we can apply quantum phase estimation [10] to obtain λ max with n-bit precision.The precision is limited in this case by the size of the processor.Our aim is to apply the algorithm to the 3 × 3 matrix given in Eq. ( 12) in the 5-qubit IBMQX2 quantum processor.Firstly, we will solve the 2 × 2 submatrix of σ 3 containing only two maturities, and afterwards, we will solve the 4×4 expansion of the same matrix.Despite the small size of the problem, the volume of the quantum algorithms allowed in this processor is almost achieved, but we can still obtain relatively accurate results.We have run the algorithm in both the simulator provided by QISKIT and the real IBM quantum processor, reaching accurate results in both cases.Firstly, we need to codify the covariant matrix in a quantum state, so we only need to normalize it with respect to its trace, whose spectral decomposition is given by Let us remark that λ max λ 2 , a usual characteristic of these correlation matrices, so we can apply the PCA technique to find the optimal low-rank approximation of ρ 2 .Let us now define the unitary For the first part of the protocol, we will make use of three qubits, two for a 2-bit approximation of the eigenvalue, and a third one one to represent the eigenvector.We apply the first part of the protocol as described above, starting with a quantum state |b 0 = 1 √ 2 (|0 + |1 ) and projecting into the |y (n) = |11 state.After the 4th iteration, each of them averaged over 8192 realizations, the outcome vector estimating the eigenvector stabilizes and we stop.With this final eigenvector, we also rotate the measurement basis in x, y and an arbitrary direction r = (cos α, −e iβ sin α; e iβ sin α, e iγ cos α), with α = 1.00, β = 0.80 and γ = 0.16, to compute the relative phase and to improve the accuracy of the solution provided.Our estimation for |u max is consequently given by with δ = 0.9 the error estimated from the qubit and measurement fidelity provided by IBM and the statistical error related to the number of repetitions.Let us remark that we have split the complex phase between both states using the global phase.
The estimation for the coefficients after each iteration in the z basis is provided in Table I.We can observe that the algorithm has already converged in the first iteration, and the variations are within the estimated error.We take the eigenvector produced in the last iteration and repeat the algorithm with this one as initial state measuring in x, y and a r-random direction to check possible relative phases and to try to remove systematic errors, which yields the states |b x = 0.878|0 + (0.421 + i0.230)|1 , |b y = 0.878|0 + (0.427 + i0.220)|1 , and |b r = 0.985|0 + 0.175|1 .Let us remark that the previous estimation of the eigenvector was performed by projecting into the subspace estimating the eigenvalue into the two bit string λ max = 0.11.However, we can now apply quantum phase estimation to improve the estimation for the eigenvalue.We divide the problem into these two stages for two reasons.Firstly, we do not know a priori the value of the maximum eigenvalue only the approximate rank, and hence a low n-bit approximation covers The graphic shows the experimental probabilities of finding the three qubits in each state and its corresponding errors (red bars) for the four iterations of the algorithm.We have considered both statistical and experimental errors, assuming for the latter an error of 8% for each two-qubit gate.a larger range, as explained in the previous section.Additionally, we observe a lower error when protocol performed in this manner, probably due to the accumulation of two qubit gates and the error in the projection for the eigenvalue estimation.However, we cannot be sure, since IBM does not provide the exact quantum circuit which they are performing in the processor.
Let us now use three qubits for the eigenvalue estimation λ max = 0.b 1 b 2 b 3 , keeping one qubit to encode the corresponding eigenvector.The depth of the circuit implementation grows and leads us to the decoherence of the system when we run it on the real quantum processor, as depicted in Fig. 3.However, the result provided by the QISKIT simulator, produce the quantum state |111 ⊗ [(0.808|0 + 0.600|1 ], which is an almost ideal result for the 3-bit string estimation of the eigenvalue.Indeed, the predicted eigenvalue is λ = 0.111 in binary representation and corresponds to the number λ = 0.875 and the fidelity between |u max and the one obtained after performing the quantum phase estimation in the FIG. 3. (a) Quantum phase estimation circuit implementation for the 3-bit estimation of the greatest eigenvalue, λ (3) .After estimating the eigenvector |u max , it is used to improve the estimation of the corresponding eigenvalue λ by applying the quantum phase estimation algorithm.In this case we dedicate 3 qubits to the binary codification of λ.The fourth qubit is initialized on the estimated eigenvector |u max .The fifth two-qubit gate represents a controlled T † gate, controlling the first qubit and acting on the third one.The rest of the gates are the same that have been applied on the previous part of the algorithm.Finally, one takes measures and gets the final state of the system: |λ (3) ⊗ |u max = |111 ⊗ (0.808|0 + 0.600|1 ).(b) Populations of the 3-bit eigenvalue estimation.This chart shows the probabilities of each state in simulator QISKIT (pink bars) and in the real quantum processor (blue bars) for the quantum phase estimation algorithm taking the previously obtained eigenvector given in Eq. (17).The first qubit refers to the subspace of the eigenvector estimation.The next three qubits refers to the subspace of the binary estimation of the eigenvalue.The quantum circuit comprises at least 6 entangling gates, which leads the system to an almost total decoherence, as reflected in the homogeneous distribution of probabilities in the real chip.
QISKIT simulator |u QPE is This shows that, with few improvements in the gates and chips or with a lower level programming in the chip, one could substantially improve the results.

× matrix
In this case, the matrix σ 3 will be represented by the twoqubit quantum state 0.4489 0.2304 0.2162 0 0.2304 0.2518 0.2399 0 0.2162 0.2399 0.2993 0 0 0 0 0 Thus, the unitary generated, U ρ 4 = e 2πiρ 4 , is given by   The number of entangling gates performed for this algorithm is at least 18, so the total estimated error δ in the coefficients, assuming the 8% error per gate observed in the previous section, is over 100%, which makes in principle the result meaningless.

CONCLUSIONS
We have proposed and implemented an efficient quantum algorithm to reduce the number of noisy factors present in the time evolution of forward rates according to the multi-factor Heath-Jarrow-Morton model.Indeed, this model considers several noisy components to accurately describe the dynamics of several time-maturing forward rates, which can be gathered in a cross-correlation matrix.The eigenvectors corresponding to the largest eigenvalues of this matrix provide the principal components of the correlations.When the considered data is large, this calculation turns out to be challenging.The principal components are experimentally estimated using a hybrid classical-quantum algorithm with the 5-qubit IBMQX2 quantum computer for 2 × 2 and 3 × 3 cross-correlation matrices, which are based on historical data for two and three time-maturing forward rates.We have obtained a reasonable approximation for both the maximum eigenvalue and its corresponding eigenvector in the 2 × 2 case.For the 4 × 4 matrix, the depth of the algorithm is too high and the experimental errors in the quantum processor prevent us from extracting any useful information.Simultaneously, the simulation in QISKIT shows that it would be achievable in a better experimental set.This means that we have exhausted the computational power provided by the current quantum processor in terms of gate fidelities, connectivity, and number of qubits.The main drawback is that cloud quantum computers force us to perform only black-box high-level programming.Therefore, if a lower level programming were available, the optimization of the quantum algorithm adapted to the chip constraints would allow us for dramatically increasing the algorithm volume.Nonetheless, this manuscript is a first step towards the design of a general quantum algorithm to fully simulate on quantum computers the HJM model for pricing interest-rate financial derivatives, and shows that practical applications of quantum computers in finance will be achievable even in the NISQ technology era.
The authors acknowledge the use of IBM QISKIT for this work.The views expressed are those of the authors and do not reflect the official policy or position of IBM.We also acknowledge support from Spanish Ramón y Cajal Grant RYC-2012-11391 and RYC-2017-22482, Basque Government IT986-16,

FIG. 1 .
FIG. 1.Quantum circuit implementation for n + log N qubits.The first n qubits are dedicated to the binary codification of the maximum eigenvalue of the matrix σ N and they are initialized in the site |0 .The rest of the qubits, a total of log N, encodes the estimation of the corresponding eigenvector and are initialized on a random state |b .The single qubit gate H correspond to the Hadamard gate.The rest of the gates are controlled operations.The controlled U 2 k ρ gate applies the matrix U = e itσ N 2 k times on the last set of qubits.The controlled R † k

FIG. 2 .
FIG. 2. (a) Quantum circuit implementation for the 2 × 2 matrix.The first two qubits encodes the 2-bit estimation of the greatest eigenvalue of ρ 2 and are initialized on the state |0 .The last qubit is dedicated to the estimation of the corresponding eigenvector.It is initialized on a random state |b .For the first iteration, we have initialized it on the state |+ .The single qubit gates represented by the letter H refers to the Hadamard gate.The controlled U 3 gates represent the unitary controlled operations called U 2 k ρ on Fig 1.The last two qubit gate is a controlled S † gate, controlling the first qubit and acting on the second.It is represented by a dot on each qubit.The final state of the system after running the circuit and taking measures is |11 ⊗ (0.719|0 + 0.659|1 ).(b) Populations for each iteration.The graphic shows the experimental probabilities of finding the three qubits in each state and its corresponding errors (red bars) for the four iterations of the algorithm.We have considered both statistical and experimental errors, assuming for the latter an error of 8% for each two-qubit gate.

FIG. 4 .
FIG. 4. Quantum circuit implementation for the 4×4 matrix.The first qubit is the only one dedicated for the binary codification of the greatest eigenvalue λ of the matrix ρ 4 .It is initialized on the state |0 .The last two qubits encodes the estimation of the corresponding eigenvector and are initialized on a ransom state |b .The final state of the system after measuring is |1 ⊗ |u max

TABLE I .
Estimated coefficients of the eigenvector for consecutive iterations of the algorithm in modulus and measured in the z basis.Here, the state of the previous iteration is employed as initial state in the following iteration until the values are stabilized.Measurements of the eigenvector are performed in the z basis and repeated for 8192 realizations.

TABLE II .
Estimated coefficients of the eigenvector for consecutive iterations of the algorithm in modulus and measured in the z basis.Here, the state of the previous iteration is employed as initial state in the following iteration until the values are stabilized.Measurements of the eigenvector are performed in the z basis and repeated for 8192 realizations.