Quantum Path-Integral qPATHINT Algorithm

A path-integral algorithm, PATHINT, used previously for several systems, has been generalized from 1 dimension to N dimensions, and from classical to quantum systems, qPATHINT. Pilot quantum applications have been made to neocortical interactions and financial options in 1 dimension. Future work is planned to extend qPATHINT to multiple dimensions in these systems, and to extend calculations to multiple scales of interaction between classical events and expectations over quantum processes. Each of the two systems considered contribute insight into applications of qPATHINT to the other system.


Introduction
Section 2 gives motivations for this proposed study. This includes published work with specific applications to neuroscience and to financial options.
Section 3 describes the math-physics methodology used for path-integral development, and its generic application to many physical systems. The algorithm to be used is based on that used in previous publications, PATHINT, a kernel type method particularly well suited for time-dependent and boundary-dependent systems, for which other Monte Carlo methods are not as useful. Specific equations are given to highlight this method; computational scaling conditions are shown to be highly dependent on the dimensionality of the given system. Scaling issues are discussed for different dimensions.
Section 4 describes the adaptation of the previous algorithm to quantum systems, defining the qPATHINT code within descriptions of two systems in neuroscience and financial options. Direct calculation of the propagation of the distribution or wave function in time-dependent scenarios is often required. Some other algorithms convert time-dependence to imaginary time to get real variables, but these suffer the problem of not having an audit trail back to the original real-time evolving wave function. Therefore, the PATHINT C code of about 7500 lines of code was rewritten for the GCC C-compiler to use double complex variables instead of double variables.
Section 5 discusses direct application of qPATHINT to neuroscience and financial options systems. A top-level description is given of the similarities of the use of qPATHINT in these quite different systems, in the context of drawing on experiences from each system to the other, leading to new algorithms.
The Conclusion follows.

XSEDE EEG Project
The Extreme Science and Engineering Discovery Environment (XSEDE.org) project since February 2013, "Electroencephalographic field influence on calcium momentum waves," fit the SMNI model to EEG data, wherein ionic Ca 2+ momentum-wave effects among neuron-astrocyte-neuron tripartite synapses modified parameterization of background SMNI parameters. Direct calculations in classical and quantum physics supported the concept that the vector magnetic potential of EEG from highly synchronous firings, e.g., as measured during selective attention, might directly interact with these momentum-waves, thereby creating feedback between these ionic/quantum and macroscopic scales (Ingber, 2012a(Ingber, ,b, 2015(Ingber, , 2016a(Ingber, , 2017aIngber et al., 2014;Nunez et al., 2013).

qPATHINT For SMNI
The present qPATHINT code can be useful to determine how the quantum regenerative process that defines Ca 2+ wave-packets also may produce reasonable shocks to the waves without seriously damaging its coherence properties. A proof of principal of its use has been published (Ingber, 2017a).

PATHINT For Financial Options
In particular, this project has been developed to calculate financial options using PATHINT code, and a code PATHTREE ) based on PATHINT (Ingber, 2000;Ingber and Wilson, 1999).

Quantum Money
Quantum computing is here, and in the near future it will be applied to financial products, e.g., blockchains. It is not very far-fetched to assume that soon there will be financial derivatives developed on these products. Then, as is the case in classical real spaces with PATHTREE and PATHINT, qPATHTREE and qPATHINT are now poised to calculate financial derivatives in quantum complex spaces. This is beyond simply using quantum computation of financial derivatives, since the space of the dependent variables themselves may live in quantum worlds (Aaronson and Christiano, 2012;Accardi and Boukas, 2007;Baaquie et al., 2002;Jogenfors, 2016;Meyer, 2009;Piotrowski et al., 2005).

qPATHINT For Financial Options
The present qPATHINT code can be used to calculate quantum financial options. A proof of principal of its use has been published (Ingber, 2017b).

Generic Applications
There are many systems that are well defined by (a) Fokker-Planck/Chapman-Kolmogorov partialdifferential equations, (b) Langevin coupled stochastic-differential equations, and (c) Lagrangian or Hamiltonian path-integrals. All three such systems of equations are mathematically equivalent, when care is taken to properly take limits of discretized variables in the well-defined induced Riemannian geometry of the system due to nonlinear and time-dependent diffusions (Langouche et al., 1982;Schulman, 1981).

Path-Integral Algorithm
The path integral of a classical system of N variables indexed by i at multiple times indexed by ρ is defined in terms of its Lagrangian L: Here the diagonal diffusion terms are g ii and the drift terms are g i = −∂Φ/∂q i . If the diffusions terms are not constant, then there are additional terms in the drift, and in a Riemannian-curvature potential R/6 for dimension > 1 in the midpoint Stratonovich/Feynman discretization (Langouche et al., 1982). The path-integral approach is particularly useful to precisely define intuitive physical variables from the Lagrangian L in terms of its underlying variables q i : The histogram procedure recognizes that the distribution can be numerically approximated to a high degree of accuracy by sums of rectangles of height P i and width ∆q i at points q i . For convenience just consider a one-dimensional system. In the prepoint Ito discretization, the pathintegral representation can be written in terms of the kernel G, for each of its intermediate integrals, as This yields T ij is a banded matrix representing the Gaussian nature of the short-time probability centered about the (possibly time-dependent) drift. Explicit dependence of L on time t also can be included without complications. Care must be used in developing the mesh ∆q i , which is strongly dependent on diagonal elements of the diffusion matrix, e.g., This constrains the dependence of the covariance of each variable to be a (nonlinear) function of that variable to present a rectangular-ish underlying mesh. Since integration is inherently a smoothing process (Ingber, 1990), fitting the data with integrals over the short-time probability distribution, this permits the use of coarser meshes than the corresponding stochastic differential equation(s). For example, the coarser resolution is appropriate, typically required, for a numerical solution of the time-dependent path integral. By considering the contributions to the first and second moments, conditions on the time and variable meshes can be derived (Wehner and Wolfer, 1983a). For non-zero drift, the time slice may be determined by a scan of ∆t ≤L −1 , whereL is the uniform/static Lagrangian, respecting ranges giving the most important contributions to the probability distribution P . Thus ∆t can be measured by the diffusion divided by the square of the drift.

Direct Kernel Evaluation
Several projects have used this algorithm (Ingber and Nunez, 1995;Ingber et al., 1996;Ingber and Wilson, 1999;Wolfer, 1983a,b, 1987). Special 2-dimensional codes were developed for specific projects in Statistical Mechanics of Combat (SMC), SMNI and SMFM (Ingber, 2000;Ingber et al., 1991;Ingber and Nunez, 1995). The previous 1-dimensional PATHINT code was generalized by the author to be run under N dimensions, simply using 'make D=N' in the GCC Makefile. Then, a quantum generalization was made to the code, changing all variables and functions to complex variables. The generic Ndimensional code was developed for classical and quantum systems, using a small shell script called from a Makefile to set up pre-compile options (Ingber, 2016b(Ingber, , 2017a.

Monte Carlo vs Kernels
Many path-integral numerical applications use Monte Carlo techniques (O'Callaghan and Miller, 2014). This approach includes the author's Adaptive Simulated Annealing (ASA) code using its ASA SAMPLE OPTIONS (Ingber, 1993). This project is concerned with serial (time-sequential) random shocks, not conveniently treated with Monte-Carlo/importance-sampling algorithms.

Scaling Issues
A "contrived" qPATHINT code was developed for quantum options, which serves to illustrate some computational scaling issues, using data and parameters from dimension 1 for all N dimensions.
The volume of the kernel required for computation is measured by [I J] D , where D = dimension, I is the number of elements in the diagonal (or the drift-shifted diagonal in some cases), J is the width of the off-diagonal. Many loops in the code also have D-dependent inner loops. J has been as high as 13, requiring a span of 13+13+1 = 27 elements, needed for some oscillatory systems in previous studies (Ingber, 2017a); in contrast, currently [q]PATHTREE is only a binary tree with J = 1. Note that I scales as sqrt(E), where E = number epochs in [t 0 , T] (the diffusion is proportional to dt 1/2 ). I is determined in each dimension, by dq i that must span [q min , q max ], where Examples for this paper were done with with J = 3, T=1.5, t 0 = 0, q min = 1, q max = 12, I=imxall J=jmxall Prob Mesh Size=ijkcnt=number-nonzero-elements. For larger J and/or larger E, it is possible to decrease E and T, such that fewer meshes can be developed, and qPATHINT would propagate from t 0 to T 1, from T 1 to T 2, ..., from T s-1 to T s=T, with write/read of probabilities/wave-functions developed at each intermediate T [].
Runs were done for 16 Strikes for an American option (Hull, 2000) (each Strike require independent propagation of the distribution), requiring a total of 1364 foldings.
To appreciate requirements of kernel memory as a function of dimension, for the mesh considered in this pilot study, where I=imxall, J=jmxall, and kernel size = ijkcnt. The results to date show that D=3 is reasonable with current systems constraints. D=4 is only possible with very long run times exceeding 47 CPU hours on XSEDE San Diego Supercomputer (SDSC.edu) Comet. D=5,6 are possible, but not one epoch evolution completed within 47 CPU hours on Comet. Comet is a 2.0 Petaflop (PF) Dell integrated compute cluster, with next-generation Intel Haswell processors (with AVX2), interconnected with Mellanox FDR InfiniBand in a hybrid fat-tree topology. Full bisection bandwidth is available at rack level (72 nodes) and there is a 4:1 oversubscription cross-rack. Compute nodes feature 320 GB of SSD storage and 128GB of DRAM per node.
It is possible to run the code saving all elements of the kernel is a large matrix, instead of calculating the Lagrangian and its kernel each evolution. However, this is not useful for timedependent problems as considered here, and the ijkcnt-size of memory required prevents any runs with dimension > 3.  (Schulman, 1981).

SMNI
Previous papers have modeled minicolumns as wires which support neuronal firings, mainly from large neocortical excitatory pyramidal cells in layer V (of I-VI), giving rise to currents which in turn gives rise to electric potentials measured as scalp EEG (Ingber, 2011(Ingber, , 2012aNunez et al., 2013). This gives rise to a magnetic vector potential which has a log-insensitive dependence on distance. In the brain, µ ≈ µ 0 , where µ 0 is the magnetic permeability in vacuum = 4π10 −7 H/m (Henry/meter), where Henry has units of kg-m-C −2 , the conversion factor from electrical to mechanical variables. For oscillatory waves, the magnetic field B = ∇ × A and the electric field E = (ic/ω)∇ × ∇ × A do not have this log dependence on distance. Thus, A fields can contribute collectively over large regions of neocortex (Ingber, 2012a(Ingber, ,b, 2015(Ingber, , 2016a(Ingber, , 2017aIngber et al., 2014;Nunez et al., 2013). The magnitude of the current is taken from experimental data on dipole moments Q = |I|z whereẑ is the direction of the current I with the dipole spread over z. Q ranges from 1 pA-m = 10 −12 A-m for a pyramidal neuron (Murakami and Okada, 2006), to 10 −9 A-m for larger neocortical mass (Nunez and Srinivasan, 2006). These currents give rise to qA ≈ 10 −28 kg-m/s. The velocity of a Ca 2+ wave can be ≈20-50 µm/s. In neocortex, a typical Ca 2+ wave of 1000 ions, with total mass m = 6.655 × 10 −23 kg times a speed of ≈20-50 µm/s, gives p ≈ 10 −27 kg-m/s. Without random shocks, the wave function ψ e representing the interaction of the EEG magnetic vector potential A with the momenta p of Ca 2+ wave packets was derived to be (Ingber, 2017a) where ψ 0 is the initial Gaussian packet, ψ F is the free-wave evolution operator,h is the Planck constant, q is the electronic charge of Ca 2+ ions, m is the mass of a wave-packet of 1000 Ca 2+ ions, ∆r 2 is the spatial variance of the wave-packet, the initial canonical momentum is Π 0 = p 0 + qA 0 , and the evolving canonical momentum is Π = p + qA. Detailed classical and quantum calculations have shown that p of the Ca 2+ wave packet and qA of the large-scale EEG field make about equal contributions to Π. This calculation is for any time t, so the path integral was folded over many times numerically to give agreement with this results for long times (Ingber, 2017a). Then, the path integral was calculated with random shocks to find a reasonable threshold that still possessed the character of the original wave function.
All this was done for a one-dimensional system. EEG is produced primarily by highly synchronous firings of pyramidal neurons, also the source of A fields, relatively orthogonal to the 6 layers of neocortex. A realistic calculation would require a 3-dimensional calculation over sets of input parameters. After this, contact with real EEG must be made to see if better fits are obtained including this more realistic modeling of Ca 2+ -wave interaction with EEG than in previous XSEDE studies (Ingber, 2016a(Ingber, , 2017aIngber et al., 2014). This will require coupling models of ψ with the current SMNI model as discussed in the next section.

Assumptions for quantum SMNI
There are assumptions made for this quantum enhancement of SMNI that can only be determined by future experiments.
Of course, the Zeno/"bang-bang" effect may exist only in special contexts, since decoherence among particles is known to be very fast, e.g., faster than phase-damping of macroscopic classical particles colliding with quantum particles (Preskill, 2015). Here, the constant collisions of Ca 2+ ions as they enter and leave the Ca 2+ wave packet due to the regenerative process that maintains the wave, may perpetuate at least part of the wave, permitting the Zeno/"bang-bang" effect. In any case, qPATHINT as used here provides an opportunity to explore the coherence stability of the wave due to serial shocks of this process.

Free Will
In addition to the intrinsic interest of researching STM and multiple scales of neocortical interactions via EEG data, there is interest in researching possible quantum influences on highly synchronous neuronal firings relevant to STM to understand possible connections to consciousness and "Free Will" (FW). As pointed out in some recent papers (Ingber, 2016a,b), if neuroscience ever establishes experimental feedback from quantum-level processes of tripartite synaptic interactions with large-scale synchronous neuronal firings, that are now recognized as being highly correlated with STM and states of attention, then FW may yet be established using the quantum no-clone "Free Will Theorem" (FWT) Kochen, 2006, 2009). Attentional processes are considered to be an integral part of consciousness (Dehaene et al., 2017).
Basically, this means that a Ca 2+ quantum wave-packet may generate a state proven to have not previously existed; quantum states cannot be cloned. In the context of the basic premise of this paper, this state may be influential in a large-scale pattern of synchronous neuronal firings, thereby rendering this pattern as a truly new pattern not having previously existed. The FWT shows that this pattern, considered as a measurement of the Ca 2+ quantum wave-packet, is correctly identified as itself being a new decision not solely based on previous decisions, even under reasonably stochastic experimental and real-life conditions.
Clearly, even in the above context, for most people most of the time, internal and external events affecting neural probabilistic patterns of attention (Pouget et al., 2013) give rise to quite practical reasonable FW. However, there also may be some Science that establishes a truly precise FW.

SMNI Context
A short description of the SMNI structure is required to understand how the qPATHINT development is used in this multiple-scale model (Ingber, 2016a). After a statistical-mechanical aggregation of synaptic, neuronal and columnar scales (Ingber, 1982(Ingber, , 1983, the SMNI Lagrangian L in the prepoint (Ito) representation is where G = {E, I} for chemically independent excitatory and inhibitory synaptic interactions. All values of parameters were taken within ranges of experimental data: N G = {N E = 160, N I = 60} was chosen for visual neocortex, {N E = 80, N I = 30} was chosen for all other neocortical regions, M G and N G in F G are afferent macrocolumnar firings scaled to efferent minicolumnar firings by N/N * ≈ 10 −3 , and N * is the number of neurons in a macrocolumn, about 10 5 . V includes nearest-neighbor mesocolumnar interactions (Ingber, 1982(Ingber, , 1983. τ is usually considered to be on the order of 5-10 ms. The threshold factor F G is derived as where A G G is the columnar-averaged direct synaptic efficacy, B G G is the columnar-averaged backgroundnoise contribution to synaptic efficacy. A G G and B G G have been scaled by N * /N ≈ 10 3 keeping F G invariant. Other values are consistent with experimental data, e.g., V G = 10 mV, v G G = 0.1 mV, φ G G = 0.03 1/2 mV. The " ‡ " parameters arise from regional interactions across many macrocolumns. Three basic models were developed with slight adjustments of the parameters (Ingber, 1984a), changing the firing component of the columnar-averaged efficacies A G G within experimental ranges, which modify F G threshold factors to yield (a) case EC, dominant excitation subsequent firings in the conditional probability, or (b) case IC, inhibitory subsequent firings, or (c) case BC, balanced between EC and IC. A Centering Mechanism (CM) on case BC yields case BC wherein the numerator of F G only has terms proportional to M E , M I and M ‡E , i.e., zeroing other constant terms by resetting the background parameters B G G , still within experimental ranges. This has the net effect of bringing in a maximum number of minima into the physical firing M G -space. The minima of the numerator then defines a major parabolic trough, about which other SMNI nonlinearities bring in multiple minima calculated to be consistent with STM phenomena. Here, A dynamic CM (DCM) model is used (Ingber, 2016a), wherein the B G G are reset every few epochs of τ , parameterized to include contributions from tripartite neuron-astrocyteneuron contributions. PATHINT also has been successfully used with the SMNI Lagrangian L to calculate properties of STM for both auditory and visual memory (Ericsson and Chase, 1982;Zhang and Simon, 1985) calculating the stability and duration of STM, the observed 7 ± 2 capacity rule of auditory memory and the observed 4 ± 2 capacity rule of visual memory (Ingber, 2000;Ingber and Nunez, 1995).

SMFM
Options models describe the market value of an option, V as where S is the asset price, and σ is the standard deviation, or volatility of S, and r is the short-term interest rate. The basic Black-Scholes (BS) options model (Black and Scholes, 1973) considers a portfolio Π in terms of ∆, in a market with Gaussian-Markovian ("white") noise X and drift µ, where V (S, t) inherits a random process from S, This yields Financial options are generally described and traded using "Greeks": The portfolio to be hedged is often considered to be "risk-neutral," if ∆ is chosen such that The expected risk-neutral return of Π is where S is the asset price, and σ is the standard deviation, or volatility of S, and r is the short-term interest rate. For example, the basic equation can apply to many models of interpretations of prices given to V , e.g., puts or calls, and to S, e.g., stocks or futures, dividends, etc. Path-integral algorithms are very useful for the calculation of the evolving probability distribution defined by this stochastic system, especially for realistic non-Black-Scholes financial options requiring time-dependent nonlinear drifts and diffusions, e.g., as developed by the author (Ingber, 2000;Ingber and Wilson, 1999). In particular, American options (with possible early exercise), the most popular options and calculated here, have no closed solutions and must be done numerically. Other authors also have applied classical path-integral techniques to options (Balaji, 2013).
Dividends and stress-testing for possible future events require including "shocks" to the system. A 1-dimensional calculation of quantum options using qPATHINT with shocks was published (Ingber, 2017b). Future studies including volatility of volatility (Ingber, 2000) are required to better understand quantum financial options.

Blockchains
As in SMNI, here too the core of the quantum no-clone "Free Will Theorem" (FWT) theorem can have important applications. Quantum currency cannot be cloned. Such currencies are exceptional candidates for very efficient blockchains, e.g., since each "coin" has a unique identity (Aaronson and Christiano, 2012;Jogenfors, 2016;Meyer, 2009). As in SMNI, here too there are issues about the decoherence time of such "coins".

Applications of qPATHINT for SMNI and SMFM
While these two systems, SMNI and SMFM, are quite different, the use of qPATHINT is envisioned to be quite similar.

SMFM
For SMFM, the use of qPATHINT for quantum options is similar to the use of PATHINT for classical options. For PATHINT, the probability distribution of the underlying (e.g., "price") is propagated from its initial state, numerically growing into a tree of probability nodes. Then, starting backward from the final time at the maturity date of the option, at each node a calculation is performed, e.g., for American options comparing the strike price to the price at that node, and a decision is made, e.g., whether to exercise the option at that node, etc. Other calculations also can be made at each node or time slices of nodes, e.g., of Greeks that might enter decisions that can be applied to classical events, inclusion of dividends, changes of interest rates, etc. For qPATHINT, the evolving distribution might itself represent monetary value, a link in a quantum blockchain, a "wave-function" itself whose associated probability (complex square) is the entity being traded, etc. For quantum options, the nature of the evolving distribution likely would be determined by the market. Experience with the pilot SMNI test demonstrates the need for wide kernel bands for oscillatory systems.
For classical PATHINT, previous publications have shown how real-life strike data is successfully fit/predicted for use in trading financial options (Ingber, 2000;Ingber and Wilson, 1999). Similarly, qPATHINT can be tested when quantum strikes or other traded entities become available.

SMNI
For SMNI, the use of qPATHINT is envisioned to be similar to its use for SMFM. The wave function ψ is propagated for its initial state, numerically growing into a tree of wave-function nodes. At each node, going forward instead of back in time as for SMFM, interaction of the of Ca 2+ wavepacket, via its momentum p, with highly synchronous EEG, via its collective magnetic vector potential A, is calculated to determine changes due to time-dependent phenomena. Such changes occur at microscopic scales, e.g., due to modifications of the regenerative wave-packet as ions leave and contribute to the wave packet, thereby determining the effect on tripartite contributions to neuron-astrocyte-neuron synaptic activity, affecting both p and A. Such changes also may occur at macroscopic scales, e.g., changes due to external and internal stimuli affecting synchronous firings and thereby A. At every time slice, quantum effects on synaptic interactions are determined by expected values of the interactions over probabilities (ψ * ψ) determined by the wave-functions at their nodes.
Previous publications have shown how real-life EEG data, under experimental paradigms measuring attentional states with varying conditions ranging from studies of alcoholism to different stimuli presented to subjects, can be used to fit the SMNI description of multiple scales of neocortical activity, e.g., including synaptic variables and parameters, collective columnar firings within large regions of neocortex, etc. Recent papers have included models of Ca 2+ -waves modifying parameterization of background SMNI synaptic parameters. Data was fit to this model using the author's Adaptive Simulated Annealing code (Ingber, 1993(Ingber, , 2012c. These projects demonstrated that fits with this inclusion were better than fits without. Using qPATHINT, quantum scales of interaction can now be included. Again, a reasonable measure of the influence of these scales will be to fit real EEG data under other published experimental paradigms. This will be accomplished using the above calculation of ψ(t) with realistic serial shocks, calculating updates to p(t) and A(t) at each time slice t corresponding to the EEG data for both training and testing sets of data. While PATHINT could synchronously also be evolved using the SMNI Lagrangian, i.e., considering a joint quantum-classical probability distribution, it likely is convenient and accurate to use the short-term SMNI Lagrangian as in previous studies to fit EEG and at each epoch; note that the columnar neocortical system propagates slower than the faster Ca 2+ wave-packet system. This permits a robust inclusion of quantum-scale interactions into the SMNI multiple-scale framework.
An additional burden of reality is of course placed on the specific (p+qA) interaction developed since 2012, between p of Ca 2+ wave packets and qA from EEG fields. However, the methodology developed here still will be useful for other interactions that might be relevant to include these expanded multiple scales of neocortical interactions.

Conclusion
A summary of a kernel numerical path-integral methodology is presented, with emphasis on two different systems, in neuroscience and financial markets. Both SMNI and SMFM are generalized by including quantum variables using qPATHINT. The SMFM method of calculation of financial options used at each time slice is now adopted for SMNI. SMFM will require similar large kernel bands for oscillatory states.
In financial markets, the SMFM model has demonstrated it is faithful to experimental data, e.g., financial options traded in real financial markets, using the classical PATHINT algorithm. qPATHINT now permits calculation of quantum options with serial shocks on quantum money, by evolving the quantum distribution of a quantum price variable, and calculating early exercise by calculating comparisons or price with strikes at each node at each time slice t, marching back in time from the option maturity date.
In neuroscience, the SMNI model has demonstrated it is faithful to experimental data, e.g., STM and EEG recordings under STM experimental paradigms. qPATHINT now permits a new inclusion of quantum scales in the multiple-scale SMNI model, by evolving Ca 2+ wave-packets with momentum p, with serial shocks, interacting with the magnetic vector potential A derived from EEG data, via a (p + qA) interaction, calculated at each node at each time slice t, marching forward in time lock-step with experimental EEG data. This presents a time-dependent propagation of interacting quantum and classical scales.
Published pilot studies give a rationale for further developing this particular quantum pathintegral algorithm based on folding kernels, as this can be used to study serial random shocks that occur in many real systems. Furthermore, this quantum version can be used for many quantum systems, which are becoming increasingly important as experimental data is increasing at a rapid pace for many quantum systems.
The SMNI neuroscience project will be enhanced using a new algorithm, offering more realistic studies of potential quantum interactions calculated in 3 dimensions.