Quantum-inspired memory-enhanced stochastic algorithms
John Realpe-G\'omez, Nathan Killoran

TL;DR
This paper introduces quantum-inspired classical algorithms that significantly reduce memory requirements for simulating stochastic models, potentially enhancing classical supercomputing and impacting quantum supremacy benchmarks.
Contribution
It demonstrates that quantum memory advantages can be approximated classically, enabling more efficient simulations on existing high-performance computers.
Findings
Quantum-inspired algorithms require less memory than traditional methods.
Classical implementations can approximate quantum algorithms for stochastic models.
Potential to improve classical simulation efficiency and influence quantum supremacy efforts.
Abstract
Stochastic models are highly relevant tools in science, engineering, and society. Recent work suggests emerging quantum computing technologies can substantially decrease the memory requirements for simulating stochastic models. Here we show that some of these recent quantum memory-enhanced algorithms can be either implemented or approximated classically. In other words, we show that it is possible to develop quantum-inspired classical algorithms that require much less memory than the best classical algorithms known to date. Being classical, such algorithms could be implemented in state-of-the-art high-performance computers, which could potentially enhance the study of large-scale complex systems. Furthermore, since memory is the main bottleneck limiting the performance of classical supercomputers in one of the most promising avenues to demonstrate quantum 'supremacy', we expect…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsQuantum Computing Algorithms and Architecture · Parallel Computing and Optimization Techniques · Quantum Information and Cryptography
Quantum-inspired memory-enhanced stochastic algorithms
John Realpe-Gómez
Instituto de Matemáticas Aplicadas, Universidad de Cartagena, Bolívar 130001, Colombia
Nathan Killoran
Xanadu, Toronto, Canada
Abstract
Stochastic models are highly relevant tools in science, engineering, and society. Recent work suggests emerging quantum computing technologies can substantially decrease the memory requirements for simulating stochastic models. Here we show that some of these recent quantum memory-enhanced algorithms can be either implemented or approximated classically. In other words, we show that it is possible to develop quantum-inspired classical algorithms that require much less memory than the best classical algorithms known to date. Being classical, such algorithms could be implemented in state-of-the-art high-performance computers, which could potentially enhance the study of large-scale complex systems. Furthermore, since memory is the main bottleneck limiting the performance of classical supercomputers in one of the most promising avenues to demonstrate quantum ‘supremacy’, we expect adaptations of these ideas may potentially further raise the bar for near-term quantum computers to reach such a milestone.
I Introduction
From the prediction and understanding of financial markets bouchaud2018trades ; bisias2012survey ; farmer2009economy or the intricate relationships among ecosystems’ resilience, climate change, and human activity stern2016economics ; cai2015environmental ; franzke2015stochastic , to the design and operation of the artificial intelligence architectures lake2015human ; ghahramani2015probabilistic ; goodfellow2016deep ; murphy2012machine that pervade our lives, stochastic models and the corresponding algorithms to implement them are indispensable. Optimizing the computational resources, such as speed and memory, needed for running stochastic algorithms like Markov chain Monte Carlo, is crucial for keeping up with the fast-growing and increasingly complex problems our society faces.
With the emerging commercialization of quantum computing technologies and the race to demonstrate quantum ‘supremacy’ mohseni2017commercialize ; boixo2018characterizing , there is much interest in understanding what aspects of information processing quantum computers can do better than their classical counterparts. While much work has focused on potential quantum speedup biswas2017nasa , there is growing interest in potentially extreme memory reductions that quantum protocols can provide gu2012quantum ; thompson2018causal ; aghamohammadi2018extreme ; ghafari2018single ; ghafari2019interfering ; palsson2017experimentally ; binder2018practical ; liu2018optimal ; thompson2017using . Indeed, both theoretical gu2012quantum ; thompson2018causal ; aghamohammadi2018extreme ; binder2018practical ; liu2018optimal ; thompson2017using and experimental ghafari2018single ; ghafari2019interfering ; palsson2017experimentally work suggests that quantum protocols can generate samples from stochastic processes using much less memory than the best classical counterparts known to date, i.e., the so-called (classical) -machines crutchfield1989inferring ; shalizi2001computational . These -machines rely on the minimum ‘deterministic’ information about the past of a stochastic process necessary to statistically predict its future—known as causal states.
For instance, imagine a coin inside a box that is regularly perturbed. Each perturbation of the box can flip the coin with a probability , irrespective of the current state of the coin (see Fig. 1). If , all we need to know is the previous state of the coin, i.e., the two causal states heads or tails, to correctly predict the probabilities of all future trajectories; therefore, we need to save in memory one bit of information. The information saved is ‘deterministic’ in the sense that it is either heads or tails and not a classical probabilistic mixture of the two. In contrast, quantum -machines can operate using less memory by encoding information about the past on quantum superpositions, the so-called quantum causal states (see Fig. 2). If the process is equivalent to tossing a coin at random at each moment, so the amount of memory required by a classical -machine discontinuously jumps to zero. The amount of memory required by the quantum -machine also goes to zero, though continuously, so it cannot do better in this case (see Fig. 3).
Such quantum-enabled memory reductions are reflected in two possible ways. First, in the sequential generation of a single stochastic trajectory due to a smaller state space of the quantum -machine, e.g., an -machine that needs a trit of memory could be simulated by a quantum -machine that needs to keep in memory only a qubit thompson2018causal ; ghafari2018single —this is referred to as topological memory reduction. Second, in the parallel generation of a large number of stochastic trajectories, or samples, due to a smaller (von Neumann) entropy of the quantum -machine at the stationary state gu2012quantum ; ghafari2019interfering ; palsson2017experimentally —this is referred to as statistical memory reduction. The quantum-enabled reduction of topological memory relies on finding a representation of the quantum causal states in terms of a quantum system of smaller dimension. In contrast, following the Schumacher quantum coding theorem schumacher1995quantum , the quantum-enabled reduction of statistical memory relies on finding a suitable quantum coding of a large number of sample quantum causal states, distributed according to the stationary state of the stochastic process.
Except for a very recent work liu2018optimal , all quantum -machines studied to date encode information only on the amplitude of quantum states, i.e., no phase information is used aghamohammadi2018extreme ; ghafari2018single ; ghafari2019interfering ; palsson2017experimentally ; thompson2018causal ; binder2018practical ; gu2012quantum . Such ‘amplitude-encoded’ quantum -machines, however, can lead to ‘extreme’ memory reductions aghamohammadi2018extreme , i.e., to situations where the memory required by the classical -machine diverges while that required by the corresponding quantum -machine remains finite.
But, if the information encoded in a probability distribution and that encoded in its square root is the same, why is there a difference in the memory requirements of classical and quantum -machines? Indeed, an early algorithm for ‘quantum deep learning’ wiebe2014quantum that only exploited the amplitude of quantum states was later shown to be implementable classically wiebe2015quantum . Nowadays, there is growing interest in such ‘quantum-inspired’ algorithms tang2018quantum ; gilyen2018quantum ; hen2018quantum ; arrazola2019quantum . This aligns with recent work realpe2017modeling ; realpe2018cognitive suggesting that classical message-passing algorithms can be written in a way mathematically analogous to quantum dynamics in imaginary-time, i.e., by changing time into in the Schrödinger equation. In particular, square roots of probabilities arise naturally in such a classical setting. But when the phase degree of freedom is never used, the imaginary unit does not play any role, and it is natural to expect that both real-time and imaginary-time quantum dynamics can become similar.
Here we provide evidence that in some cases it is possible to classically implement such ‘amplitude-encoded’ quantum -machines. More precisely, we show that it is sometimes possible to implement classical protocols that have the same memory reductions as amplitude-encoded quantum -machines. We do so by saving information about the past of a stochastic process using probabilistic mixtures, or stochastic causal states, rather than the deterministic causal states of standard -machines. We also show that it is sometimes possible to build classical algorithms that, by exploiting an operational interpretation of negative numbers arising in a decomposition of probability distributions, introduced in Refs. realpe2017modeling ; realpe2018cognitive , can generate stochastic trajectories while using much less memory than the corresponding classical -machines. Interestingly, in the case of a coin being regularly flipped with probability mentioned above, the memory requirements approach zero continuously as , much as the quantum -machine does, instead of jumping discontinuously to zero as the classical -machine does. Such algorithms, though, do not attain the same memory reductions of amplitude-encoded quantum -machines, so there is room for improvement. In particular, they do not exploit square roots of probabilities. We discuss how belief propagation can pave the way for expoiting such square roots.
Our results therefore show that it is possible to develop quantum-inspired classical stochastic algorithms that require much less memory than the best classical stochastic algorithms known to date. Now, memory is the main bottleneck limiting the performance of classical supercomputers in one of the most promising avenues to demonstrate quantum ‘supremacy’ in the near term boixo2018characterizing . So we expect adaptations of these ideas may potentially further raise the bar for quantum computing technologies to reach such a milestone.
The rest of this paper is organized as follows. In Sec. II we review the main concepts related to -machines (Sec. II.1) as well as their quantum counterparts (Sec. II.2), and present two specific examples that have been recently demonstrated experimentally ghafari2019interfering ; palsson2017experimentally ; ghafari2018single , which we will revisit in the next sections. In Sec. III we identify some features implicit in quantum -machines and discuss how these can be implemented classically. Based on these, we introduce in Sec. III.2 two classical algorithms for the two examples mentioned above that require less memory to operate than the best algorithms known to date, i.e., their corresponding -machines. One of these algorithms reaches the same memory gains as the corresponding quantum -machine, while the other does not. In Sec. III.3 we discuss the extension of the main ideas developed previously to build general quantum-inspired memory-enhanced algorithms. In particular, in Sec. III.3.2 we introduce a general quantum-inspired classical algorithm that can generate samples with much less statistical memory than the best classical algorithms known to date. However, this algorithm does not reach, in general, the same memory savings of the corresponding quantum protocols. In Appendix A we present a detailed example. In Sec. III.3.4 we briefly discuss how recent work realpe2017modeling ; realpe2018cognitive , showing that belief propagation on chain- and cycle-like graphical models can be formulated as quantum-like dynamics, could serve as a general framework to exploit square roots of probabilities. In Appendix B we present a detailed discussion of these ideas and introduce two graphical models whose dynamics is mathematically analogous to the two quantum -machines discussed as examples in Sec. II.2. Finally, in Sec. IV we present the conclusions of this work and put the ideas introduced here in a broader perspective.
II Framework
II.1 Classical stochastic algorithms
Consider a system whose state at time step can be described by a stochastic variable which takes a value in a certain alphabet . The system’s dynamics can then be described by a sequence of stochastic variables . Here and are the sequences describing, respectively, the past and future dynamics of the system. The system’s dynamical law is specified by a probability distribution . Sampling from a given stochastic process amounts to generating a sequence of variables from the corresponding dynamical law . A naïve way to sample a future sequence , given a realization of the past sequence , may require infinite memory; for instance, if we need to store the whole sequence .
More compact representations of stochastic processes that require less memory resources are therefore highly desirable. Sometimes the probability distribution can be factorized into simpler probability distributions. For instance, in the case of stationary th-order Markov chains, the whole dynamics can be generated by a single conditional probability distribution that yields the probability that the state of the system at time step is , given that the previous states the system visited were . A very common example with is the Markov chain Monte Carlo algorithm.
However, in some cases the order of the Markov chain, , can be prohibitively large or even infinity (see e.g., Fig. 1 in Ref. thompson2018causal ). Fortunately, such long-range temporal correlations can sometimes be more compactly captured via hidden variables. A hidden Markov model (HMM) is characterized by a set of hidden variables or states , an alphabet , and the probability that if the HMM is in state it emits output and transitions to state (see Fig. 1).
The most direct way to characterize the memory requirements of a HMM is perhaps by the dimension of its state space. The topological memory
[TABLE]
corresponds to the number of bits necessary to encode the states in which a HMM can be. The topological memory characterizes the memory required for sequential sampling, i.e., for generating a single sample trajectory.
A perhaps more subtle way to characterize the memory requirements of a HMM is by the amount of information actually encoded in the states of a HMM, once it has reached the stationary state . The statistical memory
[TABLE]
corresponds to the entropy of the HMM’s stationary sate . The statistical memory characterizes the memory required for parallel sampling, i.e., for the simultaneous generation of samples at the stationary state. This observation is based on Shannon’s source coding theorem which states that samples distributed according to can be encoded into about bits. The statistical memory of a HMM with state space can be considered as the topological memory of a new HMM with state space . Such a new HMM operates at the stationary state and transitions , with , correspond to the independent transitions , with , of the samples of the original HMM. According to Shannon source coding theorem, at the stationary state we can then find an encoding of the state space such that the set of states defined on the code space is of size .
The best HMMs known to date, in the sense that they require the smallest topological and statistical memory, are called -machines. The states of an -machine are given by a mapping that encodes an equivalence relation
[TABLE]
with , where is the set of states of the -machine, which we will refer to as (deterministic) causal states. An important property of any -machine, called unifilarity and implied by Eq. (3), is that the causal state to which it transitions at any given time is completely determined by the output emitted in such a transition and the state from which the transition takes place. More precisely,
[TABLE]
where is the Kronecker delta function and is a deterministic function that returns the causal state to which the HMM transitions from state when it emits output .
In general, however, there is room for improvement since -machines do not always reach the minimum memory requirement, which is given by the mutual information between past and future . We now know gu2012quantum ; binder2018practical ; liu2018optimal ; aghamohammadi2018extreme ; ghafari2018single ; thompson2018causal quntum models can do better in such cases.
II.2 Quantum-enhanced stochastic algorithms
II.2.1 General considerations
We now discuss recent work gu2012quantum ; binder2018practical ; liu2018optimal ; aghamohammadi2018extreme ; ghafari2018single ; thompson2018causal on quantum protocols for generating samples from a given classical -machine that can operate with less memory requirements, the so-called quantum -machines. The central idea is to define quantum causal states as
[TABLE]
where is an orthonormal basis of a quantum system that represents the deterministic causal states of the classical -machine, and is an orthonormal basis of another quantum system that represents the corresponding outputs .
It is always possible binder2018practical to devise a unitary quantum operator , such that
[TABLE]
If we measure the second system in Eq. (6) in the basis , that system will output with the correct probability and the first system in Eq. (6) will transition to the correct next quantum causal state , with , so the protocol can be applied iteratively. Importantly, except for a very recent work liu2018optimal which shows that adding phases to Eq. (5) can provide further memory reductions, all work to date has only considered amplitude-encoded quantum causal states like those in Eq. (5). In this work we will exclusively focus on the latter which, while being less general, can still provide extreme memory reductions, i.e., situations where the memory required for a classical -machine to operate diverges while that required by the corresponding amplitude-encoded quantum -machine remains finite aghamohammadi2018extreme .
At the stationary state , the quantum causal state appears with probability . So the state of the quantum system can be represented by a density matrix
[TABLE]
whose rank yields the quantum topological memory
[TABLE]
and whose von Neuman entropy yields the quantum statistical memory
[TABLE]
Unlike deterministic casual states that are always orthogonal, the quantum causal states introduced in Eq. (5) can be non-orthogonal, i.e., we can have for and therefore can be non-diagonal. So the quantum statistical memory can be strictly lower than the classical one . This implies that if we want to generate independent samples in parallel we can encode the corresponding density matrix with about qubits describing the typical subspace schumacher1995quantum ; nielsen2002quantum .
II.2.2 Examples
*1. Symmetrically perturbed coin process: * Figures 1a and 2a show an example recently investigated in Ref. gu2012quantum and experimentally demonstrated in Refs. ghafari2019interfering ; palsson2017experimentally . This simple two-state Markov chain can be interpreted as the -machine of a coin in a box undergoing regular perturbations that induce the coin to flip with probability at each time step gu2012quantum . In this case we have and the transition probabilities are given by
[TABLE]
The best classical algorithms known to-date need to save in memory one bit, encoding whether the previous state was 0 or 1 (see Fig. 3).
Figure 2a shows a possible implementation of a quantum -machine that can reduce the memory requirements (see Fig. 3) by relying on quantum causal states ghafari2019interfering ; palsson2017experimentally ; gu2012quantum (cf. Eq. (5))
[TABLE]
These quantum causal states, Eqs. (12) and (13), can be prepared from the state via a unitary
[TABLE]
with and , respectively. Here the undetermined entries are irrelevant for the protocol; they are chosen so that the operations are unitary.
The quantum protocol starts with the current causal state , with , adds an ancilla qubit in state , and then applies to the combined system a gate (see Fig. 2a)
[TABLE]
where is the identity matrix and
[TABLE]
This yields a new combined state
[TABLE]
where
[TABLE]
By measuring the first qubit in the computational basis we get the desired statistics and the corresponding transition of the second qubit to the correct quantum causal state, so the protocol can be applied iteratively ghafari2019interfering ; palsson2017experimentally .
As the stationary state of the symmetrically perturbed coin process (see Fig. 1a) is , the density matrix associated to the quntum -machine is (see Eq. (7))
[TABLE]
Here and are the largest and smallest eigenvalues, respectively, and
[TABLE]
are the corresponding eigenvectors.
The quantum statistical memory is given by
[TABLE]
which is strictly smaller than the memory required for the classical -machine (see Fig. 3), except when and where both -machines require one bit, or where both -machines require zero bits. So, if represented in terms of and , the quantum -machine can generate independent stochastic trajectories while keeping in memory only qubits.
2. Post-processed perturbed coin process: Figures 1b and 2b show an example, recently investigated in Ref. thompson2018causal and experimentally demonstrated in Ref. ghafari2018single , of a three-state Markov chain. This can be interpreted as the -machine of a suitably post-processed perturbed coin process. See Refs. thompson2018causal ; ghafari2018single for details on such an interpretation. Here we are only interested in how quantum protocols can generate samples from this Markov chain using a smaller topological memory than the best known classical algorithms. Indeed, there are quantum -machines thompson2018causal ; ghafari2018single that can simulate this Markov chain while keeping in memory just a single qubit, instead of a qutrit or two qubits as it may appear necessary for simulating a three-state system (see Fig. 2b).
Following Sec. II.2, we can introduce an orthonormal basis (notice the primes) representing the deterministic causal states of the classical -machine (see Eq. (3) and Fig. 1b). We can then define quantum causal states in terms of these as follows (see Eq. (5) and Fig. 2b):
[TABLE]
Here we have also introduced a change of representation in terms of a new single qubit basis (with no primes), where thompson2018causal ; ghafari2018single
[TABLE]
Equations (23)-(25) show the three quantum causal states , for , can indeed be written in terms of one single qubit, as stated above.
A quantum protocol thompson2018causal (see Fig. 2b) to sequentially generate samples from the post-processed perturbed coin process in Fig. 1b starts with the current causal state , with , represented in terms of the qubit basis , along with two ancillary qubits, both in state . The following unitary operations are then succesively applied to the three-qubit state (see Fig. 2b):
[TABLE]
where and are obtained by setting and , respectively, in Eq. (14). We emphasize that the unspecified entries in Eq. (14) are not relevant for this protocol and are chosen such that and are unitary.
Using the full unitary,
[TABLE]
built from these operators we obtain
[TABLE]
A measurement of the first and third qubits in the qubit basis (see Eqs. (26) and (27)) is then performed. Let and denote the corresponding values obtained. The probability of observing both and is zero. The combination yields the three possible outputs of the post-processed perturbed coin process (see Fig. 1b) with the correct probabilities. The second qubit transitions to the correct quantum causal state (see Eqs. (23)-(25)), so the protocol can be applied iteratively.
III Results
III.1 Quantum-inspired memory-enhanced sampling
III.1.1 General considerations
The quantum protocols described in Sec. II.2 were based on the amplitude encoding of the transition probabilities of the corresponding Markov chains, Eq. (5) (see Fig. 1). However, Refs. realpe2017modeling ; realpe2018cognitive show that the quantum dynamics of such phaseless quantum states can be mathematically reproduced via classical belief propagation, at least in the examples studied here (see Sec. III.3.4 and Appendix B)—this only holds at the time scale set by the gates, not for any arbitrarily short time scale. It is then natural to ask whether such quantum memory-enhanced algorithms could be implemented classically. While belief propagation seems to be a strong candidate, there are some caveats that we expect can be resolved in the near future, as we will discuss in Appendix B.
We will therefore introduce a different approach here. We will show that by exploiting some classical features implicit in the quantum protocols described in Sec. II.2, we can design classical algorithms more memory-efficient than the best classical algorithms known to date, i.e., -machines.
For simplicity, we will first discuss in Sec. III.2 the two examples we have been dealing with (see Figs. 1 and 2) and afterwards, in Sec. III.3, we discuss how to develop general quantum-inspired memory-enhanced stochastic algorithms. In Sec. III.2, we will first introduce a classical algorithm for the symmetrically perturbed coin process (see Fig. 1a) that requires much less statistical memory than the corresponding -machine, though it does not reach the same memory gains of the corresponding quantum protocol. Interestingly, as in the quantum protocol, the memory requirements of this classical memory-enhanced algorithm vary continuously along all the range of values of , avoiding the discontinuous jump of the -machine at (see Fig. 3)—the slope of the curve, however, jumps discontinuously at while that of the quantum -machine varies continuously. To achieve this, analogous to the quantum -machine, the algorithm operates at the stationary state and at the ensemble level, i.e., on a large number of parallel independent samples. Furthermore, the algorithm exploits the eigendecomposition of the matrix of transition probabilities and an operational interpretation, introduced in Refs. realpe2017modeling ; realpe2018cognitive , of negative numbers arising in a suitable decomposition of the vector of probabilities.
Next, we will introduce a classical algorithm for the post-processed perturbed coin process (see Fig. 1b) that has the same memory gains as the corresponding quantum protocol in Fig. 2b. More precisely, this algorithm needs to keep in memory only a single bit, instead of a trit as the corresponding -machine (see Fig. 1b). To achieve this, we introduce stochastic causal states, i.e., classical mixtures of the ‘deterministic’ causal states of the corresponding -machine. Such mixtures do a similar job as the quantum superpositions of the amplitude-encoded quantum -machines. We may refer to such classical protocols as stochastic -machines.
In Sec. III.3, we will introduce general quantum-inspired memory-enhanced algorithms which, however, do not exploit square roots of probabilities. In Sec. III.3.4 and Appendix B we discuss how belief propagation can naturally lead to classical protocols formally similar to the corresponding quantum protocols. In particular, square roots of probabilities naturally arise in such protocols. However, we point out some caveats that we hope can be resolved in the near future, which would lead to a full algorithmic interpretation of square roots of probabilities with its corresponding additional memory gains.
III.2 Examples
III.2.1 Symmetrically perturbed coin process
Here we introduce a classical memory-enhanced algorithm to sample from the symmetrically perturbed coin process that requires less statistical memory than the corresponding -machine gu2012quantum —though the algorithm does not reach the performance of the quantum protocol. The lower statistical memory required by the quatum -machine is based on the eigen-representation of the corresponding density matrix . The eigen-representation of the density matrix associated to the symmetrically perturbed coin process is given by the right-most side of Eq. (20). When the process is completely random, i.e., , we have and . In this case, the first term in the eigendecomposition of is associated to completely random, memoryless behaviour. So, when , the second term in the eigendecomposition of , which has negative elements, should somehow reintroduce the Markovian memory.
The situation is similar to the one described in Refs. realpe2017modeling ; realpe2018cognitive to operationally interpret negative numbers in a decomposition of general probability vectors, in this case the vector associated to a simple coin-toss process. Following Refs. realpe2017modeling ; realpe2018cognitive , this probability vector can be written in a way similar to the eigendecomposition of in Eq. (20), namely
[TABLE]
As before, the first vector can be interpreted as tossing coins uniformly at random, while the negative numbers in the second vector can be interpreted as a sort of ‘correction’ (see Refs. realpe2017modeling ; realpe2018cognitive and Sec. III.3 below for the general version of this idea). More explicitly, the decomposition of the probability vector in Eq. (35) could be read algorithmically as follows: (i) With probability one, toss coin uniformly at random (first vector); (ii) If and coin is in state , with probability flip the coin; (iii) If and coin is in state , with probability flip the coin. The flipping in parts (ii) or (iii) would bias the uniform distribution of coins obtained in (i) just enough to get the correct statistics of the coin toss.
Figure 4 describes an algorithm that applies this idea to the case of the symmetrically perturbed coin process. Such an algorithm requires to save in memory only bits per sample instead of the bit of the best classical algorithm known to date (see Fig. 2c). In this, we first toss coins at random and save the state of of them in memory. This would yield a set of samples from the stationary distribution . To generate the next set of samples we toss again coins at random, which require zero memory, and then compare the coins saved in memory. If () we flip those coins whose state equals (differs from) the state before. This ‘correction’ produces just enough bias to recover the correct statistics of the Markov chain, i.e., its transition probabilities, while respecting the stationary state .
III.2.2 Post-processed perturbed coin process
Here we introduce a memory-enhanced classical algorithm to sample from the post-processed perturbed coin process (see Fig. 1b) that requires the same topological memory of the corresponding quantum -machine (see Fig. 2b), i.e., it requires to keep in memory only a bit instead of the trit required by the classical -machine. The idea is to encode information stochastically by defining (classical) stochastic causal states in analogy with Eqs. (23)-(25) as
[TABLE]
As before, here the ket notation just refers to standard real vector notation. The stochastic causal state is uncertain; we do not have full knowledge about it. Yet we will see that this would allow us to obtain the very same memory savings as the corresponding quantum -machine in Fig. 2b. In a sense, there seems to be computational value in knowing less.
Similarly, we can write the (classical) stochastic analogs of Eqs. (32)-(34) as
[TABLE]
Indeed, let and denote the values obtained after observing the first and third stochastic bits, respectively. The probability of observing both and is zero. The combination yields the three possible outputs of the post-processed perturbed coin process (see Fig. 1b) with the correct probabilities. The second stochastic bit transitions to the correct stochastic causal state (see Eqs. (36)-(38)), so the protocol can be applied iteratively. Since everything is real and non-negative, we can readily build a classical stochastic algorithm that implements the transitions in Eqs. (39)-(41).
For instance, if the initial output state is or , we set the first stochastic bit to or , respectively. Otherwise, we set it to or with probabilities and , respectively. To generate the next output, we do the following iteration: if we set both the second and third stochastic bits to zero or one, i.e., or , with probabilities and , respectively. Otherwise, if we set or with probabilities and , respectively; furthermore, we set . We then output and update the memory stochastic bit as . By iterating this procedure we get a sequence of outputs that is a sample trajectory of the post-processed perturbed coin process (see Fig. 1a). As in the case of the quantum -machine, here we only need to keep in memory the first stochastic bit, , which at the end of each iteration will always be in one of the stochastic causal states, Eqs. (36)-(38).
III.3 Extensions
III.3.1 General considerations
Here we highlight some of the general concepts underlying the examples discussed in Sec. III.2. We first introduce a general quantum-inspired stochastic algorithm that extends the one introduced in Fig. 4 to general Markov chains. As the one introduced in Fig. 4, this algorithm also exploits the interpretation of negative numbers introduced in Refs. realpe2017modeling ; realpe2018cognitive . Afterwards, we discuss the concept of general stochastic causal states that extends the example of the post-processed perturbed coin process to general Markov chains and -machines. None of these generaliations exploits square roots of probabilities. This possibility is discussed briefly in Sec III.3.4 and in more detail in Appendix B.
To begin, the algorithm described in Sec. III.2.1 (see Fig. 4) can be interpreted as an eigendecomposition of the matrix of transition probabilities . According to the Perron-Frobenius theorem for irreducible stochastic matrices, the stationary state corresponds to the (left)-eigenvector with eigenvalue equal to one, i.e., , which is the eigenvalue with largest absolute value. In this sense, sampling from the stationary state, which is the first step in the algorithm described in Fig. 4, yields the main contribution to generate stochastic trajectories with the correct statistics. The remaining eigenvectors yield ‘corrections’, which may involve negative numbers as in the example described in Fig. 4, whose relevance is given by the magintude of their associated eigenvalues.
In principle, these ideas can be further generalized by using eigendecompositions of more general matrices of transition probabilities and interpreting the negative numbers that may arise in a similar way as we have done in the example described in Fig. 4. Such potential generalizations should take into account that for non-symmetric matrices, unlike the example described in Fig. 4, the right and left eigenvectors may be different. In Sec. III.3.2 we discuss a general quantum-inspired memory-enhanced algorithm based on this idea. In Sec. III.3.3 we discuss the notion of general stochastic causal states that generalizes the ideas exploited in the example studied in Sec. III.2.2. Finally, in Sec. III.3.4 and Appendix B we discuss how square roots might also be exploited via belief propagation protocols.
III.3.2 General quantum-inspired algorithm with enhanced statistical memory
Here we describe how taking into account only one left- and right-eigenvector, i.e., those associated to the stationary state, already leads to a general quantum-inspired memory-enhanced stochastic algorithm. Consider an -state Markov chain with state space specified by the matrix of transition probabilities (see Appendix A and Fig. 5 for a detailed example)
[TABLE]
where is the stationary state, is the corresponding right-eigenvector, i.e., the -dimensional vector with all entries equal to one, and is composed of all the eigenvalues and eigenvectors different from and . For simplicity, we are asuming ergodicity so there is a unique stationary distribution.
For each , let
[TABLE]
It is useful to define the positive fractions
[TABLE]
and the positive ratios
[TABLE]
where is a normalization constant enforcing .
To see that we can show that all . Indeed, assume by contradiction that so, from Eq. (42), we get , i.e., . This is a contradiction since is a probability distribution. Similarly, since by definition is the maximum of all terms , then all ratios . Finally, all ratios due to the normalization constant . So, all , , and can be interpreted as probabilities.
A general quantum-inspired memory-enhanced stochastic algorithm can be designed as follows. Let , with , denote the -th sample generated at time step . For easy of reference, we will keep this ordering of samples throughout. If at time step the algorithm produces output we save it in memory with probability . At the end of time step we have generated outputs, , distributed according to the stationary state , and have saved in memory on average samples in state , with and . Let
[TABLE]
denote the set of indexes of the samples with value that are saved in memory at time . After this process we have a total of samples saved.
To generate the -th sample, , at time step we first generate a sample from the stationary state as an intermediate stage. If the -th sample was not saved at time step , i.e. , we just output the new sample . Now, suppose the -th sample, , was indeed saved at time step with value , i.e., . Suppose also that the new -th sample, , generated at the intermediate stage has value . If we just output the sample. Otherwise, if we change it into with probability
[TABLE]
This process is repeated times.
To see that this algorithm indeed generates samples with the right statistics, consider the probability to obtain a sample at time corresponding to a sample at time step . In the intermediate stage we obtain with probability . The probability that both was saved in memory at time step and at the intermediate stage is . Now, if was saved in memory and at the intermediate stage, the value of the sample will change into any with probability . This leads to the relation
[TABLE]
which using Eqs. (46)-(49) yields , or , as expected.
If instead, the sample does not change. However, we have to take into account all possible transitions into from all other samples that at the intermediate stage satisfy , with , , and . Since at the intermediate stage with probability and was saved in memory with probability , both events happen with probability . Now, the total probability that any of the samples , with , corresponds to a sample saved in memory, i.e., , and transitions into is . This leads to the relation
[TABLE]
which using Eqs. (46)-(49) yields
[TABLE]
To change the sum above into a sum over elements of we can use the identity
[TABLE]
Here we have extended the sum from to since we can add all without changing the sum. We have also taken into account that both and are probability distributions over . Using this identity and Eq. (47) we finally obtain , or , as expected.
Again, we have built this in analogy with the quantum protocols that reduce statistical complexity (see Sec. II.2), which exploit the eigendecomposition of the density matrix to find an optimal quantum encoding of the samples. However, we have exploited here only the eigenvector corresponding to the stationary state. It may be possible to exploit all eigenvalues to build algorithms that require less memory. Nevertheless, like in the case of the quantum protocols, the price to pay for this would be the need to find and deal with the full eigensystem of the matrix of transition probabilities.
III.3.3 General stochastic causal states
Now, the concept of stochastic causal state introduced in Sec. III.2.2 (see Eqs. (36)-(38)) can in principle be generalized to systems of any dimension. For instance, in the case of a Markov chain specified by matrix of transition probabilities , in analogy with Eqs. (36)-(38), we could define general stochastic causal states as
[TABLE]
Or in the case of general -machines, in analogy with Eq. (5), we could define them as
[TABLE]
where is an orthonormal basis that represents the deterministic causal states of the classical -machine, and is an orthonormal basis that represents the corresponding outputs .
We can in principle find a classical algorithm that requires a state space with the same dimensionality, , of the space spanned by the stochastic causal states, . If is smaller than the dimensionality of the original state space, , we would obtain a quantum-inspired classical algorithm that requires less topological memory than the best classical counterpart known to date, i.e., the -machine. This was the case of the post-processed perturbed coin process studied in Sec. III.2.2. This particular instance has the advantage that it does not involve negative numbers. This feature facilitates the representation in terms of classical stochastic causal states, Eqs. (36)-(38), and the corresponding transitions, Eqs. (39)-(41). In more general situations there may be negative numbers involved, which could in principle be interpreted operationally as we have done with the symmetrically-perturbed coin process (see Fig. 4) and its generalization in Sec. III.3.2 (see also Appendix A).
III.3.4 Square roots of probabilities and belief propagation
In this work we have discussed memory-enhanced quantum-inspired stochastic algorithms that, unlike the quantum protocols discussed in Sec. II.2, do not make use of square roots of probabilities. In some instances this has led to lower memory savings than those that can be achieved with the corresponding quantum protocols (see, e.g., Sec. III.2.1). So, dealing with square roots of probabilities has the potential of achieving the same performance of quantum protocols in this cases.
Indeed, what actually motivated us to search for such quantum-inspired algorithms was the observation that the classical algorithm known as belief propagation, when run on cycle- or chain-like classical graphical models, follows a dynamics which is mathematically similar to quantum dynamics when there are no phases involved realpe2017modeling ; realpe2018cognitive . Interestingly, square roots of probabilities and the analogs of the Born rule arise naturally in this potentially more general framework.
In particular, it is possible to build graphical models whose belief propagation dynamics is mathematically analogous to the quantum protocols discussed in Sec. II.2.2. There are, however, some caveats that we hope can be resolved in the near future. With this in mind, we present in Appendix B a general discussion of these ideas along with the two graphical models associated to the two quantum protocols discussed in Sec. II.2.2. This approach might in principle lead to classical algorithms where the amplitude encodings associated to the corresponding quantum protocols could be understood as organizing samples in squares, instead of lines as in Fig. 4. Any required linear algebra manipulation would then be applied to the sides of such squares rather than to the full squares themselves. A full algorithmic interpretation of square roots of probabilities is left for future work.
IV Conclusions
Memory is a key computational resource for performing high-performance simulations, e.g., of large-scale complex systems or quantum computers. In this work we have shown that some quantum protocols thompson2018causal ; gu2012quantum ; ghafari2018single ; ghafari2019interfering ; palsson2017experimentally recently introduced for stochastic simulation, which can provide extreme memory advantages over the best classical protocols known to date, can actually be either implemented or approximated classically. In the former case we can design classical algorithms with the same memory reductions of the quantum counterparts. In the latter we can design algorithms that require less memory than the best classical algorithms known to date, yet they do not reach the same memory reductions of the quantum counterparts, so there is potentially still room for further improvement.
One of the concepts involved is the encoding of information about the past of a system on probabilistic mixtures, even though such information is already known and so, in a sense, ‘deterministic’. We showed how this can lead to a reduction in the dimension of the state space, or topological memory, of the variables that need to be kept in memory in order to sequentially generate a stochastic trajectory. In short, there is value in knowing less. This is the stochastic parallel of the corresponding quantum protocols which reduce memory requirements by saving already observed information about the past on quantum superpositions.
Another concept involved is the decomposition of matrices of transition probabilities into the dominant left and right eigenvectors, i.e., those associated to the stationary state, and the residual. We can then sample first from the stationary state, which requires zero memory about the past, and then correct the samples according to the residual to recover temporal correlations. This may involve negative numbers that may arise in the decomposition. We have used an operational interpretation of such negative numbers introduced in recent work realpe2017modeling ; realpe2018cognitive , to design classical sampling algorithms that require much less memory than the best known to date, i.e., the classical -machines.
Furthermore, following Refs. realpe2017modeling ; realpe2018cognitive , we have discussed how the classical message-passing algorithm known as belief propagation can lead to a dynamics mathematically similar to amplitude-encoded quantum protocols, where the phase degree of freedom does not play any role. In particular, square roots of probabilities arise naturally in this framework. Except for a very recent quantum protocol ghafari2018single , all quantum memory-enhanced protocols for stochastic simulation investigated to date, like the belief propagation counterparts, do not make use of quantum phases. Such restricted amplitude-encoded quantum protocols, though, can lead to extreme memory reductions aghamohammadi2018extreme . A full algorithmic interpretation of such square roots of probabilities, however, is left for future work.
Being classical, such quantum-inspired algorithms could be implemented in state-of-the-art high-performance computers. This could potentially enhance the study of complex systems and further raise the bar for near-term quantum computers to demonstrate ‘quantum supremacy’.
To conclude, the possibility to classically implement protocols that were previously considered quantum raises the question: what is quantum? An intriguing possibility which arose in Refs. realpe2017modeling ; realpe2018cognitive (see also Ref. realpe2019can ), which motivated this work, is that the peculiar classical interaction of a physical agent, e.g., a robot or a scientist, with a classical experimental setup, when described from the perspective of the agent itself leads to a fully quantum-like dynamics. If this is so, it might be possible to extend the ideas introduced here to general quantum protocols that may include phase degrees of freedom, as those recently studied in Ref. ghafari2018single .
Contributions
J.R.G. conceived the main ideas and derived all technical results. N.K. supervised the project and provided critical feedback to direct the research. J.R.G. wrote the manuscript in consultation with N.K.
Competing interests
The authors declare no competing interests.
Supplementary information
Appendix A Illustrative example of algorithm in Sec. III.3.2
Here we discuss a specific three-state Markov chain to illustrate the general algorithm introduced in Sec. III.3.2. Instead of just replacing the specific values here into the general expressions introduced therein, we will rather work this example out from scratch to motivate the latter. Although this will necessarily lead to a much longer discussion, we hope this approach presents a complementary perspective that may help clarify any confusion that may have arisen in reading the general presentation in Sec. III.3.2.
Consider the three-state Markov chain specified by the transition probability matrix
[TABLE]
Here we have written in terms of the left and right eigenvectors associated to the largest eigenvalue , which are
[TABLE]
and , respectively. The reverse relation of Eq. (56) is
[TABLE]
The eigenvector in Eq. (57) is the stationary state of the Markov chain.
Although the Markov chain specified by the transition matrix in Eq. (56) could be described by just two causal states, it serves to illustrate the main ideas we want to discuss. We could use the same ideas for the corresponding two-level -machine, but this would be a rather trivial example. This also serves to illustrate that we can improve not only on -machines, but also on sub-obtimal algorithms that may arise in real-life applications, where finding the corresponding -machine may be hard. Of course, this observation also applies for the orginial quantum protocols.
If the state of the system is , with , its next state is drawn from the probability vector
[TABLE]
In the spirit of Fig. 4 we can generate samples by first sampling from the stationary state , which is the same for all , and afterwards correct the samples according to the second term in Eq. (59), i.e., .
For concreteness, let us consider the case when and , which yields (see Eqs. (57) and (58))
[TABLE]
and suppose we are generating samples in parallel (see Fig. 5; cf. Fig. 4). The samples are at the stationary state, Eq. (60), so the number of samples in states , with , and , is on average
[TABLE]
respectively. For easy of illustration, we will work with sample statistics as if they were population statistics, i.e., we will neglect fluctuations about the mean in the following discussion.
To generate the next set of samples, we first generate new samples from the stationary state , Eq. (60). This is equivalent to generate three subsets of samples of size , and , each distributed according to (see Fig. 5). To recover the temporal correlations between the current and the next set of samples, we need to ‘correct’ each subset of samples using vectors , with . Consider, for instance, the samples that transition from state . Since these samples are distributed according to the stationary state, Eq. (60), on average stay in state , transition to state , and transition to state .
To ‘correct’ these samples according to vector in Eq. (61) we need to change some of the samples that are in states with negative entries in , i.e., state , into states that have positive entries in according to the ratios specified by these entries. So, for every three samples in state that change, two should change into state and one into state . More precisely, since in this case the only negative entry in Eq. (61) is , we need to change on average samples. On average should change into state and should change into state . This recovers the correct statistics of the transitions from state for the simple reason that the corresponding vector of transition probabilities is the sum of the stationary distribution vector and the ‘correction’ vector (see Eq. (59) and general discussion in Sec. III.3.2). Although this ‘correction’ generally take the samples out of the stationary state, all samples will globally remain at the stationary state once we also ‘correct’ the samples that transition from states and , as we will see below.
Now, the correction vector in Eq. (62) associated to the samples that transition from state has two negative entries, i.e., and , and one positive entry, i.e. . In this case we need to change some of the samples in states and into state according to the ratios specified by these entries (see Fig. 5). More precisely, following the same reasoning of the previous case, on average we need to change out of the samples in state and out of the samples in state into state . This is the reverse process of the previous case: for each sample in state that is changed into state , two samples in state are changed into state .
Suppose we save in memory a given number of samples, , randomly chosen out of the samples at time step . Then, on average, of the corresponding new samples, , generated in the intermediate stage would be in state and of them would be in state . Each of these numbers should be larger than the corresponding number of samples that need to be changed to properly correct the samples, i.e., and . The minimum number of samples that need to be saved to typically guarantee these conditions is
[TABLE]
or . Equivalently, the minimum fraction of the samples that we need to save in memory is —these fractions can be interpreted probabilistically, as discussed in Sec. III.3.2.
So, if we save in memory only samples, on average samples will be in state and samples will be in state . We need to change of the samples in state into state , or a ratio . Analgously, we need to change of the samples in state into state , or a ratio —these ratios can also be interpreted probabilistically, as discussed in Sec. III.3.2. In all these fractions and ratios the actual number of samples cancels out; this is true in general. In the previous case we have , or , and ; here the actual number of samples also cancels out.
Similarly, the only negative entry in the correction vector in Eq. (63) is . To correct the samples corresponding to those that were in state at time step , we need to change on average out of the samples that, on average, transitioned into state at time step : should change, on average, into state and should change, on average, into state . In this case we have , or . Additionally, since in this case there is only one negative entry. So, all of the corresponding samples that are in state at the intermediate stage should change. All of these samples should be distributed between states with positive entries in the correction vector , i.e., and , according to the corresponding ratios. In this case such ratios are and , respectively, where is a normalization constant enforcing .
Applying the same reasoning to the first case analyzed, i.e., those samples transitioning from state , we obtain and . We obtain the same numbers as before because in this example we have (see Eqs. (61) and (63)). This is not true in general, though.
Appendix B Quantum-like belief propagation protocols
Here we describe the potentially more general perspective discussed in Sec. III.3.4 (Appendix B.1). Furthermore, we introduce the two graphical models whose belief propagation dynamics is mathematically analogous to the quantum dynamics of the examples discussed in Sec. II.2.2 (Appendix B.2). Finally, we point out some caveats that we hope can be resolved in the near future (Appendix B.3).
B.1 General considerations
Belief propagation is a message-passing algorithm to efficiently compute marginals of graphical models by passing messages from node to node along the underlying graph (see Fig. 6; see also Sec. 14 in Ref. mezard2009information ). It was recently shown realpe2017modeling ; realpe2018cognitive (see Secs. V B and C in Ref. realpe2017modeling ) that belief propagation on chain- or cycle-like graphs is mathematically analogous to quantum dynamics in imaginary time, i.e., the dynamics obtained after changing time to , where is the imaginary unit. Since the imaginary unit only appears multiplying the phase of a wave function, it is natural to expect that quantum protocols that do not exploit information about the phase, like those presented in Sec. II.2 could be efficiently simulated classically.
For instance, let us consider a graphical model of binary variables , with , interacting on a cycle whose probability distribution factorizes as (see Fig. 6)
[TABLE]
where periodicity in the index is understood, i.e., Here the non-negative functions , for , are called factors and is the normalization constant. For instance, if is a Boltzmann distribution, the factor can be a Boltzmann weight associated to an energy function and an inverse temperature . It is straightforward to extend the ideas presented here to -dimensional arrays of binary variables (see Sec. B.2 and Fig. 6).
Belief propagation is guaranteed to yield exact marginals when the graphical model has the topology of a tree. So, let us first assume that factor for all , so the cycle turns effectively into a chain. In this case, belief propagation passes messages and starting at nodes and respectively mezard2009information (see Sec. 14 therein). After such messages have travelled the entire chain, using a suitable normalization for the messages, the marginal probability of variable is given by realpe2017modeling ; realpe2018cognitive (see Sec. V B in Ref. realpe2017modeling )
[TABLE]
This is reminiscent of the Born rule of quantum theory, and we can indeed write these messages as realpe2017modeling ; realpe2018cognitive
[TABLE]
If we do in the Schrödinger equation, the imaginary unit disapears. The imaginary unit multiplying the phase of a wave function also disappears, which leads to the imaginary-time analogs of a wave function and its conjugate, Eqs. (70) and (71). Furthermore, if we write
[TABLE]
the belief propagation algorithm associated to Eq. (68) is determined by the update rules
[TABLE]
which are similar to the update rules of quantum theory, except that the factors are real and non-negative. However, see Refs. realpe2017modeling ; realpe2018cognitive for a discussion of more general situations.
From a mathematical point of view, the only difference between Eqs. (70) and (71) and quantum wavefunctions is the lack of the imaginary unit multiplying the phase . So it is natural to expect that quantum protocols that only exploit amplitudes of wave functions, such as those based in Eqs. (12), (13) and (23)-(25), might be implemented classically, e.g., via belief propagation algorithms. This is not totally unexpected given that contains the same information encoded in . We will argue here that this may indeed be the case in some instances.
B.2 Examples
B.2.1 Symmetrically perturbed coin process
To gain some initial intuition, we will first use an alternative method also introduced in Refs. realpe2017modeling ; realpe2018cognitive (see Sec. VI C in Ref. realpe2017modeling ), which, instead of messages, uses probability matrices that are analogous to the imaginary-time version of density matrices. Due to the absence of phases in the examples considered here, such probability matrices actually have the same mathematical form as the corresponding density matrices of interest, as we will see below.
Figure 6a shows a graphical model, defined on pairs of binary variables with , whose belief propagation dynamics is mathematically analogous to the quantum protocol of the symmetrically perturbed coin process described in Sec. II.2.2. As we mentioned in Sec. II.2.2, the undetermined entries in Eq. (14) are irrelevant for the application of the quantum protocols described therein. They are chosen such that is unitary, which requires some entries to be negative. However, as they are irrelevant, so we can also choose them equal to zero in the belief propagation model, for instance. We can then implement the corresponding transformations using a classical factor
[TABLE]
instead (cf. Eq. (14)).
Using Eq. (76), the factors in Fig. 6a can be defined as
[TABLE]
where is defined in Eq. (15), and refers to the causal states. In this case, and , to implement the analogs of quantum causal states and , respectively.
The probability of a path can be written as realpe2017modeling ; realpe2018cognitive
[TABLE]
where we have written for future convenience—here the normalization constant is . Due to the circular topology of the graphical model in Fig. 6a it is in general not possble to compute the marginal at step , for instance, from the marginal
[TABLE]
at step alone realpe2018cognitive . If the graphical model had the topology of a chain, instead, this would indeed be possible, i.e., we would have a Markov chain.
However, if we relax the condition that in Eqs. (78) and(79), and interpret the factors as probability matrices, we can define a real probability matrix realpe2017modeling ; realpe2018cognitive (see Sec. VI C in Ref. realpe2017modeling )
[TABLE]
at step . The -th diagonal element of in Eq. (80) is the marginal , which in this case equals one if and zero otherwise.
Following the same reasoning, and taking into account that , we can compute a probability matrix (see Eq. (77))
[TABLE]
at step . Again, the diagonal of contains the vector of marginal probabilities . In this case, the matrix is mathematically analogous to the density matrix associated to the quantum causal state of the quantum protocol shown in Fig. 2b (see Eqs. (12), (13), and (17)).
Matrix in Eq. (81) is obtained by the cyclic permutation of the final matrix in Eq. (80). Continuing with these cyclic permutations, we get (see Eqs. (18) and (19))
[TABLE]
after which we get back to , so the dynamics is self-consistent. The probability matrix has the same mathematical form of the density matrix associated to states , with , in Eqs. (18) and (19).
By measuring the first binary variable of we get the same statistics and the same state update for the probabilistic state of the second variable as the quantum protocol in Fig. 2b.
Now, let us turn back to the belief propagation algorithm, Eqs. (74) and (75), which, again, do not in general yield exact marginals for graphical models with loops. In this case, however, the marginals estimated by belief propagation (see Eq. (69)) are indeed exact if we pick “initial” messages (i.e., at index ) realpe2017modeling ; realpe2018cognitive
[TABLE]
which are consistent with in Eq. (80).
The forward belief propagation iteration, Eq. (74), leads in this case to (see Fig. 6a and Eqs. (12),(13), (18) and (19))
[TABLE]
The message at is mathematically equivalent to the initial quantum state of the quantum protocol (see Fig. 2b and Eqs. (12) and (13)). Similarly, the message at is mathematically equivalent to the quantum state (17). Finally, after the last two steps, Eqs. (88) and (89), we turn around the cycle and belief propagation consistently yields back the initial message . So the forward belief propagation iteration, Eq. (74), is self-consistent, even though the graphical model does not have the topology of a tree.
The backward belief propagation iteration, Eq. (75), yields the transposed equations, i.e., at each time index we have
[TABLE]
which is equivalent to taking the hermitian conjugate, as in quantum theory, since the messages are real.
B.2.2 Post-processed perturbed coin process
Figure 6b shows a graphical model, defined on binary variables with , where belief propagation follows a dynamics analogous to that of the quantum protocol for the post-processed perturbed coin process in Sec. II.2.2 (see Fig. 2b). The factors in Fig. 6b are defined as
[TABLE]
where and are obtained by setting and in Eq. (76), respectively, and is defined in Eq. (30). Factors and are analogous to the gates in Eqs. (28) and (29). The factor prepares from the analog of the initial quantum causal state , with . More precisely, , or , or if the initial quantum causal state is , or , or , respectively (see Eqs. (23)-(25)).
As before, the graphical model in Fig. 6b has the topology of a circle and belief propagation is not guaranteed in general to yield exact marginals for graphical models with cycles. However, the variable is connected to factors and , whose entries in the second column and second row, respectively, are zero for any (see Eq. (91)). This implies that with probability one—to see this notice that
[TABLE]
In this case, the message-passing equations become exact if, consistent with Eq. (95), we pick “initial” messages (i.e., at index ) realpe2017modeling ; realpe2018cognitive (see Sec. V B 2 in Ref. realpe2017modeling )
[TABLE]
The first iteration of the belief propagation equations, Eqs. (74) and (75), yields
[TABLE]
where , which has the same mathematical form as the initial quantum causal state of the protocol shown in Fig. 6b (see Eqs. (23)-(25)).
Now and coincide, respectively, with and , except in the undetermined entries of the latter (see Eqs. (76) and (14)). However, such undetermined entries are irrelevant for the quantum protocol in Fig. 2b (see Sec. II.2.2). As far as this quantum protocol is concerned, Eqs. (92)-(94) are equivalent to Eqs. (28)-(30). This implies that the belief propagation dynamics induced on the messages and by Eqs. (74) and (75) with factors , , and defined in Eqs. (92)-(94), has the same mathematical form as the dynamics of the corresponding quantum protocol in Fig. 2b. In particular (see Eqs. (32)-(34)),
[TABLE]
which yields the same statistics as the post-processed perturbed coin process (see Fig. 1b), as described in Sec. II.2.2.
The branch of the graphical model in Fig. 6a that connects variables , with , “prepares” the message in Eq. (100). The remaining branch connecting variables , with , is a kind of “mirror image” of the former, i.e., it has the same factors but transposed (see Fig. 6a)—such mirror image yields the analogs of the corresponding conjugate wave functions. Indeed, since the initial -message in Eq. (97) is also the transpose of the initial -message in Eq. (96), the dynamics of the -messages is the same as that of the -messages. So, the -messages have the same mathematical form of the conjugate wave functions in the corresponding quantum protocol (see Fig. 2a and Example 1 in Sec. II.2.2). This happens because there are no phases involved.
Finally, the remaining iterations of belief propagation for the -messages roll back the messages. For instance, since , we get
[TABLE]
with
[TABLE]
Now, since , we get for all . So, after turning around the cycle we get
[TABLE]
which shows the belief propagation equations are self-consistent in this case too (cf. Sec. B.2.1).
B.3 Quantum-like protocols and some caveats
The graphical models introduced in Sec. B.2 have a belief propagation dynamics mathematically analogous to the first iteration of the quantum protocols in Fig. 2. This first iteration includes the preparation of the message via factor . However, this is to be avoided in future iterations—otherwise any potential memory savings would be destroyed by having to prepare message at each time step.
Figure 7 shows an extension of the graphical model in Fig. 6a whose dynamics is mathematically analogous to that of two iterations of the quantum protocol in Fig. 2a. This is essentially composed of two copies of the graphical model in Fig. 6a connected through the variables and which, in contrast to variable , are not observed. The second copy (top right) does not have the preparation factor as required. This construction can be continued iteratively by splitting variable into two and connecting a third copy to them, and so on. A similar construction can be done for the graphical model in Fig. 6b. There are some caveats, though.
First, if we interpret the graphical model in Fig. 7 as a static Ising-like system, instead of reducing the amount of memory required to generate stochastic trajectories, in comparison to the corresponding -machine, the number of stochastic bits needed to implement the whole graphical model would rather proliferate. A potential way out is to implement each factor graph at a time (see Fig. 7). This would be closer to the original interpretation of such type of graphical models in Refs. realpe2017modeling ; realpe2018cognitive as describing the dynamics of a physical agent, e.g., a robot, interacting with an experimental device. However, this may require significant isolation from the environment to avoid the probabilities, and messages, associated to such isolated variables from changing too much. Whether the amount of isolation required is similar to that of quantum protocols is an open question at the moment.
Second, the memory gain in the case of the symmetrically perturbed coin process is in terms of statistical memory, which needs a quantum-like encoding à la Schumacher schumacher1995quantum . In the example studied here such an encoding amounts essentially at working with the Fourier transform of the messages. It is not clear at this point how to implement this either physically or algorithmically. This caveat does not apply for the topological memory savings in the case of the belief propagation protocol for the post-processed perturbed coin process. However, in more general cases a similar caveat may arise also for topologically memory saving graphical models if the lower-dimensional representation of the messages corresponding to the quantum causal states (see Eqs. (23)-(25)) involves negative numbers. This may be dealt with using the operational interpretation realpe2018cognitive of this type of negative numbers we have discussed in Secs. III.2 and III.3.
The reference list from the paper itself. Each links out to its DOI / PubMed record.
- 1(1) J.-P. Bouchaud, J. Bonart, J. Donier, and M. Gould, Trades, quotes and prices: financial markets under the microscope . Cambridge University Press, 2018.
- 2(2) D. Bisias, M. Flood, A. W. Lo, and S. Valavanis, “A survey of systemic risk analytics,” Annu. Rev. Financ. Econ. , vol. 4, no. 1, pp. 255–296, 2012.
- 3(3) J. D. Farmer and D. Foley, “The economy needs agent-based modelling,” Nature , vol. 460, no. 7256, p. 685, 2009.
- 4(4) N. Stern, “Economics: current climate models are grossly misleading,” Nature News , vol. 530, no. 7591, p. 407, 2016.
- 5(5) Y. Cai, K. L. Judd, T. M. Lenton, T. S. Lontzek, and D. Narita, “Environmental tipping points significantly affect the cost- benefit assessment of climate policies,” Proceedings of the National Academy of Sciences , p. 201503890, 2015.
- 6(6) C. L. Franzke, T. J. O’Kane, J. Berner, P. D. Williams, and V. Lucarini, “Stochastic climate theory and modeling,” Wiley Interdisciplinary Reviews: Climate Change , vol. 6, no. 1, pp. 63–78, 2015.
- 7(7) B. M. Lake, R. Salakhutdinov, and J. B. Tenenbaum, “Human-level concept learning through probabilistic program induction,” Science , vol. 350, no. 6266, pp. 1332–1338, 2015.
- 8(8) Z. Ghahramani, “Probabilistic machine learning and artificial intelligence,” Nature , vol. 521, no. 7553, p. 452, 2015.
