Quantum trajectories and what they eat with

This small note is about how to draw beautiful pictures, well, a little about physics, which is rarely talked about, about Bomov quantum mechanics.







Small introduction



As any science fiction and pseudoscientific nonsense likes to tell us, such as the movie The Secret, the laws of the microworld are very different from the classical ones that we are used to.

In the world of quantum mechanics, the probability given by the wave function rules everything.  psi (those interested in details can look, for example, in the post “Muon catalysis from the point of view of quantum chemistry. Part I: ordinary hydrogen vs. muon hydrogen” ).

The legs of all kinds of funny things, such as Schrödinger cats , Heisenberg's uncertainty principles, and Bell's inequalities, grow out of the probabilistic properties of a quantummech.



But all these pictures with all kinds of electron orbitals did not answer the question “how does an electron fly in space”. To clarify this situation, physicists spent a lot of time, but could not cope with it. But David Bohm (known to many by the Aaronov-Bohm effect ) finally created one of the formalisms of quantum mechanics (name of himself) , in which there are still trajectories along which the quantum particle moves. And, unlike the Feynman path integrals , this path for each particle is exactly one. This property fundamentally allows you to track the movement of particles, and compare the motion of classical and quantum particles, which we will deal with in this article.

not only formalism
Actually, nobody is particularly interested in formalism itself, but from this formalism one can construct one of the interpretations of quantum mechanics, which, due to the seeming simplicity of classical mechanics, is loved by some freaks (not many, because it’s not very easy to enter this business).

We will not discuss this (as well as others) interpretation.





Classical and quantum trajectories



We will consider a rather boring system: one electron in the field of several protons. You can read about this system, as well as classical and quantum mechanics in the first and second parts of the posts “Muon catalysis from the point of view of quantum chemistry”.



The classical problem of particle motion in some potential is given by Newton's second law:





m ddotx=F







where m is the particle mass, x is the coordinate, F is the force acting on the particle, and  ddotx= fracd2xdt2 - the second derivative of the particle’s coordinate in time, or acceleration. If only potential forces act in the system, then the force can be expressed through a new entity, potential energy V as





F= fracdVdx







In our case, an electron in the field of several protons,



where the electron interacts with each of the protons according to Coulomb's law





V(R)=ke2/R





, where k is the coefficient equal to 1 in atomic units, e is the charge of the electron, and R is the distance from the electron to the proton.

In this case, the total potential acting on the electron will be equal to





V= sumn=1NVn(Rn)= sumn=1N fracke2Rn







where the index n numbers the protons (total protons N pieces), and R n is the distance from the electron to the n- th proton.



Numerically solving the diffur, which is Newton’s second law, is a hackneyed task, the main thing is to set the initial position and speed. If the electron flies too fast, it will break out of the attraction of the proton (s) and fly off to infinity, and if there is just a bit of energy, it will forever flutter in the field of one of the nuclei, never visiting the others.

Radiant friction
If we took into account radiant friction , which arises due to the fact that when moving with acceleration, the electron would give part of its energy to the electromagnetic field, emitting it somewhere, then the electron would eventually roll onto the core in some time.



So what happens in the classics, we know.



But what will happen in the Bomov dynamics?

In this case, the particle will also move according to Newton’s second law with potential V=V mathrmC+V mathrmQ where V mathrmC - the classical potential from the usual Newton's law, which in our case has the form given above.

Those. in addition to the classical potential, another entity will act on it: the quantum potential V mathrmQ having (in 1D case) the form





V mathrmQ= frac hbar22mA fracd2Adx2







where A is the amplitude (modulus) of the wave function A=| psi| (  psi=A exp(i varphi) where  varphi - phase of the wave function).

So, to get the equation of motion for a quantum particle, we still need to know something about the wave function.

About hidden options
Bohm's formalism is a theory with hidden parameters. But since the hidden parameter (wave function) is non-local, the calculation results in this formalism still satisfy Bell's aforementioned inequalities.





In the case of one proton, we know (see, for example, here ) the exact expression of the electron wave function in the ground (1s) state [ in atomic units ]:





 psi(R)= exp(R)







About normalization and units
In the formula for the quantum potential, the normalization of the numerator will be reduced with the denominator, so we will not worry about it.

The argument of the exponent, in fact, is not worth R , but R/a0 where a0 Is the Bohr radius (0.529 Å). But, since we use atomic units, where a0=1 , this unit of length we can afford not to write. You can read more about this here .



In the case of several protons, within the framework of the molecular orbitals method as combinations of atomic orbitals ( MO LKAO , see here ), the ground state with a sufficient degree of accuracy will be given by the sum of 1s-orbitals of each of the atoms:





 psi approx sumn=1N psin(Rn)= sumn=1N exp(Rn)







Now, to find out the quantum potential, you just need to use this expression.

Well <s> d </s>
Function  psi as the sum of 1s orbitals is real, therefore A= psi .

Since an electron can move in three dimensions, a one-dimensional derivative is needed Axx= fracd2Adx2 replace with its three-dimensional generalization:  DeltaA=Axx+Ayy+Azz . Operator  Delta can be represented as the square of the operator nabla :  Delta= nabla2 . You can also imagine the distance Rn as Rn= sqrt mathbfRn2 where  mathbfRn Is the radius vector of the electron relative to the nth proton.



Then





 DeltaA= nabla2 psi= sumn=1N nabla2 psin(Rn)







The first derivative is considered easy:





 nabla psin(Rn)= nabla exp(Rn)= exp(Rn) cdot(1) cdot frac12 underbrace sqrt mathbfRn2Rn cdot2 mathbfRn= exp(Rn) cdot frac mathbfRnRn







The second derivative is already somewhat more complicated:





 nabla( nabla exp(Rn))= frac mathbfRnRn nabla exp(Rn) exp(Rn) nabla frac mathbfRnRn= exp(Rn) frac2 exp(Rn)Rn







Where  frac mathbfRnRn nabla exp(Rn)= exp(Rn) cdot underbrace left( frac mathbfRnRn right)21= exp(Rn) and

 exp(Rn) nabla frac mathbfRnRn= exp(Rn) cdot left( frac overbrace nabla mathbfRn3Rn frac2 mathbfRn22Rn3 right)= frac2 exp(Rn)Rn .

The result remains:

 Delta psi= overbrace sumn=1N exp(Rn) psi sumn=1N frac2 exp(Rn)Rn

Dividing everything into  psi=A and multiplying by  frac hbar22m

we get

V mathrmQ= frac hbar22m left(1 sumn=1N frac2 exp(Rn)Rn right)

The unit in the differentiation to obtain power will disappear, so you can safely leave only the second term.



As a result, we can write down our quantum potential as





V mathrmQ approx frac hbar2m sumn=1N frac exp(Rn)Rn







and with this expression we can already drive the Bohm dynamics of an electron in the field of many protons.



Implementation



For all this disgrace, code was written in python, it is available here:

Python code
from math import * import numpy as np cutoff=5.0e-4 Quantum=True def dist(r1,r2): return np.dot((r1-r2), (r1-r2)) def Vc(r, r0): if dist(r, r0)>=cutoff: return -1.0/dist(r, r0) else: return -1.0/cutoff rH=[] #h1 #rH.append(np.array([ 0.0, 0.0, 0.0])) #h2 rH.append(np.array([-1.0, 0.0, 0.0])) rH.append(np.array([+1.0, 0.0, 0.0])) def Vat(r): V=0.0 for rh in rH: V+=Vc(r,rh) return V def PsiA(r): psi=0.0 for rh in rH: if dist(r, rh)<1.0e3: psi+=np.exp(-dist(r, rh)) return psi def Vq(r): vq=0.0 for rh in rH: if dist(r, rh)>=cutoff: vq-=2.0*np.exp(-dist(r, rh))/dist(r, rh) else: vq-=2.0*np.exp(-cutoff)/cutoff vq*=(-0.5) # -0.5*hbar**2/me return vq def GradF(F, r): grad=np.zeros(3) dx=0.1 for i in range(0,3): dr=np.zeros(3) dr[i]=dx #print(dr) #print(F(r+dr)-F(r-dr)) grad[i]+=(F(r+dr)-F(r-dr))/(2.*dx) return grad dt=0.001 tmax=2.0e1 DR=1.0 dx=0.001 MaxR=10.0 t=0.0 cent=np.zeros(3) Ntrj=30 m=1.0 def GenRvBox(DX): return np.random.uniform(-DX,+DX,3) def GenRvSph(DX): r=np.random.uniform(0.0,DX) phi=np.random.uniform(0.0,2.0*np.pi) theta=np.random.uniform(0.0,np.pi) x=r*np.sin(theta)*np.cos(phi) y=r*np.sin(theta)*np.sin(phi) z=r*np.cos(theta) return np.array([x,y,z]) for ntrj in range(0,Ntrj): if Quantum: outf=open("bmd_%05i" % (ntrj) + ".trj", "w") else: outf=open("cmd_%05i" % (ntrj) + ".trj", "w") nat=np.random.randint(0,len(rH)) r=rH[nat]+GenRvSph(DR) rprev=r+GenRvBox(dx) outf.write("%15.10f %15.10f %15.10f\n" % tuple(r)) t=0.0 while t<=tmax and dist(r,cent)<=MaxR: F= -GradF(Vat, r) if Quantum: F-= GradF(Vq, r) rnew= 2.*r - rprev + (F/m)*dt**2 rprev=r r=rnew outf.write("%15.10f %15.10f %15.10f\n" % tuple(r)) t+=dt outf.close() exit()
      
      







We will only discuss a few points.

Newton’s second law is integrated using the Verlet algorithm :





x(t+ Deltat)=2x(t)x(t Deltat)+ fracF(t)m Deltat2







The initial position is generated by randomly selecting one of the protons, a direction is randomly selected around it (using spherical coordinates). To set the initial speed, you need to set another, previous position. It is selected using another small random vector.



Turning on / off the quantum potential, we switch to quantum / classical modes of motion.



Well, then, you can build beautiful pictures using Gnuplot for the hydrogen atom



and for the molecule H 2 +





As you can see, the classical trajectories (upper, blue) are either very localized, or if the electron is forced to move too quickly, they run away from the nuclei. In the quantum case (lower, pink), the quantum potential allows the electrons to walk significantly farther from the nucleus, and in the case of the H2 + molecule, it allows you to run from one proton to another, which is an indirect visualization of chemical bonds.



A few words about building pictures: to create a neon effect, each path is drawn many times, from thin white to thick black, through the shadows of the color of interest. For the convenience of choosing such a palette, you can, for example, use the site https://www.color-hex.com/

An example script is given below.

Script for Gnuplot
unset key

set xyplane relative 0



unset box



set view map



set size ratio -1



unset border

unset xtics

unset ytics



set terminal pngcairo size 2160,4096 backgr rgb "black"

set output "tmp.png"



yshift=-5.0

maxiC=29

maxiQ=29

splot \

for [i=0:maxiC] sprintf("cmd_%05i.trj", i) wl lw 30.0 lc rgb "#030d19" not,\

for [i=0:maxiC] sprintf("cmd_%05i.trj", i) wl lw 18.0 lc rgb "#071b33" not,\

for [i=0:maxiC] sprintf("cmd_%05i.trj", i) wl lw 17.0 lc rgb "#0a294c" not,\

for [i=0:maxiC] sprintf("cmd_%05i.trj", i) wl lw 16.0 lc rgb "#0e3766" not,\

for [i=0:maxiC] sprintf("cmd_%05i.trj", i) wl lw 15.0 lc rgb "#11457f" not,\

for [i=0:maxiC] sprintf("cmd_%05i.trj", i) wl lw 14.0 lc rgb "#155399" not,\

for [i=0:maxiC] sprintf("cmd_%05i.trj", i) wl lw 13.0 lc rgb "#1861b2" not,\

for [i=0:maxiC] sprintf("cmd_%05i.trj", i) wl lw 12.0 lc rgb "#1c6fcc" not,\

for [i=0:maxiC] sprintf("cmd_%05i.trj", i) wl lw 11.0 lc rgb "#1f7de5" not,\

for [i=0:maxiC] sprintf("cmd_%05i.trj", i) wl lw 10.0 lc rgb "#238bff" not,\

for [i=0:maxiC] sprintf("cmd_%05i.trj", i) wl lw 9.0 lc rgb "#3896ff" not,\

for [i=0:maxiC] sprintf("cmd_%05i.trj", i) wl lw 8. lc rgb "#4ea2ff" not,\

for [i=0:maxiC] sprintf("cmd_%05i.trj", i) wl lw 7. lc rgb "#65adff" not,\

for [i=0:maxiC] sprintf("cmd_%05i.trj", i) wl lw 6. lc rgb "#7bb9ff" not,\

for [i=0:maxiC] sprintf("cmd_%05i.trj", i) wl lw 5. lc rgb "#91c5ff" not,\

for [i=0:maxiC] sprintf("cmd_%05i.trj", i) wl lw 4. lc rgb "#a7d0ff" not,\

for [i=0:maxiC] sprintf("cmd_%05i.trj", i) wl lw 3. lc rgb "#bddcff" not,\

for [i=0:maxiC] sprintf("cmd_%05i.trj", i) wl lw 2. lc rgb "#d3e7ff" not,\

for [i=0:maxiC] sprintf("cmd_%05i.trj", i) wl lw 1. lc rgb "#e9f3ff" not,\

for [i=0:maxiC] sprintf("cmd_%05i.trj", i) wl lw 0.5 lc rgb "#ffffff" not,\

for [i=0:maxiQ] sprintf("bmd_%05i.trj", i) u 1:($2+yshift):3 wl lw 30.0 lc rgb "#190613" not,\

for [i=0:maxiQ] sprintf("bmd_%05i.trj", i) u 1:($2+yshift):3 wl lw 18.0 lc rgb "#330c27" not,\

for [i=0:maxiQ] sprintf("bmd_%05i.trj", i) u 1:($2+yshift):3 wl lw 17.0 lc rgb "#4c123b" not,\

for [i=0:maxiQ] sprintf("bmd_%05i.trj", i) u 1:($2+yshift):3 wl lw 16.0 lc rgb "#66184f" not,\

for [i=0:maxiQ] sprintf("bmd_%05i.trj", i) u 1:($2+yshift):3 wl lw 15.0 lc rgb "#7f1e63" not,\

for [i=0:maxiQ] sprintf("bmd_%05i.trj", i) u 1:($2+yshift):3 wl lw 14.0 lc rgb "#992476" not,\

for [i=0:maxiQ] sprintf("bmd_%05i.trj", i) u 1:($2+yshift):3 wl lw 13.0 lc rgb "#b22a8a" not,\

for [i=0:maxiQ] sprintf("bmd_%05i.trj", i) u 1:($2+yshift):3 wl lw 12.0 lc rgb "#cc309e" not,\

for [i=0:maxiQ] sprintf("bmd_%05i.trj", i) u 1:($2+yshift):3 wl lw 11.0 lc rgb "#e536b2" not,\

for [i=0:maxiQ] sprintf("bmd_%05i.trj", i) u 1:($2+yshift):3 wl lw 10.0 lc rgb "#ff3dc6" not,\

for [i=0:maxiQ] sprintf("bmd_%05i.trj", i) u 1:($2+yshift):3 wl lw 9.0 lc rgb "#ff50cb" not,\

for [i=0:maxiQ] sprintf("bmd_%05i.trj", i) u 1:($2+yshift):3 wl lw 8. lc rgb "#ff63d1" not,\

for [i=0:maxiQ] sprintf("bmd_%05i.trj", i) u 1:($2+yshift):3 wl lw 7. lc rgb "#ff77d7" not,\

for [i=0:maxiQ] sprintf("bmd_%05i.trj", i) u 1:($2+yshift):3 wl lw 6. lc rgb "#ff8adc" not,\

for [i=0:maxiQ] sprintf("bmd_%05i.trj", i) u 1:($2+yshift):3 wl lw 5. lc rgb "#ff9ee2" not,\

for [i=0:maxiQ] sprintf("bmd_%05i.trj", i) u 1:($2+yshift):3 wl lw 4. lc rgb "#ffb1e8" not,\

for [i=0:maxiQ] sprintf("bmd_%05i.trj", i) u 1:($2+yshift):3 wl lw 3. lc rgb "#ffc4ed" not,\

for [i=0:maxiQ] sprintf("bmd_%05i.trj", i) u 1:($2+yshift):3 wl lw 2. lc rgb "#ffd8f3" not,\

for [i=0:maxiQ] sprintf("bmd_%05i.trj", i) u 1:($2+yshift):3 wl lw 1. lc rgb "#ffebf9" not,\

for [i=0:maxiQ] sprintf("bmd_%05i.trj", i) u 1:($2+yshift):3 wl lw 0.5 lc rgb "#ffffff" not











Conclusion



The Bomov trajectories, although difficult to understand and calculate, allow you to draw beautiful pictures that show how much more fun and richer than classical mechanics.



If you have comments, questions, suggestions: write. :)



All Articles