SlideShare a Scribd company logo
ARTICLE OPEN
Quantum-enhanced analysis of discrete stochastic processes
Carsten Blank 1
, Daniel K. Park 2
and Francesco Petruccione 3,4 ✉
Discrete stochastic processes (DSP) are instrumental for modeling the dynamics of probabilistic systems and have a wide spectrum
of applications in science and engineering. DSPs are usually analyzed via Monte-Carlo methods since the number of realizations
increases exponentially with the number of time steps, and importance sampling is often required to reduce the variance. We
propose a quantum algorithm for calculating the characteristic function of a DSP, which completely defines its probability
distribution, using the number of quantum circuit elements that grows only linearly with the number of time steps. The quantum
algorithm reduces the Monte-Carlo sampling to a Bernoulli trial while taking all stochastic trajectories into account. This approach
guarantees the optimal variance without the need for importance sampling. The algorithm can be further furnished with the
quantum amplitude estimation algorithm to provide quadratic speed-up in sampling. The Fourier approximation can be used to
estimate an expectation value of any integrable function of the random variable. Applications in finance and correlated random
walks are presented. Proof-of-principle experiments are performed using the IBM quantum cloud platform.
npj Quantum Information (2021)7:126 ; https://doi.org/10.1038/s41534-021-00459-2
INTRODUCTION
Simulation of physical processes on quantum computers1,2
has
many facets, with recent developments improving the usage of
this technology3–14
. While one obvious task for a quantum
computer is to simulate quantum mechanical behaviors of nature1
,
quantum simulation of probability distributions and stochastic
processes has gained attention recently15–20
. Since quantum
mechanics can be viewed as a mathematical generalization of
probability theory, where nonnegative real-valued probabilities are
replaced by complex-valued probability amplitudes, quantum
computing appears to be a natural tool for simulating classical
probabilistic processes. Intuitively, some quantum advantage is
expected since the probability amplitudes can interfere, unlike in
classical probabilistic computing. Indeed, a quadratic quantum
speed-up has been reported for solving financial problems when
compared to Monte-Carlo simulations16,21
.
Classically, Monte-Carlo methods are essential for estimating
expected values of random variables in DSPs, since the number of
realizations increases exponentially with the time steps. When the
Monte Carlo sampling is repeated N times, the expectation value
to be found converges with Oð1=
ffiffiffiffi
N
p
Þ regardless of the number of
realizations. The central limit theorem ensures this, but it is
important to note that this convergence is only attained in the
limit of N → ∞. When this limit is not nearly attained, it is often
crucial to have sampling strategies to reduce the variance of the
estimate. The reason for this is that less likely events can, on the
other hand, be of high impact. This can create a bias in the
computation as the estimation can be dominated by more
probable, but less important values. To correctly sample with a
given N that is not near the limit of the large number, it is
beneficial to modify the probability of the process in a way that
balances the importance of the events. This is called importance
sampling22–28
. This makes apparent two problems with Monte-
Carlo algorithms. First, it may be difficult to calculate the
probability of a particular realization of a random variable. Second,
the importance sampling strategy relies on a sophisticated
understanding of the probability distribution.
In this manuscript, we show that the characteristic function of a
DSP can be efficiently calculated on a quantum computer, and in so
doing we introduce an effect called quantum brute force. The
random variables of the DSP of interest do not need to be identically
and independently distributed, and non-Markovian processes can
also be studied. The quantum-state space that grows exponentially
with the number of qubits is used to move along all paths of the
discrete stochastic process simultaneously in a quantum super-
position, and hence the term quantum brute force is adequate.
The method proposed in this work maps the expectation value
of interest into a probability of measuring a particular computa-
tional basis state of a qubit. This probability can essentially be
thought of as the success parameter of a Bernoulli trial, i.e., a coin
toss, whose statistics are well-known. As a consequence, the
variance is optimal in the sense that it behaves according to the
central limit theorem for all sample sizes, not only for large
numbers. This leads to a crucial result that no sampling strategies
are necessary.
Moreover, we connect quantum amplitude estimation (AE)29
,
which can be utilized to overcome the classical limit on the
sampling convergence of Monte-Carlo methods15,16,30,31
, to our
method. In brief, the single-qubit measurement scheme can be
replaced by an application of AE to the full system. With this
modification, our algorithm uses resources that scale linearly
instead of quadratically, and thus achieves a quantum speed-up.
The methods developed here point therefore to an exciting and
promising use of quantum computers: less variance and faster
convergence for Monte-Carlo sampling. Equivalently, it is possible
to reduce the sample size without losing precision.
Applications of our method span extensively across many fields
in science and engineering; any physical behavior that can be
mathematically modeled as a DSP can be studied in principle. In
particular, we show how the found simulation procedure can be
applied to option pricing theory and to correlated random walks
1
Data Cybernetics, Landsberg, Germany. 2
Sungkyunkwan University Advanced Institute of Nanotechnology, Suwon, Republic of Korea. 3
Quantum Research Group, School of
Chemistry and Physics, University of KwaZulu-Natal, Durban, KwaZulu-Natal, South Africa. 4
National Institute for Theoretical and Computational Sciences (NITheCS), KwaZulu-
Natal, South Africa. ✉email: petruccione@ukzn.ac.za
www.nature.com/npjqi
Published in partnership with The University of New South Wales
1234567890():,;
which leads to various applications in biology, ecology, and
finance. For each example, we experimentally demonstrate the
proof-of-principle using the IBM quantum cloud platform.
Although the main focus of this work is to achieve quantum
sampling advantage for discrete stochastic processes, we note
that quantum memory advantages have been shown for
stochastic processes with causal structures18–20,32
and in rare-
events sampling33
. An interesting connection concerning our
result to this line of research comes from the work by Binder
et al.32
which presented the construction of a unitary quantum
simulator for generating all possible realizations of a hidden
Markov model (HMM) that requires less memory than any classical
counterparts throughout the simulation. The focus of this body of
work has been sampling from a distribution, but with respect to
the results discussed here, it can also be used to estimate
expectation values, in particular characteristic functions.
RESULTS
A discrete stochastic process can be described with n discrete
random variables Xl : Ωl ! R, l = 1, …, n for some n 2 Nþ, each
having at most k nonzero realizations, i.e., given a sample space Ωl,
there exist at most k elements xl;0; ¼ ; xl;k1 2 R with Xl(Ωl) =
{xl,0, …, xl,k−1}. In plain words, a discrete stochastic process consists
of n steps, and in each step, one of k possible events occurs at
random with a certain probability. Hereinafter, we use the
following notations. Each realization of the stochastic process is
identified with an index vector j ¼ ðj1; ¼ ; jnÞ
2 Kn
with K = {0,
…, k − 1} and is denoted by xðjÞ ¼ ðx1;j1
; ¼ ; xn;jn
Þ
. Moreover, we
define sum xðjÞ
f g :¼
Pn
l¼1 xl;jl
and xðmÞ
ðjÞ ¼ ðx1;j1
; ¼ ; xm;jm
Þ
with
m ≤ n. The first and the second subscripts of the random variables
and probabilities label the time step and the event, respectively. A
quantity of interest for such processes is the expectation value of
an integrable function f : R ! R of the random variable
Sn ¼
Pn
l¼1 Xl
E fðSnÞ
½  ¼
X
j2Kn
fðsum xðjÞ
f gÞP X ¼ xðjÞ
½ : (1)
The summation is over all possible realizations, each indexed by
j, and X is the random variable representing the sequence of
events that can occur in a particular realization. The number of
terms in the summation (i.e., the number of realizations) is kn
.
Now, we explain how to encode the described stochastic
process in a quantum state, and evaluate Eq. (1) by making a
measurement on the quantum state. The quantum state consists
of an index system and a data system defined in a Hilbert space
HI  HD ¼ Ckn
 C2
, where I (D) indicates the index (data)
system. Each realization of the stochastic process is represented as
a unitary operator UðÞ : Rn

! BðHI  HDÞ parametrized by
some n-dimensional vector (BðHÞ is the space of linear operators
on a Hilbert space H). Then a DSP can be represented as
Ψf
j i ¼
X
j2Kn
pðjÞ j
j i  UðjÞ ψ
j i: (2)
The factor of each part of the sum is denoted by p(j) with ∑jp2
(j)
= 1 and the state of the index system is denoted by
j
j i ¼ jn    j1
j i ¼ jn
j i      j1
j i, where jl
j i for jl = 0, …, k − 1 is
the orthogonal basis. Measuring an expectation value of an
observable M on the data system of the final state in Eq. (2) yields
the convex sum of independent expectation values measured
from all kn
trajectories34
as
hMi ¼ Ψf
h jII  M Ψf
j i
¼
P
j2Kn
p2
ðjÞ ψ
h jUy
ðjÞMUðjÞ ψ
j i
¼
P
j2Kn
p2
ðjÞhMðjÞiψ;
(3)
where M(j) = U†
(j)MU(j). The coefficient p2
(j) can be identified with
the joint probability and the expectation value with the evaluation
of f, i.e.,
p2
ðjÞ  P X1 ¼ x1;j1
; ¼ ; Xn ¼ xn;jn
 
(4)
hMðjÞi  fðx1;j1
þ    þ xn;jn
Þ (5)
for a function f : R ! R that we will specify below.
In the worst case, evaluation of Eq. (3) requires two expensive
procedures as follows. First, kn
probabilities need to be encoded as
the amplitudes of kn
computational basis given by n qudits of
dimension k. This can be done with various quantum state
preparation techniques with a substantial amount of computa-
tional overhead35,36
. Next, kn
unitary operators, conditioned on all
possible index states, need to be applied to an input state ψ
j i.
Such operators can be expressed as
c-UðjÞ ¼ j
j i j
h j  Vðxn;jn
Þ    Vðx1;j1
Þ
 
þ j
j i j
h j? ID
with V : R ! HD. On the other hand, for many interesting DSPs,
the number of necessary unitary operators can be reduced to
OðnkÞ.
Before explaining such exponential reduction in detail, we
introduce two results in the next two propositions (with proofs
provided in Supplementary Information) to establish the grounds
for the measurement scheme.
Proposition 1 (Pauli X and Y Measurement). Let VðxÞ ¼
Rzð2xÞ ¼ 0
j i 0
h j þ eix
1
j i 1
h j with x 2 R, then by setting M = σx or
M = σy and ψ
j i ¼ ð 0
j i þ 1
j iÞ=
ffiffiffi
2
p
, we find
hII  σxiΨf
¼ E cosðSnÞ
½ ; (6)
hII  σyiΨf
¼ E sinðSnÞ
½ : (7)
As the true value of E cosðSnÞ
½  and E sinðSnÞ
½  must be
estimated, in general, the convergence behaves according to
the central limit theorem, which guarantees that the measure-
ment statistics approaches to a normal distribution around a mean
that corresponds to E fðSnÞ
½  as the number of experiments
NS → ∞. The speed of convergence is moreover given by
Oð1=
ffiffiffiffiffi
NS
p
Þ. Taking into account that the Pauli measurements
have two eigenvalues, the task is essentially estimating a
probability of a Bernoulli trial, which specifies how the central
limit theorem is realized. Given confidence of 1 − α, the number of
experiments to be within a margin of error ϵ  0 is NS ¼ dz2
α=ð4ϵ2
Þe
with zα = z (1 − α/2) being the quantile function. In contrast, with
classical Monte-Carlo sampling, the convergence rate by the
central limit theorem is achieved with the caveat that the Monte-
Carlo simulation samples from a usually unknown stochastic
process and concise estimates on the number of experiments
given a margin of error are in general not easily accessible. As we
see, the property that Eq. (2) encompasses all possible paths with
the correct probability with a quantum measurement leads to the
seemingly small advantage of knowing the convergence before-
hand, irrespective of the distribution of the underlying DSP.
Contemplation on this fact reveals that this is no small feat: the
quantum advantage lies in the fact that no sampling strategies are
necessary.
The quantum amplitude estimation algorithm29
can provide
further speed-up compared to the convergence rate of the
classical Monte-Carlo method given by the central limit theo-
rem15,16,30,31
. The algorithm uses m ancilla qubits in addition to
data and index qubits and OðpolyðmÞÞ number of Grover-like
iterators followed by Oðm2
Þ Hadamard and controlled phase-shift
gates for quantum Fourier transform (QFT)37
to estimate an
amplitude with an error of Oð1=2m
Þ. The number of repeated
measurements needed to reach confidence that the estimation
succeeded is independent of m. The quantum AE algorithm can
be adapted to our method to construct an even more powerful
C. Blank et al.
2
npj Quantum Information (2021) 126 Published in partnership with The University of New South Wales
1234567890():,;
strategy by formulating an AE problem as follows. Given the final
state in Eq. (2) written as a linear combination Ψf
j i ¼ Ψ0
j i þ Ψ1
j i
by separating the full Hilbert space into two orthogonal
subspaces, we estimate the amplitude defined as a = 〈Ψ1∣Ψ1〉.
Then, the following proposition connects AE with the DSP
simulation.
Proposition 2 (Amplitude Estimation). Let
VðxÞ ¼ RyðxÞ ¼ cosðx=2ÞI  i sinðx=2Þσy, x 2 R, ψ
j i ¼ 0
j i, then
the final state is
Ψf
j i ¼ Ψ0
j i þ Ψ1
j i (8)
with
Ψ0
j i ¼
X
j2Kn
pðjÞ cos
1
2
sum xðjÞ
f g
 
j
j i 0
j i (9)
Ψ1
j i ¼
X
j2Kn
pðjÞ sin
1
2
sum xðjÞ
f g
 
j
j i 1
j i: (10)
With AE the value ~
a will be estimated, hence E cosðSnÞ
½  ¼ 1  2~
a.
Conversely, if V(x) = Ry (−x), ψ
j i ¼ Ryðπ=2Þ 0
j i, then there exists a
similar decomposition Ψ0
f
	
	


¼ Ψ0
0
	
	


þ Ψ0
1
	
	


so that with a0
¼
hΨ0
1jΨ0
1i we therefore find E sinðSnÞ
½  ¼ 1  2~
a0
.
The above result opens up an exciting avenue towards a fast
Monte-Carlo alternative without the need of sampling strategies.
These propositions in conjunction with Theorem 1 which is stated
in the following section show that a quantum computer can
simulate the quantities E cosðSnÞ
½  and E sinðSnÞ
½  efficiently. As a
result, one can calculate a random variable’s characteristic
function φX ðvÞ ¼ E eivX
½  ¼ E cosðvXÞ
½  þ iE sinðvXÞ
½  with two sets
of experiments per v 2 R.
In order to extend the above ideas to estimate expectation
values of a range of integrable functions f : R ! R, a Fourier
series is used. If f is P-periodic, then
fLðxÞ ¼
X
L
l¼L
clei2πl
P x
(11)
is the Fourier approximation of order L for f(x). By linearity of the
expectation value, this approximation carries over to
E fLðSnÞ
½  ¼
X
L
l¼L
clφSn
2πl
P
 
: (12)
As a consequence, it is possible to approximate any such
expectation value in OðLNÞ experiments, where N is the number of
shots per experiment. Convergence on Fourier series is a rich and
mature field38–40
, which establishes basic results about conver-
gence and the rate of convergence of each coefficient for given
properties of the function f.
The underlying idea of simulating DSPs on a quantum
computer has been laid out. Now we show that the simulation
can be performed efficiently with a quantum circuit.
Independent increments
To deliver the underlying idea with a simple example, we start by
presenting the case for DSPs with independent increments. To this
end, the strategy taken is as follows. We first construct the state
P
j2Kn pðjÞ j
j i 2 HI , and systematically entangle the data system D
with the index system. When each of the increments are
independent of each other, i.e., P Xi ¼ x; Xj ¼ y
 
¼
P Xi ¼ x
½ P Xj ¼ y
 
for pairwise different i ≠ j, Eq. (1) can be
written as
E fðSnÞ
½  ¼
X
j2Kn
fðsum xðjÞ
f gÞ
Y
n
l¼1
P Xl ¼ xl;jl
 
; (13)
and p2
l;jl
¼ P Xl ¼ xl;jl
 
. This structure allows to partition I into
subsystems, so-called level-index (sub)systems: HI ¼
Nn
l¼1HIl
,
where each HIl
¼ Ck
represents a qudit Hilbert space. Let
αðnÞ
j i 2 HI be the index-state. Then it can be described as a
product state
αðnÞ
j i ¼
X
j
pðjÞ j
j i ¼
O
n
l¼1
X
k1
jl¼0
pl;jl
jl
j i
!
: (14)
Each evolution from αðlÞ
j i ! αðl þ 1Þ
j i is done by an unitary
operator Alþ1 2 BðHIl
Þ as given by Alþ1 0
j i ¼
Pk1
j¼0 plþ1;j j
j i. After n
levels, i.e., the application of A = An ⋯ A1, the final state A 0
j in ¼
αðnÞ
j i shown in Eq. (14) is created. Since each of the operators Al
only acts on a separate subspace HIl
, they commute and can be
applied in parallel. This is a consequence of the independence of
the increments Xl. For example, an n-step DSP with k = 2 possible
paths at each time step can be realized with n index qubits each
prepared by a single-qubit unitary operation Al 0
j i ¼
RyðθlÞ 0
j i ¼ cosðθl=2Þ 0
j i þ sinðθl=2Þ 1
j i, where θl is chosen to
satisfy cosðθl=2Þ ¼ pl;0 and sinðθl=2Þ ¼ pl;1.
Now, for each step of the DSP, k unitary operators applied to the
data system controlled by an index qudit split the data space into
k spaces, each attached to an orthogonal subspace of the index
system. In other words, in each time step, the data system
undergoes k independent trajectories. Thus n steps of k controlled
unitary operations allow for the encoding of kn
independent
realizations of a DSP to the index-data quantum state. To this end,
we identify to each realization xl;jl
of the random variable Xl to the
application of the operator Vðxl;jl
Þ 2 BðHDÞ to the data system. In
fact, the operator will be defined in such a way that the lth index-
level state’s branches jl
j il with the amplitudes pl;jl
(for jl ∈ K)
control the operator, thereby identifying the probability p2
l;jl
¼
P Xl ¼ xl;jl
 
with the occurrence of Vðxl;jl
Þ. We denote a
projection to the lth index subsystem Il as
Πlj ¼ j
j i j
h jl b
¼ Il1
k  j
j i j
h j  Inl
k ; (15)
where Ik is the k-by-k unit matrix and its perpendicular pendant as
Π?
lj . Then the following theorem establishes the desired result (see
Supplementary Information for the proof).
Theorem 1 Let x 2 R and j ∈ K. Define operators
c- Vljl
ðxÞ :¼ Πljl
 VðxÞ þ Π?
ljl
 I (16)
with c- Vljl
ðxÞ 2 BðHIl
 HDÞ. Furthermore, for l = 1, …, n and
x 2 Rk
, define the operator
UlðxÞ ¼
Y
k1
j¼0
c- Vljl
ðxjÞ 2 BðHI  HDÞ: (17)
Then U(j) = Un(xn) ⋯ U1(x1) for xl 2 Rk
; l ¼ 1; ¼ ; n. The appli-
cation of nk controlled operations c- Vljl
ðxl;jl
Þ is thus necessary. See
Fig. 1 for a depiction of Eqs. (16) and (17).
Propositions 1, 2 and Theorem 1 establish that for V(x) = Rz(2x)
or V(x) = Ry(x), x 2 R, we can compute given expectation values of
Eqs. (6) and (7), respectively, with OðnkÞ controlled gates. The
above algorithm can be visualized quite intuitively. Consider a set
of unitary operators V ¼ fVljl
¼ Vðxl;jl
Þ : l ¼ 1; ¼ ; n; jl 2 Kg as
above. These operators span an ordered tree of height n and a
maximal degree of k. The label of the nodes themselves are of
secondary importance, but each edge is labeled by one of the
operators of the family V in such a way that, given the level l (l = 1
is the root), each node of the lth level has k edges, each of them
are labeled by Vljl
; jl 2 K. A path between any two nodes, i.e.,
ðVljl
; ¼ ; VðlþiÞjlþi
Þ, can be interpreted as a concatenation of
operators, i.e., Vðjl; ¼ ; jlþiÞ ¼ VðlþiÞjlþi
     Vljl
. After l level
operations, paths from the root to every nodes at (l + 1)th level
in the operator tree are traveled simultaneously. Hence the data
system is evolved by the operator UðjÞ ¼ Vðj1; ¼ ; jlÞ ¼ Vljl
    
V1j1
for all possible j. An example of the operator tree with n = 3
and k = 2 is depicted in Fig. 2.
C. Blank et al.
3
Published in partnership with The University of New South Wales npj Quantum Information (2021) 126
Path-dependent increments
For a DSP with path-dependent increments, the probability of a
particular realization can be expressed as
P X ¼ xðjÞ
½  ¼
Q
n
i¼2
P Xi ¼ xi;ji
jXi1 ¼ xi1;ji1
 
´ P X1 ¼ x1;j1
 
:
(18)
This is the first-order Markov chain that the probability to take a
particular path in a given time step is determined by which path
was taken in the previous step. Discussions thus far can easily be
extended to such DSPs. The only difference is in the preparation of
the index system, i.e., in the construction of the state
P
j2Kn pðjÞ j
j i.
Unlike in the case of the independent increments, one needs to
introduce entangling operations directly within the index system.
Without loss of generality, we use the index system consisting of
qubits, i.e., two paths at each level, to describe the procedure.
First, the index qubit for the first level is prepared in A0 0
j i ¼
cosðθ0=2Þ 0
j i þ sinðθ0=2Þ 1
j i as before, while the rest of the qubits
are in 0
j i. Then the second index qubit is prepared by using the
controlled operation 0
j i 0
h j  Ryðθ
ð0Þ
2 Þ þ 1
j i 1
h j  Ryðθ
ð1Þ
2 Þ, con-
trolled by the first index qubit, where the superscript indicates
the path index of the previous step. Then the second index qubit
is used as the control to prepare the third index qubit and so on.
Thus, the index system state preparation can be done in n steps
and the lth index qubit is prepared by applying a controlled
operator 0
j i 0
h j  Ryðθ
ð0Þ
l Þ þ 1
j i 1
h j  Ryðθ
ð1Þ
l Þ. An example quan-
tum circuit for preparing the index quantum state for a DSP of n =
3 time steps (levels), each branch to two possibilities, is shown in
Fig. 3.
It is also straightforward to generalize the above procedure to
implement path-dependence between events that are more than
one time steps away. As an example, let us consider the n = 3, k =
2 cases depicted in Fig. 3. When the events at step 0 and step 1
have an impact on the event at step 2 (i.e., second-order Markov
chain), then the single-qubit controlled rotations applied on the
index qubit for step 2 should be replaced with the two-qubits
controlled rotations controlled by both step 0 and step 1 index
qubits. The number of three-qubit operations applied to the step 2
index qubit is four. Similarly, more complicated path-dependence,
such as higher-order Markov chains, can be realized by designing
multiqubit operations among index registers such that
the rotation of the future state is controlled by the past states.
The quantum circuit depth increases as OðkDq
Þ where Dq is the
quantum topological memory41–43
, which satisfies Dq ≤ q for a qth-
order Markov chain (i.e., the current state is affected by q past
states). Equality is given if each past state generates a unique
future state. Note that many interesting applications can be
described with small q (e.g., the first- or second-order Markov
chain), and in some cases, Dq can even stay constant for
unbounded q43
.
Besides the index-state preparation procedure, the analysis of
the DSP follows exactly the same procedure as described in the
previous section.
Fig. 2 Operator tree. a The operator tree spanned by a binary example (k = 2) of V for three time steps with the edges named. Each edge
represents a state transformation from a parent node to a child node, and each node represents a quantum state. Three states at the final
leaves starting from an initial state ψ
j i at the root node are explicitly shown as an example. b The path j = (2, 1, 2)⊤
∈ K3
and the operator U(j)
= V32V21V12 are shown as an example.
Fig. 3 Quantum circuit to prepare the index system for simulating
a path-dependent DSP. The figure depicts an example of the first-
order Markov chain of two steps each consisting of two realizations.
Fig. 1 Circuit design of DSPs with independent increments. a A quantum circuit including preparation of the index system (operators in
blue denoted by Al) and the realization of c − U(j) (operators in green denoted by Ul(x) with a verticle line connected to black squares). A black
square is placed on a control register, and the green box denoted by Ul(x) is placed on a target register. Unlike the conventional symbol for a
controlled-NOT gate between qubits, the black square indicates that one of the k different unitary transformations is performed conditioned
on the state of the control register of dimension k. b Schematic circuit representation of the applications of c  Ul 2 BðHIl
 HDÞ for l = 1, …,
n as used in (a). We use the notation Vlj = V(xl,j). The open circle with a number j means that the unitary operator Vlj is applied if the control
register state is j
j i.
C. Blank et al.
4
npj Quantum Information (2021) 126 Published in partnership with The University of New South Wales
State-dependent increments
The increments in a given DSP can also vary in each step,
determined by the state in the preceding step. In this case, the
probability of a particular realization can be expressed as
P X ¼ xðjÞ
½  ¼
Q
n
i¼2
P Xi ¼ xi;ji
j
P
i1
l¼1
Xl
´ P X1 ¼ x1;j1
 
:
(19)
Intuitively, in order to control the increment given a particular
realization of the current step, one needs to apply controlled
operation to the index register, controlled by the data register in
between each successive step. We leave the explicit details on
how to realize the above process with quantum circuits as
future work.
State machine simulation
In the “Introduction”, we mentioned that there is another way of
simulating discrete stochastic processes by using a hidden Markov
model (HMM). This is a state machine that has states Σ = {s1, s2,
…}, output alphabets A = {a1, …, ak}, and a transition probability
from state si to sj while outputting the symbol ak, i.e.,
p2
ðj; kjiÞ ¼ P Sn ¼ sj; An ¼ akjSn1 ¼ si
 
. A quantum advantage
in simulating such processes has been reported in several
places32,42,43
, which requires provably less memory than its
classical counterpart18
. This uses the unifilarity property which
states that the output symbol uniquely defines the next state.
Consequently, the above probability notation can be shortened to
p2
ðkjiÞ ¼ P Sn ¼ λðk; iÞ; An ¼ akjSn1 ¼ si
½  with a function λ that
maps uniquely the output symbol to a state. Models with this
property are fairly common through a topological equivalence
relation41,44
; unifilar models exist for any stochastic process with
finite topological memory, which even includes some instances
with infinite Markov order18,19,32,43
.
While the references above focus on sampling from a
distribution rather than calculating an expectation value, we point
out that our methods can be used to expand these ideas in the
following way. First, it is necessary to map si to a quantum state
σi
j i 2 HS  Cs
on a subspace that will be added to the total
system. The unifilarity property allows the HMM states to be
translated to non-orthogonal quantum states (i.e., σi
j i ≠ si
j i in
general) which can reduce the memory requirement even further
and more interestingly, s  ∣Σ∣. Going forward, as described above,
the index space HI is constructed by nk-dimensional qudits. A
unitary operator is applied to HS  HIl
on the lth step. To be
precise, given an initial state σi
j i, the first step
U σi
j i 0
j i ¼
X
k12A
pðk1jiÞ σλðk1;iÞ
	
	


k1
j i (20)
creates a superposition of all possible outputs and their current
state. The subsequent step creates
U
X
k12A
pðk1jiÞ σλðk1Þ
	
	


k1
j i 0
j i ¼
X
k1;k22A
pðk2jλðk1; iÞÞpðk1jiÞ σλðk2;λðk1;iÞÞ
	
	


k1
j i k2
j i:
(21)
By repeating the application of U with a fresh qudit initialized in
0
j i l times, a quantum state that encodes all possible paths of the
l-step HMM can be created.
By introducing a mapping from the output alphabet to a
numerical value g : A ! R, we can create the process Xn = g(An)
and then apply propositions 1 or 2 by adding a data system HD.
Therefore the quantum memory advantage reported18
and
experimentally verified19,20
can be carried over to our reported
advantages to estimate the characteristic function efficiently. An
interesting avenue for future work is also to apply these methods
to rare-event sampling strategies33
.
The Delta for European call option
An exciting potential application of quantum computing is
financial analysis15,16,31
. In particular, the framework developed
in this work can be employed to compute the Delta of an
European call option, which is central to various hedging
strategies and hence of significant importance in financial
engineering21
. In brief, options are financial contracts that give
the holder the right to buy (call) or sell (put) an underlying
financial asset (e.g., stock) at a prescribed price (strike) on or
before a prescribed date (expiration), whose value derives from
the underlying asset. For European options, the holder can
exercise the option only at the time of expiration. In this context,
Delta measures the rate of change of the theoretical option value
with respect to changes in the price of the underlying asset, which
is instrumental for risk analysis.
Let St be stochastic process of an underlying asset then the
Delta of a European call option can be expressed as
fðStÞ ¼ Φ
ln St
K þ r þ σ2
2

 
ðT  tÞ
σ
ffiffiffiffiffiffiffiffiffiffiffi
T  t
p
0
@
1
A (22)
where Φ : R ! ½0; 1 is the cumulative distribution function (CDF)
of the standard normal distribution, K  0 is the strike price, r is the
risk-free interest rate, T − t is the time to maturity and σ is the
volatility of the underlying asset. We are interested in the
expectation value of the Delta, E fðStÞ
½  when the underlying
asset is described by a geometric Brownian motion, i.e., St ¼
S0 expð μ  σ2
=2
ð Þt þ σWtÞ where μ 2 R and S0 denote the drift
and the starting value, respectively. Indeed, Eq. (22) considers a
value reminiscent of the log-return, which is modeled by the
Brownian motion and can be approximated as a random walk by
Donsker’s invariance principle45,46
. The following result establishes
the way to implement this on a quantum computer.
Proposition 3 Given n independent and identically distributed
random variables Xl with P Xl ¼ x1
½  ¼ P Xl ¼ x2
½  ¼ 1=2 where
x1 ¼
μ  σ2
2
nσ
ffiffiffiffiffiffiffiffiffiffiffi
T  t
p 
1
ffiffiffi
n
p ffiffiffiffiffiffiffiffiffiffiffi
T  t
p (23)
x2 ¼
μ  σ2
2
nσ
ffiffiffiffiffiffiffiffiffiffiffi
T  t
p þ
1
ffiffiffi
n
p ffiffiffiffiffiffiffiffiffiffiffi
T  t
p (24)
and an initial starting point of
x0 ¼
ln S0  ln K þ r þ σ2
2

 
ðT  tÞ
σ
ffiffiffiffiffiffiffiffiffiffiffi
T  t
p (25)
with ~
Sn ¼ x0 þ
Pn
l¼1 Xl, we find that
E fðStÞ
½  ¼
1
2

X
1 0
l¼1
i
2πl
e2π2
l2
=P2
φ~
Sn
2πl
P
 
(26)
when Φ is limited on the interval [−P/2, P/2]. Note that we define the
sum with prime as the sum over all summands except for l = 0 (see
Supplementary Information).
When using the Pauli measurement scheme as explained in
Proposition 1, one needs to use V(vx) = Rz(2vx) as operators with
constants v = 2πl/P for l = −L, …, L to evaluate the characteristic
function at those points for the Fourier-series approximation. This
makes a total of 2L experiments (L measurements for each Pauli
observable) with n Hadamard gates on n index qubits for
encoding the probability information, n bit-flip gates on the index
qubits for implementing the controlled operations that operate if
the control qubit is 0, and 2n controlled-Rz gates, which of each
can be further decomposed to two controlled-NOT and two Rz
gates, applied on a data qubit controlled by the index qubit for
implementing x1 and x2. In addition, the initial value x0 can be
implemented by one Rz gate (see Supplementary Fig. 2).
C. Blank et al.
5
Published in partnership with The University of New South Wales npj Quantum Information (2021) 126
To demonstrate the proof-of-principle, we performed classical
simulations and experiments of the quantum algorithm for
calculating the Delta of an European call option on a IBM
quantum device named ibmqx2. As an example, the underlying
asset is given with μ = 0, σ = 0.02, r = 0.02, S0 = 100, t = 1, and the
time of maturity T = 10. The Fourier-series approximation is
performed by choosing L = 100 and P = 100. The standard error
mitigation protocol available in qiskit47
is applied to reduce
experimental errors. Despite imperfections, the experiment
predicts the expectation value with high accuracy for the most
important region, which is where it changes drastically, i.e., where
the strike price varies between 100 and 150. We also performed a
classical simulation of the quantum algorithm with the standard
noise model provided in qiskit. These results are compared
with the theoretical values in Fig. 4. The comparison shows that
the noise model provided in qiskit explains the experimental
error reasonably well (see “Methods” for a brief comment on the
remaining difference between the two results).
Correlated random walks
The quantum advantage against classical methods manifests
when the DSP strictly requires the ability to simulate path-
dependent increments. We demonstrate the simulation of
correlated random walks as one such example in this section.
Correlated random walk (CRW) is a mathematical model that
describes discrete random processes with correlations between
successive steps48
. It has been a useful tool to study biological
processes49,50
, and can also be used to approximate fractional
Brownian motion51,52
, which has broad applications for example in
mathematical finance53–55
and data network56–59
. The correlation,
often referred to as persistence, results in a local directional bias as
the walker moves. More precisely, the CRW denoted by Sn ¼
Pn
l¼0 Xl with n discrete random variables Xl, l = 1, …, n and
persistence parameters pl ∈ [0, 1] and ql ∈ [0, 1] has the following
properties: (1) X0 = x0, (2) P X1 ¼ x1
½  ¼ P X1 ¼ x2
½  ¼ 1=2, and (3)
P Xlþ1 ¼ x1jXl ¼ x1
½  ¼ pl and P Xlþ1 ¼ x2jXl ¼ x2
½  ¼ ql ∀ l ≥ 1.
The first two properties can be incorporated in quantum
simulations easily by following the same procedure used in the
previous example. Given pl and ql, the third property can be
implemented as follows. First, all index qubits except the first one
that encodes the probability distribution of X1 are initialized in 0
j i.
The first index qubit is prepared in ð 0
j i þ 1
j iÞ=
ffiffiffi
2
p
in accordance
with the second property. Then a controlled rotation gate is
applied from each index qubit to an index qubit of the successive
step. The controlled operation can be expressed as
0
j i 0
h j  Ryðθpl
Þ þ 1
j i 1
h j  Ryðθql
Þ; (27)
where θpl
¼ 2cos1
ð
ffiffiffiffi
pl
p
Þ and θql
¼ 2cos1
ð
ffiffiffiffi
ql
p
Þ. For example,
after one application of the above-controlled operation, the index
qubits representing the probability distribution of the first two
steps of the CRW is given as
0
j ið
ffiffiffiffiffi
p1
p
0
j i þ
ffiffiffiffiffiffiffiffiffiffiffiffiffi
1  p1
p
1
j iÞ þ 1
j ið
ffiffiffiffiffiffiffiffiffiffiffiffiffi
1  q1
p
0
j i þ
ffiffiffiffiffi
q1
p
1
j iÞ
ffiffiffi
2
p : (28)
The above state shows that P X2 ¼ x1jX1 ¼ x1
½  ¼ p1 and
P X2 ¼ x2jX1 ¼ x2
½  ¼ q1 as required by the property (3) of
the CRW.
We demonstrate the proof-of-principle with an example
designed as follows. The correlated random walk is given by
increments xl1 = 1 and xl2 = −1 with an initial value x0 = 0. The
persistence parameters are pl = (1/2, 2/3, 5/6, 1) and ql = (1/2, 1/3,
1/6, 0) with l = 1, 2, 3, 4. Experiments were performed to calculate
the characteristic function for vl = 2πl/P, l = −L, …, L with L = 100
and P = 100 on ibmqx2. The standard error mitigation protocol
available in qiskit is applied to reduce experimental errors. We
also performed classical simulation of the quantum algorithm with
the standard noise model provided by qiskit. These results are
compared with the theoretical values in Fig. 5.
DISCUSSION
We presented a quantum-classical hybrid framework for estimat-
ing an expectation value of a random variable based on a discrete
stochastic process under the action of function that admits a
Fourier-series approximation. As the main ingredient of the
framework, we developed a quantum algorithm for efficiently
calculating point evaluations of the characteristic function of a
random variable. This may also lead to other interesting
applications since the probability distribution of a random variable
can be completely defined by its characteristic function. More
specifically, in the quantum part, the framework proposes a
succinct representation of a classical DSP as a quantum state in
the form of Eq. (2). The joint probability and the value of each
realization are encoded in an entangled state Ψf
j i, and therefore
Fig. 4 Evaluation of the Delta for the European call option. Left: The Delta of an European call option is calculated for various strike prices.
The underlying asset is defined with μ = 0, σ = 0.02, r = 0.02, S0 = 100, t = 1, and the time of maturity T = 10. The dotted black line is the true
evaluation of the Delta. The black (blue) solid line is the real (imaginary) part of the theoretical Delta calculation obtained by a Fourier
approximation with P = 100 and L = 100, which serves as the reference for the experimental validation. The black crosses (blue tri-downs) are
the real (imaginary) part of the Delta calculated with the experiment on the IBM quantum computer with error mitigation applied. The black
dots (blue triangles) are the simulation with noise model provided in qiskit with the same error mitigation applied. Right: This plot shows
the characteristic function calculated in theory ( × ), by simulation with noise and error mitigation (dot) and the IBM quantum experiment with
error mitigation (tri-down) for the example strike price of K = 110.
C. Blank et al.
6
npj Quantum Information (2021) 126 Published in partnership with The University of New South Wales
all necessary information about a DSP is present. We also detailed
the construction of a quantum circuit for preparing the quantum
state Ψf
j i using the number of circuit elements that only grow
linearly with the total number of time steps. For a DSP of n total
steps each consisting of k possibilities, there are kn
paths. Such a
process can be encoded in a quantum state using nk-dimensional
index qudits (or dlog 2ðkÞe qubits) and nk controlled gates. There is
no need for sampling strategies since all realizations exist in
quantum superposition.
Two different measurement schemes are proposed for the
estimation of expectation values E cosðSnÞ
½  and E sinðSnÞ
½ . The
first scheme is to measure an expectation value of σx and σy
directly on the data system of Ψf
j i, resulting in a convergence
error of Oð1=
ffiffiffiffi
N
p
Þ for N repeated experiments for any N  0. This
shows that the quantum brute-force approach acquires the
optimal importance distribution. Furthermore, the sampling
convergence can be improved by utilizing the quantum amplitude
estimation technique, which promises to reduce the approxima-
tion error by a factor of Oð1=2m
Þ using m additional qubits.
However, the resource overhead of the latter approach is m ancilla
qubits, OðpolyðmÞÞ Grover-like controlled operations, and Oðm2
Þ
one- and two-qubit gates for implementing QFT. Therefore, with
the noisy intermediate-scale quantum (NISQ) devices, it may be
desirable to use the former approach.
The advantage of this algorithm lies in two facts. First, it is a
quantum-classical hybrid computation and thus is a viable
candidate to be solved with near-term quantum devices. One
can envisage multiple near-term quantum devices running in
parallel to calculate all 2L terms independently at the same time.
Similar parallelization is also suitable for multiple partitions of a
large quantum device where the qubit connectivity is high within
each partition but low among partitions. Second, given one type
of process Sn, we can pre-compute a number of evaluations of the
characteristic functions φSn
ð± viÞ for v1     vL 2 R a priori. With
those evaluations at hand, it is possible to assemble the Fourier-
series on-demand when given the Fourier-coefficients of a
function f. This approach makes it possible to invest resources
to maximize the precision of the characteristic function evaluation
for regularly used DSPs. Furthermore, our framework promotes the
idea for a co-design quantum computer60–63
, which focuses on
optimizations and design decisions at the hardware level to
particularly support the DSP simulations at hand.
We underscore our findings with two interesting examples.
First, we showed an application to finance, the calculation of the
Delta of a European call option. The key idea was to model the
stochastic behavior of an underlying asset as a Brownian motion,
which is then approximated as a random walk by Donsker’s
invariance principle. Next, an application to DSPs with path-
dependent increments is demonstrated by an example of
correlated random walks. We presented the results of proof-of-
principle experiments for each example to demonstrate the
validity and the feasibility of our method.
The framework can be extended to multivariate functions
f : Rd
! R. Given P1; ¼ ; Pd 2 R, the period of the respective
argument of f and L1; ¼ ; Ld 2 Nþ, a multi-dimensional Fourier-
series approximation
fðx1; ¼ ; xdÞ ¼
X
L1
l1¼1
  
X
Ld
ld¼1
cðω1; ¼ ; ωdÞe
i
P
j
2πlj
Pj
xj
can be applied like Eq. (11) and consequently Eq. (12). The primary
harmonics to calculate are thus φSn
ðvÞ ¼ E eivSn
 
, which can be
achieved by increasing the dimension of the index system and
applying a new set of a unitary family Vr (r = 1, …, d) to the same
data system D.
The ability to simulate multivariate stochastic dynamics with the
optimal variance and quadratic quantum speed-up without
requiring any sampling strategies is highly beneficial for various
analyses in the quantitative and computational science. The path-
dependent and state-dependent DSP simulations are excellent fits
for studying random walks with internal states64
, and discrete
processes that converge to Ornstein–Uhlenbeck65
and fractional
Brownian motion51
. Due to the broad applicability of these
mathematical models, the framework developed in this work
opens tremendous and extensive opportunities in physics,
biology, epidemiology, hydrology, engineering, and finance.
In future work, we plan to provide explicit quantum circuit
design for simulating state-dependent DSPs. Interesting applica-
tions to accompany this model include the analysis of stochastic
epidemic models66,67
and of hot streak68
.
METHODS
All experiments are performed using one of the publicly available IBM
quantum devices consisting of five superconducting qubits, named as
ibmqx2. In order to fully utilize the IBM quantum cloud platform, we used the
IBM quantum information science kit (qiskit) framework47
. The versions—
as defined by PyPi version numbers—used for this work were 0.20.0.
Superconducting quantum computing devices that are currently
available via the cloud service, such as those used in this work, have
limited coupling between qubits. Resolving coupling constraints as well as
optimizations are done in qiskit with a preset of so-called pass
managers. The optimization level ranges from 0 to 3. As we chose the
ibmqx2 for our experiments the mapping of data register and index
register follow the connectivity. For the family of devices that contains
ibmq_ourense, one swap operation must be used to exchange the
physical qubit 3 and 4. For both layouts see Supplementary Fig. 1a, b.
During the compilation step of the experiments, we first use a level 0 pass
and then a subsequent level 3 pass to optimize and resolve connectivity
constraints. To reduce experimental errors, we used the standard error
mitigation functionality of qiskit. This requires an extra set of
experiments to be executed prior to the main experiment.
In order to understand the source of experimental discrepancy, the
experimental results were compared to simulation results that take a
realistic noise model into account. During the execution of an experiment,
the current device parameters were gathered and stored. Upon comple-
tion, a simulation was executed with the standard qiskit noise model,
Fig. 5 Characteristic functions of a correlated random walk.
Characteristic functions of a random walk is calculated theoretically
( × ), by simulation (dot), and by experiment (tri-down). The
simulation includes the standard noise model provided in qiskit.
The experiment employs the standard error mitigation technique
provided in qiskit. The parameters that define the correlated
random walk is described in the main text.
C. Blank et al.
7
Published in partnership with The University of New South Wales npj Quantum Information (2021) 126
also applying error mitigation on the result. The remaining discrepancy
between experimental and simulation results can be attributed to errors
that are not included in the basic error model, such as various cross-talk
effects, drift, and non-Markovian noise. The standard noise model is
described in the supplementary information of ref. 69
in detail.
The example for the Delta applied the strike price K from 10 to 220 in
increments of 5 for the theoretical calculation, while the experiments were
performed for K = 25, 55, 85, 105, 110, 115, 120, 125, 130, 160, 190, 220. The
experiment for each K is executed for characteristic function evaluations at
vl = 2πl/P with l = −L, …, L, L = 100 and P = 100, each with 8129 shots. For
the correlated random walk experiment, we used 32786 shots for each of
the evaluations of vl = 2πl/P with l = −L, …, L and P = L = 100. Note that
this example did not use the Fourier approximation, and P has been
chosen to be the same as L so that vl goes through one period on each
side, resulting in a symmetric picture. As the IBM quantum cloud platform
allows for 8192 shots per execution, we created multiple identical
experiments and manually added the results.
DATA AVAILABILITY
The data that support the findings of this study are available from C.B. upon
reasonable request.
Received: 4 October 2020; Accepted: 14 July 2021;
REFERENCES
1. Feynman, R. P. Simulating physics with computers. Int. J. Theor. Phys. 21, 467–488
(1982).
2. Lloyd, S. Universal quantum simulators. Science 273, 1073–1078 (1996).
3. Kassal, I., Whitfield, J. D., Perdomo-Ortiz, A., Yung, M.-H.  Aspuru-Guzik, A.
Simulating chemistry using quantum computers. Annu. Rev. Phys. Chem. 62,
185–207 (2011).
4. Zalka, C. Simulating quantum systems on a quantum computer. Proc. Math. Phys.
Eng. Sci. 454, 313–322 (1998).
5. Blatt, R.  Roos, C. F. Quantum simulations with trapped ions. Nat. Phys. 8,
277–284 (2012).
6. Barreiro, J. T. et al. An open-system quantum simulator with trapped ions. Nature
470, 486–491 (2011).
7. Gerritsma, R. et al. Quantum simulation of the dirac equation. Nature 463, 68–71
(2010).
8. Aspuru-Guzik, A.  Walther, P. Photonic quantum simulators. Nat. Phys. 8,
285–291 (2012).
9. Friedenauer, A., Schmitz, H., Glueckert, J. T., Porras, D.  Schätz, T. Simulating a
quantum magnet with trapped ions. Nat. Phys. 4, 757–761 (2008).
10. Weimer, H., Müller, M., Lesanovsky, I., Zoller, P.  Büchler, H. P. A rydberg
quantum simulator. Nat. Phys. 6, 382–388 (2010).
11. Aspuru-Guzik, A., Dutoi, A. D., Love, P. J.  Head-Gordon, M. Simulated quantum
computation of molecular energies. Science 309, 1704–1707 (2005).
12. Lanyon, B. P. et al. Towards quantum chemistry on a quantum computer. Nat.
Chem. 2, 106–111 (2010).
13. Abrams, D. S.  Lloyd, S. Quantum algorithm providing exponential speed
increase for finding eigenvalues and eigenvectors. Phys. Rev. Lett. 83, 5162 (1999).
14. Berry, D. W., Ahokas, G., Cleve, R.  Sanders, B. C. Efficient quantum algorithms for
simulating sparse hamiltonians. Commun. Math. Phys. 270, 359–371 (2007).
15. Rebentrost, P., Gupt, B.  Bromley, T. R. Quantum computational finance: Monte
Carlo pricing of financial derivatives. Phys. Rev. A 98, 022321 (2018).
16. Woerner, S.  Egger, D. J. Quantum risk analysis. npj Quant. Inf. 5, 15 (2019).
17. Heinrich, S. From monte carlo to quantum computation. Math. Comput. Simul. 62,
219–230 (2003).
18. Gu, M., Wiesner, K., Rieper, E.  Vedral, V. Quantum mechanics can reduce the
complexity of classical models. Nat. Commun. 3, 1–5 (2012).
19. Ghafari, F. et al. Dimensional quantum memory advantage in the simulation of
stochastic processes. Phys. Rev. X 9, 041013 (2019).
20. Ghafari, F. et al. Interfering trajectories in experimental quantum-enhanced sto-
chastic simulation. Nat. Commun. 10, 1–8 (2019).
21. Stamatopoulos, N. et al. Option pricing using quantum computers. Quantum 4,
291 (2020).
22. Blanchet, J. H.  Liu, J. State-dependent importance sampling for regularly
varying random walks. Adv. Appl. Probab. 40, 1104–1128 (2008).
23. Hastings, W. K. Monte Carlo Sampling Methods Using Markov Chains and Their
Applications (Oxford University Press, 1970).
24. Rubinstein, R. Y.  Kroese, D. P. Simulation and the Monte Carlo Method, Vol. 10
(John Wiley  Sons, 2016).
25. Owen, A.  Zhou, Y. Safe and effective importance sampling. J. Am. Stat. Assoc.
95, 135–143 (1998).
26. Cappé, O., Douc, R., Guillin, A., Marin, J.-M.  Robert, C. P. Adaptive importance
sampling in general mixture classes. Stat. Comput. 18, 447–459 (2008).
27. Srinivasan, R. Importance Sampling: Applications in Communications and Detection
(Springer Science  Business Media, 2013).
28. Martino, L., Elvira, V., Luengo, D.  Corander, J. Layered adaptive importance
sampling. Stat. Comput. 27, 599–623 (2017).
29. Brassard, G., Hoyer, P., Mosca, M.  Tapp, A. Quantum amplitude amplification
and estimation. Contemp. Math. 305, 53–74 (2002).
30. Montanaro, A. Quantum speedup of monte carlo methods. Proc. Math. Phys. Eng.
Sci. 471, 20150301 (2015).
31. Rebentrost, P.  Lloyd, S. Quantum computational finance: quantum algorithm
for portfolio optimization. Preprint at https://arxiv.org/abs/1811.03975 (2018).
32. Binder, F. C., Thompson, J.  Gu, M. Practical unitary simulator for non-markovian
complex processes. Phys. Rev. Lett. 120, 240502 (2018).
33. Aghamohammadi, C., Loomis, S. P., Mahoney, J. R.  Crutchfield, J. P. Extreme
quantum memory advantage for rare-event sampling. Phys. Rev. X 8, 011025
(2018).
34. Park, D. K., Sinayskiy, I., Fingerhuth, M., Petruccione, F.  Rhee, J.-K. K. Parallel
quantum trajectories via forking for sampling without redundancy. N. J. Phys. 21,
083024 (2019).
35. Möttönen, M., Vartiainen, J. J., Bergholm, V.  Salomaa, M. M. Transformation of
quantum states using uniformly controlled rotations. Quantum Info Comput. 5,
467–473 (2005).
36. Park, D. K., Petruccione, F.  Rhee, J.-K. K. Circuit-based quantum random access
memory for classical data. Sci. Rep. 9, 3949 (2019).
37. Nielsen, M. A.  Chuang, I. L. Quantum Computation and Quantum Information:
10th Anniversary Edition. (Cambridge University Press, 2011).
38. Zygmund, A. Trigonometric Series, Vol. 1 (Cambridge University Press, 2002).
39. Bary, N. K. A Treatise on Trigonometric Series, Vol. 1 (Elsevier, 2014).
40. Katznelson, Y. An Introduction to Harmonic Analysis (Cambridge University Press,
2004).
41. Crutchfield, J. P.  Young, K. Inferring statistical complexity. Phys. Rev. Lett. 63,
105–108 (1989).
42. Liu, Q., Elliott, T. J., Binder, F. C., Di Franco, C.  Gu, M. Optimal stochastic mod-
eling with unitary quantum dynamics. Phys. Rev. A 99, 062110 (2019).
43. Elliott, T. J. et al. Extreme dimensionality reduction with quantum modeling. Phys.
Rev. Lett. 125, 260501 (2020).
44. Crutchfield, J. P. The calculi of emergence: computation, dynamics and induction.
Phys. D: Nonlinear Phenom. 75, 11–54 (1994).
45. Donsker, M. D. An invariance principle for certain probability limit theorems.
Mem. Am. Math. Soc. 6, 12 (1951).
46. Fristedt, B. E.  Gray, L. F. A Modern Approach to Probability Theory (Springer
Science  Business Media, 2013).
47. ANIS, M. S. et al. Qiskit: An Open-source Framework for Quantum Computing.
https://doi.org/10.5281/zenodo.5096364 (2021).
48. Gillis, J. Correlated random walk. Math. Proc. Camb. Philos. Soc. 51, 639–651
(1955).
49. Bovet, P.  Benhamou, S. Spatial analysis of animals’ movements using a corre-
lated random walk model. J. Theor. Biol. 131, 419 – 433 (1988).
50. Codling, E. A., Plank, M. J.  Benhamou, S. Random walk models in biology. J. R.
Soc. Interface 5, 813–834 (2008).
51. Mandelbrot, B. B.  Van Ness, J. W. Fractional Brownian motions, fractional noises
and applications. SIAM Rev. 10, 422–437 (1968).
52. Enriquez, N. A simple construction of the fractional Brownian motion. Stoch.
Process. Their Appl. 109, 203 – 223 (2004).
53. Elliott, R. J.  van der Hoek, J. Fractional brownian motion and financial model-
ling. In Kohlmann M., Tang S. (eds) Mathematical Finance. Trends in Mathematics,
140–151, https://doi.org/10.1007/978-3-0348-8291-0_13 (Birkhäuser Basel, 2001).
54. Cheridito, P. Arbitrage in fractional Brownian motion models. Financ. Stoch. 7,
533–553 (2003).
55. Rostek, S.  Schöbel, R. A note on the use of fractional Brownian motion for
financial modeling. Econ. Model. 30, 30 – 35 (2013).
56. Norros, I. On the use of fractional Brownian motion in the theory of con-
nectionless networks. IEEE J. Sel. Areas Commun. 13, 953–962 (1995).
57. Konstantopoulos, T.  Lin, S.-J. In Stochastic Networks (eds Glasserman, P., Sigman,
K.  Yao, D. D.) 257–273 (Springer New York, 1996).
58. Belly, S.  Decreusefond, L. In Fractals in Engineering (eds Lévy Véhel, J., Lutton, E.
 Tricot, C.) 170–184 (Springer London, 1997).
59. Filatova, D. Mixed fractional Brownian motion: some related questions for com-
puter network traffic modeling. In 2008 International Conference on Signals and
Electronic Systems, 393–396 (IEEE, 2008).
C. Blank et al.
8
npj Quantum Information (2021) 126 Published in partnership with The University of New South Wales

More Related Content

PDF
ProbErrorBoundROM_MC2015
PDF
GRADIENT OMISSIVE DESCENT IS A MINIMIZATION ALGORITHM
PDF
Receding Horizon Stochastic Control Algorithms for Sensor Management ACC 2010
DOC
PDF
A Non Parametric Estimation Based Underwater Target Classifier
PDF
Entropy 12-02268-v2
PDF
Preconditioning in Large-scale VDA
PDF
A04410107
ProbErrorBoundROM_MC2015
GRADIENT OMISSIVE DESCENT IS A MINIMIZATION ALGORITHM
Receding Horizon Stochastic Control Algorithms for Sensor Management ACC 2010
A Non Parametric Estimation Based Underwater Target Classifier
Entropy 12-02268-v2
Preconditioning in Large-scale VDA
A04410107

What's hot (19)

PPTX
System suitability testing
PDF
Enhanced random walk with choice an empirical study
PPTX
Variation of peak shape and peak tailing in chromatography
PDF
Cu24631635
PDF
Grasp approach to rcpsp with min max robustness objective
PPTX
Signal modelling
PDF
A Combination of Wavelet Artificial Neural Networks Integrated with Bootstrap...
PDF
Computing Maximum Entropy Densities: A Hybrid Approach
PDF
Numerical Study of Some Iterative Methods for Solving Nonlinear Equations
PPTX
Paper2_CSE6331_Vivek_1001053883
PDF
The International Journal of Engineering and Science (The IJES)
PDF
Program on Mathematical and Statistical Methods for Climate and the Earth Sys...
PDF
FurtherInvestegationOnProbabilisticErrorBounds_final
PDF
5. 8519 1-pb
PDF
Scalable trust-region method for deep reinforcement learning using Kronecker-...
PPT
Query optimization for_sensor_networks
PDF
Approaches to online quantile estimation
PDF
I0343047049
PDF
Sequential estimation of_discrete_choice_models
System suitability testing
Enhanced random walk with choice an empirical study
Variation of peak shape and peak tailing in chromatography
Cu24631635
Grasp approach to rcpsp with min max robustness objective
Signal modelling
A Combination of Wavelet Artificial Neural Networks Integrated with Bootstrap...
Computing Maximum Entropy Densities: A Hybrid Approach
Numerical Study of Some Iterative Methods for Solving Nonlinear Equations
Paper2_CSE6331_Vivek_1001053883
The International Journal of Engineering and Science (The IJES)
Program on Mathematical and Statistical Methods for Climate and the Earth Sys...
FurtherInvestegationOnProbabilisticErrorBounds_final
5. 8519 1-pb
Scalable trust-region method for deep reinforcement learning using Kronecker-...
Query optimization for_sensor_networks
Approaches to online quantile estimation
I0343047049
Sequential estimation of_discrete_choice_models
Ad

Similar to First paper with the NITheCS affiliation (20)

PDF
Distributional RL via Moment Matching
PDF
Nonlinear stochastic programming by Monte-Carlo estimators
PPT
MAchin learning graphoalmodesland bayesian netorls
PDF
Bioalgo 2012-04-hmm
PDF
Nonlinear Stochastic Optimization by the Monte-Carlo Method
PDF
PDF
Information path from randomness
PDF
thesis_final_draft
PDF
PhysicsSIG2008-01-Seneviratne
PDF
2009 PRE - Simulation of the time evolution of the Wigner function with a fir...
PDF
Reinforcement Learning: Hidden Theory and New Super-Fast Algorithms
PDF
17_monte_carlo.pdf
PDF
QMC Program: Trends and Advances in Monte Carlo Sampling Algorithms Workshop,...
PPTX
Monte Carlo Berkeley.pptx
PDF
High dimensional probability proc of the fourth international conference Evar...
PDF
stochastic-processes-1.pdf
PDF
Nishant_thesis_report
PDF
FullMLCheatSheetfor engineering students .pdf
Distributional RL via Moment Matching
Nonlinear stochastic programming by Monte-Carlo estimators
MAchin learning graphoalmodesland bayesian netorls
Bioalgo 2012-04-hmm
Nonlinear Stochastic Optimization by the Monte-Carlo Method
Information path from randomness
thesis_final_draft
PhysicsSIG2008-01-Seneviratne
2009 PRE - Simulation of the time evolution of the Wigner function with a fir...
Reinforcement Learning: Hidden Theory and New Super-Fast Algorithms
17_monte_carlo.pdf
QMC Program: Trends and Advances in Monte Carlo Sampling Algorithms Workshop,...
Monte Carlo Berkeley.pptx
High dimensional probability proc of the fourth international conference Evar...
stochastic-processes-1.pdf
Nishant_thesis_report
FullMLCheatSheetfor engineering students .pdf
Ad

More from Rene Kotze (20)

PDF
Attention Bursary holders: Tutorial to complete a bi annual progress report 2...
PDF
South African Radio Astronomy Observatory Postdoctoral Fellowships for 2022...
PDF
Hands on instructions for NITheCS August mini - school
PDF
Postdoctoral associate ad university of minnesota fernandes birol
PDF
Webinar2020 nithep talk 1-ppt.ppt
PPTX
NITheP presentation including video
PPTX
What is Theoretical Physics?
PDF
Invitation to guest lecture at Stellenbosch University: Provost and Professor...
PDF
NITheP Computatonal \
PDF
L'Oreal UNESCO applications for Women in Science 2015
PDF
Consultant job spec
PDF
Consultant job spec - Opportunity for The
PDF
2015 05 13 call for internships for 2015 intership period
PDF
2015 05 13 information to students and teachers regarding NITheP internships
DOCX
HB Thom The Paper Circus
PDF
Hamburg female researcher position
PDF
Hamburg Female Researcher position
PDF
Advert for sci stip postdocs 17 april 2015
PDF
2016 sts
PDF
SISSA: new Director elected
Attention Bursary holders: Tutorial to complete a bi annual progress report 2...
South African Radio Astronomy Observatory Postdoctoral Fellowships for 2022...
Hands on instructions for NITheCS August mini - school
Postdoctoral associate ad university of minnesota fernandes birol
Webinar2020 nithep talk 1-ppt.ppt
NITheP presentation including video
What is Theoretical Physics?
Invitation to guest lecture at Stellenbosch University: Provost and Professor...
NITheP Computatonal \
L'Oreal UNESCO applications for Women in Science 2015
Consultant job spec
Consultant job spec - Opportunity for The
2015 05 13 call for internships for 2015 intership period
2015 05 13 information to students and teachers regarding NITheP internships
HB Thom The Paper Circus
Hamburg female researcher position
Hamburg Female Researcher position
Advert for sci stip postdocs 17 april 2015
2016 sts
SISSA: new Director elected

Recently uploaded (20)

PDF
2.FourierTransform-ShortQuestionswithAnswers.pdf
PDF
Complications of Minimal Access Surgery at WLH
PPTX
GDM (1) (1).pptx small presentation for students
PDF
O5-L3 Freight Transport Ops (International) V1.pdf
PPTX
Institutional Correction lecture only . . .
PDF
Sports Quiz easy sports quiz sports quiz
PPTX
PPH.pptx obstetrics and gynecology in nursing
PDF
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
PDF
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
PDF
TR - Agricultural Crops Production NC III.pdf
PDF
Insiders guide to clinical Medicine.pdf
PPTX
human mycosis Human fungal infections are called human mycosis..pptx
PDF
Abdominal Access Techniques with Prof. Dr. R K Mishra
PPTX
Microbial diseases, their pathogenesis and prophylaxis
PDF
Module 4: Burden of Disease Tutorial Slides S2 2025
PDF
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
PPTX
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
PDF
FourierSeries-QuestionsWithAnswers(Part-A).pdf
PDF
Classroom Observation Tools for Teachers
PPTX
Pharmacology of Heart Failure /Pharmacotherapy of CHF
2.FourierTransform-ShortQuestionswithAnswers.pdf
Complications of Minimal Access Surgery at WLH
GDM (1) (1).pptx small presentation for students
O5-L3 Freight Transport Ops (International) V1.pdf
Institutional Correction lecture only . . .
Sports Quiz easy sports quiz sports quiz
PPH.pptx obstetrics and gynecology in nursing
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
TR - Agricultural Crops Production NC III.pdf
Insiders guide to clinical Medicine.pdf
human mycosis Human fungal infections are called human mycosis..pptx
Abdominal Access Techniques with Prof. Dr. R K Mishra
Microbial diseases, their pathogenesis and prophylaxis
Module 4: Burden of Disease Tutorial Slides S2 2025
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
FourierSeries-QuestionsWithAnswers(Part-A).pdf
Classroom Observation Tools for Teachers
Pharmacology of Heart Failure /Pharmacotherapy of CHF

First paper with the NITheCS affiliation

  • 1. ARTICLE OPEN Quantum-enhanced analysis of discrete stochastic processes Carsten Blank 1 , Daniel K. Park 2 and Francesco Petruccione 3,4 ✉ Discrete stochastic processes (DSP) are instrumental for modeling the dynamics of probabilistic systems and have a wide spectrum of applications in science and engineering. DSPs are usually analyzed via Monte-Carlo methods since the number of realizations increases exponentially with the number of time steps, and importance sampling is often required to reduce the variance. We propose a quantum algorithm for calculating the characteristic function of a DSP, which completely defines its probability distribution, using the number of quantum circuit elements that grows only linearly with the number of time steps. The quantum algorithm reduces the Monte-Carlo sampling to a Bernoulli trial while taking all stochastic trajectories into account. This approach guarantees the optimal variance without the need for importance sampling. The algorithm can be further furnished with the quantum amplitude estimation algorithm to provide quadratic speed-up in sampling. The Fourier approximation can be used to estimate an expectation value of any integrable function of the random variable. Applications in finance and correlated random walks are presented. Proof-of-principle experiments are performed using the IBM quantum cloud platform. npj Quantum Information (2021)7:126 ; https://doi.org/10.1038/s41534-021-00459-2 INTRODUCTION Simulation of physical processes on quantum computers1,2 has many facets, with recent developments improving the usage of this technology3–14 . While one obvious task for a quantum computer is to simulate quantum mechanical behaviors of nature1 , quantum simulation of probability distributions and stochastic processes has gained attention recently15–20 . Since quantum mechanics can be viewed as a mathematical generalization of probability theory, where nonnegative real-valued probabilities are replaced by complex-valued probability amplitudes, quantum computing appears to be a natural tool for simulating classical probabilistic processes. Intuitively, some quantum advantage is expected since the probability amplitudes can interfere, unlike in classical probabilistic computing. Indeed, a quadratic quantum speed-up has been reported for solving financial problems when compared to Monte-Carlo simulations16,21 . Classically, Monte-Carlo methods are essential for estimating expected values of random variables in DSPs, since the number of realizations increases exponentially with the time steps. When the Monte Carlo sampling is repeated N times, the expectation value to be found converges with Oð1= ffiffiffiffi N p Þ regardless of the number of realizations. The central limit theorem ensures this, but it is important to note that this convergence is only attained in the limit of N → ∞. When this limit is not nearly attained, it is often crucial to have sampling strategies to reduce the variance of the estimate. The reason for this is that less likely events can, on the other hand, be of high impact. This can create a bias in the computation as the estimation can be dominated by more probable, but less important values. To correctly sample with a given N that is not near the limit of the large number, it is beneficial to modify the probability of the process in a way that balances the importance of the events. This is called importance sampling22–28 . This makes apparent two problems with Monte- Carlo algorithms. First, it may be difficult to calculate the probability of a particular realization of a random variable. Second, the importance sampling strategy relies on a sophisticated understanding of the probability distribution. In this manuscript, we show that the characteristic function of a DSP can be efficiently calculated on a quantum computer, and in so doing we introduce an effect called quantum brute force. The random variables of the DSP of interest do not need to be identically and independently distributed, and non-Markovian processes can also be studied. The quantum-state space that grows exponentially with the number of qubits is used to move along all paths of the discrete stochastic process simultaneously in a quantum super- position, and hence the term quantum brute force is adequate. The method proposed in this work maps the expectation value of interest into a probability of measuring a particular computa- tional basis state of a qubit. This probability can essentially be thought of as the success parameter of a Bernoulli trial, i.e., a coin toss, whose statistics are well-known. As a consequence, the variance is optimal in the sense that it behaves according to the central limit theorem for all sample sizes, not only for large numbers. This leads to a crucial result that no sampling strategies are necessary. Moreover, we connect quantum amplitude estimation (AE)29 , which can be utilized to overcome the classical limit on the sampling convergence of Monte-Carlo methods15,16,30,31 , to our method. In brief, the single-qubit measurement scheme can be replaced by an application of AE to the full system. With this modification, our algorithm uses resources that scale linearly instead of quadratically, and thus achieves a quantum speed-up. The methods developed here point therefore to an exciting and promising use of quantum computers: less variance and faster convergence for Monte-Carlo sampling. Equivalently, it is possible to reduce the sample size without losing precision. Applications of our method span extensively across many fields in science and engineering; any physical behavior that can be mathematically modeled as a DSP can be studied in principle. In particular, we show how the found simulation procedure can be applied to option pricing theory and to correlated random walks 1 Data Cybernetics, Landsberg, Germany. 2 Sungkyunkwan University Advanced Institute of Nanotechnology, Suwon, Republic of Korea. 3 Quantum Research Group, School of Chemistry and Physics, University of KwaZulu-Natal, Durban, KwaZulu-Natal, South Africa. 4 National Institute for Theoretical and Computational Sciences (NITheCS), KwaZulu- Natal, South Africa. ✉email: petruccione@ukzn.ac.za www.nature.com/npjqi Published in partnership with The University of New South Wales 1234567890():,;
  • 2. which leads to various applications in biology, ecology, and finance. For each example, we experimentally demonstrate the proof-of-principle using the IBM quantum cloud platform. Although the main focus of this work is to achieve quantum sampling advantage for discrete stochastic processes, we note that quantum memory advantages have been shown for stochastic processes with causal structures18–20,32 and in rare- events sampling33 . An interesting connection concerning our result to this line of research comes from the work by Binder et al.32 which presented the construction of a unitary quantum simulator for generating all possible realizations of a hidden Markov model (HMM) that requires less memory than any classical counterparts throughout the simulation. The focus of this body of work has been sampling from a distribution, but with respect to the results discussed here, it can also be used to estimate expectation values, in particular characteristic functions. RESULTS A discrete stochastic process can be described with n discrete random variables Xl : Ωl ! R, l = 1, …, n for some n 2 Nþ, each having at most k nonzero realizations, i.e., given a sample space Ωl, there exist at most k elements xl;0; ¼ ; xl;k1 2 R with Xl(Ωl) = {xl,0, …, xl,k−1}. In plain words, a discrete stochastic process consists of n steps, and in each step, one of k possible events occurs at random with a certain probability. Hereinafter, we use the following notations. Each realization of the stochastic process is identified with an index vector j ¼ ðj1; ¼ ; jnÞ 2 Kn with K = {0, …, k − 1} and is denoted by xðjÞ ¼ ðx1;j1 ; ¼ ; xn;jn Þ . Moreover, we define sum xðjÞ f g :¼ Pn l¼1 xl;jl and xðmÞ ðjÞ ¼ ðx1;j1 ; ¼ ; xm;jm Þ with m ≤ n. The first and the second subscripts of the random variables and probabilities label the time step and the event, respectively. A quantity of interest for such processes is the expectation value of an integrable function f : R ! R of the random variable Sn ¼ Pn l¼1 Xl E fðSnÞ ½ ¼ X j2Kn fðsum xðjÞ f gÞP X ¼ xðjÞ ½ : (1) The summation is over all possible realizations, each indexed by j, and X is the random variable representing the sequence of events that can occur in a particular realization. The number of terms in the summation (i.e., the number of realizations) is kn . Now, we explain how to encode the described stochastic process in a quantum state, and evaluate Eq. (1) by making a measurement on the quantum state. The quantum state consists of an index system and a data system defined in a Hilbert space HI HD ¼ Ckn C2 , where I (D) indicates the index (data) system. Each realization of the stochastic process is represented as a unitary operator UðÞ : Rn ! BðHI HDÞ parametrized by some n-dimensional vector (BðHÞ is the space of linear operators on a Hilbert space H). Then a DSP can be represented as Ψf j i ¼ X j2Kn pðjÞ j j i UðjÞ ψ j i: (2) The factor of each part of the sum is denoted by p(j) with ∑jp2 (j) = 1 and the state of the index system is denoted by j j i ¼ jn j1 j i ¼ jn j i j1 j i, where jl j i for jl = 0, …, k − 1 is the orthogonal basis. Measuring an expectation value of an observable M on the data system of the final state in Eq. (2) yields the convex sum of independent expectation values measured from all kn trajectories34 as hMi ¼ Ψf h jII M Ψf j i ¼ P j2Kn p2 ðjÞ ψ h jUy ðjÞMUðjÞ ψ j i ¼ P j2Kn p2 ðjÞhMðjÞiψ; (3) where M(j) = U† (j)MU(j). The coefficient p2 (j) can be identified with the joint probability and the expectation value with the evaluation of f, i.e., p2 ðjÞ P X1 ¼ x1;j1 ; ¼ ; Xn ¼ xn;jn (4) hMðjÞi fðx1;j1 þ þ xn;jn Þ (5) for a function f : R ! R that we will specify below. In the worst case, evaluation of Eq. (3) requires two expensive procedures as follows. First, kn probabilities need to be encoded as the amplitudes of kn computational basis given by n qudits of dimension k. This can be done with various quantum state preparation techniques with a substantial amount of computa- tional overhead35,36 . Next, kn unitary operators, conditioned on all possible index states, need to be applied to an input state ψ j i. Such operators can be expressed as c-UðjÞ ¼ j j i j h j Vðxn;jn Þ Vðx1;j1 Þ þ j j i j h j? ID with V : R ! HD. On the other hand, for many interesting DSPs, the number of necessary unitary operators can be reduced to OðnkÞ. Before explaining such exponential reduction in detail, we introduce two results in the next two propositions (with proofs provided in Supplementary Information) to establish the grounds for the measurement scheme. Proposition 1 (Pauli X and Y Measurement). Let VðxÞ ¼ Rzð2xÞ ¼ 0 j i 0 h j þ eix 1 j i 1 h j with x 2 R, then by setting M = σx or M = σy and ψ j i ¼ ð 0 j i þ 1 j iÞ= ffiffiffi 2 p , we find hII σxiΨf ¼ E cosðSnÞ ½ ; (6) hII σyiΨf ¼ E sinðSnÞ ½ : (7) As the true value of E cosðSnÞ ½ and E sinðSnÞ ½ must be estimated, in general, the convergence behaves according to the central limit theorem, which guarantees that the measure- ment statistics approaches to a normal distribution around a mean that corresponds to E fðSnÞ ½ as the number of experiments NS → ∞. The speed of convergence is moreover given by Oð1= ffiffiffiffiffi NS p Þ. Taking into account that the Pauli measurements have two eigenvalues, the task is essentially estimating a probability of a Bernoulli trial, which specifies how the central limit theorem is realized. Given confidence of 1 − α, the number of experiments to be within a margin of error ϵ 0 is NS ¼ dz2 α=ð4ϵ2 Þe with zα = z (1 − α/2) being the quantile function. In contrast, with classical Monte-Carlo sampling, the convergence rate by the central limit theorem is achieved with the caveat that the Monte- Carlo simulation samples from a usually unknown stochastic process and concise estimates on the number of experiments given a margin of error are in general not easily accessible. As we see, the property that Eq. (2) encompasses all possible paths with the correct probability with a quantum measurement leads to the seemingly small advantage of knowing the convergence before- hand, irrespective of the distribution of the underlying DSP. Contemplation on this fact reveals that this is no small feat: the quantum advantage lies in the fact that no sampling strategies are necessary. The quantum amplitude estimation algorithm29 can provide further speed-up compared to the convergence rate of the classical Monte-Carlo method given by the central limit theo- rem15,16,30,31 . The algorithm uses m ancilla qubits in addition to data and index qubits and OðpolyðmÞÞ number of Grover-like iterators followed by Oðm2 Þ Hadamard and controlled phase-shift gates for quantum Fourier transform (QFT)37 to estimate an amplitude with an error of Oð1=2m Þ. The number of repeated measurements needed to reach confidence that the estimation succeeded is independent of m. The quantum AE algorithm can be adapted to our method to construct an even more powerful C. Blank et al. 2 npj Quantum Information (2021) 126 Published in partnership with The University of New South Wales 1234567890():,;
  • 3. strategy by formulating an AE problem as follows. Given the final state in Eq. (2) written as a linear combination Ψf j i ¼ Ψ0 j i þ Ψ1 j i by separating the full Hilbert space into two orthogonal subspaces, we estimate the amplitude defined as a = 〈Ψ1∣Ψ1〉. Then, the following proposition connects AE with the DSP simulation. Proposition 2 (Amplitude Estimation). Let VðxÞ ¼ RyðxÞ ¼ cosðx=2ÞI i sinðx=2Þσy, x 2 R, ψ j i ¼ 0 j i, then the final state is Ψf j i ¼ Ψ0 j i þ Ψ1 j i (8) with Ψ0 j i ¼ X j2Kn pðjÞ cos 1 2 sum xðjÞ f g j j i 0 j i (9) Ψ1 j i ¼ X j2Kn pðjÞ sin 1 2 sum xðjÞ f g j j i 1 j i: (10) With AE the value ~ a will be estimated, hence E cosðSnÞ ½ ¼ 1 2~ a. Conversely, if V(x) = Ry (−x), ψ j i ¼ Ryðπ=2Þ 0 j i, then there exists a similar decomposition Ψ0 f ¼ Ψ0 0 þ Ψ0 1 so that with a0 ¼ hΨ0 1jΨ0 1i we therefore find E sinðSnÞ ½ ¼ 1 2~ a0 . The above result opens up an exciting avenue towards a fast Monte-Carlo alternative without the need of sampling strategies. These propositions in conjunction with Theorem 1 which is stated in the following section show that a quantum computer can simulate the quantities E cosðSnÞ ½ and E sinðSnÞ ½ efficiently. As a result, one can calculate a random variable’s characteristic function φX ðvÞ ¼ E eivX ½ ¼ E cosðvXÞ ½ þ iE sinðvXÞ ½ with two sets of experiments per v 2 R. In order to extend the above ideas to estimate expectation values of a range of integrable functions f : R ! R, a Fourier series is used. If f is P-periodic, then fLðxÞ ¼ X L l¼L clei2πl P x (11) is the Fourier approximation of order L for f(x). By linearity of the expectation value, this approximation carries over to E fLðSnÞ ½ ¼ X L l¼L clφSn 2πl P : (12) As a consequence, it is possible to approximate any such expectation value in OðLNÞ experiments, where N is the number of shots per experiment. Convergence on Fourier series is a rich and mature field38–40 , which establishes basic results about conver- gence and the rate of convergence of each coefficient for given properties of the function f. The underlying idea of simulating DSPs on a quantum computer has been laid out. Now we show that the simulation can be performed efficiently with a quantum circuit. Independent increments To deliver the underlying idea with a simple example, we start by presenting the case for DSPs with independent increments. To this end, the strategy taken is as follows. We first construct the state P j2Kn pðjÞ j j i 2 HI , and systematically entangle the data system D with the index system. When each of the increments are independent of each other, i.e., P Xi ¼ x; Xj ¼ y ¼ P Xi ¼ x ½ P Xj ¼ y for pairwise different i ≠ j, Eq. (1) can be written as E fðSnÞ ½ ¼ X j2Kn fðsum xðjÞ f gÞ Y n l¼1 P Xl ¼ xl;jl ; (13) and p2 l;jl ¼ P Xl ¼ xl;jl . This structure allows to partition I into subsystems, so-called level-index (sub)systems: HI ¼ Nn l¼1HIl , where each HIl ¼ Ck represents a qudit Hilbert space. Let αðnÞ j i 2 HI be the index-state. Then it can be described as a product state αðnÞ j i ¼ X j pðjÞ j j i ¼ O n l¼1 X k1 jl¼0 pl;jl jl j i ! : (14) Each evolution from αðlÞ j i ! αðl þ 1Þ j i is done by an unitary operator Alþ1 2 BðHIl Þ as given by Alþ1 0 j i ¼ Pk1 j¼0 plþ1;j j j i. After n levels, i.e., the application of A = An ⋯ A1, the final state A 0 j in ¼ αðnÞ j i shown in Eq. (14) is created. Since each of the operators Al only acts on a separate subspace HIl , they commute and can be applied in parallel. This is a consequence of the independence of the increments Xl. For example, an n-step DSP with k = 2 possible paths at each time step can be realized with n index qubits each prepared by a single-qubit unitary operation Al 0 j i ¼ RyðθlÞ 0 j i ¼ cosðθl=2Þ 0 j i þ sinðθl=2Þ 1 j i, where θl is chosen to satisfy cosðθl=2Þ ¼ pl;0 and sinðθl=2Þ ¼ pl;1. Now, for each step of the DSP, k unitary operators applied to the data system controlled by an index qudit split the data space into k spaces, each attached to an orthogonal subspace of the index system. In other words, in each time step, the data system undergoes k independent trajectories. Thus n steps of k controlled unitary operations allow for the encoding of kn independent realizations of a DSP to the index-data quantum state. To this end, we identify to each realization xl;jl of the random variable Xl to the application of the operator Vðxl;jl Þ 2 BðHDÞ to the data system. In fact, the operator will be defined in such a way that the lth index- level state’s branches jl j il with the amplitudes pl;jl (for jl ∈ K) control the operator, thereby identifying the probability p2 l;jl ¼ P Xl ¼ xl;jl with the occurrence of Vðxl;jl Þ. We denote a projection to the lth index subsystem Il as Πlj ¼ j j i j h jl b ¼ Il1 k j j i j h j Inl k ; (15) where Ik is the k-by-k unit matrix and its perpendicular pendant as Π? lj . Then the following theorem establishes the desired result (see Supplementary Information for the proof). Theorem 1 Let x 2 R and j ∈ K. Define operators c- Vljl ðxÞ :¼ Πljl VðxÞ þ Π? ljl I (16) with c- Vljl ðxÞ 2 BðHIl HDÞ. Furthermore, for l = 1, …, n and x 2 Rk , define the operator UlðxÞ ¼ Y k1 j¼0 c- Vljl ðxjÞ 2 BðHI HDÞ: (17) Then U(j) = Un(xn) ⋯ U1(x1) for xl 2 Rk ; l ¼ 1; ¼ ; n. The appli- cation of nk controlled operations c- Vljl ðxl;jl Þ is thus necessary. See Fig. 1 for a depiction of Eqs. (16) and (17). Propositions 1, 2 and Theorem 1 establish that for V(x) = Rz(2x) or V(x) = Ry(x), x 2 R, we can compute given expectation values of Eqs. (6) and (7), respectively, with OðnkÞ controlled gates. The above algorithm can be visualized quite intuitively. Consider a set of unitary operators V ¼ fVljl ¼ Vðxl;jl Þ : l ¼ 1; ¼ ; n; jl 2 Kg as above. These operators span an ordered tree of height n and a maximal degree of k. The label of the nodes themselves are of secondary importance, but each edge is labeled by one of the operators of the family V in such a way that, given the level l (l = 1 is the root), each node of the lth level has k edges, each of them are labeled by Vljl ; jl 2 K. A path between any two nodes, i.e., ðVljl ; ¼ ; VðlþiÞjlþi Þ, can be interpreted as a concatenation of operators, i.e., Vðjl; ¼ ; jlþiÞ ¼ VðlþiÞjlþi Vljl . After l level operations, paths from the root to every nodes at (l + 1)th level in the operator tree are traveled simultaneously. Hence the data system is evolved by the operator UðjÞ ¼ Vðj1; ¼ ; jlÞ ¼ Vljl V1j1 for all possible j. An example of the operator tree with n = 3 and k = 2 is depicted in Fig. 2. C. Blank et al. 3 Published in partnership with The University of New South Wales npj Quantum Information (2021) 126
  • 4. Path-dependent increments For a DSP with path-dependent increments, the probability of a particular realization can be expressed as P X ¼ xðjÞ ½ ¼ Q n i¼2 P Xi ¼ xi;ji jXi1 ¼ xi1;ji1 ´ P X1 ¼ x1;j1 : (18) This is the first-order Markov chain that the probability to take a particular path in a given time step is determined by which path was taken in the previous step. Discussions thus far can easily be extended to such DSPs. The only difference is in the preparation of the index system, i.e., in the construction of the state P j2Kn pðjÞ j j i. Unlike in the case of the independent increments, one needs to introduce entangling operations directly within the index system. Without loss of generality, we use the index system consisting of qubits, i.e., two paths at each level, to describe the procedure. First, the index qubit for the first level is prepared in A0 0 j i ¼ cosðθ0=2Þ 0 j i þ sinðθ0=2Þ 1 j i as before, while the rest of the qubits are in 0 j i. Then the second index qubit is prepared by using the controlled operation 0 j i 0 h j Ryðθ ð0Þ 2 Þ þ 1 j i 1 h j Ryðθ ð1Þ 2 Þ, con- trolled by the first index qubit, where the superscript indicates the path index of the previous step. Then the second index qubit is used as the control to prepare the third index qubit and so on. Thus, the index system state preparation can be done in n steps and the lth index qubit is prepared by applying a controlled operator 0 j i 0 h j Ryðθ ð0Þ l Þ þ 1 j i 1 h j Ryðθ ð1Þ l Þ. An example quan- tum circuit for preparing the index quantum state for a DSP of n = 3 time steps (levels), each branch to two possibilities, is shown in Fig. 3. It is also straightforward to generalize the above procedure to implement path-dependence between events that are more than one time steps away. As an example, let us consider the n = 3, k = 2 cases depicted in Fig. 3. When the events at step 0 and step 1 have an impact on the event at step 2 (i.e., second-order Markov chain), then the single-qubit controlled rotations applied on the index qubit for step 2 should be replaced with the two-qubits controlled rotations controlled by both step 0 and step 1 index qubits. The number of three-qubit operations applied to the step 2 index qubit is four. Similarly, more complicated path-dependence, such as higher-order Markov chains, can be realized by designing multiqubit operations among index registers such that the rotation of the future state is controlled by the past states. The quantum circuit depth increases as OðkDq Þ where Dq is the quantum topological memory41–43 , which satisfies Dq ≤ q for a qth- order Markov chain (i.e., the current state is affected by q past states). Equality is given if each past state generates a unique future state. Note that many interesting applications can be described with small q (e.g., the first- or second-order Markov chain), and in some cases, Dq can even stay constant for unbounded q43 . Besides the index-state preparation procedure, the analysis of the DSP follows exactly the same procedure as described in the previous section. Fig. 2 Operator tree. a The operator tree spanned by a binary example (k = 2) of V for three time steps with the edges named. Each edge represents a state transformation from a parent node to a child node, and each node represents a quantum state. Three states at the final leaves starting from an initial state ψ j i at the root node are explicitly shown as an example. b The path j = (2, 1, 2)⊤ ∈ K3 and the operator U(j) = V32V21V12 are shown as an example. Fig. 3 Quantum circuit to prepare the index system for simulating a path-dependent DSP. The figure depicts an example of the first- order Markov chain of two steps each consisting of two realizations. Fig. 1 Circuit design of DSPs with independent increments. a A quantum circuit including preparation of the index system (operators in blue denoted by Al) and the realization of c − U(j) (operators in green denoted by Ul(x) with a verticle line connected to black squares). A black square is placed on a control register, and the green box denoted by Ul(x) is placed on a target register. Unlike the conventional symbol for a controlled-NOT gate between qubits, the black square indicates that one of the k different unitary transformations is performed conditioned on the state of the control register of dimension k. b Schematic circuit representation of the applications of c Ul 2 BðHIl HDÞ for l = 1, …, n as used in (a). We use the notation Vlj = V(xl,j). The open circle with a number j means that the unitary operator Vlj is applied if the control register state is j j i. C. Blank et al. 4 npj Quantum Information (2021) 126 Published in partnership with The University of New South Wales
  • 5. State-dependent increments The increments in a given DSP can also vary in each step, determined by the state in the preceding step. In this case, the probability of a particular realization can be expressed as P X ¼ xðjÞ ½ ¼ Q n i¼2 P Xi ¼ xi;ji j P i1 l¼1 Xl
  • 6. ´ P X1 ¼ x1;j1 : (19) Intuitively, in order to control the increment given a particular realization of the current step, one needs to apply controlled operation to the index register, controlled by the data register in between each successive step. We leave the explicit details on how to realize the above process with quantum circuits as future work. State machine simulation In the “Introduction”, we mentioned that there is another way of simulating discrete stochastic processes by using a hidden Markov model (HMM). This is a state machine that has states Σ = {s1, s2, …}, output alphabets A = {a1, …, ak}, and a transition probability from state si to sj while outputting the symbol ak, i.e., p2 ðj; kjiÞ ¼ P Sn ¼ sj; An ¼ akjSn1 ¼ si . A quantum advantage in simulating such processes has been reported in several places32,42,43 , which requires provably less memory than its classical counterpart18 . This uses the unifilarity property which states that the output symbol uniquely defines the next state. Consequently, the above probability notation can be shortened to p2 ðkjiÞ ¼ P Sn ¼ λðk; iÞ; An ¼ akjSn1 ¼ si ½ with a function λ that maps uniquely the output symbol to a state. Models with this property are fairly common through a topological equivalence relation41,44 ; unifilar models exist for any stochastic process with finite topological memory, which even includes some instances with infinite Markov order18,19,32,43 . While the references above focus on sampling from a distribution rather than calculating an expectation value, we point out that our methods can be used to expand these ideas in the following way. First, it is necessary to map si to a quantum state σi j i 2 HS Cs on a subspace that will be added to the total system. The unifilarity property allows the HMM states to be translated to non-orthogonal quantum states (i.e., σi j i ≠ si j i in general) which can reduce the memory requirement even further and more interestingly, s ∣Σ∣. Going forward, as described above, the index space HI is constructed by nk-dimensional qudits. A unitary operator is applied to HS HIl on the lth step. To be precise, given an initial state σi j i, the first step U σi j i 0 j i ¼ X k12A pðk1jiÞ σλðk1;iÞ k1 j i (20) creates a superposition of all possible outputs and their current state. The subsequent step creates U X k12A pðk1jiÞ σλðk1Þ k1 j i 0 j i ¼ X k1;k22A pðk2jλðk1; iÞÞpðk1jiÞ σλðk2;λðk1;iÞÞ k1 j i k2 j i: (21) By repeating the application of U with a fresh qudit initialized in 0 j i l times, a quantum state that encodes all possible paths of the l-step HMM can be created. By introducing a mapping from the output alphabet to a numerical value g : A ! R, we can create the process Xn = g(An) and then apply propositions 1 or 2 by adding a data system HD. Therefore the quantum memory advantage reported18 and experimentally verified19,20 can be carried over to our reported advantages to estimate the characteristic function efficiently. An interesting avenue for future work is also to apply these methods to rare-event sampling strategies33 . The Delta for European call option An exciting potential application of quantum computing is financial analysis15,16,31 . In particular, the framework developed in this work can be employed to compute the Delta of an European call option, which is central to various hedging strategies and hence of significant importance in financial engineering21 . In brief, options are financial contracts that give the holder the right to buy (call) or sell (put) an underlying financial asset (e.g., stock) at a prescribed price (strike) on or before a prescribed date (expiration), whose value derives from the underlying asset. For European options, the holder can exercise the option only at the time of expiration. In this context, Delta measures the rate of change of the theoretical option value with respect to changes in the price of the underlying asset, which is instrumental for risk analysis. Let St be stochastic process of an underlying asset then the Delta of a European call option can be expressed as fðStÞ ¼ Φ ln St K þ r þ σ2 2 ðT tÞ σ ffiffiffiffiffiffiffiffiffiffiffi T t p 0 @ 1 A (22) where Φ : R ! ½0; 1 is the cumulative distribution function (CDF) of the standard normal distribution, K 0 is the strike price, r is the risk-free interest rate, T − t is the time to maturity and σ is the volatility of the underlying asset. We are interested in the expectation value of the Delta, E fðStÞ ½ when the underlying asset is described by a geometric Brownian motion, i.e., St ¼ S0 expð μ σ2 =2 ð Þt þ σWtÞ where μ 2 R and S0 denote the drift and the starting value, respectively. Indeed, Eq. (22) considers a value reminiscent of the log-return, which is modeled by the Brownian motion and can be approximated as a random walk by Donsker’s invariance principle45,46 . The following result establishes the way to implement this on a quantum computer. Proposition 3 Given n independent and identically distributed random variables Xl with P Xl ¼ x1 ½ ¼ P Xl ¼ x2 ½ ¼ 1=2 where x1 ¼ μ σ2 2 nσ ffiffiffiffiffiffiffiffiffiffiffi T t p 1 ffiffiffi n p ffiffiffiffiffiffiffiffiffiffiffi T t p (23) x2 ¼ μ σ2 2 nσ ffiffiffiffiffiffiffiffiffiffiffi T t p þ 1 ffiffiffi n p ffiffiffiffiffiffiffiffiffiffiffi T t p (24) and an initial starting point of x0 ¼ ln S0 ln K þ r þ σ2 2 ðT tÞ σ ffiffiffiffiffiffiffiffiffiffiffi T t p (25) with ~ Sn ¼ x0 þ Pn l¼1 Xl, we find that E fðStÞ ½ ¼ 1 2 X 1 0 l¼1 i 2πl e2π2 l2 =P2 φ~ Sn 2πl P (26) when Φ is limited on the interval [−P/2, P/2]. Note that we define the sum with prime as the sum over all summands except for l = 0 (see Supplementary Information). When using the Pauli measurement scheme as explained in Proposition 1, one needs to use V(vx) = Rz(2vx) as operators with constants v = 2πl/P for l = −L, …, L to evaluate the characteristic function at those points for the Fourier-series approximation. This makes a total of 2L experiments (L measurements for each Pauli observable) with n Hadamard gates on n index qubits for encoding the probability information, n bit-flip gates on the index qubits for implementing the controlled operations that operate if the control qubit is 0, and 2n controlled-Rz gates, which of each can be further decomposed to two controlled-NOT and two Rz gates, applied on a data qubit controlled by the index qubit for implementing x1 and x2. In addition, the initial value x0 can be implemented by one Rz gate (see Supplementary Fig. 2). C. Blank et al. 5 Published in partnership with The University of New South Wales npj Quantum Information (2021) 126
  • 7. To demonstrate the proof-of-principle, we performed classical simulations and experiments of the quantum algorithm for calculating the Delta of an European call option on a IBM quantum device named ibmqx2. As an example, the underlying asset is given with μ = 0, σ = 0.02, r = 0.02, S0 = 100, t = 1, and the time of maturity T = 10. The Fourier-series approximation is performed by choosing L = 100 and P = 100. The standard error mitigation protocol available in qiskit47 is applied to reduce experimental errors. Despite imperfections, the experiment predicts the expectation value with high accuracy for the most important region, which is where it changes drastically, i.e., where the strike price varies between 100 and 150. We also performed a classical simulation of the quantum algorithm with the standard noise model provided in qiskit. These results are compared with the theoretical values in Fig. 4. The comparison shows that the noise model provided in qiskit explains the experimental error reasonably well (see “Methods” for a brief comment on the remaining difference between the two results). Correlated random walks The quantum advantage against classical methods manifests when the DSP strictly requires the ability to simulate path- dependent increments. We demonstrate the simulation of correlated random walks as one such example in this section. Correlated random walk (CRW) is a mathematical model that describes discrete random processes with correlations between successive steps48 . It has been a useful tool to study biological processes49,50 , and can also be used to approximate fractional Brownian motion51,52 , which has broad applications for example in mathematical finance53–55 and data network56–59 . The correlation, often referred to as persistence, results in a local directional bias as the walker moves. More precisely, the CRW denoted by Sn ¼ Pn l¼0 Xl with n discrete random variables Xl, l = 1, …, n and persistence parameters pl ∈ [0, 1] and ql ∈ [0, 1] has the following properties: (1) X0 = x0, (2) P X1 ¼ x1 ½ ¼ P X1 ¼ x2 ½ ¼ 1=2, and (3) P Xlþ1 ¼ x1jXl ¼ x1 ½ ¼ pl and P Xlþ1 ¼ x2jXl ¼ x2 ½ ¼ ql ∀ l ≥ 1. The first two properties can be incorporated in quantum simulations easily by following the same procedure used in the previous example. Given pl and ql, the third property can be implemented as follows. First, all index qubits except the first one that encodes the probability distribution of X1 are initialized in 0 j i. The first index qubit is prepared in ð 0 j i þ 1 j iÞ= ffiffiffi 2 p in accordance with the second property. Then a controlled rotation gate is applied from each index qubit to an index qubit of the successive step. The controlled operation can be expressed as 0 j i 0 h j Ryðθpl Þ þ 1 j i 1 h j Ryðθql Þ; (27) where θpl ¼ 2cos1 ð ffiffiffiffi pl p Þ and θql ¼ 2cos1 ð ffiffiffiffi ql p Þ. For example, after one application of the above-controlled operation, the index qubits representing the probability distribution of the first two steps of the CRW is given as 0 j ið ffiffiffiffiffi p1 p 0 j i þ ffiffiffiffiffiffiffiffiffiffiffiffiffi 1 p1 p 1 j iÞ þ 1 j ið ffiffiffiffiffiffiffiffiffiffiffiffiffi 1 q1 p 0 j i þ ffiffiffiffiffi q1 p 1 j iÞ ffiffiffi 2 p : (28) The above state shows that P X2 ¼ x1jX1 ¼ x1 ½ ¼ p1 and P X2 ¼ x2jX1 ¼ x2 ½ ¼ q1 as required by the property (3) of the CRW. We demonstrate the proof-of-principle with an example designed as follows. The correlated random walk is given by increments xl1 = 1 and xl2 = −1 with an initial value x0 = 0. The persistence parameters are pl = (1/2, 2/3, 5/6, 1) and ql = (1/2, 1/3, 1/6, 0) with l = 1, 2, 3, 4. Experiments were performed to calculate the characteristic function for vl = 2πl/P, l = −L, …, L with L = 100 and P = 100 on ibmqx2. The standard error mitigation protocol available in qiskit is applied to reduce experimental errors. We also performed classical simulation of the quantum algorithm with the standard noise model provided by qiskit. These results are compared with the theoretical values in Fig. 5. DISCUSSION We presented a quantum-classical hybrid framework for estimat- ing an expectation value of a random variable based on a discrete stochastic process under the action of function that admits a Fourier-series approximation. As the main ingredient of the framework, we developed a quantum algorithm for efficiently calculating point evaluations of the characteristic function of a random variable. This may also lead to other interesting applications since the probability distribution of a random variable can be completely defined by its characteristic function. More specifically, in the quantum part, the framework proposes a succinct representation of a classical DSP as a quantum state in the form of Eq. (2). The joint probability and the value of each realization are encoded in an entangled state Ψf j i, and therefore Fig. 4 Evaluation of the Delta for the European call option. Left: The Delta of an European call option is calculated for various strike prices. The underlying asset is defined with μ = 0, σ = 0.02, r = 0.02, S0 = 100, t = 1, and the time of maturity T = 10. The dotted black line is the true evaluation of the Delta. The black (blue) solid line is the real (imaginary) part of the theoretical Delta calculation obtained by a Fourier approximation with P = 100 and L = 100, which serves as the reference for the experimental validation. The black crosses (blue tri-downs) are the real (imaginary) part of the Delta calculated with the experiment on the IBM quantum computer with error mitigation applied. The black dots (blue triangles) are the simulation with noise model provided in qiskit with the same error mitigation applied. Right: This plot shows the characteristic function calculated in theory ( × ), by simulation with noise and error mitigation (dot) and the IBM quantum experiment with error mitigation (tri-down) for the example strike price of K = 110. C. Blank et al. 6 npj Quantum Information (2021) 126 Published in partnership with The University of New South Wales
  • 8. all necessary information about a DSP is present. We also detailed the construction of a quantum circuit for preparing the quantum state Ψf j i using the number of circuit elements that only grow linearly with the total number of time steps. For a DSP of n total steps each consisting of k possibilities, there are kn paths. Such a process can be encoded in a quantum state using nk-dimensional index qudits (or dlog 2ðkÞe qubits) and nk controlled gates. There is no need for sampling strategies since all realizations exist in quantum superposition. Two different measurement schemes are proposed for the estimation of expectation values E cosðSnÞ ½ and E sinðSnÞ ½ . The first scheme is to measure an expectation value of σx and σy directly on the data system of Ψf j i, resulting in a convergence error of Oð1= ffiffiffiffi N p Þ for N repeated experiments for any N 0. This shows that the quantum brute-force approach acquires the optimal importance distribution. Furthermore, the sampling convergence can be improved by utilizing the quantum amplitude estimation technique, which promises to reduce the approxima- tion error by a factor of Oð1=2m Þ using m additional qubits. However, the resource overhead of the latter approach is m ancilla qubits, OðpolyðmÞÞ Grover-like controlled operations, and Oðm2 Þ one- and two-qubit gates for implementing QFT. Therefore, with the noisy intermediate-scale quantum (NISQ) devices, it may be desirable to use the former approach. The advantage of this algorithm lies in two facts. First, it is a quantum-classical hybrid computation and thus is a viable candidate to be solved with near-term quantum devices. One can envisage multiple near-term quantum devices running in parallel to calculate all 2L terms independently at the same time. Similar parallelization is also suitable for multiple partitions of a large quantum device where the qubit connectivity is high within each partition but low among partitions. Second, given one type of process Sn, we can pre-compute a number of evaluations of the characteristic functions φSn ð± viÞ for v1 vL 2 R a priori. With those evaluations at hand, it is possible to assemble the Fourier- series on-demand when given the Fourier-coefficients of a function f. This approach makes it possible to invest resources to maximize the precision of the characteristic function evaluation for regularly used DSPs. Furthermore, our framework promotes the idea for a co-design quantum computer60–63 , which focuses on optimizations and design decisions at the hardware level to particularly support the DSP simulations at hand. We underscore our findings with two interesting examples. First, we showed an application to finance, the calculation of the Delta of a European call option. The key idea was to model the stochastic behavior of an underlying asset as a Brownian motion, which is then approximated as a random walk by Donsker’s invariance principle. Next, an application to DSPs with path- dependent increments is demonstrated by an example of correlated random walks. We presented the results of proof-of- principle experiments for each example to demonstrate the validity and the feasibility of our method. The framework can be extended to multivariate functions f : Rd ! R. Given P1; ¼ ; Pd 2 R, the period of the respective argument of f and L1; ¼ ; Ld 2 Nþ, a multi-dimensional Fourier- series approximation fðx1; ¼ ; xdÞ ¼ X L1 l1¼1 X Ld ld¼1 cðω1; ¼ ; ωdÞe i P j 2πlj Pj xj can be applied like Eq. (11) and consequently Eq. (12). The primary harmonics to calculate are thus φSn ðvÞ ¼ E eivSn , which can be achieved by increasing the dimension of the index system and applying a new set of a unitary family Vr (r = 1, …, d) to the same data system D. The ability to simulate multivariate stochastic dynamics with the optimal variance and quadratic quantum speed-up without requiring any sampling strategies is highly beneficial for various analyses in the quantitative and computational science. The path- dependent and state-dependent DSP simulations are excellent fits for studying random walks with internal states64 , and discrete processes that converge to Ornstein–Uhlenbeck65 and fractional Brownian motion51 . Due to the broad applicability of these mathematical models, the framework developed in this work opens tremendous and extensive opportunities in physics, biology, epidemiology, hydrology, engineering, and finance. In future work, we plan to provide explicit quantum circuit design for simulating state-dependent DSPs. Interesting applica- tions to accompany this model include the analysis of stochastic epidemic models66,67 and of hot streak68 . METHODS All experiments are performed using one of the publicly available IBM quantum devices consisting of five superconducting qubits, named as ibmqx2. In order to fully utilize the IBM quantum cloud platform, we used the IBM quantum information science kit (qiskit) framework47 . The versions— as defined by PyPi version numbers—used for this work were 0.20.0. Superconducting quantum computing devices that are currently available via the cloud service, such as those used in this work, have limited coupling between qubits. Resolving coupling constraints as well as optimizations are done in qiskit with a preset of so-called pass managers. The optimization level ranges from 0 to 3. As we chose the ibmqx2 for our experiments the mapping of data register and index register follow the connectivity. For the family of devices that contains ibmq_ourense, one swap operation must be used to exchange the physical qubit 3 and 4. For both layouts see Supplementary Fig. 1a, b. During the compilation step of the experiments, we first use a level 0 pass and then a subsequent level 3 pass to optimize and resolve connectivity constraints. To reduce experimental errors, we used the standard error mitigation functionality of qiskit. This requires an extra set of experiments to be executed prior to the main experiment. In order to understand the source of experimental discrepancy, the experimental results were compared to simulation results that take a realistic noise model into account. During the execution of an experiment, the current device parameters were gathered and stored. Upon comple- tion, a simulation was executed with the standard qiskit noise model, Fig. 5 Characteristic functions of a correlated random walk. Characteristic functions of a random walk is calculated theoretically ( × ), by simulation (dot), and by experiment (tri-down). The simulation includes the standard noise model provided in qiskit. The experiment employs the standard error mitigation technique provided in qiskit. The parameters that define the correlated random walk is described in the main text. C. Blank et al. 7 Published in partnership with The University of New South Wales npj Quantum Information (2021) 126
  • 9. also applying error mitigation on the result. The remaining discrepancy between experimental and simulation results can be attributed to errors that are not included in the basic error model, such as various cross-talk effects, drift, and non-Markovian noise. The standard noise model is described in the supplementary information of ref. 69 in detail. The example for the Delta applied the strike price K from 10 to 220 in increments of 5 for the theoretical calculation, while the experiments were performed for K = 25, 55, 85, 105, 110, 115, 120, 125, 130, 160, 190, 220. The experiment for each K is executed for characteristic function evaluations at vl = 2πl/P with l = −L, …, L, L = 100 and P = 100, each with 8129 shots. For the correlated random walk experiment, we used 32786 shots for each of the evaluations of vl = 2πl/P with l = −L, …, L and P = L = 100. Note that this example did not use the Fourier approximation, and P has been chosen to be the same as L so that vl goes through one period on each side, resulting in a symmetric picture. As the IBM quantum cloud platform allows for 8192 shots per execution, we created multiple identical experiments and manually added the results. DATA AVAILABILITY The data that support the findings of this study are available from C.B. upon reasonable request. Received: 4 October 2020; Accepted: 14 July 2021; REFERENCES 1. Feynman, R. P. Simulating physics with computers. Int. J. Theor. Phys. 21, 467–488 (1982). 2. Lloyd, S. Universal quantum simulators. Science 273, 1073–1078 (1996). 3. Kassal, I., Whitfield, J. D., Perdomo-Ortiz, A., Yung, M.-H. Aspuru-Guzik, A. Simulating chemistry using quantum computers. Annu. Rev. Phys. Chem. 62, 185–207 (2011). 4. Zalka, C. Simulating quantum systems on a quantum computer. Proc. Math. Phys. Eng. Sci. 454, 313–322 (1998). 5. Blatt, R. Roos, C. F. Quantum simulations with trapped ions. Nat. Phys. 8, 277–284 (2012). 6. Barreiro, J. T. et al. An open-system quantum simulator with trapped ions. Nature 470, 486–491 (2011). 7. Gerritsma, R. et al. Quantum simulation of the dirac equation. Nature 463, 68–71 (2010). 8. Aspuru-Guzik, A. Walther, P. Photonic quantum simulators. Nat. Phys. 8, 285–291 (2012). 9. Friedenauer, A., Schmitz, H., Glueckert, J. T., Porras, D. Schätz, T. Simulating a quantum magnet with trapped ions. Nat. Phys. 4, 757–761 (2008). 10. Weimer, H., Müller, M., Lesanovsky, I., Zoller, P. Büchler, H. P. A rydberg quantum simulator. Nat. Phys. 6, 382–388 (2010). 11. Aspuru-Guzik, A., Dutoi, A. D., Love, P. J. Head-Gordon, M. Simulated quantum computation of molecular energies. Science 309, 1704–1707 (2005). 12. Lanyon, B. P. et al. Towards quantum chemistry on a quantum computer. Nat. Chem. 2, 106–111 (2010). 13. Abrams, D. S. Lloyd, S. Quantum algorithm providing exponential speed increase for finding eigenvalues and eigenvectors. Phys. Rev. Lett. 83, 5162 (1999). 14. Berry, D. W., Ahokas, G., Cleve, R. Sanders, B. C. Efficient quantum algorithms for simulating sparse hamiltonians. Commun. Math. Phys. 270, 359–371 (2007). 15. Rebentrost, P., Gupt, B. Bromley, T. R. Quantum computational finance: Monte Carlo pricing of financial derivatives. Phys. Rev. A 98, 022321 (2018). 16. Woerner, S. Egger, D. J. Quantum risk analysis. npj Quant. Inf. 5, 15 (2019). 17. Heinrich, S. From monte carlo to quantum computation. Math. Comput. Simul. 62, 219–230 (2003). 18. Gu, M., Wiesner, K., Rieper, E. Vedral, V. Quantum mechanics can reduce the complexity of classical models. Nat. Commun. 3, 1–5 (2012). 19. Ghafari, F. et al. Dimensional quantum memory advantage in the simulation of stochastic processes. Phys. Rev. X 9, 041013 (2019). 20. Ghafari, F. et al. Interfering trajectories in experimental quantum-enhanced sto- chastic simulation. Nat. Commun. 10, 1–8 (2019). 21. Stamatopoulos, N. et al. Option pricing using quantum computers. Quantum 4, 291 (2020). 22. Blanchet, J. H. Liu, J. State-dependent importance sampling for regularly varying random walks. Adv. Appl. Probab. 40, 1104–1128 (2008). 23. Hastings, W. K. Monte Carlo Sampling Methods Using Markov Chains and Their Applications (Oxford University Press, 1970). 24. Rubinstein, R. Y. Kroese, D. P. Simulation and the Monte Carlo Method, Vol. 10 (John Wiley Sons, 2016). 25. Owen, A. Zhou, Y. Safe and effective importance sampling. J. Am. Stat. Assoc. 95, 135–143 (1998). 26. Cappé, O., Douc, R., Guillin, A., Marin, J.-M. Robert, C. P. Adaptive importance sampling in general mixture classes. Stat. Comput. 18, 447–459 (2008). 27. Srinivasan, R. Importance Sampling: Applications in Communications and Detection (Springer Science Business Media, 2013). 28. Martino, L., Elvira, V., Luengo, D. Corander, J. Layered adaptive importance sampling. Stat. Comput. 27, 599–623 (2017). 29. Brassard, G., Hoyer, P., Mosca, M. Tapp, A. Quantum amplitude amplification and estimation. Contemp. Math. 305, 53–74 (2002). 30. Montanaro, A. Quantum speedup of monte carlo methods. Proc. Math. Phys. Eng. Sci. 471, 20150301 (2015). 31. Rebentrost, P. Lloyd, S. Quantum computational finance: quantum algorithm for portfolio optimization. Preprint at https://arxiv.org/abs/1811.03975 (2018). 32. Binder, F. C., Thompson, J. Gu, M. Practical unitary simulator for non-markovian complex processes. Phys. Rev. Lett. 120, 240502 (2018). 33. Aghamohammadi, C., Loomis, S. P., Mahoney, J. R. Crutchfield, J. P. Extreme quantum memory advantage for rare-event sampling. Phys. Rev. X 8, 011025 (2018). 34. Park, D. K., Sinayskiy, I., Fingerhuth, M., Petruccione, F. Rhee, J.-K. K. Parallel quantum trajectories via forking for sampling without redundancy. N. J. Phys. 21, 083024 (2019). 35. Möttönen, M., Vartiainen, J. J., Bergholm, V. Salomaa, M. M. Transformation of quantum states using uniformly controlled rotations. Quantum Info Comput. 5, 467–473 (2005). 36. Park, D. K., Petruccione, F. Rhee, J.-K. K. Circuit-based quantum random access memory for classical data. Sci. Rep. 9, 3949 (2019). 37. Nielsen, M. A. Chuang, I. L. Quantum Computation and Quantum Information: 10th Anniversary Edition. (Cambridge University Press, 2011). 38. Zygmund, A. Trigonometric Series, Vol. 1 (Cambridge University Press, 2002). 39. Bary, N. K. A Treatise on Trigonometric Series, Vol. 1 (Elsevier, 2014). 40. Katznelson, Y. An Introduction to Harmonic Analysis (Cambridge University Press, 2004). 41. Crutchfield, J. P. Young, K. Inferring statistical complexity. Phys. Rev. Lett. 63, 105–108 (1989). 42. Liu, Q., Elliott, T. J., Binder, F. C., Di Franco, C. Gu, M. Optimal stochastic mod- eling with unitary quantum dynamics. Phys. Rev. A 99, 062110 (2019). 43. Elliott, T. J. et al. Extreme dimensionality reduction with quantum modeling. Phys. Rev. Lett. 125, 260501 (2020). 44. Crutchfield, J. P. The calculi of emergence: computation, dynamics and induction. Phys. D: Nonlinear Phenom. 75, 11–54 (1994). 45. Donsker, M. D. An invariance principle for certain probability limit theorems. Mem. Am. Math. Soc. 6, 12 (1951). 46. Fristedt, B. E. Gray, L. F. A Modern Approach to Probability Theory (Springer Science Business Media, 2013). 47. ANIS, M. S. et al. Qiskit: An Open-source Framework for Quantum Computing. https://doi.org/10.5281/zenodo.5096364 (2021). 48. Gillis, J. Correlated random walk. Math. Proc. Camb. Philos. Soc. 51, 639–651 (1955). 49. Bovet, P. Benhamou, S. Spatial analysis of animals’ movements using a corre- lated random walk model. J. Theor. Biol. 131, 419 – 433 (1988). 50. Codling, E. A., Plank, M. J. Benhamou, S. Random walk models in biology. J. R. Soc. Interface 5, 813–834 (2008). 51. Mandelbrot, B. B. Van Ness, J. W. Fractional Brownian motions, fractional noises and applications. SIAM Rev. 10, 422–437 (1968). 52. Enriquez, N. A simple construction of the fractional Brownian motion. Stoch. Process. Their Appl. 109, 203 – 223 (2004). 53. Elliott, R. J. van der Hoek, J. Fractional brownian motion and financial model- ling. In Kohlmann M., Tang S. (eds) Mathematical Finance. Trends in Mathematics, 140–151, https://doi.org/10.1007/978-3-0348-8291-0_13 (Birkhäuser Basel, 2001). 54. Cheridito, P. Arbitrage in fractional Brownian motion models. Financ. Stoch. 7, 533–553 (2003). 55. Rostek, S. Schöbel, R. A note on the use of fractional Brownian motion for financial modeling. Econ. Model. 30, 30 – 35 (2013). 56. Norros, I. On the use of fractional Brownian motion in the theory of con- nectionless networks. IEEE J. Sel. Areas Commun. 13, 953–962 (1995). 57. Konstantopoulos, T. Lin, S.-J. In Stochastic Networks (eds Glasserman, P., Sigman, K. Yao, D. D.) 257–273 (Springer New York, 1996). 58. Belly, S. Decreusefond, L. In Fractals in Engineering (eds Lévy Véhel, J., Lutton, E. Tricot, C.) 170–184 (Springer London, 1997). 59. Filatova, D. Mixed fractional Brownian motion: some related questions for com- puter network traffic modeling. In 2008 International Conference on Signals and Electronic Systems, 393–396 (IEEE, 2008). C. Blank et al. 8 npj Quantum Information (2021) 126 Published in partnership with The University of New South Wales
  • 10. 60. Brown, K. R., Kim, J. Monroe, C. Co-designing a scalable quantum computer with trapped atomic ions. npj Quant. Inf. 2, 1–10 (2016). 61. Langford, N. et al. Experimentally simulating the dynamics of quantum light and matter at deep-strong coupling. Nat. Commun. 8, 1–10 (2017). 62. Parra-Rodriguez, A., Lougovski, P., Lamata, L., Solano, E. Sanz, M. Digital-analog quantum computation. Phys. Rev. A 101, 022305 (2020). 63. Lamata, L., Parra-Rodriguez, A., Sanz, M. Solano, E. Digital-analog quantum simulations with superconducting circuits. Adv. Phys. 3, 1457981 (2018). 64. Hughes, B. Random Walks and Random Environments: Random Walks (Clarendon Press, 1995). 65. Uhlenbeck, G. E. Ornstein, L. S. On the theory of the brownian motion. Phys. Rev. 36, 823–841 (1930). 66. Tuckwell, H. C. Williams, R. J. Some properties of a simple stochastic epidemic model of sir type. Math. Biosci. 208, 76 – 97 (2007). 67. Allen, L. J. A primer on stochastic epidemic models: formulation, numerical simulation, and analysis. Infect. Dis. Model. 2, 128 – 142 (2017). 68. Liu, L. et al. Hot streaks in artistic, cultural, and scientific careers. Nature 559, 396–399 (2018). 69. Blank, C., Park, D. K., Rhee, J.-K. K. Petruccione, F. Quantum classifier with tailored quantum kernel. npj Quant. Inf. 6, 1–7 (2020). ACKNOWLEDGEMENTS We acknowledge the use of IBM Q for this work. The views expressed are those of the authors and do not reflect the official policy or position of IBM or the IBM Q team. We thank Philipp Leser, Mile Gu, and Jayne Thompson for fruitful discussions, and James Crutchfield for sharing references. This research is supported by the National Research Foundation of Korea (No. 2019R1I1A1A01050161 and 2021M3H3A1038085), Quantum Computing Development Program (No. 2019M3E4A1080227), and the South African Research Chair Initiative of the Department of Science and Technology and the National Research Foundation (UID: 64812). AUTHOR CONTRIBUTIONS C.B. and D.K.P. contributed equally to this work. C.B. and D.K.P. designed and analyzed the model. C.B. conducted the simulations and the experiments on the IBM Q. All authors reviewed and discussed the analyses and results, and contributed toward writing the manuscript. COMPETING INTERESTS The authors declare no competing interests. ADDITIONAL INFORMATION Supplementary information The online version contains supplementary material available at https://doi.org/10.1038/s41534-021-00459-2. Correspondence and requests for materials should be addressed to F.P. Reprints and permission information is available at http://www.nature.com/ reprints Publisher’s note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations. Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made. The images or other third party material in this article are included in the article’s Creative Commons license, unless indicated otherwise in a credit line to the material. If material is not included in the article’s Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this license, visit http://creativecommons. org/licenses/by/4.0/. © The Author(s) 2021 C. Blank et al. 9 Published in partnership with The University of New South Wales npj Quantum Information (2021) 126