1]Department of Mathematics, Nottingham Trent University, Nottingham, NG11 8NS, UK *][email protected], [email protected]

Simulating the non-Hermitian dynamics of financial option pricing with quantum computers

Swagat Kumar    Colin Michael Wilmott [ [
Abstract

The Schrödinger equation describes how quantum states evolve according to the Hamiltonian of the system. For physical systems, we have it that the Hamiltonian must be a Hermitian operator to ensure unitary dynamics. For anti-Hermitian Hamiltonians, the Schrödinger equation instead models the evolution of quantum states in imaginary time. This process of imaginary time evolution has been used successfully to calculate the ground state of a quantum system. Although imaginary time evolution is non-unitary, the normalised dynamics of this evolution can be simulated on a quantum computer using the quantum imaginary time evolution (QITE) algorithm. In this paper, we broaden the scope of QITE by removing its restriction to anti-Hermitian Hamiltonians, which allows us to solve any partial differential equation (PDE) that is equivalent to the Schrödinger equation with an arbitrary, non-Hermitian Hamiltonian. An example of such a PDE is the famous Black-Scholes equation that models the price of financial derivatives. We will demonstrate how our generalised QITE methodology offers a feasible approach for real-world applications by using it to price various European option contracts modelled according to the Black-Scholes equation.

keywords:
quantum computing, quantum simulation, imaginary time evolution, Black-Scholes equation

A financial derivative is an options contract whose value derives from an underlying financial asset [1]. An options contract defines an agreement between two parties that entails a right to trade an asset at some specified future date for a fixed price. This right to trade agreement thus creates inherent value, which may in turn be traded in the same manner as the underlying financial asset. Consequently, a financial derivative may be viewed as an instrument, which can be used to either exploit arbitrage opportunities or mitigate risk exposure in the market. For this reason, a fundamental task in quantitative finance is how exactly do we determine the fair price of a financial derivative. Determining the fair price of an option is a highly non-trivial task, which is due in part to the stochastic nature of the parameters that define a derivative.

The famous Black–Scholes model [2, 1] is an effective method for determining the fair price of a derivative, and has become the standard for pricing European style financial options. Given the payoff price for an option at the maturity time, we can determine the present price of the option by solving the linear differential equation

ut=12(σx)22ux2rxux+ru,𝑢𝑡12superscript𝜎𝑥2partial-derivative𝑥2𝑢𝑟𝑥𝑢𝑥𝑟𝑢\frac{\partial u}{\partial t}=-\frac{1}{2}(\sigma x)^{2}\partialderivative[2]{% u}{x}-rx\frac{\partial u}{\partial x}+ru,divide start_ARG ∂ italic_u end_ARG start_ARG ∂ italic_t end_ARG = - divide start_ARG 1 end_ARG start_ARG 2 end_ARG ( italic_σ italic_x ) start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT divide start_ARG start_DIFFOP SUPERSCRIPTOP start_ARG ∂ end_ARG start_ARG 2 end_ARG end_DIFFOP start_ARG italic_u end_ARG end_ARG start_ARG SUPERSCRIPTOP start_ARG ∂ start_ARG italic_x end_ARG end_ARG start_ARG 2 end_ARG end_ARG - italic_r italic_x divide start_ARG ∂ italic_u end_ARG start_ARG ∂ italic_x end_ARG + italic_r italic_u , (1)

for (x,t)[x0,xN]×[0,T]𝑥𝑡subscript𝑥0subscript𝑥𝑁0𝑇(x,t)\in[x_{0},x_{N}]\times[0,T]( italic_x , italic_t ) ∈ [ italic_x start_POSTSUBSCRIPT 0 end_POSTSUBSCRIPT , italic_x start_POSTSUBSCRIPT italic_N end_POSTSUBSCRIPT ] × [ 0 , italic_T ], where the condition u(x,T)=p(x)𝑢𝑥𝑇𝑝𝑥u(x,T)=p(x)italic_u ( italic_x , italic_T ) = italic_p ( italic_x ) denotes the payoff of the option. The price of the option is denoted by u(x,t)𝑢𝑥𝑡u(x,t)italic_u ( italic_x , italic_t ), while x𝑥xitalic_x denotes the value of the underlying asset, t𝑡titalic_t represents time, and T𝑇Titalic_T is the maturity time. For simplicity, it is assumed that the volatility of the asset, σ𝜎\sigmaitalic_σ, and the risk-free interest rate, r𝑟ritalic_r, are constant with respect to time. For convenience, adopting τ=Tt𝜏𝑇𝑡\tau=T-titalic_τ = italic_T - italic_t transforms the Black-Scholes equation Eq. (1) to the initial value problem

uτ=12(σx)22ux2+rxuxru,𝑢𝜏12superscript𝜎𝑥2partial-derivative𝑥2𝑢𝑟𝑥𝑢𝑥𝑟𝑢\frac{\partial u}{\partial\tau}=\frac{1}{2}(\sigma x)^{2}\partialderivative[2]% {u}{x}+rx\frac{\partial u}{\partial x}-ru,divide start_ARG ∂ italic_u end_ARG start_ARG ∂ italic_τ end_ARG = divide start_ARG 1 end_ARG start_ARG 2 end_ARG ( italic_σ italic_x ) start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT divide start_ARG start_DIFFOP SUPERSCRIPTOP start_ARG ∂ end_ARG start_ARG 2 end_ARG end_DIFFOP start_ARG italic_u end_ARG end_ARG start_ARG SUPERSCRIPTOP start_ARG ∂ start_ARG italic_x end_ARG end_ARG start_ARG 2 end_ARG end_ARG + italic_r italic_x divide start_ARG ∂ italic_u end_ARG start_ARG ∂ italic_x end_ARG - italic_r italic_u , (2)

for (x,τ)[x0,xN]×[0,T]𝑥𝜏subscript𝑥0subscript𝑥𝑁0𝑇(x,\tau)\in[x_{0},x_{N}]\times[0,T]( italic_x , italic_τ ) ∈ [ italic_x start_POSTSUBSCRIPT 0 end_POSTSUBSCRIPT , italic_x start_POSTSUBSCRIPT italic_N end_POSTSUBSCRIPT ] × [ 0 , italic_T ] with the initial condition u(x,τ=0)=p(x)𝑢𝑥𝜏0𝑝𝑥u(x,\tau=0)=p(x)italic_u ( italic_x , italic_τ = 0 ) = italic_p ( italic_x ). To numerically solve the Black-Scholes equation, we must discretise the domain [x0,xN]subscript𝑥0subscript𝑥𝑁[x_{0},x_{N}][ italic_x start_POSTSUBSCRIPT 0 end_POSTSUBSCRIPT , italic_x start_POSTSUBSCRIPT italic_N end_POSTSUBSCRIPT ] to a finite domain and assign appropriate boundary conditions.

The Schrödinger equation models the evolution of the wave function of a quantum mechanical system, and takes the form

iψ(x,t)t=H^ψ(x,t),𝑖𝜓𝑥𝑡𝑡^𝐻𝜓𝑥𝑡i\frac{\partial\psi(\vec{x},t)}{\partial t}=\hat{H}\psi(\vec{x},t),italic_i divide start_ARG ∂ italic_ψ ( over→ start_ARG italic_x end_ARG , italic_t ) end_ARG start_ARG ∂ italic_t end_ARG = over^ start_ARG italic_H end_ARG italic_ψ ( over→ start_ARG italic_x end_ARG , italic_t ) , (3)

where the Hamiltonian, H^^𝐻\hat{H}over^ start_ARG italic_H end_ARG, is a linear differential operator in x𝑥\vec{x}over→ start_ARG italic_x end_ARG acting on the wave function ψ𝜓\psiitalic_ψ. Solutions to the Schrödinger equation are expressed in terms of the time evolution operator,

ψ(x,t)=eiH^tψ(x,0).𝜓𝑥𝑡superscript𝑒𝑖^𝐻𝑡𝜓𝑥0\psi(\vec{x},t)=e^{-i\hat{H}t}\psi(\vec{x},0).italic_ψ ( over→ start_ARG italic_x end_ARG , italic_t ) = italic_e start_POSTSUPERSCRIPT - italic_i over^ start_ARG italic_H end_ARG italic_t end_POSTSUPERSCRIPT italic_ψ ( over→ start_ARG italic_x end_ARG , 0 ) . (4)

The Black-Scholes equation, Eq. (2), can also be expressed in the form of the Schrödinger equation, where its Hamiltonian is given by

H^BS=i[12(σx)22x2+rxxr].subscript^𝐻𝐵𝑆𝑖delimited-[]12superscript𝜎𝑥2partial-derivative𝑥2𝑟𝑥𝑥𝑟\hat{H}_{BS}=i\left[\frac{1}{2}(\sigma x)^{2}\partialderivative[2]{x}+rx\frac{% \partial}{\partial x}-r\right].over^ start_ARG italic_H end_ARG start_POSTSUBSCRIPT italic_B italic_S end_POSTSUBSCRIPT = italic_i [ divide start_ARG 1 end_ARG start_ARG 2 end_ARG ( italic_σ italic_x ) start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT start_DIFFOP divide start_ARG start_DIFFOP SUPERSCRIPTOP start_ARG ∂ end_ARG start_ARG 2 end_ARG end_DIFFOP end_ARG start_ARG SUPERSCRIPTOP start_ARG ∂ start_ARG italic_x end_ARG end_ARG start_ARG 2 end_ARG end_ARG end_DIFFOP + italic_r italic_x divide start_ARG ∂ end_ARG start_ARG ∂ italic_x end_ARG - italic_r ] . (5)

Note that while the Hamiltonian of the Schrödinger equation is a Hermitian operator, which gives rise to unitary time evolution, the Black-Scholes Hamiltonian, Eq. (5), is non-Hermitian, and induces non-unitary time evolution. However, since quantum computers evolve under unitary time evolution, it is the case that simulating non-Hermitian dynamics is not directly feasible on a quantum computer. It is for this reason that quantum computing approaches for solving the Black-Scholes equation have thus far been based on variational algorithms [3, 4, 5] or require post-selection techniques [6].

Another example of non-Hermitian dynamics can be seen in the imaginary time evolution of a quantum system. Following a Wick rotation, which replaces time with an imaginary number β=it𝛽𝑖𝑡\beta=ititalic_β = italic_i italic_t, the Schrödinger equation drives wave functions to become parallel to the ground state of the system. The Wick-rotated form of the Schrödinger equation also takes the form of Eq. (3), but with an anti-Hermitian Hamiltonian. Although the imaginary time Schrödinger equation induces non-unitary dynamics, the normalised evolution can be simulated with quantum algorithms, including quantum imaginary time evolution (QITE) [7] and variational QITE [8].

Variational QITE (varQITE) is a hybrid quantum-classical algorithm that is well suited for noisy intermediate-scale quantum (NISQ) devices. As a variational quantum algorithm, varQITE considers a system of differential equations linking to the gradients of ansatz parameters in imaginary time, and coefficients that depend on measurements of the ansatz. Variational QITE employs a fixed ansatz, where the time complexity is linear in the number of Hamiltonian terms. However, the choice of ansatz is crucial, as it is possible that the states produced by the true imaginary time evolution may not be generated by the particular parameterised ansatz circuit.

On the other hand, the simulated QITE approach is an alternative technique for simulating imaginary time evolution [7]. The technique works by approximating the normalised time evolution operator with Trotter products via unitaries. Simulated QITE with sufficiently large unitary domains is not plagued by barren plateaus, as is the case with its variational counterpart. Simulated QITE on a k𝑘kitalic_k-local Hamiltonian requires a number of measurements that is exponential in k𝑘kitalic_k, with the depth of the associated quantum circuits scaling accordingly. Interestingly, however, recent work has focused on optimising the circuit depth and the number of measurements required in simulated QITE. For instance, Fast QITE provides for an exponential reduction in the circuit depth of each unitary and also reduces the number of measurements required per time step, leading to a quadratic speedup over QITE [9]. A time dependent drifted QITE introduces the concept of randomised compiling, which reduces the unitary circuit depth to be a constant and also reduces the number of measurements needed [10]. We also have an implementation of QITE using nonlocal approximation, which reduces circuit depth and is NISQ-friendly [11].

Refer to caption
Figure 1: Black-Scholes option pricing simulations using QNUTE. The figure compares the Black-Scholes option prices calculated using QNUTE with varying number of qubits to the corresponding analytical solutions for the following European option types: (a) Call (b) Put (c) Bull Spread (d) Bear Spread (e) Straddle (f) Strangle. The vertical dashed lines at x=50,75,𝑥5075x=50,75,italic_x = 50 , 75 , and 100100100100 correspond to the strike prices of the option contracts. We simulated the solutions for the asset prices x[0,150]𝑥0150x\in[0,150]italic_x ∈ [ 0 , 150 ], with the maturity time T=3𝑇3T=3italic_T = 3 years, simulated over NT=500subscript𝑁𝑇500N_{T}=500italic_N start_POSTSUBSCRIPT italic_T end_POSTSUBSCRIPT = 500 time steps. Our simulations used a risk-free interest rate of r=0.04𝑟0.04r=0.04italic_r = 0.04, and the volatility σ=0.2𝜎0.2\sigma=0.2italic_σ = 0.2. The unitaries used to approximate the evolution act on all of the qubits used in the simulation.

Although imaginary time evolution was originally envisioned as a technique for determining the ground state of a Hamiltonian [8, 7], the methodology has been recently used as an approach for solving partial differential equations (PDEs), primarily based on varQITE [12, 13, 5, 3, 14]. However, a simulated QITE approach for solving linear PDEs was recently considered [15], although it is restricted to anti-Hermitian Hamiltonians involving only even-ordered derivatives. This application tracks how the non-unitary time evolution scales the quantum state over time. The approach was used to generate solutions to the isotropic heat equation by combining the scale information with the normalised states obtained from QITE.

In this paper, we further widen the scope of simulated QITE by broadening the methodology to simulations involving arbitrary non-Hermitian dynamics. By removing simulated QITE’s underlying restriction to anti-Hermitian Hamiltonians, we enhance the capabilities of the methodology with an ability to simulate arbitrary linear PDEs involving non-unitary time evolution. We have called this generalisation of simulated QITE to arbitrary Hamiltonians quantum non-unitary time evolution (QNUTE).

Results

Quantum Non-Unitary Time Evolution

QNUTE is a quantum algorithm that simulates the dynamics of the Schrödinger equation with an arbitrary non-Hermitian Hamiltonian H^=m=1Mih^m^𝐻superscriptsubscript𝑚1𝑀𝑖subscript^𝑚{\hat{H}=\sum_{m=1}^{M}i\hat{h}_{m}}over^ start_ARG italic_H end_ARG = ∑ start_POSTSUBSCRIPT italic_m = 1 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT italic_M end_POSTSUPERSCRIPT italic_i over^ start_ARG italic_h end_ARG start_POSTSUBSCRIPT italic_m end_POSTSUBSCRIPT. The non-unitary time evolution operator generated by H^^𝐻\hat{H}over^ start_ARG italic_H end_ARG is approximated by its first order Trotter product, and takes the form

eiH^T(m=1Meh^mΔt)NT,superscript𝑒𝑖^𝐻𝑇superscriptsuperscriptsubscriptproduct𝑚1𝑀superscript𝑒subscript^𝑚Δ𝑡subscript𝑁𝑇e^{-i\hat{H}T}\approx\left(\prod_{m=1}^{M}e^{\hat{h}_{m}\Delta t}\right)^{N_{T% }},italic_e start_POSTSUPERSCRIPT - italic_i over^ start_ARG italic_H end_ARG italic_T end_POSTSUPERSCRIPT ≈ ( ∏ start_POSTSUBSCRIPT italic_m = 1 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT italic_M end_POSTSUPERSCRIPT italic_e start_POSTSUPERSCRIPT over^ start_ARG italic_h end_ARG start_POSTSUBSCRIPT italic_m end_POSTSUBSCRIPT roman_Δ italic_t end_POSTSUPERSCRIPT ) start_POSTSUPERSCRIPT italic_N start_POSTSUBSCRIPT italic_T end_POSTSUBSCRIPT end_POSTSUPERSCRIPT , (6)

where NT=T/Δtsubscript𝑁𝑇𝑇Δ𝑡N_{T}=T/\Delta titalic_N start_POSTSUBSCRIPT italic_T end_POSTSUBSCRIPT = italic_T / roman_Δ italic_t [16, 17]. The normalised actions of each Trotter step eh^mΔtsuperscript𝑒subscript^𝑚Δ𝑡e^{\hat{h}_{m}\Delta t}italic_e start_POSTSUPERSCRIPT over^ start_ARG italic_h end_ARG start_POSTSUBSCRIPT italic_m end_POSTSUBSCRIPT roman_Δ italic_t end_POSTSUPERSCRIPT acting on a state |ψket𝜓\ket{\psi}| start_ARG italic_ψ end_ARG ⟩ are approximated with unitaries of the form eiA^Δtsuperscript𝑒𝑖^𝐴Δ𝑡e^{-i\hat{A}\Delta t}italic_e start_POSTSUPERSCRIPT - italic_i over^ start_ARG italic_A end_ARG roman_Δ italic_t end_POSTSUPERSCRIPT, and implemented with Trotter products of the form

eiA^ΔtI=1eiaIσ^IΔt.superscript𝑒𝑖^𝐴Δ𝑡superscriptsubscriptproduct𝐼1superscript𝑒𝑖subscript𝑎𝐼subscript^𝜎𝐼Δ𝑡e^{-i\hat{A}\Delta t}\approx\prod_{I=1}^{\mathcal{I}}e^{-ia_{I}\hat{\sigma}_{I% }\Delta t}.italic_e start_POSTSUPERSCRIPT - italic_i over^ start_ARG italic_A end_ARG roman_Δ italic_t end_POSTSUPERSCRIPT ≈ ∏ start_POSTSUBSCRIPT italic_I = 1 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT caligraphic_I end_POSTSUPERSCRIPT italic_e start_POSTSUPERSCRIPT - italic_i italic_a start_POSTSUBSCRIPT italic_I end_POSTSUBSCRIPT over^ start_ARG italic_σ end_ARG start_POSTSUBSCRIPT italic_I end_POSTSUBSCRIPT roman_Δ italic_t end_POSTSUPERSCRIPT . (7)

In Eq. (7), A^=I=1aIσ^I^𝐴superscriptsubscript𝐼1subscript𝑎𝐼subscript^𝜎𝐼{\hat{A}=\sum_{I=1}^{\mathcal{I}}a_{I}\hat{\sigma}_{I}}over^ start_ARG italic_A end_ARG = ∑ start_POSTSUBSCRIPT italic_I = 1 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT caligraphic_I end_POSTSUPERSCRIPT italic_a start_POSTSUBSCRIPT italic_I end_POSTSUBSCRIPT over^ start_ARG italic_σ end_ARG start_POSTSUBSCRIPT italic_I end_POSTSUBSCRIPT is a Hermitian operator with σ^Isubscript^𝜎𝐼\hat{\sigma}_{I}over^ start_ARG italic_σ end_ARG start_POSTSUBSCRIPT italic_I end_POSTSUBSCRIPT denoting Hermitian operators chosen such that each unitary eiθσ^Isuperscript𝑒𝑖𝜃subscript^𝜎𝐼e^{-i\theta\hat{\sigma}_{I}}italic_e start_POSTSUPERSCRIPT - italic_i italic_θ over^ start_ARG italic_σ end_ARG start_POSTSUBSCRIPT italic_I end_POSTSUBSCRIPT end_POSTSUPERSCRIPT is efficiently implemented with a quantum circuit parameterised by θ𝜃\thetaitalic_θ. The real-valued coefficients aIsubscript𝑎𝐼a_{I}italic_a start_POSTSUBSCRIPT italic_I end_POSTSUBSCRIPT are determined by minimising the expression

eh^mΔt|ψψ|eh^mΔteh^mΔt|ψeiA^Δt|ψ,normsuperscript𝑒subscript^𝑚Δ𝑡ket𝜓expectation-valuesuperscript𝑒superscriptsubscript^𝑚Δ𝑡superscript𝑒subscript^𝑚Δ𝑡𝜓𝜓superscript𝑒𝑖^𝐴Δ𝑡ket𝜓\left\|\frac{e^{\hat{h}_{m}\Delta t}\ket{\psi}}{\sqrt{\expectationvalue{e^{% \hat{h}_{m}^{\dagger}\Delta t}e^{\hat{h}_{m}\Delta t}}{\psi}}}-e^{-i\hat{A}% \Delta t}\ket{\psi}\right\|,∥ divide start_ARG italic_e start_POSTSUPERSCRIPT over^ start_ARG italic_h end_ARG start_POSTSUBSCRIPT italic_m end_POSTSUBSCRIPT roman_Δ italic_t end_POSTSUPERSCRIPT | start_ARG italic_ψ end_ARG ⟩ end_ARG start_ARG square-root start_ARG ⟨ start_ARG italic_ψ end_ARG | start_ARG italic_e start_POSTSUPERSCRIPT over^ start_ARG italic_h end_ARG start_POSTSUBSCRIPT italic_m end_POSTSUBSCRIPT start_POSTSUPERSCRIPT † end_POSTSUPERSCRIPT roman_Δ italic_t end_POSTSUPERSCRIPT italic_e start_POSTSUPERSCRIPT over^ start_ARG italic_h end_ARG start_POSTSUBSCRIPT italic_m end_POSTSUBSCRIPT roman_Δ italic_t end_POSTSUPERSCRIPT end_ARG | start_ARG italic_ψ end_ARG ⟩ end_ARG end_ARG - italic_e start_POSTSUPERSCRIPT - italic_i over^ start_ARG italic_A end_ARG roman_Δ italic_t end_POSTSUPERSCRIPT | start_ARG italic_ψ end_ARG ⟩ ∥ , (8)

up to O(Δt)𝑂Δ𝑡O(\Delta t)italic_O ( roman_Δ italic_t ), which involves solving a system of linear equations, (S+S)a=b𝑆superscript𝑆top𝑎𝑏{(S+S^{\top})\,\vec{a}=\vec{b}}( italic_S + italic_S start_POSTSUPERSCRIPT ⊤ end_POSTSUPERSCRIPT ) over→ start_ARG italic_a end_ARG = over→ start_ARG italic_b end_ARG, constructed using various measurements on |ψket𝜓\ket{\psi}| start_ARG italic_ψ end_ARG ⟩. In particular, we have

SI,J=ψ|σ^Iσ^J|ψ,c=1+2ΔtReψ|h^m|ψ,bI=2cImψ|σ^Ih^m|ψ,subscript𝑆𝐼𝐽absentexpectation-valuesuperscriptsubscript^𝜎𝐼subscript^𝜎𝐽𝜓𝜓𝑐absent12Δ𝑡Reexpectation-valuesubscript^𝑚𝜓𝜓subscript𝑏𝐼absent2𝑐Imexpectation-valuesuperscriptsubscript^𝜎𝐼subscript^𝑚𝜓𝜓\displaystyle\begin{aligned} S_{I,J}&=\expectationvalue{\hat{\sigma}_{I}^{% \dagger}\hat{\sigma}_{J}}{\psi},\\ c&=\sqrt{1+2\Delta t\,\text{Re}\expectationvalue{\hat{h}_{m}}{\psi}},\\ b_{I}&=\frac{-2}{c}\,\text{Im}\expectationvalue{\hat{\sigma}_{I}^{\dagger}\,% \hat{h}_{m}}{\psi},\end{aligned}start_ROW start_CELL italic_S start_POSTSUBSCRIPT italic_I , italic_J end_POSTSUBSCRIPT end_CELL start_CELL = ⟨ start_ARG italic_ψ end_ARG | start_ARG over^ start_ARG italic_σ end_ARG start_POSTSUBSCRIPT italic_I end_POSTSUBSCRIPT start_POSTSUPERSCRIPT † end_POSTSUPERSCRIPT over^ start_ARG italic_σ end_ARG start_POSTSUBSCRIPT italic_J end_POSTSUBSCRIPT end_ARG | start_ARG italic_ψ end_ARG ⟩ , end_CELL end_ROW start_ROW start_CELL italic_c end_CELL start_CELL = square-root start_ARG 1 + 2 roman_Δ italic_t Re ⟨ start_ARG italic_ψ end_ARG | start_ARG over^ start_ARG italic_h end_ARG start_POSTSUBSCRIPT italic_m end_POSTSUBSCRIPT end_ARG | start_ARG italic_ψ end_ARG ⟩ end_ARG , end_CELL end_ROW start_ROW start_CELL italic_b start_POSTSUBSCRIPT italic_I end_POSTSUBSCRIPT end_CELL start_CELL = divide start_ARG - 2 end_ARG start_ARG italic_c end_ARG Im ⟨ start_ARG italic_ψ end_ARG | start_ARG over^ start_ARG italic_σ end_ARG start_POSTSUBSCRIPT italic_I end_POSTSUBSCRIPT start_POSTSUPERSCRIPT † end_POSTSUPERSCRIPT over^ start_ARG italic_h end_ARG start_POSTSUBSCRIPT italic_m end_POSTSUBSCRIPT end_ARG | start_ARG italic_ψ end_ARG ⟩ , end_CELL end_ROW (9)

see Supplementary Information for further details on the construction. Simulating each Trotter step involves taking O(2)𝑂superscript2O(\mathcal{I}^{2})italic_O ( caligraphic_I start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT ) measurements to construct the ×\mathcal{I}\times\mathcal{I}caligraphic_I × caligraphic_I matrix equation and generates a quantum circuit of depth O()𝑂O(\mathcal{I})italic_O ( caligraphic_I ). The full simulation therefore requires O(NTM2)𝑂subscript𝑁𝑇𝑀superscript2O(N_{T}M\mathcal{I}^{2})italic_O ( italic_N start_POSTSUBSCRIPT italic_T end_POSTSUBSCRIPT italic_M caligraphic_I start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT ) measurements.

The states generated by QNUTE are determined by the choice of σ^Isubscript^𝜎𝐼\hat{\sigma}_{I}over^ start_ARG italic_σ end_ARG start_POSTSUBSCRIPT italic_I end_POSTSUBSCRIPT. For example, choosing σ^Isubscript^𝜎𝐼\hat{\sigma}_{I}over^ start_ARG italic_σ end_ARG start_POSTSUBSCRIPT italic_I end_POSTSUBSCRIPT to encompass all Pauli strings allows us to capture arbitrary state vector rotations in the state space, whereas restricting σ^Isubscript^𝜎𝐼\hat{\sigma}_{I}over^ start_ARG italic_σ end_ARG start_POSTSUBSCRIPT italic_I end_POSTSUBSCRIPT to Pauli strings involving an odd number of Y^^𝑌\hat{Y}over^ start_ARG italic_Y end_ARG gates significantly reduces the operator decomposition count and allows us to capture those rotations that do not introduce complex phases to the quantum state. Given a choice of σ^Isubscript^𝜎𝐼\hat{\sigma}_{I}over^ start_ARG italic_σ end_ARG start_POSTSUBSCRIPT italic_I end_POSTSUBSCRIPT, the accuracy of the QNUTE implementation is dependent on the support of A^^𝐴\hat{A}over^ start_ARG italic_A end_ARG. Ideally, the support of A^^𝐴\hat{A}over^ start_ARG italic_A end_ARG should cover D=O(C)𝐷𝑂𝐶{D=O(C)}italic_D = italic_O ( italic_C ) adjacent qubits surrounding the support of h^msubscript^𝑚\hat{h}_{m}over^ start_ARG italic_h end_ARG start_POSTSUBSCRIPT italic_m end_POSTSUBSCRIPT, where the correlation length C𝐶Citalic_C denotes the maximum distance between interacting qubits in the Hamiltonian. However, our choice to express A^^𝐴\hat{A}over^ start_ARG italic_A end_ARG has been in terms of Pauli strings, which gives rise to an exponential dependence on D𝐷Ditalic_D, =O(2D)𝑂superscript2𝐷{\mathcal{I}=O(2^{D})}caligraphic_I = italic_O ( 2 start_POSTSUPERSCRIPT italic_D end_POSTSUPERSCRIPT ). For this reason, we have considered an inexact implementation of QNUTE that uses a constant domain size D<C𝐷𝐶D<Citalic_D < italic_C.

We will demonstrate that QNUTE can be used to approximate solutions to arbitrary linear PDEs with solutions stored in the qubit state vector. Information relevant to the solution is extracted by taking measurements on the final quantum state. It is expected that the number of distinct measurements required to extract the relevant information should scale polynomially with the number of qubits. Further, if it is known that the solution to a PDE will be real-valued and non-negative, then the normalised solution calculated by QNUTE can be extracted obtained by taking the square root of the probability distribution of computational basis states. We will use QNUTE to simulate the Black-Scholes equation, as it has a non-Hermitian Hamiltonian and has non-negative real-valued solutions.

Refer to caption
Figure 2: Average fidelities of inexact QNUTE implementations. The figure shows the fidelities of different implementations of inexact QNUTE used to simulate Black-Scholes dynamics averaged over each time step, with the error bars depicting the standard deviation. These simulations share the same parameters values for r,σ,T𝑟𝜎𝑇r,\sigma,Titalic_r , italic_σ , italic_T and NTsubscript𝑁𝑇N_{T}italic_N start_POSTSUBSCRIPT italic_T end_POSTSUBSCRIPT as with the simulations shown in Fig. 1. n𝑛nitalic_n denotes the number of qubits used to store the function samples, and D𝐷Ditalic_D denotes the maximum number of adjacent qubits targeted by the unitaries. The overall low fidelities shown the by inexact QNUTE, where D<n𝐷𝑛D<nitalic_D < italic_n, indicate that the Black-Scholes Hamiltonian with linear boundary conditions has a high correlation length, making it difficult to accurately reproduce its evolution with small unitaries.

Simulating Black-Scholes with QNUTE

To model the dynamics of the Black-Scholes equation, we discretise the domain [x0,xN]subscript𝑥0subscript𝑥𝑁[x_{0},x_{N}][ italic_x start_POSTSUBSCRIPT 0 end_POSTSUBSCRIPT , italic_x start_POSTSUBSCRIPT italic_N end_POSTSUBSCRIPT ] into 2nsuperscript2𝑛2^{n}2 start_POSTSUPERSCRIPT italic_n end_POSTSUPERSCRIPT points equally spaced by a distance of h=xNx02n1subscript𝑥𝑁subscript𝑥0superscript2𝑛1h=\frac{x_{N}-x_{0}}{2^{n}-1}italic_h = divide start_ARG italic_x start_POSTSUBSCRIPT italic_N end_POSTSUBSCRIPT - italic_x start_POSTSUBSCRIPT 0 end_POSTSUBSCRIPT end_ARG start_ARG 2 start_POSTSUPERSCRIPT italic_n end_POSTSUPERSCRIPT - 1 end_ARG. The normalised samples of the option price are stored in an n𝑛nitalic_n-qubit quantum state given by

|u¯(τ)=k=02n1u(xk,τ)|kk=02n1u2(xk,τ),ket¯𝑢𝜏superscriptsubscript𝑘0superscript2𝑛1𝑢subscript𝑥𝑘𝜏ket𝑘superscriptsubscript𝑘0superscript2𝑛1superscript𝑢2subscript𝑥𝑘𝜏\ket{\bar{u}(\tau)}=\frac{\sum_{k=0}^{2^{n}-1}u(x_{k},\tau)\ket{k}}{\sqrt{\sum% _{k=0}^{2^{n}-1}u^{2}(x_{k},\tau)}},| start_ARG over¯ start_ARG italic_u end_ARG ( italic_τ ) end_ARG ⟩ = divide start_ARG ∑ start_POSTSUBSCRIPT italic_k = 0 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT 2 start_POSTSUPERSCRIPT italic_n end_POSTSUPERSCRIPT - 1 end_POSTSUPERSCRIPT italic_u ( italic_x start_POSTSUBSCRIPT italic_k end_POSTSUBSCRIPT , italic_τ ) | start_ARG italic_k end_ARG ⟩ end_ARG start_ARG square-root start_ARG ∑ start_POSTSUBSCRIPT italic_k = 0 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT 2 start_POSTSUPERSCRIPT italic_n end_POSTSUPERSCRIPT - 1 end_POSTSUPERSCRIPT italic_u start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT ( italic_x start_POSTSUBSCRIPT italic_k end_POSTSUBSCRIPT , italic_τ ) end_ARG end_ARG , (10)

where xk=x0+khsubscript𝑥𝑘subscript𝑥0𝑘x_{k}=x_{0}+khitalic_x start_POSTSUBSCRIPT italic_k end_POSTSUBSCRIPT = italic_x start_POSTSUBSCRIPT 0 end_POSTSUBSCRIPT + italic_k italic_h. Following Eq. (5), the discretised Black-Scholes Hamiltonian can be represented in terms of a central finite difference matrix of the form

iH^BS=[γ0β0α1γ1β1α2n2γ2n2β2n2α2n1γ2n1],𝑖subscript^𝐻𝐵𝑆matrixsubscript𝛾0subscript𝛽0missing-subexpressionmissing-subexpressionsubscript𝛼1subscript𝛾1subscript𝛽1missing-subexpressionmissing-subexpressionmissing-subexpressionmissing-subexpressionmissing-subexpressionmissing-subexpressionsubscript𝛼superscript2𝑛2subscript𝛾superscript2𝑛2subscript𝛽superscript2𝑛2missing-subexpressionmissing-subexpressionmissing-subexpressionsubscript𝛼superscript2𝑛1subscript𝛾superscript2𝑛1-i\hat{H}_{BS}=\begin{bmatrix}\gamma_{0}&\beta_{0}&&\\ \alpha_{1}&\gamma_{1}&\beta_{1}&\\ &\ddots&\ddots&\ddots&&\\ &&\alpha_{2^{n}-2}&\gamma_{2^{n}-2}&\beta_{2^{n}-2}\\ &&&\alpha_{2^{n}-1}&\gamma_{2^{n}-1}\end{bmatrix},- italic_i over^ start_ARG italic_H end_ARG start_POSTSUBSCRIPT italic_B italic_S end_POSTSUBSCRIPT = [ start_ARG start_ROW start_CELL italic_γ start_POSTSUBSCRIPT 0 end_POSTSUBSCRIPT end_CELL start_CELL italic_β start_POSTSUBSCRIPT 0 end_POSTSUBSCRIPT end_CELL start_CELL end_CELL start_CELL end_CELL end_ROW start_ROW start_CELL italic_α start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT end_CELL start_CELL italic_γ start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT end_CELL start_CELL italic_β start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT end_CELL start_CELL end_CELL end_ROW start_ROW start_CELL end_CELL start_CELL ⋱ end_CELL start_CELL ⋱ end_CELL start_CELL ⋱ end_CELL start_CELL end_CELL start_CELL end_CELL end_ROW start_ROW start_CELL end_CELL start_CELL end_CELL start_CELL italic_α start_POSTSUBSCRIPT 2 start_POSTSUPERSCRIPT italic_n end_POSTSUPERSCRIPT - 2 end_POSTSUBSCRIPT end_CELL start_CELL italic_γ start_POSTSUBSCRIPT 2 start_POSTSUPERSCRIPT italic_n end_POSTSUPERSCRIPT - 2 end_POSTSUBSCRIPT end_CELL start_CELL italic_β start_POSTSUBSCRIPT 2 start_POSTSUPERSCRIPT italic_n end_POSTSUPERSCRIPT - 2 end_POSTSUBSCRIPT end_CELL end_ROW start_ROW start_CELL end_CELL start_CELL end_CELL start_CELL end_CELL start_CELL italic_α start_POSTSUBSCRIPT 2 start_POSTSUPERSCRIPT italic_n end_POSTSUPERSCRIPT - 1 end_POSTSUBSCRIPT end_CELL start_CELL italic_γ start_POSTSUBSCRIPT 2 start_POSTSUPERSCRIPT italic_n end_POSTSUPERSCRIPT - 1 end_POSTSUBSCRIPT end_CELL end_ROW end_ARG ] , (11)

where

αk=σ2xk22h2rxk2h,βk=σ2xk22h2+rxk2h,γk=rαkβk.subscript𝛼𝑘absentsuperscript𝜎2superscriptsubscript𝑥𝑘22superscript2𝑟subscript𝑥𝑘2subscript𝛽𝑘absentsuperscript𝜎2superscriptsubscript𝑥𝑘22superscript2𝑟subscript𝑥𝑘2subscript𝛾𝑘absent𝑟subscript𝛼𝑘subscript𝛽𝑘\displaystyle\begin{aligned} \alpha_{k}&=\frac{\sigma^{2}x_{k}^{2}}{2h^{2}}-% \frac{rx_{k}}{2h},\\ \beta_{k}&=\frac{\sigma^{2}x_{k}^{2}}{2h^{2}}+\frac{rx_{k}}{2h},\\ \gamma_{k}&=-r-\alpha_{k}-\beta_{k}.\end{aligned}start_ROW start_CELL italic_α start_POSTSUBSCRIPT italic_k end_POSTSUBSCRIPT end_CELL start_CELL = divide start_ARG italic_σ start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT italic_x start_POSTSUBSCRIPT italic_k end_POSTSUBSCRIPT start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT end_ARG start_ARG 2 italic_h start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT end_ARG - divide start_ARG italic_r italic_x start_POSTSUBSCRIPT italic_k end_POSTSUBSCRIPT end_ARG start_ARG 2 italic_h end_ARG , end_CELL end_ROW start_ROW start_CELL italic_β start_POSTSUBSCRIPT italic_k end_POSTSUBSCRIPT end_CELL start_CELL = divide start_ARG italic_σ start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT italic_x start_POSTSUBSCRIPT italic_k end_POSTSUBSCRIPT start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT end_ARG start_ARG 2 italic_h start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT end_ARG + divide start_ARG italic_r italic_x start_POSTSUBSCRIPT italic_k end_POSTSUBSCRIPT end_ARG start_ARG 2 italic_h end_ARG , end_CELL end_ROW start_ROW start_CELL italic_γ start_POSTSUBSCRIPT italic_k end_POSTSUBSCRIPT end_CELL start_CELL = - italic_r - italic_α start_POSTSUBSCRIPT italic_k end_POSTSUBSCRIPT - italic_β start_POSTSUBSCRIPT italic_k end_POSTSUBSCRIPT . end_CELL end_ROW (12)

Refer to Supplementary Information for the representation of the discretised Hamiltonian of Eq. (11) in the Pauli operator basis.

Norm correction

The scale factor c𝑐citalic_c given in Eq. (9) approximates how the Trotter step scales |ψket𝜓\ket{\psi}| start_ARG italic_ψ end_ARG ⟩ up to O(Δt)𝑂Δ𝑡O(\Delta t)italic_O ( roman_Δ italic_t ). These approximations can be stored and multiplied to provide an approximation of how the state vector scales over the course of the evolution. Excluding the scenario of the ideal implementation of QNUTE that records a perfect fidelity, errors associated to each scale factor will compound over multiple Trotter steps, which must be corrected periodically. For an anti-Hermitian Hamiltonian H^=iL^^𝐻𝑖^𝐿\hat{H}=i\hat{L}over^ start_ARG italic_H end_ARG = italic_i over^ start_ARG italic_L end_ARG, it was shown that the correction factor can be calculated using knowledge of the non-degenerate ground state |ψ0ketsubscript𝜓0\ket{\psi_{0}}| start_ARG italic_ψ start_POSTSUBSCRIPT 0 end_POSTSUBSCRIPT end_ARG ⟩ of L^^𝐿\hat{L}over^ start_ARG italic_L end_ARG and its corresponding eigenvalue λ0subscript𝜆0\lambda_{0}italic_λ start_POSTSUBSCRIPT 0 end_POSTSUBSCRIPT [15]. This correction strategy necessarily exploits the mutual orthogonality of the eigenstates of the associated Hamiltonian.

However, since the discretised Black-Scholes Hamiltonian as given in Eq. (11) is not a normal operator, its eigenvectors are not guaranteed to be mutually orthogonal. This, therefore, rules out the norm correction strategy pursued in Ref. [15]. Interestingly, variational QITE has been employed as a technique for solving the Black-Scholes equation. Under this setting, the normalisation factor was considered either as a variational parameter [5] or was determined with prior knowledge of how, specifically, call option prices evolve at the boundary xNsubscript𝑥𝑁x_{N}italic_x start_POSTSUBSCRIPT italic_N end_POSTSUBSCRIPT [3]. Since the former is not compatible with QNUTE, we generalise the latter approach to cater to various European option types.

Table 1: Average fidelity data for the QNUTE simulations for pricing various European option types. μFsubscript𝜇𝐹\mu_{F}italic_μ start_POSTSUBSCRIPT italic_F end_POSTSUBSCRIPT denotes the mean fidelity over each time step and σFsubscript𝜎𝐹\sigma_{F}italic_σ start_POSTSUBSCRIPT italic_F end_POSTSUBSCRIPT the standard deviation. Simulations involving D<n𝐷𝑛D<nitalic_D < italic_n represent inexact QNUTE implementations.
n𝑛nitalic_n D𝐷Ditalic_D Call Put
μFsubscript𝜇𝐹\mu_{F}italic_μ start_POSTSUBSCRIPT italic_F end_POSTSUBSCRIPT σFsubscript𝜎𝐹\sigma_{F}italic_σ start_POSTSUBSCRIPT italic_F end_POSTSUBSCRIPT μFsubscript𝜇𝐹\mu_{F}italic_μ start_POSTSUBSCRIPT italic_F end_POSTSUBSCRIPT σFsubscript𝜎𝐹\sigma_{F}italic_σ start_POSTSUBSCRIPT italic_F end_POSTSUBSCRIPT
2 2 1.000 2.67×105absentsuperscript105\times 10^{-5}× 10 start_POSTSUPERSCRIPT - 5 end_POSTSUPERSCRIPT 1.000 4.54×105absentsuperscript105\times 10^{-5}× 10 start_POSTSUPERSCRIPT - 5 end_POSTSUPERSCRIPT
3 2 0.994 4.77×103absentsuperscript103\times 10^{-3}× 10 start_POSTSUPERSCRIPT - 3 end_POSTSUPERSCRIPT 0.982 1.20×102absentsuperscript102\times 10^{-2}× 10 start_POSTSUPERSCRIPT - 2 end_POSTSUPERSCRIPT
4 1.000 3.26×106absentsuperscript106\times 10^{-6}× 10 start_POSTSUPERSCRIPT - 6 end_POSTSUPERSCRIPT 1.000 3.06×106absentsuperscript106\times 10^{-6}× 10 start_POSTSUPERSCRIPT - 6 end_POSTSUPERSCRIPT
4 2 0.710 2.78×101absentsuperscript101\times 10^{-1}× 10 start_POSTSUPERSCRIPT - 1 end_POSTSUPERSCRIPT 0.904 8.02×102absentsuperscript102\times 10^{-2}× 10 start_POSTSUPERSCRIPT - 2 end_POSTSUPERSCRIPT
4 1.000 3.16×107absentsuperscript107\times 10^{-7}× 10 start_POSTSUPERSCRIPT - 7 end_POSTSUPERSCRIPT 1.000 2.79×107absentsuperscript107\times 10^{-7}× 10 start_POSTSUPERSCRIPT - 7 end_POSTSUPERSCRIPT
5 2 0.158 2.11×101absentsuperscript101\times 10^{-1}× 10 start_POSTSUPERSCRIPT - 1 end_POSTSUPERSCRIPT 0.749 6.79×102absentsuperscript102\times 10^{-2}× 10 start_POSTSUPERSCRIPT - 2 end_POSTSUPERSCRIPT
4 0.111 1.79×101absentsuperscript101\times 10^{-1}× 10 start_POSTSUPERSCRIPT - 1 end_POSTSUPERSCRIPT 0.655 1.70×101absentsuperscript101\times 10^{-1}× 10 start_POSTSUPERSCRIPT - 1 end_POSTSUPERSCRIPT
6 1.000 4.15×108absentsuperscript108\times 10^{-8}× 10 start_POSTSUPERSCRIPT - 8 end_POSTSUPERSCRIPT 1.000 2.10×107absentsuperscript107\times 10^{-7}× 10 start_POSTSUPERSCRIPT - 7 end_POSTSUPERSCRIPT
6 2 0.130 7.27×102absentsuperscript102\times 10^{-2}× 10 start_POSTSUPERSCRIPT - 2 end_POSTSUPERSCRIPT 0.724 4.18×102absentsuperscript102\times 10^{-2}× 10 start_POSTSUPERSCRIPT - 2 end_POSTSUPERSCRIPT
4 0.122 7.32×102absentsuperscript102\times 10^{-2}× 10 start_POSTSUPERSCRIPT - 2 end_POSTSUPERSCRIPT 0.766 5.20×102absentsuperscript102\times 10^{-2}× 10 start_POSTSUPERSCRIPT - 2 end_POSTSUPERSCRIPT
6 1.000 3.81×108absentsuperscript108\times 10^{-8}× 10 start_POSTSUPERSCRIPT - 8 end_POSTSUPERSCRIPT 1.000 2.18×107absentsuperscript107\times 10^{-7}× 10 start_POSTSUPERSCRIPT - 7 end_POSTSUPERSCRIPT
n𝑛nitalic_n D𝐷Ditalic_D Bull Bear
μFsubscript𝜇𝐹\mu_{F}italic_μ start_POSTSUBSCRIPT italic_F end_POSTSUBSCRIPT σFsubscript𝜎𝐹\sigma_{F}italic_σ start_POSTSUBSCRIPT italic_F end_POSTSUBSCRIPT μFsubscript𝜇𝐹\mu_{F}italic_μ start_POSTSUBSCRIPT italic_F end_POSTSUBSCRIPT σFsubscript𝜎𝐹\sigma_{F}italic_σ start_POSTSUBSCRIPT italic_F end_POSTSUBSCRIPT
2 2 1.000 2.67×105absentsuperscript105\times 10^{-5}× 10 start_POSTSUPERSCRIPT - 5 end_POSTSUPERSCRIPT 1.000 4.54×105absentsuperscript105\times 10^{-5}× 10 start_POSTSUPERSCRIPT - 5 end_POSTSUPERSCRIPT
3 2 0.994 4.77×103absentsuperscript103\times 10^{-3}× 10 start_POSTSUPERSCRIPT - 3 end_POSTSUPERSCRIPT 0.982 1.20×102absentsuperscript102\times 10^{-2}× 10 start_POSTSUPERSCRIPT - 2 end_POSTSUPERSCRIPT
4 1.000 3.26×106absentsuperscript106\times 10^{-6}× 10 start_POSTSUPERSCRIPT - 6 end_POSTSUPERSCRIPT 1.000 3.06×106absentsuperscript106\times 10^{-6}× 10 start_POSTSUPERSCRIPT - 6 end_POSTSUPERSCRIPT
4 2 0.710 2.78×101absentsuperscript101\times 10^{-1}× 10 start_POSTSUPERSCRIPT - 1 end_POSTSUPERSCRIPT 0.904 8.02×102absentsuperscript102\times 10^{-2}× 10 start_POSTSUPERSCRIPT - 2 end_POSTSUPERSCRIPT
4 1.000 3.16×107absentsuperscript107\times 10^{-7}× 10 start_POSTSUPERSCRIPT - 7 end_POSTSUPERSCRIPT 1.000 2.79×107absentsuperscript107\times 10^{-7}× 10 start_POSTSUPERSCRIPT - 7 end_POSTSUPERSCRIPT
5 2 0.158 2.11×101absentsuperscript101\times 10^{-1}× 10 start_POSTSUPERSCRIPT - 1 end_POSTSUPERSCRIPT 0.749 6.79×102absentsuperscript102\times 10^{-2}× 10 start_POSTSUPERSCRIPT - 2 end_POSTSUPERSCRIPT
4 0.111 1.79×101absentsuperscript101\times 10^{-1}× 10 start_POSTSUPERSCRIPT - 1 end_POSTSUPERSCRIPT 0.655 1.70×101absentsuperscript101\times 10^{-1}× 10 start_POSTSUPERSCRIPT - 1 end_POSTSUPERSCRIPT
6 1.000 4.15×108absentsuperscript108\times 10^{-8}× 10 start_POSTSUPERSCRIPT - 8 end_POSTSUPERSCRIPT 1.000 2.10×107absentsuperscript107\times 10^{-7}× 10 start_POSTSUPERSCRIPT - 7 end_POSTSUPERSCRIPT
6 2 0.130 7.27×102absentsuperscript102\times 10^{-2}× 10 start_POSTSUPERSCRIPT - 2 end_POSTSUPERSCRIPT 0.724 4.18×102absentsuperscript102\times 10^{-2}× 10 start_POSTSUPERSCRIPT - 2 end_POSTSUPERSCRIPT
4 0.122 7.32×102absentsuperscript102\times 10^{-2}× 10 start_POSTSUPERSCRIPT - 2 end_POSTSUPERSCRIPT 0.766 5.20×102absentsuperscript102\times 10^{-2}× 10 start_POSTSUPERSCRIPT - 2 end_POSTSUPERSCRIPT
6 1.000 3.81×108absentsuperscript108\times 10^{-8}× 10 start_POSTSUPERSCRIPT - 8 end_POSTSUPERSCRIPT 1.000 2.18×107absentsuperscript107\times 10^{-7}× 10 start_POSTSUPERSCRIPT - 7 end_POSTSUPERSCRIPT
n𝑛nitalic_n D𝐷Ditalic_D Straddle Strangle
μFsubscript𝜇𝐹\mu_{F}italic_μ start_POSTSUBSCRIPT italic_F end_POSTSUBSCRIPT σFsubscript𝜎𝐹\sigma_{F}italic_σ start_POSTSUBSCRIPT italic_F end_POSTSUBSCRIPT μFsubscript𝜇𝐹\mu_{F}italic_μ start_POSTSUBSCRIPT italic_F end_POSTSUBSCRIPT σFsubscript𝜎𝐹\sigma_{F}italic_σ start_POSTSUBSCRIPT italic_F end_POSTSUBSCRIPT
2 2 1.000 2.67×105absentsuperscript105\times 10^{-5}× 10 start_POSTSUPERSCRIPT - 5 end_POSTSUPERSCRIPT 1.000 4.54×105absentsuperscript105\times 10^{-5}× 10 start_POSTSUPERSCRIPT - 5 end_POSTSUPERSCRIPT
3 2 0.994 4.77×103absentsuperscript103\times 10^{-3}× 10 start_POSTSUPERSCRIPT - 3 end_POSTSUPERSCRIPT 0.982 1.20×102absentsuperscript102\times 10^{-2}× 10 start_POSTSUPERSCRIPT - 2 end_POSTSUPERSCRIPT
4 1.000 3.26×106absentsuperscript106\times 10^{-6}× 10 start_POSTSUPERSCRIPT - 6 end_POSTSUPERSCRIPT 1.000 3.06×106absentsuperscript106\times 10^{-6}× 10 start_POSTSUPERSCRIPT - 6 end_POSTSUPERSCRIPT
4 2 0.710 2.78×101absentsuperscript101\times 10^{-1}× 10 start_POSTSUPERSCRIPT - 1 end_POSTSUPERSCRIPT 0.904 8.02×102absentsuperscript102\times 10^{-2}× 10 start_POSTSUPERSCRIPT - 2 end_POSTSUPERSCRIPT
4 1.000 3.16×107absentsuperscript107\times 10^{-7}× 10 start_POSTSUPERSCRIPT - 7 end_POSTSUPERSCRIPT 1.000 2.79×107absentsuperscript107\times 10^{-7}× 10 start_POSTSUPERSCRIPT - 7 end_POSTSUPERSCRIPT
5 2 0.158 2.11×101absentsuperscript101\times 10^{-1}× 10 start_POSTSUPERSCRIPT - 1 end_POSTSUPERSCRIPT 0.749 6.79×102absentsuperscript102\times 10^{-2}× 10 start_POSTSUPERSCRIPT - 2 end_POSTSUPERSCRIPT
4 0.111 1.79×101absentsuperscript101\times 10^{-1}× 10 start_POSTSUPERSCRIPT - 1 end_POSTSUPERSCRIPT 0.655 1.70×101absentsuperscript101\times 10^{-1}× 10 start_POSTSUPERSCRIPT - 1 end_POSTSUPERSCRIPT
6 1.000 4.15×108absentsuperscript108\times 10^{-8}× 10 start_POSTSUPERSCRIPT - 8 end_POSTSUPERSCRIPT 1.000 2.10×107absentsuperscript107\times 10^{-7}× 10 start_POSTSUPERSCRIPT - 7 end_POSTSUPERSCRIPT
6 2 0.130 7.27×102absentsuperscript102\times 10^{-2}× 10 start_POSTSUPERSCRIPT - 2 end_POSTSUPERSCRIPT 0.724 4.18×102absentsuperscript102\times 10^{-2}× 10 start_POSTSUPERSCRIPT - 2 end_POSTSUPERSCRIPT
4 0.122 7.32×102absentsuperscript102\times 10^{-2}× 10 start_POSTSUPERSCRIPT - 2 end_POSTSUPERSCRIPT 0.766 5.20×102absentsuperscript102\times 10^{-2}× 10 start_POSTSUPERSCRIPT - 2 end_POSTSUPERSCRIPT
6 1.000 3.81×108absentsuperscript108\times 10^{-8}× 10 start_POSTSUPERSCRIPT - 8 end_POSTSUPERSCRIPT 1.000 2.18×107absentsuperscript107\times 10^{-7}× 10 start_POSTSUPERSCRIPT - 7 end_POSTSUPERSCRIPT

Consider the Black-Scholes equation, as given in Eq. (5), with option price u(x,τ)𝑢𝑥𝜏u(x,\tau)italic_u ( italic_x , italic_τ ) assumed to be linear in x𝑥xitalic_x in the neighbourhood of the boundaries x0subscript𝑥0x_{0}italic_x start_POSTSUBSCRIPT 0 end_POSTSUBSCRIPT and xNsubscript𝑥𝑁x_{N}italic_x start_POSTSUBSCRIPT italic_N end_POSTSUBSCRIPT. We will consider linear boundary conditions, since they are widely used in classical option pricing simulations and are known to be numerically stable [18]. Thus, under linear boundary conditions, the option price takes the form u(x,τ)=a(τ)x+b(τ)𝑢𝑥𝜏𝑎𝜏𝑥𝑏𝜏{u(x,\tau)=a(\tau)x+b(\tau)}italic_u ( italic_x , italic_τ ) = italic_a ( italic_τ ) italic_x + italic_b ( italic_τ ) near the boundaries. Substituting this form into Eq. (5) reduces the Black-Scholes equation to an ordinary differential equation (ODE) at the boundaries

xdadτ+dbdτ=rb(τ).𝑥derivative𝜏𝑎derivative𝜏𝑏𝑟𝑏𝜏x\derivative{a}{\tau}+\derivative{b}{\tau}=-rb(\tau).italic_x divide start_ARG roman_d start_ARG italic_a end_ARG end_ARG start_ARG roman_d start_ARG italic_τ end_ARG end_ARG + divide start_ARG roman_d start_ARG italic_b end_ARG end_ARG start_ARG roman_d start_ARG italic_τ end_ARG end_ARG = - italic_r italic_b ( italic_τ ) . (13)

Solving Eq. (13) yields a(τ)=a(0)𝑎𝜏𝑎0a(\tau)=a(0)italic_a ( italic_τ ) = italic_a ( 0 ) and b(τ)=b(0)erτ𝑏𝜏𝑏0superscript𝑒𝑟𝜏b(\tau)=b(0)e^{-r\tau}italic_b ( italic_τ ) = italic_b ( 0 ) italic_e start_POSTSUPERSCRIPT - italic_r italic_τ end_POSTSUPERSCRIPT, where a(0)𝑎0a(0)italic_a ( 0 ), and b(0)𝑏0b(0)italic_b ( 0 ) can be derived from the initial conditions p(x)𝑝𝑥p(x)italic_p ( italic_x ) at each boundary. If a(0)𝑎0a(0)italic_a ( 0 ) or b(0)𝑏0b(0)italic_b ( 0 ) are non-zero on at least one of the boundaries, we can rescale a normalised solution to ensure that the value at that boundary is equal to a(τ)x+b(τ)𝑎𝜏𝑥𝑏𝜏a(\tau)x+b(\tau)italic_a ( italic_τ ) italic_x + italic_b ( italic_τ ).

To guarantee that the linear boundary conditions apply during the QNUTE simulation, they must be encoded into the Black-Scholes Hamiltonian. The first and last rows of the matrix in Eq. (11) are updated with the corresponding forward and backward first-order finite difference coefficients, respectively, with the second-derivative terms vanishing as the function is linear. The Black-Scholes Hamiltonian inclusive of linear boundary conditions takes the form

iH^LBS=[γ0β0α1γ1β1α2n2γ2n2β2n2α2n1γ2n1],𝑖subscript^𝐻𝐿𝐵𝑆matrixsuperscriptsubscript𝛾0superscriptsubscript𝛽0missing-subexpressionmissing-subexpressionsubscript𝛼1subscript𝛾1subscript𝛽1missing-subexpressionmissing-subexpressionmissing-subexpressionmissing-subexpressionmissing-subexpressionmissing-subexpressionsubscript𝛼superscript2𝑛2subscript𝛾superscript2𝑛2subscript𝛽superscript2𝑛2missing-subexpressionmissing-subexpressionmissing-subexpressionsuperscriptsubscript𝛼superscript2𝑛1superscriptsubscript𝛾superscript2𝑛1-i\hat{H}_{LBS}=\begin{bmatrix}\gamma_{0}^{\prime}&\beta_{0}^{\prime}&&\\ \alpha_{1}&\gamma_{1}&\beta_{1}&\\ &\ddots&\ddots&\ddots&&\\ &&\alpha_{2^{n}-2}&\gamma_{2^{n}-2}&\beta_{2^{n}-2}\\ &&&\alpha_{2^{n}-1}^{\prime}&\gamma_{2^{n}-1}^{\prime}\end{bmatrix},- italic_i over^ start_ARG italic_H end_ARG start_POSTSUBSCRIPT italic_L italic_B italic_S end_POSTSUBSCRIPT = [ start_ARG start_ROW start_CELL italic_γ start_POSTSUBSCRIPT 0 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT end_CELL start_CELL italic_β start_POSTSUBSCRIPT 0 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT end_CELL start_CELL end_CELL start_CELL end_CELL end_ROW start_ROW start_CELL italic_α start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT end_CELL start_CELL italic_γ start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT end_CELL start_CELL italic_β start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT end_CELL start_CELL end_CELL end_ROW start_ROW start_CELL end_CELL start_CELL ⋱ end_CELL start_CELL ⋱ end_CELL start_CELL ⋱ end_CELL start_CELL end_CELL start_CELL end_CELL end_ROW start_ROW start_CELL end_CELL start_CELL end_CELL start_CELL italic_α start_POSTSUBSCRIPT 2 start_POSTSUPERSCRIPT italic_n end_POSTSUPERSCRIPT - 2 end_POSTSUBSCRIPT end_CELL start_CELL italic_γ start_POSTSUBSCRIPT 2 start_POSTSUPERSCRIPT italic_n end_POSTSUPERSCRIPT - 2 end_POSTSUBSCRIPT end_CELL start_CELL italic_β start_POSTSUBSCRIPT 2 start_POSTSUPERSCRIPT italic_n end_POSTSUPERSCRIPT - 2 end_POSTSUBSCRIPT end_CELL end_ROW start_ROW start_CELL end_CELL start_CELL end_CELL start_CELL end_CELL start_CELL italic_α start_POSTSUBSCRIPT 2 start_POSTSUPERSCRIPT italic_n end_POSTSUPERSCRIPT - 1 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT end_CELL start_CELL italic_γ start_POSTSUBSCRIPT 2 start_POSTSUPERSCRIPT italic_n end_POSTSUPERSCRIPT - 1 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT end_CELL end_ROW end_ARG ] , (14)

where

γ0=rrx0h,β0=rx0h,α2n1=rxNh,γ2n1=r+rxNh.superscriptsubscript𝛾0absent𝑟𝑟subscript𝑥0superscriptsubscript𝛽0absent𝑟subscript𝑥0superscriptsubscript𝛼superscript2𝑛1absent𝑟subscript𝑥𝑁superscriptsubscript𝛾superscript2𝑛1absent𝑟𝑟subscript𝑥𝑁\displaystyle\begin{aligned} \gamma_{0}^{\prime}&=\ -r-\frac{rx_{0}}{h},\\ \beta_{0}^{\prime}&=\ \frac{rx_{0}}{h},\\ \alpha_{2^{n}-1}^{\prime}&=\ -\frac{rx_{N}}{h},\\ \gamma_{2^{n}-1}^{\prime}&=\ -r+\frac{rx_{N}}{h}.\end{aligned}start_ROW start_CELL italic_γ start_POSTSUBSCRIPT 0 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT end_CELL start_CELL = - italic_r - divide start_ARG italic_r italic_x start_POSTSUBSCRIPT 0 end_POSTSUBSCRIPT end_ARG start_ARG italic_h end_ARG , end_CELL end_ROW start_ROW start_CELL italic_β start_POSTSUBSCRIPT 0 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT end_CELL start_CELL = divide start_ARG italic_r italic_x start_POSTSUBSCRIPT 0 end_POSTSUBSCRIPT end_ARG start_ARG italic_h end_ARG , end_CELL end_ROW start_ROW start_CELL italic_α start_POSTSUBSCRIPT 2 start_POSTSUPERSCRIPT italic_n end_POSTSUPERSCRIPT - 1 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT end_CELL start_CELL = - divide start_ARG italic_r italic_x start_POSTSUBSCRIPT italic_N end_POSTSUBSCRIPT end_ARG start_ARG italic_h end_ARG , end_CELL end_ROW start_ROW start_CELL italic_γ start_POSTSUBSCRIPT 2 start_POSTSUPERSCRIPT italic_n end_POSTSUPERSCRIPT - 1 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT end_CELL start_CELL = - italic_r + divide start_ARG italic_r italic_x start_POSTSUBSCRIPT italic_N end_POSTSUBSCRIPT end_ARG start_ARG italic_h end_ARG . end_CELL end_ROW (15)

See Supplementary Information for the Pauli decomposition of this Hamiltonian.

Discussion

In this work, we have generalised the quantum imaginary time evolution algorithm to enable the simulation of arbitrary non-Hermitian dynamics on quantum computers. We demonstrated our QNUTE algorithm’s application via a numerical implementation that simulating the pricing dynamics of European options, as dictated by the Black-Scholes equation.

In undertaking these simulations, we assumed that the underlying financial asset had constant volatility, σ𝜎\sigmaitalic_σ, and risk-free interest rate, r𝑟ritalic_r. The time dependence of these variables can be encoded in the Hamiltonian with no extra cost to its construction. Further, the inclusion of these variables does not affect the unitary approximations produced by QNUTE, however, modelling volatility and interest rates as stochastic processes may require smaller time steps for more accurate simulations. Indeed, the time dependence of r𝑟ritalic_r gives rise to a different boundary ODE, which necessitates modifications to our rescaling protocol.

As depicted in Fig. 1, our implementations of QNUTE were able to match the analytical solutions of the Black-Scholes equation. For convergence, it is important to choose an asset price domain with boundaries such that linear boundary conditions hold for the option’s payoff u(x,τ=T)𝑢𝑥𝜏𝑇u(x,\tau=T)italic_u ( italic_x , italic_τ = italic_T ). A good level of convergence also depends on having access to enough sample points around the strike prices of the option, a lack of which can be seen in the 2-qubit curves in Fig. 1 (c), (d) and (f).

In our implementations of QNUTE, each term, h^msubscript^𝑚\hat{h}_{m}over^ start_ARG italic_h end_ARG start_POSTSUBSCRIPT italic_m end_POSTSUBSCRIPT, in the decomposition of the Black-Scholes Hamiltonian was a linear combination of Pauli strings. Since the number of distinct Pauli strings in our decomposition scales exponentially with the number of qubits, an alternative decomposition is required for the scalability of QNUTE for Black-Scholes. Approaches taken to solve PDEs using varQITE have also required the expectation values of finite difference operators. In particular, Liu et al. proposed a scheme to measure such expectation values with a linear overhead [14]. We conjecture that this scheme may be adopted within our approach, leading to exponentially fewer terms in the Hamiltonian decomposition.

The discretised Black-Scholes Hamiltonian has a high degree of correlation between all the qubits used in the simulation. This was demonstrated by implementing inexact QNUTE, wherein the unitary approximations only act on at most D𝐷Ditalic_D adjacent qubits. Figure 2 depicts the fidelities of inexact QNUTE simulations, averaged over each time step for the various option payoffs, see Table 1 for the exact values. For an increasing number of qubits and fixed domain size D𝐷Ditalic_D, we have it that inexact QNUTE does not capture the correlations between the qubits, rendering it unable to emulate the true time evolution. For future work, we intend to incorporate recent improvements to the simulated QITE methodology, including Fast QITE  [9], time-dependent drifted QITE [10] and QITE with nonlocal approximation [11], within our QNUTE framework to understand their effect on the accuracy and efficiency for simulated PDE dynamics.

Data availability

All data generated and analysed during this study are included in this published article and its supplementary information files.

Code availability

The code that supports the findings of this study is available from the corresponding authors upon reasonable request.

References

  • \bibcommenthead
  • Hull [2017] Hull, J.: Options, Futures, and Other Derivatives John C. Hull., Ninth edition. edn. Pearson Education Limited, Harlow, United Kingdom (2017)
  • Black and Scholes [1973] Black, F., Scholes, M.S.: The Pricing of Options and Corporate Liabilities. Journal of Political Economy 81(3), 637–654 (1973) https://doi.org/10.1086/260062
  • Fontanela et al. [2021] Fontanela, F., Jacquier, A., Oumgari, M.: A quantum algorithm for linear pdes arising in finance. SIAM Journal on Financial Mathematics 12(4), 98–114 (2021)
  • Radha [2021] Radha, S.K.: Quantum option pricing using wick rotated imaginary time evolution. arXiv preprint arXiv:2101.04280 (2021)
  • Alghassi et al. [2022] Alghassi, H., Deshmukh, A., Ibrahim, N., Robles, N., Woerner, S., Zoufal, C.: A variational quantum algorithm for the Feynman-Kac formula. Quantum 6, 730 (2022) https://doi.org/10.22331/q-2022-06-07-730
  • Gonzalez-Conde et al. [2023] Gonzalez-Conde, J., Rodríguez-Rozas, A., Solano, E., Sanz, M.: Efficient hamiltonian simulation for solving option price dynamics. Phys. Rev. Res. 5, 043220 (2023) https://doi.org/10.1103/PhysRevResearch.5.043220
  • Motta et al. [2020] Motta, M., Sun, C., Tan, A.T., O’Rourke, M.J., Ye, E., Minnich, A.J., Brandao, F.G., Chan, G.K.-L.: Determining eigenstates and thermal states on a quantum computer using quantum imaginary time evolution. Nature Physics 16(2), 205–210 (2020)
  • McArdle et al. [2019] McArdle, S., Jones, T., Endo, S., Li, Y., Benjamin, S.C., Yuan, X.: Variational ansatz-based quantum simulation of imaginary time evolution. npj Quantum Information 5(1) (2019) https://doi.org/10.1038/s41534-019-0187-2
  • Tan [2020] Tan, K.C.: Fast quantum imaginary time evolution (2020)
  • Huang et al. [2022] Huang, Y., Shao, Y., Ren, W., Sun, J., Lv, D.: Efficient quantum imaginary time evolution by drifting real time evolution: an approach with low gate and measurement complexity. arXiv preprint arXiv:2203.11112 (2022)
  • Nishi et al. [2021] Nishi, H., Kosugi, T., Matsushita, Y.-i.: Implementation of quantum imaginary-time evolution method on nisq devices by introducing nonlocal approximation. npj Quantum Information 7(1), 1–7 (2021)
  • Nguyen and Thompson [2024] Nguyen, N., Thompson, R.: Solving maxwells equations using variational quantum imaginary time evolution. arXiv preprint arXiv:2402.14156 (2024)
  • Leong et al. [2023] Leong, F.Y., Koh, D.E., Ewe, W.-B., Kong, J.F.: Variational Quantum Simulation of Partial Differential Equations: Applications in Colloidal Transport (2023)
  • Liu et al. [2021] Liu, H.-L., Wu, Y.-S., Wan, L.-C., Pan, S.-J., Qin, S.-J., Gao, F., Wen, Q.-Y.: Variational quantum algorithm for the poisson equation. Phys. Rev. A 104, 022418 (2021) https://doi.org/10.1103/PhysRevA.104.022418
  • Kumar and Wilmott [2024] Kumar, S., Wilmott, C.M.: Generalising quantum imaginary time evolution to solve linear partial differential equations (2024)
  • Jones et al. [2019] Jones, B., White, D., O’Brien, G., Clark, J., Campbell, E.: Optimising trotter-suzuki decompositions for quantum simulation using evolutionary strategies, pp. 1223–1231 (2019). https://doi.org/10.1145/3321707.3321835
  • Trotter [1959] Trotter, H.F.: On the product of semi-groups of operators. Proceedings of the American Mathematical Society 10(4), 545–551 (1959)
  • Windcliff et al. [2004] Windcliff, H., Forsyth, P.A., Vetzal, K.: Analysis of the stability of the linear boundary condition for the black–scholes equation. Journal of Computational Finance 8, 65–92 (2004)

Acknowledgements

C.M.W. and S.K. gratefully acknowledge the financial support of the Engineering and Physical Sciences Research Council (EPSRC) through the Hub in Quantum Computing and Simulation (EP/T001062/1).

Author Contributions

C.M.W. conceived the project. S.K. performed the numerical simulations. C.M.W. and S.K. analyzed the data and interpreted the results, and proposed improvements. C.M.W. and S.K. both contributed to the writing and editing of the manuscript.

Competing Interests

The authors declare no competing interests.

Supplementary Information

Calculating the unitaries

We approximate the normalised action of a Trotter step eh^mΔtsuperscript𝑒subscript^𝑚Δ𝑡e^{\hat{h}_{m}\Delta t}italic_e start_POSTSUPERSCRIPT over^ start_ARG italic_h end_ARG start_POSTSUBSCRIPT italic_m end_POSTSUBSCRIPT roman_Δ italic_t end_POSTSUPERSCRIPT on the state |ψket𝜓\ket{\psi}| start_ARG italic_ψ end_ARG ⟩ by using the unitary eiA^Δtsuperscript𝑒𝑖^𝐴Δ𝑡e^{-i\hat{A}\Delta t}italic_e start_POSTSUPERSCRIPT - italic_i over^ start_ARG italic_A end_ARG roman_Δ italic_t end_POSTSUPERSCRIPT, where A^=IaIσI^^𝐴subscript𝐼subscript𝑎𝐼^subscript𝜎𝐼\hat{A}=\sum_{I}a_{I}\hat{\sigma_{I}}over^ start_ARG italic_A end_ARG = ∑ start_POSTSUBSCRIPT italic_I end_POSTSUBSCRIPT italic_a start_POSTSUBSCRIPT italic_I end_POSTSUBSCRIPT over^ start_ARG italic_σ start_POSTSUBSCRIPT italic_I end_POSTSUBSCRIPT end_ARG is a Hermitian operator expressed as a real linear combination of Pauli operator strings indexed by I𝐼Iitalic_I. To calculate the coefficients aIsubscript𝑎𝐼a_{I}italic_a start_POSTSUBSCRIPT italic_I end_POSTSUBSCRIPT, we minimise the distance between the normalised Trotter step and the unitary acting on |ψket𝜓\ket{\psi}| start_ARG italic_ψ end_ARG ⟩ expanded to O(Δt)𝑂Δ𝑡O(\Delta t)italic_O ( roman_Δ italic_t ). This is achieved by firstly approximating the norm of the Trotter step acting on |ψket𝜓\ket{\psi}| start_ARG italic_ψ end_ARG ⟩. We have it that

c2=ψ|eh^mΔteh^mΔt|ψ=ψ|(𝟙^+h^mΔt)(𝟙^+h^mΔt)|ψ+O(Δt2)=ψ|𝟙^+(h^m+h^m)Δt|ψ+O(Δt2)=1+2Reψ|h^m|ψΔt+O(Δt2),superscript𝑐2absentexpectation-valuesuperscript𝑒superscriptsubscript^𝑚Δ𝑡superscript𝑒subscript^𝑚Δ𝑡𝜓𝜓missing-subexpressionabsentexpectation-value^1superscriptsubscript^𝑚Δ𝑡^1subscript^𝑚Δ𝑡𝜓𝜓𝑂Δsuperscript𝑡2missing-subexpressionabsentexpectation-value^1superscriptsubscript^𝑚subscript^𝑚Δ𝑡𝜓𝜓𝑂Δsuperscript𝑡2missing-subexpressionabsent12Reexpectation-valuesubscript^𝑚𝜓𝜓Δ𝑡𝑂Δsuperscript𝑡2\displaystyle\begin{aligned} c^{2}&={\expectationvalue{e^{\hat{h}_{m}^{\dagger% }\Delta t}e^{\hat{h}_{m}\Delta t}}{\psi}}\\ &=\expectationvalue{(\hat{\mathbbm{1}}+\hat{h}_{m}^{\dagger}\Delta t)(\hat{% \mathbbm{1}}+\hat{h}_{m}\Delta t)}{\psi}+O(\Delta t^{2})\\ &=\expectationvalue{\hat{\mathbbm{1}}+(\hat{h}_{m}^{\dagger}+\hat{h}_{m})% \Delta t}{\psi}+O(\Delta t^{2})\\ &=1+2\mathrm{Re}\expectationvalue{\hat{h}_{m}}{\psi}\Delta t+O(\Delta t^{2}),% \end{aligned}start_ROW start_CELL italic_c start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT end_CELL start_CELL = ⟨ start_ARG italic_ψ end_ARG | start_ARG italic_e start_POSTSUPERSCRIPT over^ start_ARG italic_h end_ARG start_POSTSUBSCRIPT italic_m end_POSTSUBSCRIPT start_POSTSUPERSCRIPT † end_POSTSUPERSCRIPT roman_Δ italic_t end_POSTSUPERSCRIPT italic_e start_POSTSUPERSCRIPT over^ start_ARG italic_h end_ARG start_POSTSUBSCRIPT italic_m end_POSTSUBSCRIPT roman_Δ italic_t end_POSTSUPERSCRIPT end_ARG | start_ARG italic_ψ end_ARG ⟩ end_CELL end_ROW start_ROW start_CELL end_CELL start_CELL = ⟨ start_ARG italic_ψ end_ARG | start_ARG ( over^ start_ARG blackboard_1 end_ARG + over^ start_ARG italic_h end_ARG start_POSTSUBSCRIPT italic_m end_POSTSUBSCRIPT start_POSTSUPERSCRIPT † end_POSTSUPERSCRIPT roman_Δ italic_t ) ( over^ start_ARG blackboard_1 end_ARG + over^ start_ARG italic_h end_ARG start_POSTSUBSCRIPT italic_m end_POSTSUBSCRIPT roman_Δ italic_t ) end_ARG | start_ARG italic_ψ end_ARG ⟩ + italic_O ( roman_Δ italic_t start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT ) end_CELL end_ROW start_ROW start_CELL end_CELL start_CELL = ⟨ start_ARG italic_ψ end_ARG | start_ARG over^ start_ARG blackboard_1 end_ARG + ( over^ start_ARG italic_h end_ARG start_POSTSUBSCRIPT italic_m end_POSTSUBSCRIPT start_POSTSUPERSCRIPT † end_POSTSUPERSCRIPT + over^ start_ARG italic_h end_ARG start_POSTSUBSCRIPT italic_m end_POSTSUBSCRIPT ) roman_Δ italic_t end_ARG | start_ARG italic_ψ end_ARG ⟩ + italic_O ( roman_Δ italic_t start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT ) end_CELL end_ROW start_ROW start_CELL end_CELL start_CELL = 1 + 2 roman_R roman_e ⟨ start_ARG italic_ψ end_ARG | start_ARG over^ start_ARG italic_h end_ARG start_POSTSUBSCRIPT italic_m end_POSTSUBSCRIPT end_ARG | start_ARG italic_ψ end_ARG ⟩ roman_Δ italic_t + italic_O ( roman_Δ italic_t start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT ) , end_CELL end_ROW (16)

from which we have

c𝑐\displaystyle citalic_c 1+2ΔtReψ|h^m|ψ.absent12Δ𝑡Reexpectation-valuesubscript^𝑚𝜓𝜓\displaystyle\approx\sqrt{1+2\Delta t\,\mathrm{Re}\expectationvalue{\hat{h}_{m% }}{\psi}}.≈ square-root start_ARG 1 + 2 roman_Δ italic_t roman_Re ⟨ start_ARG italic_ψ end_ARG | start_ARG over^ start_ARG italic_h end_ARG start_POSTSUBSCRIPT italic_m end_POSTSUBSCRIPT end_ARG | start_ARG italic_ψ end_ARG ⟩ end_ARG . (17)

Next, we set the unitary eiA^Δtsuperscript𝑒𝑖^𝐴Δ𝑡e^{-i\hat{A}\Delta t}italic_e start_POSTSUPERSCRIPT - italic_i over^ start_ARG italic_A end_ARG roman_Δ italic_t end_POSTSUPERSCRIPT to map |ψket𝜓\ket{\psi}| start_ARG italic_ψ end_ARG ⟩ to the normalised output of the Trotter step

eiA^Δt|ψsuperscript𝑒𝑖^𝐴Δ𝑡ket𝜓\displaystyle e^{-i\hat{A}\Delta t}\ket{\psi}italic_e start_POSTSUPERSCRIPT - italic_i over^ start_ARG italic_A end_ARG roman_Δ italic_t end_POSTSUPERSCRIPT | start_ARG italic_ψ end_ARG ⟩ =eh^mΔtc|ψ,absentsuperscript𝑒subscript^𝑚Δ𝑡𝑐ket𝜓\displaystyle=\frac{e^{\hat{h}_{m}\Delta t}}{c}\ket{\psi},= divide start_ARG italic_e start_POSTSUPERSCRIPT over^ start_ARG italic_h end_ARG start_POSTSUBSCRIPT italic_m end_POSTSUBSCRIPT roman_Δ italic_t end_POSTSUPERSCRIPT end_ARG start_ARG italic_c end_ARG | start_ARG italic_ψ end_ARG ⟩ , (18)

from which we have

(𝟙^iA^Δt)|ψ^1𝑖^𝐴Δ𝑡ket𝜓\displaystyle(\hat{\mathbbm{1}}-i\hat{A}\Delta t)\ket{\psi}( over^ start_ARG blackboard_1 end_ARG - italic_i over^ start_ARG italic_A end_ARG roman_Δ italic_t ) | start_ARG italic_ψ end_ARG ⟩ (𝟙^+h^mΔtc)|ψ,absent^1subscript^𝑚Δ𝑡𝑐ket𝜓\displaystyle\approx\left(\frac{\hat{\mathbbm{1}}+\hat{h}_{m}\Delta t}{c}% \right)\ket{\psi},≈ ( divide start_ARG over^ start_ARG blackboard_1 end_ARG + over^ start_ARG italic_h end_ARG start_POSTSUBSCRIPT italic_m end_POSTSUBSCRIPT roman_Δ italic_t end_ARG start_ARG italic_c end_ARG ) | start_ARG italic_ψ end_ARG ⟩ , (19)

and rewriting

iA^|ψ𝑖^𝐴ket𝜓\displaystyle-i\hat{A}\ket{\psi}- italic_i over^ start_ARG italic_A end_ARG | start_ARG italic_ψ end_ARG ⟩ 1ccΔt|ψ+h^mc|ψ.absent1𝑐𝑐Δ𝑡ket𝜓subscript^𝑚𝑐ket𝜓\displaystyle\approx\frac{1-c}{c\,\Delta t}\ket{\psi}+\frac{\hat{h}_{m}}{c}% \ket{\psi}.≈ divide start_ARG 1 - italic_c end_ARG start_ARG italic_c roman_Δ italic_t end_ARG | start_ARG italic_ψ end_ARG ⟩ + divide start_ARG over^ start_ARG italic_h end_ARG start_POSTSUBSCRIPT italic_m end_POSTSUBSCRIPT end_ARG start_ARG italic_c end_ARG | start_ARG italic_ψ end_ARG ⟩ . (20)

Now, defining

|Δ0:=1ccΔt|ψ+h^mc|ψ,assignketsubscriptΔ01𝑐𝑐Δ𝑡ket𝜓subscript^𝑚𝑐ket𝜓\ket{\Delta_{0}}:=\frac{1-c}{c\,\Delta t}\ket{\psi}+\frac{\hat{h}_{m}}{c}\ket{% \psi},| start_ARG roman_Δ start_POSTSUBSCRIPT 0 end_POSTSUBSCRIPT end_ARG ⟩ := divide start_ARG 1 - italic_c end_ARG start_ARG italic_c roman_Δ italic_t end_ARG | start_ARG italic_ψ end_ARG ⟩ + divide start_ARG over^ start_ARG italic_h end_ARG start_POSTSUBSCRIPT italic_m end_POSTSUBSCRIPT end_ARG start_ARG italic_c end_ARG | start_ARG italic_ψ end_ARG ⟩ , (21)

and

|Δ:=iA^|ψ,assignketΔ𝑖^𝐴ket𝜓\ket{\Delta}:=-i\hat{A}\ket{\psi},| start_ARG roman_Δ end_ARG ⟩ := - italic_i over^ start_ARG italic_A end_ARG | start_ARG italic_ψ end_ARG ⟩ , (22)

we solve for A^^𝐴\hat{A}over^ start_ARG italic_A end_ARG such that the squared distance between |ΔketΔ\ket{\Delta}| start_ARG roman_Δ end_ARG ⟩ and |Δ0ketsubscriptΔ0\ket{\Delta_{0}}| start_ARG roman_Δ start_POSTSUBSCRIPT 0 end_POSTSUBSCRIPT end_ARG ⟩ is minimised. It follows that

|Δ0|Δ2=(Δ0|Δ|)(|Δ0|Δ)=Δ0Δ0ΔΔΔ0+Δ=Δ0+Δ2ReΔ0Δ.superscriptnormketsubscriptΔ0ketΔ2absentbrasubscriptΔ0braΔketsubscriptΔ0ketΔmissing-subexpressionabsentexpectationsubscriptΔ0expectationsubscriptΔ0ΔexpectationΔsubscriptΔ0expectationΔmissing-subexpressionabsentexpectationsubscriptΔ0expectationΔ2ReexpectationsubscriptΔ0Δ\displaystyle\begin{aligned} \|\ket{\Delta_{0}}-\ket{\Delta}\|^{2}&=(\bra{% \Delta_{0}}-\bra{\Delta})(\ket{\Delta_{0}}-\ket{\Delta})\\ &=\braket{\Delta_{0}}-\braket{\Delta_{0}}{\Delta}-\braket{\Delta}{\Delta_{0}}+% \braket{\Delta}\\ &=\braket{\Delta_{0}}+\braket{\Delta}-2\mathrm{Re}\braket{\Delta_{0}}{\Delta}.% \end{aligned}start_ROW start_CELL ∥ | start_ARG roman_Δ start_POSTSUBSCRIPT 0 end_POSTSUBSCRIPT end_ARG ⟩ - | start_ARG roman_Δ end_ARG ⟩ ∥ start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT end_CELL start_CELL = ( ⟨ start_ARG roman_Δ start_POSTSUBSCRIPT 0 end_POSTSUBSCRIPT end_ARG | - ⟨ start_ARG roman_Δ end_ARG | ) ( | start_ARG roman_Δ start_POSTSUBSCRIPT 0 end_POSTSUBSCRIPT end_ARG ⟩ - | start_ARG roman_Δ end_ARG ⟩ ) end_CELL end_ROW start_ROW start_CELL end_CELL start_CELL = ⟨ start_ARG roman_Δ start_POSTSUBSCRIPT 0 end_POSTSUBSCRIPT end_ARG ⟩ - ⟨ start_ARG roman_Δ start_POSTSUBSCRIPT 0 end_POSTSUBSCRIPT end_ARG ⟩ roman_Δ - ⟨ start_ARG roman_Δ end_ARG ⟩ roman_Δ start_POSTSUBSCRIPT 0 end_POSTSUBSCRIPT + ⟨ start_ARG roman_Δ end_ARG ⟩ end_CELL end_ROW start_ROW start_CELL end_CELL start_CELL = ⟨ start_ARG roman_Δ start_POSTSUBSCRIPT 0 end_POSTSUBSCRIPT end_ARG ⟩ + ⟨ start_ARG roman_Δ end_ARG ⟩ - 2 roman_R roman_e ⟨ start_ARG roman_Δ start_POSTSUBSCRIPT 0 end_POSTSUBSCRIPT end_ARG ⟩ roman_Δ . end_CELL end_ROW (23)

Since |Δ0ketsubscriptΔ0\ket{\Delta_{0}}| start_ARG roman_Δ start_POSTSUBSCRIPT 0 end_POSTSUBSCRIPT end_ARG ⟩ does not depend on A^^𝐴\hat{A}over^ start_ARG italic_A end_ARG, Δ0expectationsubscriptΔ0\braket{\Delta_{0}}⟨ start_ARG roman_Δ start_POSTSUBSCRIPT 0 end_POSTSUBSCRIPT end_ARG ⟩, in the minimisation, can be ignored. Noting that A^^𝐴\hat{A}over^ start_ARG italic_A end_ARG is Hermitian, we see that

Δ=ψ|A^2|ψ,expectationΔexpectation-valuesuperscript^𝐴2𝜓𝜓\braket{\Delta}=\expectationvalue{\hat{A}^{2}}{\psi},⟨ start_ARG roman_Δ end_ARG ⟩ = ⟨ start_ARG italic_ψ end_ARG | start_ARG over^ start_ARG italic_A end_ARG start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT end_ARG | start_ARG italic_ψ end_ARG ⟩ , (24)

while the quantity Δ0ΔexpectationsubscriptΔ0Δ\braket{\Delta_{0}}{\Delta}⟨ start_ARG roman_Δ start_POSTSUBSCRIPT 0 end_POSTSUBSCRIPT end_ARG ⟩ roman_Δ can be evaluated as

Δ0ΔexpectationsubscriptΔ0Δ\displaystyle\braket{\Delta_{0}}{\Delta}⟨ start_ARG roman_Δ start_POSTSUBSCRIPT 0 end_POSTSUBSCRIPT end_ARG ⟩ roman_Δ =\displaystyle== (1ccΔtψ|+ψ|h^mc)(iA^|ψ)1𝑐𝑐Δ𝑡bra𝜓bra𝜓superscriptsubscript^𝑚𝑐𝑖^𝐴ket𝜓\displaystyle\left(\frac{1-c}{c\,\Delta t}\bra{\psi}+\bra{\psi}\frac{\hat{h}_{% m}^{\dagger}}{c}\right)(-i\hat{A}\ket{\psi})( divide start_ARG 1 - italic_c end_ARG start_ARG italic_c roman_Δ italic_t end_ARG ⟨ start_ARG italic_ψ end_ARG | + ⟨ start_ARG italic_ψ end_ARG | divide start_ARG over^ start_ARG italic_h end_ARG start_POSTSUBSCRIPT italic_m end_POSTSUBSCRIPT start_POSTSUPERSCRIPT † end_POSTSUPERSCRIPT end_ARG start_ARG italic_c end_ARG ) ( - italic_i over^ start_ARG italic_A end_ARG | start_ARG italic_ψ end_ARG ⟩ ) (25)
=\displaystyle== i(1ccΔt)ψ|A^|ψicψ|h^mA^|ψ.𝑖1𝑐𝑐Δ𝑡expectation-value^𝐴𝜓𝜓𝑖𝑐expectation-valuesuperscriptsubscript^𝑚^𝐴𝜓𝜓\displaystyle-i\left(\frac{1-c}{c\,\Delta t}\right)\expectationvalue{\hat{A}}{% \psi}-\frac{i}{c}\expectationvalue{\hat{h}_{m}^{\dagger}\hat{A}}{\psi}.- italic_i ( divide start_ARG 1 - italic_c end_ARG start_ARG italic_c roman_Δ italic_t end_ARG ) ⟨ start_ARG italic_ψ end_ARG | start_ARG over^ start_ARG italic_A end_ARG end_ARG | start_ARG italic_ψ end_ARG ⟩ - divide start_ARG italic_i end_ARG start_ARG italic_c end_ARG ⟨ start_ARG italic_ψ end_ARG | start_ARG over^ start_ARG italic_h end_ARG start_POSTSUBSCRIPT italic_m end_POSTSUBSCRIPT start_POSTSUPERSCRIPT † end_POSTSUPERSCRIPT over^ start_ARG italic_A end_ARG end_ARG | start_ARG italic_ψ end_ARG ⟩ . (26)

Using that A^^𝐴\hat{A}over^ start_ARG italic_A end_ARG is Hermitian, the expectation value of ψ|A^|ψexpectation-value^𝐴𝜓𝜓\expectationvalue{\hat{A}}{\psi}⟨ start_ARG italic_ψ end_ARG | start_ARG over^ start_ARG italic_A end_ARG end_ARG | start_ARG italic_ψ end_ARG ⟩ will always be real, which implies that the real part of Δ0ΔexpectationsubscriptΔ0Δ\braket{\Delta_{0}}{\Delta}⟨ start_ARG roman_Δ start_POSTSUBSCRIPT 0 end_POSTSUBSCRIPT end_ARG ⟩ roman_Δ only depends on the second term in Eq. (26)

Re(Δ0Δ)=Re(icψ|h^mA^|ψ)=Im(ψ|h^mA^|ψc)=Im(ψ|A^h^m|ψc).ReexpectationsubscriptΔ0ΔabsentRe𝑖𝑐expectation-valuesuperscriptsubscript^𝑚^𝐴𝜓𝜓missing-subexpressionabsentImexpectation-valuesuperscriptsubscript^𝑚^𝐴𝜓𝜓𝑐missing-subexpressionabsentImexpectation-value^𝐴subscript^𝑚𝜓𝜓𝑐\displaystyle\begin{aligned} \mathrm{Re}(\braket{\Delta_{0}}{\Delta})&=\mathrm% {Re}\left(\frac{-i}{c}\expectationvalue{\hat{h}_{m}^{\dagger}\hat{A}}{\psi}% \right)\\ &=\mathrm{Im}\left(\frac{\expectationvalue{\hat{h}_{m}^{\dagger}\hat{A}}{\psi}% }{c}\right)\\ &=-\mathrm{Im}\left(\frac{\expectationvalue{\hat{A}\hat{h}_{m}}{\psi}}{c}% \right).\end{aligned}start_ROW start_CELL roman_Re ( ⟨ start_ARG roman_Δ start_POSTSUBSCRIPT 0 end_POSTSUBSCRIPT end_ARG ⟩ roman_Δ ) end_CELL start_CELL = roman_Re ( divide start_ARG - italic_i end_ARG start_ARG italic_c end_ARG ⟨ start_ARG italic_ψ end_ARG | start_ARG over^ start_ARG italic_h end_ARG start_POSTSUBSCRIPT italic_m end_POSTSUBSCRIPT start_POSTSUPERSCRIPT † end_POSTSUPERSCRIPT over^ start_ARG italic_A end_ARG end_ARG | start_ARG italic_ψ end_ARG ⟩ ) end_CELL end_ROW start_ROW start_CELL end_CELL start_CELL = roman_Im ( divide start_ARG ⟨ start_ARG italic_ψ end_ARG | start_ARG over^ start_ARG italic_h end_ARG start_POSTSUBSCRIPT italic_m end_POSTSUBSCRIPT start_POSTSUPERSCRIPT † end_POSTSUPERSCRIPT over^ start_ARG italic_A end_ARG end_ARG | start_ARG italic_ψ end_ARG ⟩ end_ARG start_ARG italic_c end_ARG ) end_CELL end_ROW start_ROW start_CELL end_CELL start_CELL = - roman_Im ( divide start_ARG ⟨ start_ARG italic_ψ end_ARG | start_ARG over^ start_ARG italic_A end_ARG over^ start_ARG italic_h end_ARG start_POSTSUBSCRIPT italic_m end_POSTSUBSCRIPT end_ARG | start_ARG italic_ψ end_ARG ⟩ end_ARG start_ARG italic_c end_ARG ) . end_CELL end_ROW (27)

The function to minimise, therefore, reduces to

f(a)=2Re(Δ0Δ+Δ)=2cIm(ψ|A^h^m|ψ)+ψ|A^2|ψ=I2aIcIm(ψ|σ^Ih^m|ψ)+I,JaIaJψ|σ^Iσ^J|ψ.𝑓𝑎absent2ReexpectationsubscriptΔ0ΔexpectationΔmissing-subexpressionabsent2𝑐Imexpectation-value^𝐴subscript^𝑚𝜓𝜓expectation-valuesuperscript^𝐴2𝜓𝜓missing-subexpressionabsentsubscript𝐼2subscript𝑎𝐼𝑐Imexpectation-valuesubscript^𝜎𝐼subscript^𝑚𝜓𝜓subscript𝐼𝐽subscript𝑎𝐼subscript𝑎𝐽expectation-valuesubscript^𝜎𝐼subscript^𝜎𝐽𝜓𝜓\displaystyle\begin{aligned} f(\vec{a})&=-2\mathrm{Re}(\braket{\Delta_{0}}{% \Delta}+\braket{\Delta})\\ &=\frac{2}{c}\,\mathrm{Im}(\expectationvalue{\hat{A}\hat{h}_{m}}{\psi})+% \expectationvalue{\hat{A}^{2}}{\psi}\\ &=\sum_{I}\frac{2a_{I}}{c}\,\mathrm{Im}(\expectationvalue{\hat{\sigma}_{I}\hat% {h}_{m}}{\psi})+\sum_{I,J}a_{I}a_{J}\expectationvalue{\hat{\sigma}_{I}\hat{% \sigma}_{J}}{\psi}.\end{aligned}start_ROW start_CELL italic_f ( over→ start_ARG italic_a end_ARG ) end_CELL start_CELL = - 2 roman_R roman_e ( ⟨ start_ARG roman_Δ start_POSTSUBSCRIPT 0 end_POSTSUBSCRIPT end_ARG ⟩ roman_Δ + ⟨ start_ARG roman_Δ end_ARG ⟩ ) end_CELL end_ROW start_ROW start_CELL end_CELL start_CELL = divide start_ARG 2 end_ARG start_ARG italic_c end_ARG roman_Im ( ⟨ start_ARG italic_ψ end_ARG | start_ARG over^ start_ARG italic_A end_ARG over^ start_ARG italic_h end_ARG start_POSTSUBSCRIPT italic_m end_POSTSUBSCRIPT end_ARG | start_ARG italic_ψ end_ARG ⟩ ) + ⟨ start_ARG italic_ψ end_ARG | start_ARG over^ start_ARG italic_A end_ARG start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT end_ARG | start_ARG italic_ψ end_ARG ⟩ end_CELL end_ROW start_ROW start_CELL end_CELL start_CELL = ∑ start_POSTSUBSCRIPT italic_I end_POSTSUBSCRIPT divide start_ARG 2 italic_a start_POSTSUBSCRIPT italic_I end_POSTSUBSCRIPT end_ARG start_ARG italic_c end_ARG roman_Im ( ⟨ start_ARG italic_ψ end_ARG | start_ARG over^ start_ARG italic_σ end_ARG start_POSTSUBSCRIPT italic_I end_POSTSUBSCRIPT over^ start_ARG italic_h end_ARG start_POSTSUBSCRIPT italic_m end_POSTSUBSCRIPT end_ARG | start_ARG italic_ψ end_ARG ⟩ ) + ∑ start_POSTSUBSCRIPT italic_I , italic_J end_POSTSUBSCRIPT italic_a start_POSTSUBSCRIPT italic_I end_POSTSUBSCRIPT italic_a start_POSTSUBSCRIPT italic_J end_POSTSUBSCRIPT ⟨ start_ARG italic_ψ end_ARG | start_ARG over^ start_ARG italic_σ end_ARG start_POSTSUBSCRIPT italic_I end_POSTSUBSCRIPT over^ start_ARG italic_σ end_ARG start_POSTSUBSCRIPT italic_J end_POSTSUBSCRIPT end_ARG | start_ARG italic_ψ end_ARG ⟩ . end_CELL end_ROW (28)

Defining b𝑏\vec{b}over→ start_ARG italic_b end_ARG with components

bI:=2cIm(ψ|σ^Ih^m|ψ),assignsubscript𝑏𝐼2𝑐Imexpectation-valuesubscript^𝜎𝐼subscript^𝑚𝜓𝜓b_{I}:=\frac{-2}{c}\,\mathrm{Im}(\expectationvalue{\hat{\sigma}_{I}\hat{h}_{m}% }{\psi}),italic_b start_POSTSUBSCRIPT italic_I end_POSTSUBSCRIPT := divide start_ARG - 2 end_ARG start_ARG italic_c end_ARG roman_Im ( ⟨ start_ARG italic_ψ end_ARG | start_ARG over^ start_ARG italic_σ end_ARG start_POSTSUBSCRIPT italic_I end_POSTSUBSCRIPT over^ start_ARG italic_h end_ARG start_POSTSUBSCRIPT italic_m end_POSTSUBSCRIPT end_ARG | start_ARG italic_ψ end_ARG ⟩ ) , (29)

and the matrix S𝑆Sitalic_S with entries

SI,J:=ψ|σ^Iσ^J|ψ,assignsubscript𝑆𝐼𝐽expectation-valuesubscript^𝜎𝐼subscript^𝜎𝐽𝜓𝜓S_{I,J}:=\expectationvalue{\hat{\sigma}_{I}\hat{\sigma}_{J}}{\psi},italic_S start_POSTSUBSCRIPT italic_I , italic_J end_POSTSUBSCRIPT := ⟨ start_ARG italic_ψ end_ARG | start_ARG over^ start_ARG italic_σ end_ARG start_POSTSUBSCRIPT italic_I end_POSTSUBSCRIPT over^ start_ARG italic_σ end_ARG start_POSTSUBSCRIPT italic_J end_POSTSUBSCRIPT end_ARG | start_ARG italic_ψ end_ARG ⟩ , (30)

we can rewrite the objective function as

f(a)=I,JaISI,JaJIbIaI=aSaba.𝑓𝑎absentsubscript𝐼𝐽subscript𝑎𝐼subscript𝑆𝐼𝐽subscript𝑎𝐽subscript𝐼subscript𝑏𝐼subscript𝑎𝐼missing-subexpressionabsent𝑎𝑆𝑎𝑏𝑎\displaystyle\begin{aligned} f(\vec{a})&=\sum_{I,J}a_{I}S_{I,J}a_{J}-\sum_{I}b% _{I}a_{I}\\ &=\vec{a}\cdot S\vec{a}-\vec{b}\cdot\vec{a}.\end{aligned}start_ROW start_CELL italic_f ( over→ start_ARG italic_a end_ARG ) end_CELL start_CELL = ∑ start_POSTSUBSCRIPT italic_I , italic_J end_POSTSUBSCRIPT italic_a start_POSTSUBSCRIPT italic_I end_POSTSUBSCRIPT italic_S start_POSTSUBSCRIPT italic_I , italic_J end_POSTSUBSCRIPT italic_a start_POSTSUBSCRIPT italic_J end_POSTSUBSCRIPT - ∑ start_POSTSUBSCRIPT italic_I end_POSTSUBSCRIPT italic_b start_POSTSUBSCRIPT italic_I end_POSTSUBSCRIPT italic_a start_POSTSUBSCRIPT italic_I end_POSTSUBSCRIPT end_CELL end_ROW start_ROW start_CELL end_CELL start_CELL = over→ start_ARG italic_a end_ARG ⋅ italic_S over→ start_ARG italic_a end_ARG - over→ start_ARG italic_b end_ARG ⋅ over→ start_ARG italic_a end_ARG . end_CELL end_ROW (31)

To minimise f𝑓fitalic_f with respect to a𝑎\vec{a}over→ start_ARG italic_a end_ARG, we equate its gradient to zero, and observe that

faI=JI(SI,J+SJ,I)aJ+2SI,IaIbI=I,J(SI,J+SJ,I)aJbI.partial-derivativesubscript𝑎𝐼𝑓absentsubscript𝐽𝐼subscript𝑆𝐼𝐽subscript𝑆𝐽𝐼subscript𝑎𝐽2subscript𝑆𝐼𝐼subscript𝑎𝐼subscript𝑏𝐼missing-subexpressionabsentsubscript𝐼𝐽subscript𝑆𝐼𝐽subscript𝑆𝐽𝐼subscript𝑎𝐽subscript𝑏𝐼\displaystyle\begin{aligned} \partialderivative{f}{a_{I}}&=\sum_{J\neq I}(S_{I% ,J}+S_{J,I})a_{J}+2S_{I,I}a_{I}-b_{I}\\ &=\sum_{I,J}(S_{I,J}+S_{J,I})a_{J}-b_{I}.\end{aligned}start_ROW start_CELL divide start_ARG ∂ start_ARG italic_f end_ARG end_ARG start_ARG ∂ start_ARG italic_a start_POSTSUBSCRIPT italic_I end_POSTSUBSCRIPT end_ARG end_ARG end_CELL start_CELL = ∑ start_POSTSUBSCRIPT italic_J ≠ italic_I end_POSTSUBSCRIPT ( italic_S start_POSTSUBSCRIPT italic_I , italic_J end_POSTSUBSCRIPT + italic_S start_POSTSUBSCRIPT italic_J , italic_I end_POSTSUBSCRIPT ) italic_a start_POSTSUBSCRIPT italic_J end_POSTSUBSCRIPT + 2 italic_S start_POSTSUBSCRIPT italic_I , italic_I end_POSTSUBSCRIPT italic_a start_POSTSUBSCRIPT italic_I end_POSTSUBSCRIPT - italic_b start_POSTSUBSCRIPT italic_I end_POSTSUBSCRIPT end_CELL end_ROW start_ROW start_CELL end_CELL start_CELL = ∑ start_POSTSUBSCRIPT italic_I , italic_J end_POSTSUBSCRIPT ( italic_S start_POSTSUBSCRIPT italic_I , italic_J end_POSTSUBSCRIPT + italic_S start_POSTSUBSCRIPT italic_J , italic_I end_POSTSUBSCRIPT ) italic_a start_POSTSUBSCRIPT italic_J end_POSTSUBSCRIPT - italic_b start_POSTSUBSCRIPT italic_I end_POSTSUBSCRIPT . end_CELL end_ROW (32)

It follows that f=(S+S)ab𝑓𝑆superscript𝑆top𝑎𝑏\nabla f=(S+S^{\top})\vec{a}-\vec{b}∇ italic_f = ( italic_S + italic_S start_POSTSUPERSCRIPT ⊤ end_POSTSUPERSCRIPT ) over→ start_ARG italic_a end_ARG - over→ start_ARG italic_b end_ARG, and, hence, to minimise f𝑓fitalic_f, we solve for a𝑎\vec{a}over→ start_ARG italic_a end_ARG in

(S+S)a=b.𝑆superscript𝑆top𝑎𝑏(S+S^{\top})\vec{a}=\vec{b}.( italic_S + italic_S start_POSTSUPERSCRIPT ⊤ end_POSTSUPERSCRIPT ) over→ start_ARG italic_a end_ARG = over→ start_ARG italic_b end_ARG . (33)

The Black-Scholes Hamiltonian in the Pauli basis

In order to discretise the Black-Scholes equation with the form, as given in Eq. (2),

uτ=σ22x22ux2+rxuxru,partial-derivative𝜏𝑢superscript𝜎22superscript𝑥2partial-derivative𝑥2𝑢𝑟𝑥partial-derivative𝑥𝑢𝑟𝑢\partialderivative{u}{\tau}=\frac{\sigma^{2}}{2}x^{2}\partialderivative[2]{u}{% x}+rx\partialderivative{u}{x}-ru,divide start_ARG ∂ start_ARG italic_u end_ARG end_ARG start_ARG ∂ start_ARG italic_τ end_ARG end_ARG = divide start_ARG italic_σ start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT end_ARG start_ARG 2 end_ARG italic_x start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT divide start_ARG start_DIFFOP SUPERSCRIPTOP start_ARG ∂ end_ARG start_ARG 2 end_ARG end_DIFFOP start_ARG italic_u end_ARG end_ARG start_ARG SUPERSCRIPTOP start_ARG ∂ start_ARG italic_x end_ARG end_ARG start_ARG 2 end_ARG end_ARG + italic_r italic_x divide start_ARG ∂ start_ARG italic_u end_ARG end_ARG start_ARG ∂ start_ARG italic_x end_ARG end_ARG - italic_r italic_u , (34)

we rewrite the derivative operators in terms of finite difference representations and substitute the x𝑥xitalic_x and x2superscript𝑥2x^{2}italic_x start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT terms with the diagonal matrices

X^=[x0xN]andX^2=[x02xN2],^𝑋matrixsubscript𝑥0missing-subexpressionmissing-subexpressionmissing-subexpressionmissing-subexpressionmissing-subexpressionmissing-subexpressionsubscript𝑥𝑁andsuperscript^𝑋2matrixsuperscriptsubscript𝑥02missing-subexpressionmissing-subexpressionmissing-subexpressionmissing-subexpressionmissing-subexpressionmissing-subexpressionsuperscriptsubscript𝑥𝑁2{\hat{X}=\begin{bmatrix}x_{0}&&\\ &\ddots&\\ &&x_{N}\end{bmatrix}}\ \textrm{and}\ {\hat{X}^{2}=\begin{bmatrix}x_{0}^{2}&&\\ &\ddots&\\ &&x_{N}^{2}\end{bmatrix}},over^ start_ARG italic_X end_ARG = [ start_ARG start_ROW start_CELL italic_x start_POSTSUBSCRIPT 0 end_POSTSUBSCRIPT end_CELL start_CELL end_CELL start_CELL end_CELL end_ROW start_ROW start_CELL end_CELL start_CELL ⋱ end_CELL start_CELL end_CELL end_ROW start_ROW start_CELL end_CELL start_CELL end_CELL start_CELL italic_x start_POSTSUBSCRIPT italic_N end_POSTSUBSCRIPT end_CELL end_ROW end_ARG ] and over^ start_ARG italic_X end_ARG start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT = [ start_ARG start_ROW start_CELL italic_x start_POSTSUBSCRIPT 0 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT end_CELL start_CELL end_CELL start_CELL end_CELL end_ROW start_ROW start_CELL end_CELL start_CELL ⋱ end_CELL start_CELL end_CELL end_ROW start_ROW start_CELL end_CELL start_CELL end_CELL start_CELL italic_x start_POSTSUBSCRIPT italic_N end_POSTSUBSCRIPT start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT end_CELL end_ROW end_ARG ] , (35)

respectively, where xk=x0+khsubscript𝑥𝑘subscript𝑥0𝑘x_{k}=x_{0}+khitalic_x start_POSTSUBSCRIPT italic_k end_POSTSUBSCRIPT = italic_x start_POSTSUBSCRIPT 0 end_POSTSUBSCRIPT + italic_k italic_h. We are required to represent these matrices as linear combinations of the Pauli operators in order to be able to simulate their dynamics with QNUTE. Firstly, let us define the following one-qubit matrices.

A^(1):=[1000]=I^+Z^2A^(1):=[0001]=I^Z^2A^(1):=[0100]=X^+iY^2A^(1):=[0010]=X^iY^2assignsuperscriptsubscript^𝐴1matrix1000absent^𝐼^𝑍2assignsuperscriptsubscript^𝐴1matrix0001absent^𝐼^𝑍2assignsuperscriptsubscript^𝐴1matrix0100absent^𝑋𝑖^𝑌2assignsuperscriptsubscript^𝐴1matrix0010absent^𝑋𝑖^𝑌2\displaystyle\begin{aligned} \hat{A}_{\nwarrow}^{(1)}:=\begin{bmatrix}1&0\\ 0&0\end{bmatrix}&=\frac{\hat{I}+\hat{Z}}{2}\\ \hat{A}_{\searrow}^{(1)}:=\begin{bmatrix}0&0\\ 0&1\end{bmatrix}&=\frac{\hat{I}-\hat{Z}}{2}\\ \hat{A}_{\nearrow}^{(1)}:=\begin{bmatrix}0&1\\ 0&0\end{bmatrix}&=\frac{\hat{X}+i\hat{Y}}{2}\\ \hat{A}_{\swarrow}^{(1)}:=\begin{bmatrix}0&0\\ 1&0\end{bmatrix}&=\frac{\hat{X}-i\hat{Y}}{2}\end{aligned}start_ROW start_CELL over^ start_ARG italic_A end_ARG start_POSTSUBSCRIPT ↖ end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( 1 ) end_POSTSUPERSCRIPT := [ start_ARG start_ROW start_CELL 1 end_CELL start_CELL 0 end_CELL end_ROW start_ROW start_CELL 0 end_CELL start_CELL 0 end_CELL end_ROW end_ARG ] end_CELL start_CELL = divide start_ARG over^ start_ARG italic_I end_ARG + over^ start_ARG italic_Z end_ARG end_ARG start_ARG 2 end_ARG end_CELL end_ROW start_ROW start_CELL over^ start_ARG italic_A end_ARG start_POSTSUBSCRIPT ↘ end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( 1 ) end_POSTSUPERSCRIPT := [ start_ARG start_ROW start_CELL 0 end_CELL start_CELL 0 end_CELL end_ROW start_ROW start_CELL 0 end_CELL start_CELL 1 end_CELL end_ROW end_ARG ] end_CELL start_CELL = divide start_ARG over^ start_ARG italic_I end_ARG - over^ start_ARG italic_Z end_ARG end_ARG start_ARG 2 end_ARG end_CELL end_ROW start_ROW start_CELL over^ start_ARG italic_A end_ARG start_POSTSUBSCRIPT ↗ end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( 1 ) end_POSTSUPERSCRIPT := [ start_ARG start_ROW start_CELL 0 end_CELL start_CELL 1 end_CELL end_ROW start_ROW start_CELL 0 end_CELL start_CELL 0 end_CELL end_ROW end_ARG ] end_CELL start_CELL = divide start_ARG over^ start_ARG italic_X end_ARG + italic_i over^ start_ARG italic_Y end_ARG end_ARG start_ARG 2 end_ARG end_CELL end_ROW start_ROW start_CELL over^ start_ARG italic_A end_ARG start_POSTSUBSCRIPT ↙ end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( 1 ) end_POSTSUPERSCRIPT := [ start_ARG start_ROW start_CELL 0 end_CELL start_CELL 0 end_CELL end_ROW start_ROW start_CELL 1 end_CELL start_CELL 0 end_CELL end_ROW end_ARG ] end_CELL start_CELL = divide start_ARG over^ start_ARG italic_X end_ARG - italic_i over^ start_ARG italic_Y end_ARG end_ARG start_ARG 2 end_ARG end_CELL end_ROW (36)

Further, consider the n𝑛nitalic_n-qubit generalisations of Eq. (36) given by

A^(n):=A^(1)A^(n1),A^(n):=A^(1)A^(n1),A^(n):=A^(1)A^(n1),A^(n):=A^(1)A^(n1).superscriptsubscript^𝐴𝑛assignabsenttensor-productsuperscriptsubscript^𝐴1superscriptsubscript^𝐴𝑛1superscriptsubscript^𝐴𝑛assignabsenttensor-productsuperscriptsubscript^𝐴1superscriptsubscript^𝐴𝑛1superscriptsubscript^𝐴𝑛assignabsenttensor-productsuperscriptsubscript^𝐴1superscriptsubscript^𝐴𝑛1superscriptsubscript^𝐴𝑛assignabsenttensor-productsuperscriptsubscript^𝐴1superscriptsubscript^𝐴𝑛1\displaystyle\begin{aligned} \hat{A}_{\nwarrow}^{(n)}&:=\hat{A}_{\nwarrow}^{(1% )}\otimes\hat{A}_{\nwarrow}^{(n-1)},\\ \hat{A}_{\searrow}^{(n)}&:=\hat{A}_{\searrow}^{(1)}\otimes\hat{A}_{\searrow}^{% (n-1)},\\ \hat{A}_{\nearrow}^{(n)}&:=\hat{A}_{\nearrow}^{(1)}\otimes\hat{A}_{\nearrow}^{% (n-1)},\\ \hat{A}_{\swarrow}^{(n)}&:=\hat{A}_{\swarrow}^{(1)}\otimes\hat{A}_{\swarrow}^{% (n-1)}.\end{aligned}start_ROW start_CELL over^ start_ARG italic_A end_ARG start_POSTSUBSCRIPT ↖ end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( italic_n ) end_POSTSUPERSCRIPT end_CELL start_CELL := over^ start_ARG italic_A end_ARG start_POSTSUBSCRIPT ↖ end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( 1 ) end_POSTSUPERSCRIPT ⊗ over^ start_ARG italic_A end_ARG start_POSTSUBSCRIPT ↖ end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( italic_n - 1 ) end_POSTSUPERSCRIPT , end_CELL end_ROW start_ROW start_CELL over^ start_ARG italic_A end_ARG start_POSTSUBSCRIPT ↘ end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( italic_n ) end_POSTSUPERSCRIPT end_CELL start_CELL := over^ start_ARG italic_A end_ARG start_POSTSUBSCRIPT ↘ end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( 1 ) end_POSTSUPERSCRIPT ⊗ over^ start_ARG italic_A end_ARG start_POSTSUBSCRIPT ↘ end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( italic_n - 1 ) end_POSTSUPERSCRIPT , end_CELL end_ROW start_ROW start_CELL over^ start_ARG italic_A end_ARG start_POSTSUBSCRIPT ↗ end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( italic_n ) end_POSTSUPERSCRIPT end_CELL start_CELL := over^ start_ARG italic_A end_ARG start_POSTSUBSCRIPT ↗ end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( 1 ) end_POSTSUPERSCRIPT ⊗ over^ start_ARG italic_A end_ARG start_POSTSUBSCRIPT ↗ end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( italic_n - 1 ) end_POSTSUPERSCRIPT , end_CELL end_ROW start_ROW start_CELL over^ start_ARG italic_A end_ARG start_POSTSUBSCRIPT ↙ end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( italic_n ) end_POSTSUPERSCRIPT end_CELL start_CELL := over^ start_ARG italic_A end_ARG start_POSTSUBSCRIPT ↙ end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( 1 ) end_POSTSUPERSCRIPT ⊗ over^ start_ARG italic_A end_ARG start_POSTSUBSCRIPT ↙ end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( italic_n - 1 ) end_POSTSUPERSCRIPT . end_CELL end_ROW (37)

Tensor product strings comprising n𝑛nitalic_n copies of the four 1-qubit operators in Eq. (36) allows us to generate matrices that have a 1 in exactly one entry of a 2n×2nsuperscript2𝑛superscript2𝑛2^{n}\times 2^{n}2 start_POSTSUPERSCRIPT italic_n end_POSTSUPERSCRIPT × 2 start_POSTSUPERSCRIPT italic_n end_POSTSUPERSCRIPT matrix with 0s elsewhere. We will use these n𝑛nitalic_n-qubit tensor strings of the operators in Eq. (36) to define the linear boundary conditions for the Black-Scholes Hamiltonian.

Let us construct the X^^𝑋\hat{X}over^ start_ARG italic_X end_ARG matrix for n𝑛nitalic_n-qubits. We have

X^(n)=[x0x1xN]=x0𝟙^+h[012n1]=x0𝟙^+hχ^(n).superscript^𝑋𝑛matrixsubscript𝑥0missing-subexpressionmissing-subexpressionmissing-subexpressionmissing-subexpressionsubscript𝑥1missing-subexpressionmissing-subexpressionmissing-subexpressionmissing-subexpressionmissing-subexpressionmissing-subexpressionmissing-subexpressionmissing-subexpressionsubscript𝑥𝑁subscript𝑥0^1matrix0missing-subexpressionmissing-subexpressionmissing-subexpressionmissing-subexpression1missing-subexpressionmissing-subexpressionmissing-subexpressionmissing-subexpressionmissing-subexpressionmissing-subexpressionmissing-subexpressionmissing-subexpressionsuperscript2𝑛1subscript𝑥0^1superscript^𝜒𝑛\hat{X}^{(n)}=\begin{bmatrix}x_{0}&&&\\ &x_{1}&&\\ &&\ddots&\\ &&&x_{N}\end{bmatrix}=x_{0}\hat{\mathbbm{1}}+h\begin{bmatrix}0&&&\\ &1&&\\ &&\ddots&\\ &&&2^{n}-1\end{bmatrix}=x_{0}\hat{\mathbbm{1}}+h\hat{\chi}^{(n)}.over^ start_ARG italic_X end_ARG start_POSTSUPERSCRIPT ( italic_n ) end_POSTSUPERSCRIPT = [ start_ARG start_ROW start_CELL italic_x start_POSTSUBSCRIPT 0 end_POSTSUBSCRIPT end_CELL start_CELL end_CELL start_CELL end_CELL start_CELL end_CELL end_ROW start_ROW start_CELL end_CELL start_CELL italic_x start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT end_CELL start_CELL end_CELL start_CELL end_CELL end_ROW start_ROW start_CELL end_CELL start_CELL end_CELL start_CELL ⋱ end_CELL start_CELL end_CELL end_ROW start_ROW start_CELL end_CELL start_CELL end_CELL start_CELL end_CELL start_CELL italic_x start_POSTSUBSCRIPT italic_N end_POSTSUBSCRIPT end_CELL end_ROW end_ARG ] = italic_x start_POSTSUBSCRIPT 0 end_POSTSUBSCRIPT over^ start_ARG blackboard_1 end_ARG + italic_h [ start_ARG start_ROW start_CELL 0 end_CELL start_CELL end_CELL start_CELL end_CELL start_CELL end_CELL end_ROW start_ROW start_CELL end_CELL start_CELL 1 end_CELL start_CELL end_CELL start_CELL end_CELL end_ROW start_ROW start_CELL end_CELL start_CELL end_CELL start_CELL ⋱ end_CELL start_CELL end_CELL end_ROW start_ROW start_CELL end_CELL start_CELL end_CELL start_CELL end_CELL start_CELL 2 start_POSTSUPERSCRIPT italic_n end_POSTSUPERSCRIPT - 1 end_CELL end_ROW end_ARG ] = italic_x start_POSTSUBSCRIPT 0 end_POSTSUBSCRIPT over^ start_ARG blackboard_1 end_ARG + italic_h over^ start_ARG italic_χ end_ARG start_POSTSUPERSCRIPT ( italic_n ) end_POSTSUPERSCRIPT . (38)

Consider the matrix χ^(n)superscript^𝜒𝑛\hat{\chi}^{(n)}over^ start_ARG italic_χ end_ARG start_POSTSUPERSCRIPT ( italic_n ) end_POSTSUPERSCRIPT. For n=1𝑛1n=1italic_n = 1, χ^(1)=A^(1)superscript^𝜒1superscriptsubscript^𝐴1\hat{\chi}^{(1)}=\hat{A}_{\searrow}^{(1)}over^ start_ARG italic_χ end_ARG start_POSTSUPERSCRIPT ( 1 ) end_POSTSUPERSCRIPT = over^ start_ARG italic_A end_ARG start_POSTSUBSCRIPT ↘ end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( 1 ) end_POSTSUPERSCRIPT, while for n=2𝑛2n=2italic_n = 2, we have

χ^(2)=[χ^(1)002I^+χ^(1)]=A^(1)χ^(1)+A^(1)(2I^+χ^(1)).superscript^𝜒2matrixsuperscript^𝜒1002^𝐼superscript^𝜒1tensor-productsuperscriptsubscript^𝐴1superscript^𝜒1tensor-productsuperscriptsubscript^𝐴12^𝐼superscript^𝜒1\hat{\chi}^{(2)}=\begin{bmatrix}\hat{\chi}^{(1)}&0\\ 0&2\hat{I}+\hat{\chi}^{(1)}\end{bmatrix}=\hat{A}_{\nwarrow}^{(1)}\otimes\hat{% \chi}^{(1)}+\hat{A}_{\searrow}^{(1)}\otimes(2\hat{I}+\hat{\chi}^{(1)}).over^ start_ARG italic_χ end_ARG start_POSTSUPERSCRIPT ( 2 ) end_POSTSUPERSCRIPT = [ start_ARG start_ROW start_CELL over^ start_ARG italic_χ end_ARG start_POSTSUPERSCRIPT ( 1 ) end_POSTSUPERSCRIPT end_CELL start_CELL 0 end_CELL end_ROW start_ROW start_CELL 0 end_CELL start_CELL 2 over^ start_ARG italic_I end_ARG + over^ start_ARG italic_χ end_ARG start_POSTSUPERSCRIPT ( 1 ) end_POSTSUPERSCRIPT end_CELL end_ROW end_ARG ] = over^ start_ARG italic_A end_ARG start_POSTSUBSCRIPT ↖ end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( 1 ) end_POSTSUPERSCRIPT ⊗ over^ start_ARG italic_χ end_ARG start_POSTSUPERSCRIPT ( 1 ) end_POSTSUPERSCRIPT + over^ start_ARG italic_A end_ARG start_POSTSUBSCRIPT ↘ end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( 1 ) end_POSTSUPERSCRIPT ⊗ ( 2 over^ start_ARG italic_I end_ARG + over^ start_ARG italic_χ end_ARG start_POSTSUPERSCRIPT ( 1 ) end_POSTSUPERSCRIPT ) . (39)

Generalising to n𝑛nitalic_n-qubits, we have it that

χ^(n)=[χ^(n1)002n1I^n1+χ^(n1)]=I^χ^(n1)+2n1(A^(1)I^n1).superscript^𝜒𝑛matrixsuperscript^𝜒𝑛100superscript2𝑛1superscript^𝐼tensor-productabsent𝑛1superscript^𝜒𝑛1tensor-product^𝐼superscript^𝜒𝑛1superscript2𝑛1tensor-productsuperscriptsubscript^𝐴1superscript^𝐼tensor-productabsent𝑛1\hat{\chi}^{(n)}=\begin{bmatrix}\hat{\chi}^{(n-1)}&0\\ 0&2^{n-1}\hat{I}^{\otimes n-1}+\hat{\chi}^{(n-1)}\end{bmatrix}=\hat{I}\otimes% \hat{\chi}^{(n-1)}+2^{n-1}\left(\hat{A}_{\searrow}^{(1)}\otimes\hat{I}^{% \otimes n-1}\right).over^ start_ARG italic_χ end_ARG start_POSTSUPERSCRIPT ( italic_n ) end_POSTSUPERSCRIPT = [ start_ARG start_ROW start_CELL over^ start_ARG italic_χ end_ARG start_POSTSUPERSCRIPT ( italic_n - 1 ) end_POSTSUPERSCRIPT end_CELL start_CELL 0 end_CELL end_ROW start_ROW start_CELL 0 end_CELL start_CELL 2 start_POSTSUPERSCRIPT italic_n - 1 end_POSTSUPERSCRIPT over^ start_ARG italic_I end_ARG start_POSTSUPERSCRIPT ⊗ italic_n - 1 end_POSTSUPERSCRIPT + over^ start_ARG italic_χ end_ARG start_POSTSUPERSCRIPT ( italic_n - 1 ) end_POSTSUPERSCRIPT end_CELL end_ROW end_ARG ] = over^ start_ARG italic_I end_ARG ⊗ over^ start_ARG italic_χ end_ARG start_POSTSUPERSCRIPT ( italic_n - 1 ) end_POSTSUPERSCRIPT + 2 start_POSTSUPERSCRIPT italic_n - 1 end_POSTSUPERSCRIPT ( over^ start_ARG italic_A end_ARG start_POSTSUBSCRIPT ↘ end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( 1 ) end_POSTSUPERSCRIPT ⊗ over^ start_ARG italic_I end_ARG start_POSTSUPERSCRIPT ⊗ italic_n - 1 end_POSTSUPERSCRIPT ) . (40)

Squaring both sides yields

(χ^(n))2superscriptsuperscript^𝜒𝑛2\displaystyle(\hat{\chi}^{(n)})^{2}( over^ start_ARG italic_χ end_ARG start_POSTSUPERSCRIPT ( italic_n ) end_POSTSUPERSCRIPT ) start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT =(I^χ^(n1)+2n1(A^(1)I^n1))(I^χ^(n1)+2n1(A^(1)I^n1))absenttensor-product^𝐼superscript^𝜒𝑛1superscript2𝑛1tensor-productsuperscriptsubscript^𝐴1superscript^𝐼tensor-productabsent𝑛1tensor-product^𝐼superscript^𝜒𝑛1superscript2𝑛1tensor-productsuperscriptsubscript^𝐴1superscript^𝐼tensor-productabsent𝑛1\displaystyle=\left(\hat{I}\otimes\hat{\chi}^{(n-1)}+2^{n-1}\left(\hat{A}_{% \searrow}^{(1)}\otimes\hat{I}^{\otimes n-1}\right)\right)\left(\hat{I}\otimes% \hat{\chi}^{(n-1)}+2^{n-1}\left(\hat{A}_{\searrow}^{(1)}\otimes\hat{I}^{% \otimes n-1}\right)\right)= ( over^ start_ARG italic_I end_ARG ⊗ over^ start_ARG italic_χ end_ARG start_POSTSUPERSCRIPT ( italic_n - 1 ) end_POSTSUPERSCRIPT + 2 start_POSTSUPERSCRIPT italic_n - 1 end_POSTSUPERSCRIPT ( over^ start_ARG italic_A end_ARG start_POSTSUBSCRIPT ↘ end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( 1 ) end_POSTSUPERSCRIPT ⊗ over^ start_ARG italic_I end_ARG start_POSTSUPERSCRIPT ⊗ italic_n - 1 end_POSTSUPERSCRIPT ) ) ( over^ start_ARG italic_I end_ARG ⊗ over^ start_ARG italic_χ end_ARG start_POSTSUPERSCRIPT ( italic_n - 1 ) end_POSTSUPERSCRIPT + 2 start_POSTSUPERSCRIPT italic_n - 1 end_POSTSUPERSCRIPT ( over^ start_ARG italic_A end_ARG start_POSTSUBSCRIPT ↘ end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( 1 ) end_POSTSUPERSCRIPT ⊗ over^ start_ARG italic_I end_ARG start_POSTSUPERSCRIPT ⊗ italic_n - 1 end_POSTSUPERSCRIPT ) )
=I^(χ^(n1))2+2n(A^(1)χ^(n1))+22(n1)((A^(1))2I^n1)absenttensor-product^𝐼superscriptsuperscript^𝜒𝑛12superscript2𝑛tensor-productsubscriptsuperscript^𝐴1superscript^𝜒𝑛1superscript22𝑛1tensor-productsuperscriptsubscriptsuperscript^𝐴12superscript^𝐼tensor-productabsent𝑛1\displaystyle=\hat{I}\otimes(\hat{\chi}^{(n-1)})^{2}+2^{n}\left(\hat{A}^{(1)}_% {\searrow}\otimes\hat{\chi}^{(n-1)}\right)+2^{2(n-1)}\left((\hat{A}^{(1)}_{% \searrow})^{2}\otimes\hat{I}^{\otimes n-1}\right)= over^ start_ARG italic_I end_ARG ⊗ ( over^ start_ARG italic_χ end_ARG start_POSTSUPERSCRIPT ( italic_n - 1 ) end_POSTSUPERSCRIPT ) start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT + 2 start_POSTSUPERSCRIPT italic_n end_POSTSUPERSCRIPT ( over^ start_ARG italic_A end_ARG start_POSTSUPERSCRIPT ( 1 ) end_POSTSUPERSCRIPT start_POSTSUBSCRIPT ↘ end_POSTSUBSCRIPT ⊗ over^ start_ARG italic_χ end_ARG start_POSTSUPERSCRIPT ( italic_n - 1 ) end_POSTSUPERSCRIPT ) + 2 start_POSTSUPERSCRIPT 2 ( italic_n - 1 ) end_POSTSUPERSCRIPT ( ( over^ start_ARG italic_A end_ARG start_POSTSUPERSCRIPT ( 1 ) end_POSTSUPERSCRIPT start_POSTSUBSCRIPT ↘ end_POSTSUBSCRIPT ) start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT ⊗ over^ start_ARG italic_I end_ARG start_POSTSUPERSCRIPT ⊗ italic_n - 1 end_POSTSUPERSCRIPT )
=I^(χ^(n1))2+A^(1)(2nχ^(n1)+22(n1)I^n1).absenttensor-product^𝐼superscriptsuperscript^𝜒𝑛12tensor-productsubscriptsuperscript^𝐴1superscript2𝑛superscript^𝜒𝑛1superscript22𝑛1superscript^𝐼tensor-productabsent𝑛1\displaystyle=\hat{I}\otimes(\hat{\chi}^{(n-1)})^{2}+\hat{A}^{(1)}_{\searrow}% \otimes\left(2^{n}\hat{\chi}^{(n-1)}+2^{2(n-1)}\hat{I}^{\otimes n-1}\right).= over^ start_ARG italic_I end_ARG ⊗ ( over^ start_ARG italic_χ end_ARG start_POSTSUPERSCRIPT ( italic_n - 1 ) end_POSTSUPERSCRIPT ) start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT + over^ start_ARG italic_A end_ARG start_POSTSUPERSCRIPT ( 1 ) end_POSTSUPERSCRIPT start_POSTSUBSCRIPT ↘ end_POSTSUBSCRIPT ⊗ ( 2 start_POSTSUPERSCRIPT italic_n end_POSTSUPERSCRIPT over^ start_ARG italic_χ end_ARG start_POSTSUPERSCRIPT ( italic_n - 1 ) end_POSTSUPERSCRIPT + 2 start_POSTSUPERSCRIPT 2 ( italic_n - 1 ) end_POSTSUPERSCRIPT over^ start_ARG italic_I end_ARG start_POSTSUPERSCRIPT ⊗ italic_n - 1 end_POSTSUPERSCRIPT ) . (41)

Next, let us consider the first derivative xpartial-derivative𝑥\partialderivative{x}start_DIFFOP divide start_ARG ∂ end_ARG start_ARG ∂ start_ARG italic_x end_ARG end_ARG end_DIFFOP. This operator is approximated by the central difference matrix 12hD^1(n)12superscriptsubscript^𝐷1𝑛\frac{1}{2h}\hat{D}_{1}^{(n)}divide start_ARG 1 end_ARG start_ARG 2 italic_h end_ARG over^ start_ARG italic_D end_ARG start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( italic_n ) end_POSTSUPERSCRIPT, where

D^1(n)=[0110110110].superscriptsubscript^𝐷1𝑛matrix01missing-subexpressionmissing-subexpressionmissing-subexpression101missing-subexpressionmissing-subexpressionmissing-subexpressionmissing-subexpressionmissing-subexpressionmissing-subexpression101missing-subexpressionmissing-subexpressionmissing-subexpression10\hat{D}_{1}^{(n)}=\begin{bmatrix}0&1&&&\\ -1&0&1&&\\ &\ddots&\ddots&\ddots&\\ &&-1&0&1\\ &&&-1&0\end{bmatrix}.over^ start_ARG italic_D end_ARG start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( italic_n ) end_POSTSUPERSCRIPT = [ start_ARG start_ROW start_CELL 0 end_CELL start_CELL 1 end_CELL start_CELL end_CELL start_CELL end_CELL start_CELL end_CELL end_ROW start_ROW start_CELL - 1 end_CELL start_CELL 0 end_CELL start_CELL 1 end_CELL start_CELL end_CELL start_CELL end_CELL end_ROW start_ROW start_CELL end_CELL start_CELL ⋱ end_CELL start_CELL ⋱ end_CELL start_CELL ⋱ end_CELL start_CELL end_CELL end_ROW start_ROW start_CELL end_CELL start_CELL end_CELL start_CELL - 1 end_CELL start_CELL 0 end_CELL start_CELL 1 end_CELL end_ROW start_ROW start_CELL end_CELL start_CELL end_CELL start_CELL end_CELL start_CELL - 1 end_CELL start_CELL 0 end_CELL end_ROW end_ARG ] . (42)

For one qubit case, n=1𝑛1n=1italic_n = 1, we have

D^1(1)=[0110]=iY^.superscriptsubscript^𝐷11matrix0110𝑖^𝑌\hat{D}_{1}^{(1)}=\begin{bmatrix}0&1\\ -1&0\end{bmatrix}=i\hat{Y}.over^ start_ARG italic_D end_ARG start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( 1 ) end_POSTSUPERSCRIPT = [ start_ARG start_ROW start_CELL 0 end_CELL start_CELL 1 end_CELL end_ROW start_ROW start_CELL - 1 end_CELL start_CELL 0 end_CELL end_ROW end_ARG ] = italic_i over^ start_ARG italic_Y end_ARG . (43)

Generalising to n𝑛nitalic_n-qubits, we have

D^1(n)=[D^1(n1)A^(n1)A^(n1)D^1(n1)]=I^D^1(n1)+A^(1)A^(n1)A^(1)A^(n1).superscriptsubscript^𝐷1𝑛matrixsuperscriptsubscript^𝐷1𝑛1superscriptsubscript^𝐴𝑛1superscriptsubscript^𝐴𝑛1superscriptsubscript^𝐷1𝑛1tensor-product^𝐼superscriptsubscript^𝐷1𝑛1tensor-productsuperscriptsubscript^𝐴1superscriptsubscript^𝐴𝑛1tensor-productsuperscriptsubscript^𝐴1superscriptsubscript^𝐴𝑛1\hat{D}_{1}^{(n)}=\begin{bmatrix}\hat{D}_{1}^{(n-1)}&\hat{A}_{\swarrow}^{(n-1)% }\\ -\hat{A}_{\nearrow}^{(n-1)}&\hat{D}_{1}^{(n-1)}\end{bmatrix}=\hat{I}\otimes% \hat{D}_{1}^{(n-1)}+\hat{A}_{\nearrow}^{(1)}\otimes\hat{A}_{\swarrow}^{(n-1)}-% \hat{A}_{\swarrow}^{(1)}\otimes\hat{A}_{\nearrow}^{(n-1)}.over^ start_ARG italic_D end_ARG start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( italic_n ) end_POSTSUPERSCRIPT = [ start_ARG start_ROW start_CELL over^ start_ARG italic_D end_ARG start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( italic_n - 1 ) end_POSTSUPERSCRIPT end_CELL start_CELL over^ start_ARG italic_A end_ARG start_POSTSUBSCRIPT ↙ end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( italic_n - 1 ) end_POSTSUPERSCRIPT end_CELL end_ROW start_ROW start_CELL - over^ start_ARG italic_A end_ARG start_POSTSUBSCRIPT ↗ end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( italic_n - 1 ) end_POSTSUPERSCRIPT end_CELL start_CELL over^ start_ARG italic_D end_ARG start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( italic_n - 1 ) end_POSTSUPERSCRIPT end_CELL end_ROW end_ARG ] = over^ start_ARG italic_I end_ARG ⊗ over^ start_ARG italic_D end_ARG start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( italic_n - 1 ) end_POSTSUPERSCRIPT + over^ start_ARG italic_A end_ARG start_POSTSUBSCRIPT ↗ end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( 1 ) end_POSTSUPERSCRIPT ⊗ over^ start_ARG italic_A end_ARG start_POSTSUBSCRIPT ↙ end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( italic_n - 1 ) end_POSTSUPERSCRIPT - over^ start_ARG italic_A end_ARG start_POSTSUBSCRIPT ↙ end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( 1 ) end_POSTSUPERSCRIPT ⊗ over^ start_ARG italic_A end_ARG start_POSTSUBSCRIPT ↗ end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( italic_n - 1 ) end_POSTSUPERSCRIPT . (44)

Next, let us consider the second derivative 2x2partial-derivative𝑥2\partialderivative[2]{x}start_DIFFOP divide start_ARG start_DIFFOP SUPERSCRIPTOP start_ARG ∂ end_ARG start_ARG 2 end_ARG end_DIFFOP end_ARG start_ARG SUPERSCRIPTOP start_ARG ∂ start_ARG italic_x end_ARG end_ARG start_ARG 2 end_ARG end_ARG end_DIFFOP, which is approximated by the central difference matrix 1h2D^2(n)1superscript2superscriptsubscript^𝐷2𝑛\frac{1}{h^{2}}\hat{D}_{2}^{(n)}divide start_ARG 1 end_ARG start_ARG italic_h start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT end_ARG over^ start_ARG italic_D end_ARG start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( italic_n ) end_POSTSUPERSCRIPT, where

D^2(n)=[2112112112].superscriptsubscript^𝐷2𝑛matrix21missing-subexpression121missing-subexpressionmissing-subexpressionmissing-subexpressionmissing-subexpressionmissing-subexpression121missing-subexpressionmissing-subexpressionmissing-subexpressionmissing-subexpression12\hat{D}_{2}^{(n)}=\begin{bmatrix}-2&1&\\ 1&-2&1&\\ &\ddots&\ddots&\ddots&\\ &&1&-2&1&\\ &&&1&-2\end{bmatrix}.over^ start_ARG italic_D end_ARG start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( italic_n ) end_POSTSUPERSCRIPT = [ start_ARG start_ROW start_CELL - 2 end_CELL start_CELL 1 end_CELL start_CELL end_CELL end_ROW start_ROW start_CELL 1 end_CELL start_CELL - 2 end_CELL start_CELL 1 end_CELL start_CELL end_CELL end_ROW start_ROW start_CELL end_CELL start_CELL ⋱ end_CELL start_CELL ⋱ end_CELL start_CELL ⋱ end_CELL start_CELL end_CELL end_ROW start_ROW start_CELL end_CELL start_CELL end_CELL start_CELL 1 end_CELL start_CELL - 2 end_CELL start_CELL 1 end_CELL start_CELL end_CELL end_ROW start_ROW start_CELL end_CELL start_CELL end_CELL start_CELL end_CELL start_CELL 1 end_CELL start_CELL - 2 end_CELL end_ROW end_ARG ] . (45)

For n=1𝑛1n=1italic_n = 1, we have

D^2(1)=[2112]=2I^+X^.superscriptsubscript^𝐷21matrix21122^𝐼^𝑋\hat{D}_{2}^{(1)}=\begin{bmatrix}-2&1\\ 1&-2\end{bmatrix}=-2\hat{I}+\hat{X}.over^ start_ARG italic_D end_ARG start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( 1 ) end_POSTSUPERSCRIPT = [ start_ARG start_ROW start_CELL - 2 end_CELL start_CELL 1 end_CELL end_ROW start_ROW start_CELL 1 end_CELL start_CELL - 2 end_CELL end_ROW end_ARG ] = - 2 over^ start_ARG italic_I end_ARG + over^ start_ARG italic_X end_ARG . (46)

Generalising to n𝑛nitalic_n-qubits, it can be shown that

D^2(n)=[D^2(n1)A^(n1)A^(n1)D^2(n1)]=I^D^2(n1)+A^(1)A^(n1)+A^(1)A^(n1).superscriptsubscript^𝐷2𝑛matrixsuperscriptsubscript^𝐷2𝑛1superscriptsubscript^𝐴𝑛1superscriptsubscript^𝐴𝑛1superscriptsubscript^𝐷2𝑛1tensor-product^𝐼superscriptsubscript^𝐷2𝑛1tensor-productsuperscriptsubscript^𝐴1superscriptsubscript^𝐴𝑛1tensor-productsuperscriptsubscript^𝐴1superscriptsubscript^𝐴𝑛1\hat{D}_{2}^{(n)}=\begin{bmatrix}\hat{D}_{2}^{(n-1)}&\hat{A}_{\swarrow}^{(n-1)% }\\ \hat{A}_{\nearrow}^{(n-1)}&\hat{D}_{2}^{(n-1)}\end{bmatrix}=\hat{I}\otimes\hat% {D}_{2}^{(n-1)}+\hat{A}_{\nearrow}^{(1)}\otimes\hat{A}_{\swarrow}^{(n-1)}+\hat% {A}_{\swarrow}^{(1)}\otimes\hat{A}_{\nearrow}^{(n-1)}.over^ start_ARG italic_D end_ARG start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( italic_n ) end_POSTSUPERSCRIPT = [ start_ARG start_ROW start_CELL over^ start_ARG italic_D end_ARG start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( italic_n - 1 ) end_POSTSUPERSCRIPT end_CELL start_CELL over^ start_ARG italic_A end_ARG start_POSTSUBSCRIPT ↙ end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( italic_n - 1 ) end_POSTSUPERSCRIPT end_CELL end_ROW start_ROW start_CELL over^ start_ARG italic_A end_ARG start_POSTSUBSCRIPT ↗ end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( italic_n - 1 ) end_POSTSUPERSCRIPT end_CELL start_CELL over^ start_ARG italic_D end_ARG start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( italic_n - 1 ) end_POSTSUPERSCRIPT end_CELL end_ROW end_ARG ] = over^ start_ARG italic_I end_ARG ⊗ over^ start_ARG italic_D end_ARG start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( italic_n - 1 ) end_POSTSUPERSCRIPT + over^ start_ARG italic_A end_ARG start_POSTSUBSCRIPT ↗ end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( 1 ) end_POSTSUPERSCRIPT ⊗ over^ start_ARG italic_A end_ARG start_POSTSUBSCRIPT ↙ end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( italic_n - 1 ) end_POSTSUPERSCRIPT + over^ start_ARG italic_A end_ARG start_POSTSUBSCRIPT ↙ end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( 1 ) end_POSTSUPERSCRIPT ⊗ over^ start_ARG italic_A end_ARG start_POSTSUBSCRIPT ↗ end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( italic_n - 1 ) end_POSTSUPERSCRIPT . (47)

Using the X^(n)superscript^𝑋𝑛\hat{X}^{(n)}over^ start_ARG italic_X end_ARG start_POSTSUPERSCRIPT ( italic_n ) end_POSTSUPERSCRIPT, D^2(n)superscriptsubscript^𝐷2𝑛\hat{D}_{2}^{(n)}over^ start_ARG italic_D end_ARG start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( italic_n ) end_POSTSUPERSCRIPT and D^2(n)superscriptsubscript^𝐷2𝑛\hat{D}_{2}^{(n)}over^ start_ARG italic_D end_ARG start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( italic_n ) end_POSTSUPERSCRIPT representations above, the n𝑛nitalic_n-qubit Black-Scholes Hamiltonian takes the form

iH^BS(n)=σ22h2(X^(n))2D^2(n)+r2hX^(n)D^1(n)rI^n.𝑖superscriptsubscript^𝐻𝐵𝑆𝑛superscript𝜎22superscript2superscriptsuperscript^𝑋𝑛2superscriptsubscript^𝐷2𝑛𝑟2superscript^𝑋𝑛superscriptsubscript^𝐷1𝑛𝑟superscript^𝐼tensor-productabsent𝑛-i\hat{H}_{BS}^{(n)}=\frac{\sigma^{2}}{2h^{2}}(\hat{X}^{(n)})^{2}\hat{D}_{2}^{% (n)}+\frac{r}{2h}\hat{X}^{(n)}\hat{D}_{1}^{(n)}-r\hat{I}^{\otimes n}.- italic_i over^ start_ARG italic_H end_ARG start_POSTSUBSCRIPT italic_B italic_S end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( italic_n ) end_POSTSUPERSCRIPT = divide start_ARG italic_σ start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT end_ARG start_ARG 2 italic_h start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT end_ARG ( over^ start_ARG italic_X end_ARG start_POSTSUPERSCRIPT ( italic_n ) end_POSTSUPERSCRIPT ) start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT over^ start_ARG italic_D end_ARG start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( italic_n ) end_POSTSUPERSCRIPT + divide start_ARG italic_r end_ARG start_ARG 2 italic_h end_ARG over^ start_ARG italic_X end_ARG start_POSTSUPERSCRIPT ( italic_n ) end_POSTSUPERSCRIPT over^ start_ARG italic_D end_ARG start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( italic_n ) end_POSTSUPERSCRIPT - italic_r over^ start_ARG italic_I end_ARG start_POSTSUPERSCRIPT ⊗ italic_n end_POSTSUPERSCRIPT . (48)

Expressing Eq. (48) in matrix form over n𝑛nitalic_n-qubits, we have it that

iH^BS(n)=[γ0β0α1γ1β1α2n2γ2n2β2n2α2n1γ2n1],𝑖superscriptsubscript^𝐻𝐵𝑆𝑛matrixsubscript𝛾0subscript𝛽0missing-subexpressionsubscript𝛼1subscript𝛾1subscript𝛽1missing-subexpressionmissing-subexpressionmissing-subexpressionmissing-subexpressionmissing-subexpressionsubscript𝛼superscript2𝑛2subscript𝛾superscript2𝑛2subscript𝛽superscript2𝑛2missing-subexpressionmissing-subexpressionmissing-subexpressionsubscript𝛼superscript2𝑛1subscript𝛾superscript2𝑛1-i\hat{H}_{BS}^{(n)}=\begin{bmatrix}\gamma_{0}&\beta_{0}&\\ \alpha_{1}&\gamma_{1}&\beta_{1}&\\ &\ddots&\ddots&\ddots&\\ &&\alpha_{2^{n}-2}&\gamma_{2^{n}-2}&\beta_{2^{n}-2}\\ &&&\alpha_{2^{n}-1}&\gamma_{2^{n}-1}\end{bmatrix},- italic_i over^ start_ARG italic_H end_ARG start_POSTSUBSCRIPT italic_B italic_S end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( italic_n ) end_POSTSUPERSCRIPT = [ start_ARG start_ROW start_CELL italic_γ start_POSTSUBSCRIPT 0 end_POSTSUBSCRIPT end_CELL start_CELL italic_β start_POSTSUBSCRIPT 0 end_POSTSUBSCRIPT end_CELL start_CELL end_CELL end_ROW start_ROW start_CELL italic_α start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT end_CELL start_CELL italic_γ start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT end_CELL start_CELL italic_β start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT end_CELL start_CELL end_CELL end_ROW start_ROW start_CELL end_CELL start_CELL ⋱ end_CELL start_CELL ⋱ end_CELL start_CELL ⋱ end_CELL start_CELL end_CELL end_ROW start_ROW start_CELL end_CELL start_CELL end_CELL start_CELL italic_α start_POSTSUBSCRIPT 2 start_POSTSUPERSCRIPT italic_n end_POSTSUPERSCRIPT - 2 end_POSTSUBSCRIPT end_CELL start_CELL italic_γ start_POSTSUBSCRIPT 2 start_POSTSUPERSCRIPT italic_n end_POSTSUPERSCRIPT - 2 end_POSTSUBSCRIPT end_CELL start_CELL italic_β start_POSTSUBSCRIPT 2 start_POSTSUPERSCRIPT italic_n end_POSTSUPERSCRIPT - 2 end_POSTSUBSCRIPT end_CELL end_ROW start_ROW start_CELL end_CELL start_CELL end_CELL start_CELL end_CELL start_CELL italic_α start_POSTSUBSCRIPT 2 start_POSTSUPERSCRIPT italic_n end_POSTSUPERSCRIPT - 1 end_POSTSUBSCRIPT end_CELL start_CELL italic_γ start_POSTSUBSCRIPT 2 start_POSTSUPERSCRIPT italic_n end_POSTSUPERSCRIPT - 1 end_POSTSUBSCRIPT end_CELL end_ROW end_ARG ] , (49)

where

αk=σ2xk22h2rxk2h,βk=σ2xk22h2+rxk2h,andγk=rαkβk.formulae-sequencesubscript𝛼𝑘superscript𝜎2superscriptsubscript𝑥𝑘22superscript2𝑟subscript𝑥𝑘2formulae-sequencesubscript𝛽𝑘superscript𝜎2superscriptsubscript𝑥𝑘22superscript2𝑟subscript𝑥𝑘2andsubscript𝛾𝑘𝑟subscript𝛼𝑘subscript𝛽𝑘\alpha_{k}=\frac{\sigma^{2}x_{k}^{2}}{2h^{2}}-\frac{rx_{k}}{2h},\quad\beta_{k}% =\frac{\sigma^{2}x_{k}^{2}}{2h^{2}}+\frac{rx_{k}}{2h},\quad\text{and}\quad% \gamma_{k}=-r-\alpha_{k}-\beta_{k}.italic_α start_POSTSUBSCRIPT italic_k end_POSTSUBSCRIPT = divide start_ARG italic_σ start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT italic_x start_POSTSUBSCRIPT italic_k end_POSTSUBSCRIPT start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT end_ARG start_ARG 2 italic_h start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT end_ARG - divide start_ARG italic_r italic_x start_POSTSUBSCRIPT italic_k end_POSTSUBSCRIPT end_ARG start_ARG 2 italic_h end_ARG , italic_β start_POSTSUBSCRIPT italic_k end_POSTSUBSCRIPT = divide start_ARG italic_σ start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT italic_x start_POSTSUBSCRIPT italic_k end_POSTSUBSCRIPT start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT end_ARG start_ARG 2 italic_h start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT end_ARG + divide start_ARG italic_r italic_x start_POSTSUBSCRIPT italic_k end_POSTSUBSCRIPT end_ARG start_ARG 2 italic_h end_ARG , and italic_γ start_POSTSUBSCRIPT italic_k end_POSTSUBSCRIPT = - italic_r - italic_α start_POSTSUBSCRIPT italic_k end_POSTSUBSCRIPT - italic_β start_POSTSUBSCRIPT italic_k end_POSTSUBSCRIPT . (50)

To include linear boundary conditions, we neglect the second derivative terms and substitute the first and last row of Eq. (48) with forward and backward finite difference coefficients, respectively. The revised first row coefficients that take into account the linear boundary conditions are

γ0=rrx0handβ0=rx0h,formulae-sequencesuperscriptsubscript𝛾0𝑟𝑟subscript𝑥0andsuperscriptsubscript𝛽0𝑟subscript𝑥0\gamma_{0}^{\prime}=-r-\frac{rx_{0}}{h}\quad\text{and}\quad\beta_{0}^{\prime}=% \frac{rx_{0}}{h},italic_γ start_POSTSUBSCRIPT 0 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT = - italic_r - divide start_ARG italic_r italic_x start_POSTSUBSCRIPT 0 end_POSTSUBSCRIPT end_ARG start_ARG italic_h end_ARG and italic_β start_POSTSUBSCRIPT 0 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT = divide start_ARG italic_r italic_x start_POSTSUBSCRIPT 0 end_POSTSUBSCRIPT end_ARG start_ARG italic_h end_ARG , (51)

while the revised last row coefficients that into account the linear boundary conditions are

α2n1=rxNhandγ2n1=r+rxNh.formulae-sequencesuperscriptsubscript𝛼superscript2𝑛1𝑟subscript𝑥𝑁andsuperscriptsubscript𝛾superscript2𝑛1𝑟𝑟subscript𝑥𝑁\alpha_{2^{n}-1}^{\prime}=-\frac{rx_{N}}{h}\quad\text{and}\quad\gamma_{2^{n}-1% }^{\prime}=-r+\frac{rx_{N}}{h}.italic_α start_POSTSUBSCRIPT 2 start_POSTSUPERSCRIPT italic_n end_POSTSUPERSCRIPT - 1 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT = - divide start_ARG italic_r italic_x start_POSTSUBSCRIPT italic_N end_POSTSUBSCRIPT end_ARG start_ARG italic_h end_ARG and italic_γ start_POSTSUBSCRIPT 2 start_POSTSUPERSCRIPT italic_n end_POSTSUPERSCRIPT - 1 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT = - italic_r + divide start_ARG italic_r italic_x start_POSTSUBSCRIPT italic_N end_POSTSUBSCRIPT end_ARG start_ARG italic_h end_ARG . (52)

Consequently, for n2𝑛2n\geq 2italic_n ≥ 2 qubits, the Black-Scholes Hamiltonian with linear boundary conditions is written as

iH^LBS(n)𝑖superscriptsubscript^𝐻𝐿𝐵𝑆𝑛\displaystyle-i\hat{H}_{LBS}^{(n)}- italic_i over^ start_ARG italic_H end_ARG start_POSTSUBSCRIPT italic_L italic_B italic_S end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( italic_n ) end_POSTSUPERSCRIPT =\displaystyle== iH^BS(n)+(γ0γ0)A^(n)+(β0β0)(A^(n1)A^(1))𝑖superscriptsubscript^𝐻𝐵𝑆𝑛superscriptsubscript𝛾0subscript𝛾0superscriptsubscript^𝐴𝑛superscriptsubscript𝛽0subscript𝛽0tensor-productsuperscriptsubscript^𝐴𝑛1superscriptsubscript^𝐴1\displaystyle-i\hat{H}_{BS}^{(n)}+(\gamma_{0}^{\prime}-\gamma_{0})\hat{A}_{% \nwarrow}^{(n)}+(\beta_{0}^{\prime}-\beta_{0})(\hat{A}_{\nwarrow}^{(n-1)}% \otimes\hat{A}_{\nearrow}^{(1)})- italic_i over^ start_ARG italic_H end_ARG start_POSTSUBSCRIPT italic_B italic_S end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( italic_n ) end_POSTSUPERSCRIPT + ( italic_γ start_POSTSUBSCRIPT 0 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT - italic_γ start_POSTSUBSCRIPT 0 end_POSTSUBSCRIPT ) over^ start_ARG italic_A end_ARG start_POSTSUBSCRIPT ↖ end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( italic_n ) end_POSTSUPERSCRIPT + ( italic_β start_POSTSUBSCRIPT 0 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT - italic_β start_POSTSUBSCRIPT 0 end_POSTSUBSCRIPT ) ( over^ start_ARG italic_A end_ARG start_POSTSUBSCRIPT ↖ end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( italic_n - 1 ) end_POSTSUPERSCRIPT ⊗ over^ start_ARG italic_A end_ARG start_POSTSUBSCRIPT ↗ end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( 1 ) end_POSTSUPERSCRIPT ) (53)
+(α2n1α2n1)(A^(n1)A^(1))+(γ2n1γ2n1)A^(n).superscriptsubscript𝛼superscript2𝑛1subscript𝛼superscript2𝑛1tensor-productsuperscriptsubscript^𝐴𝑛1superscriptsubscript^𝐴1superscriptsubscript𝛾superscript2𝑛1subscript𝛾superscript2𝑛1superscriptsubscript^𝐴𝑛\displaystyle+\ (\alpha_{2^{n}-1}^{\prime}-\alpha_{2^{n}-1})(\hat{A}_{\searrow% }^{(n-1)}\otimes\hat{A}_{\swarrow}^{(1)})+(\gamma_{2^{n}-1}^{\prime}-\gamma_{2% ^{n}-1})\hat{A}_{\searrow}^{(n)}.+ ( italic_α start_POSTSUBSCRIPT 2 start_POSTSUPERSCRIPT italic_n end_POSTSUPERSCRIPT - 1 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT - italic_α start_POSTSUBSCRIPT 2 start_POSTSUPERSCRIPT italic_n end_POSTSUPERSCRIPT - 1 end_POSTSUBSCRIPT ) ( over^ start_ARG italic_A end_ARG start_POSTSUBSCRIPT ↘ end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( italic_n - 1 ) end_POSTSUPERSCRIPT ⊗ over^ start_ARG italic_A end_ARG start_POSTSUBSCRIPT ↙ end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( 1 ) end_POSTSUPERSCRIPT ) + ( italic_γ start_POSTSUBSCRIPT 2 start_POSTSUPERSCRIPT italic_n end_POSTSUPERSCRIPT - 1 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT - italic_γ start_POSTSUBSCRIPT 2 start_POSTSUPERSCRIPT italic_n end_POSTSUPERSCRIPT - 1 end_POSTSUBSCRIPT ) over^ start_ARG italic_A end_ARG start_POSTSUBSCRIPT ↘ end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( italic_n ) end_POSTSUPERSCRIPT .

The rescaling protocol

Under the assumption of linear boundary conditions, u(x,τ)𝑢𝑥𝜏u(x,\tau)italic_u ( italic_x , italic_τ ) is linear with respect to x𝑥xitalic_x in the neighbourhood of x0subscript𝑥0x_{0}italic_x start_POSTSUBSCRIPT 0 end_POSTSUBSCRIPT and xNsubscript𝑥𝑁x_{N}italic_x start_POSTSUBSCRIPT italic_N end_POSTSUBSCRIPT, hence, we have

u(x,τ)=a(τ)x+b(τ)𝑢𝑥𝜏𝑎𝜏𝑥𝑏𝜏u(x,\tau)=a(\tau)x+b(\tau)italic_u ( italic_x , italic_τ ) = italic_a ( italic_τ ) italic_x + italic_b ( italic_τ ) (54)

for xx0𝑥subscript𝑥0x\approx x_{0}italic_x ≈ italic_x start_POSTSUBSCRIPT 0 end_POSTSUBSCRIPT and xxN𝑥subscript𝑥𝑁x\approx x_{N}italic_x ≈ italic_x start_POSTSUBSCRIPT italic_N end_POSTSUBSCRIPT. Substituting Eq. (54) into the Black-Scholes equation, Eq. (34), we obtain the boundary equation

τ(a(τ)x+b(τ))partial-derivative𝜏𝑎𝜏𝑥𝑏𝜏\displaystyle\partialderivative{\tau}\left(a(\tau)x+b(\tau)\right)start_DIFFOP divide start_ARG ∂ end_ARG start_ARG ∂ start_ARG italic_τ end_ARG end_ARG end_DIFFOP ( italic_a ( italic_τ ) italic_x + italic_b ( italic_τ ) ) =rxx(a(τ)x+b(τ))r(a(τ)x+b(τ)),absent𝑟𝑥partial-derivative𝑥𝑎𝜏𝑥𝑏𝜏𝑟𝑎𝜏𝑥𝑏𝜏\displaystyle=rx\partialderivative{x}\left(a(\tau)x+b(\tau)\right)-r\left(a(% \tau)x+b(\tau)\right),= italic_r italic_x start_DIFFOP divide start_ARG ∂ end_ARG start_ARG ∂ start_ARG italic_x end_ARG end_ARG end_DIFFOP ( italic_a ( italic_τ ) italic_x + italic_b ( italic_τ ) ) - italic_r ( italic_a ( italic_τ ) italic_x + italic_b ( italic_τ ) ) , (55)

which implies

xdadτ+dbdτ=rb(τ).𝑥derivative𝜏𝑎derivative𝜏𝑏𝑟𝑏𝜏x\derivative{a}{\tau}+\derivative{b}{\tau}=-rb(\tau).italic_x divide start_ARG roman_d start_ARG italic_a end_ARG end_ARG start_ARG roman_d start_ARG italic_τ end_ARG end_ARG + divide start_ARG roman_d start_ARG italic_b end_ARG end_ARG start_ARG roman_d start_ARG italic_τ end_ARG end_ARG = - italic_r italic_b ( italic_τ ) . (56)

Equation (56) is an ODE with solutions

a(τ)=a(0)andb(τ)=b(0)erτ.formulae-sequence𝑎𝜏𝑎0and𝑏𝜏𝑏0superscript𝑒𝑟𝜏a(\tau)=a(0)\quad\text{and}\quad b(\tau)=b(0)e^{-r\tau}.italic_a ( italic_τ ) = italic_a ( 0 ) and italic_b ( italic_τ ) = italic_b ( 0 ) italic_e start_POSTSUPERSCRIPT - italic_r italic_τ end_POSTSUPERSCRIPT . (57)

Determining a(0)𝑎0a(0)italic_a ( 0 ) and b(0)𝑏0b(0)italic_b ( 0 ) at each boundary, Eq. (54) becomes a closed form expression that explains how u(x,τ)𝑢𝑥𝜏u(x,\tau)italic_u ( italic_x , italic_τ ) evolves at the boundaries. Assuming hhitalic_h is sufficiently small, we can approximate a(0)𝑎0a(0)italic_a ( 0 ) and b(0)𝑏0b(0)italic_b ( 0 ) at each boundary by assuming that the closest sample point also follows the linear condition. Thus, on the left boundary, using u(x0,0)=a0(0)x0+b0(0)𝑢subscript𝑥00subscript𝑎00subscript𝑥0subscript𝑏00u(x_{0},0)=a_{0}(0)x_{0}+b_{0}(0)italic_u ( italic_x start_POSTSUBSCRIPT 0 end_POSTSUBSCRIPT , 0 ) = italic_a start_POSTSUBSCRIPT 0 end_POSTSUBSCRIPT ( 0 ) italic_x start_POSTSUBSCRIPT 0 end_POSTSUBSCRIPT + italic_b start_POSTSUBSCRIPT 0 end_POSTSUBSCRIPT ( 0 ) and u(x1,0)=a0(0)x1+b0(0)𝑢subscript𝑥10subscript𝑎00subscript𝑥1subscript𝑏00u(x_{1},0)=a_{0}(0)x_{1}+b_{0}(0)italic_u ( italic_x start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT , 0 ) = italic_a start_POSTSUBSCRIPT 0 end_POSTSUBSCRIPT ( 0 ) italic_x start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT + italic_b start_POSTSUBSCRIPT 0 end_POSTSUBSCRIPT ( 0 ), we have

a0=u(x1,0)u(x0,0)handb0(0)=u(x0,0)a0x0.formulae-sequencesubscript𝑎0𝑢subscript𝑥10𝑢subscript𝑥00andsubscript𝑏00𝑢subscript𝑥00subscript𝑎0subscript𝑥0a_{0}=\frac{u(x_{1},0)-u(x_{0},0)}{h}\quad\text{and}\quad b_{0}(0)=u(x_{0},0)-% a_{0}x_{0}.italic_a start_POSTSUBSCRIPT 0 end_POSTSUBSCRIPT = divide start_ARG italic_u ( italic_x start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT , 0 ) - italic_u ( italic_x start_POSTSUBSCRIPT 0 end_POSTSUBSCRIPT , 0 ) end_ARG start_ARG italic_h end_ARG and italic_b start_POSTSUBSCRIPT 0 end_POSTSUBSCRIPT ( 0 ) = italic_u ( italic_x start_POSTSUBSCRIPT 0 end_POSTSUBSCRIPT , 0 ) - italic_a start_POSTSUBSCRIPT 0 end_POSTSUBSCRIPT italic_x start_POSTSUBSCRIPT 0 end_POSTSUBSCRIPT . (58)

Similarly, on the right boundary, we have

aN=u(xN,0)u(xN1,0)handbN(0)=u(xN,0)aNxN.formulae-sequencesubscript𝑎𝑁𝑢subscript𝑥𝑁0𝑢subscript𝑥𝑁10andsubscript𝑏𝑁0𝑢subscript𝑥𝑁0subscript𝑎𝑁subscript𝑥𝑁a_{N}=\frac{u(x_{N},0)-u(x_{N-1},0)}{h}\quad\text{and}\quad b_{N}(0)=u(x_{N},0% )-a_{N}x_{N}.italic_a start_POSTSUBSCRIPT italic_N end_POSTSUBSCRIPT = divide start_ARG italic_u ( italic_x start_POSTSUBSCRIPT italic_N end_POSTSUBSCRIPT , 0 ) - italic_u ( italic_x start_POSTSUBSCRIPT italic_N - 1 end_POSTSUBSCRIPT , 0 ) end_ARG start_ARG italic_h end_ARG and italic_b start_POSTSUBSCRIPT italic_N end_POSTSUBSCRIPT ( 0 ) = italic_u ( italic_x start_POSTSUBSCRIPT italic_N end_POSTSUBSCRIPT , 0 ) - italic_a start_POSTSUBSCRIPT italic_N end_POSTSUBSCRIPT italic_x start_POSTSUBSCRIPT italic_N end_POSTSUBSCRIPT . (59)

Using Eq. (58) and Eq. (59), we define a protocol that rescales the normalised state |ψ¯u(τ)ketsubscript¯𝜓𝑢𝜏\ket{\bar{\psi}_{u}(\tau)}| start_ARG over¯ start_ARG italic_ψ end_ARG start_POSTSUBSCRIPT italic_u end_POSTSUBSCRIPT ( italic_τ ) end_ARG ⟩ obtained from QNUTE by a factor C(τ)subscript𝐶𝜏C_{*}(\tau)italic_C start_POSTSUBSCRIPT ∗ end_POSTSUBSCRIPT ( italic_τ ) such that

0|C(τ)|ψ¯u(τ)=a0x0+b0(0)erτ,bra0subscript𝐶𝜏ketsubscript¯𝜓𝑢𝜏subscript𝑎0subscript𝑥0subscript𝑏00superscript𝑒𝑟𝜏\bra{0}C_{*}(\tau)\ket{\bar{\psi}_{u}(\tau)}=a_{0}x_{0}+b_{0}(0)e^{-r\tau},⟨ start_ARG 0 end_ARG | italic_C start_POSTSUBSCRIPT ∗ end_POSTSUBSCRIPT ( italic_τ ) | start_ARG over¯ start_ARG italic_ψ end_ARG start_POSTSUBSCRIPT italic_u end_POSTSUBSCRIPT ( italic_τ ) end_ARG ⟩ = italic_a start_POSTSUBSCRIPT 0 end_POSTSUBSCRIPT italic_x start_POSTSUBSCRIPT 0 end_POSTSUBSCRIPT + italic_b start_POSTSUBSCRIPT 0 end_POSTSUBSCRIPT ( 0 ) italic_e start_POSTSUPERSCRIPT - italic_r italic_τ end_POSTSUPERSCRIPT , (60)

or

2n1|C(τ)|ψ¯u(τ)=aNxN+bN(0)erτ.brasuperscript2𝑛1subscript𝐶𝜏ketsubscript¯𝜓𝑢𝜏subscript𝑎𝑁subscript𝑥𝑁subscript𝑏𝑁0superscript𝑒𝑟𝜏\bra{2^{n}-1}C_{*}(\tau)\ket{\bar{\psi}_{u}(\tau)}=a_{N}x_{N}+b_{N}(0)e^{-r% \tau}.⟨ start_ARG 2 start_POSTSUPERSCRIPT italic_n end_POSTSUPERSCRIPT - 1 end_ARG | italic_C start_POSTSUBSCRIPT ∗ end_POSTSUBSCRIPT ( italic_τ ) | start_ARG over¯ start_ARG italic_ψ end_ARG start_POSTSUBSCRIPT italic_u end_POSTSUBSCRIPT ( italic_τ ) end_ARG ⟩ = italic_a start_POSTSUBSCRIPT italic_N end_POSTSUBSCRIPT italic_x start_POSTSUBSCRIPT italic_N end_POSTSUBSCRIPT + italic_b start_POSTSUBSCRIPT italic_N end_POSTSUBSCRIPT ( 0 ) italic_e start_POSTSUPERSCRIPT - italic_r italic_τ end_POSTSUPERSCRIPT . (61)

The choice between Eq. (60) and Eq. (61) depends on the preference assigned to the boundaries during simulation. This work used the left boundary when modelling put options, and the right boundary when modelling call options. The protocol fails if a(0)=b(0)=0𝑎0𝑏00a(0)=b(0)=0italic_a ( 0 ) = italic_b ( 0 ) = 0 on both boundaries.