Posts

Showing posts with the label code

A code for 2D particle motion

Image
The local-realistic model for quantum mechanics that we are presenting in this blog is based on a set of rules for particles' motion and interactions in a discrete spatiotemporal lattice. In a previous post , we have introduced the 3D lattice and how the model rules (earlier described in a 1D space) are generalized to it. It is time to present a Matlab code that implements the multi-dimensional model as a program. We start from the fully trained expected-motion program , where both the lattice and the particles are " trained " and in addition we simulate the expected values of momentum and position, not their actual values (this in order to limit the computing times; for a "realistic" simulation see this code  instead). For the sake of clarity we limit the number of dimensions to two; adding the third is straightforward. The main addition to the code concern the inclusion of polarization (below noted as px, py), as we have seen in the corresponding post. %...

Harmonic oscillator

Image
The local-realistic model of quantum mechanics we are presenting in this blog can adequately describe external force fields . A first example (constant force) has been discussed in the latest post . Among the other possible force fields that particles can experience, a classical textbook example is the Quantum Harmonic Oscillator (QHO), which we shall discuss here. A QHO is defined by an effective "force" f that varies with the position in the lattice, according to the rule   where Ω is a parameter and x is counted from the center of the force field. The expected position under this force is obtained as This result is useful to calculate the probability densities a priori, using the procedure discussed in this post . We turn now our attention to simulation of a few scenarios, which are discussed in the 2017 ArXiV paper . We use a value Ω = 0.005. In the first scenario, particles of the ensemble are emitted from a single source, so that only the external force...

Free fallers

Image
In a recent post , we have discussed how external forces are described alongside with quantum forces in the local-realistic model of quantum mechanics that we defend in this blog. In order to simulate force field scenarios, we use the accelerated code presented in this post  (the one simulating the expected motion) and we modify it as shown below. In this post we discuss a constant force scenario (suggestively denoted here as "the free faller"), characterized by a constant parameter f. %%% Simulate an ensemble of Np particles emitted at intervals Ti  %%% from either of Ns distinct sources xs(1,...,Ns) having %%% probability Ps(1,...,Ns), in the presence of a constant force %%% field f . Evaluate the frequency of arrivals  at a 'screen'  %%% after Nt iterations. %%% %%% Parameters: Np,Ns,Nt,xs,Ps, f . %%% %%% Evaluate the number of possible bosons for this scenario  B = Ns*(Ns-1)/2;  %%% Evaluate the probability of each Quantum Reset ...

A code for trained particles

Image
The local-realistic model for quantum mechanics that we are presenting in this blog has the feature that quantum behavior (superposition) emerges after a large number of reproductions of the same system (e.g., a double-slit preparation). A Matlab code to simulate simple scenarios has been presented in this post , where the lattice is considered as already "trained". In a previous post , we have discussed how particle boson momenta also converge to a steady-state average value. Here below is a further accelerated code that takes advantage of such property and considers particles already "trained" and their momenta already converged. In practice, the whole mechanism of quantum reset is ignored and replaced by the first line in bold. The probabilities of QR are precalculated. Note also that a lag of several iterations has been introduced to avoid numerical oscillations and reproduce somehow the time scale of the training process. %%% Simulate an ensemble of Np p...

A code for trained lattice

Image
In our quest for a local-realistic model for Quantum Mechanics, we have discussed in the last post how the lattice - that mediates locally the interactions between single instances of a same ensemble of particles - is progressively " trained " as subsequent particles are emitted. With the lattice already trained, the Matlab code discussed in this post can be strongly simplified as shown below. %%% Simulate an ensemble of Np particles emitted at intervals Nti  %%% from either of Ns distinct sources xs(1,...,Ns) having  %%% probability Ps(1,...,Ns).  Evaluate the frequency of arrivals at %%% a 'screen' after Nt  iterations. %%% %%% Parameters: Np,Ns,Nt,Nti,xs,Ps. %%% %%% Evaluate the number of possible bosons for this scenario. B = Ns*(Ns-1)/2; %%% Evaluate a priori the probability of each Quantum Reset iB = 0; for i = 1:Ns-1     for j = i+1:Ns         iB = iB+1;         Pb(iB) = 2*Ps(i)*Ps(j); ...

A code for free particle simulation

Image
In this blog I am presenting a local and realistic model that simulates ensembles of similarly-prepared particles evolving on a discrete spacetime, with the aim of retrieving the results of Quantum Mechanics. With the basic rules of motion described in this post  and the source preparation in terms of momentum described  in this post , we can already simulate an ensemble of particles for a very basic scenario. We assume that there are no external forces (including potential barriers), nor " quantum forces " acting. What the latter condition means, will be clarified in future posts. For the moment, it might be regarded as the scenario where there is only one location (one lattice node) possible as the source of the emitted particles. In this scenario, a simple pseudocode implementing the 1D model can be written as follows: %%% Simulate an ensemble of Np particles for i = 1 to Np    %%% Attribute a random source momentum    v0 = rand[-1,1] ...