> For the complete documentation index, see [llms.txt](https://servicio-social.gitbook.io/computational-physics/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://servicio-social.gitbook.io/computational-physics/time-dependent-schrodinger-equation/wave-particle-duality.md).

# Wave-particle duality

<figure><img src="/files/wbi7AEWsj4sMNZMgYlZt" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/cOy0wtPuVlBN5NkAPEsI" alt=""><figcaption></figcaption></figure>

<pre><code>Numerical Domain
<strong>(x,y) in [-1.5,1.5]x[-1.5,1.5]
</strong>Nx = Ny = 300
CFL = 0.125
Nt = 4000

Initial conditions
k0 = 12.5 pi
aX = 0.3
aY = 0.3
psi = (2.0d0/pi/aX/aY)**0.5* exp(-((x+0.8)/X)**2 - (y/aY)**2) &#x26;
      * exp(cmplx(0.0d0,k0*x))
      
Single Slit Potential
if (|x|&#x3C;=0.025  and |y|>0.25) then
    V = 6000
else
    V = 0
end if

Double Slit Potential
if (|x|&#x3C;=0.025  and y in [-1.5,0.375)U(-0.225,0.225)U(0.375,1.5] ) then
    V = 6000
else
    V = 0
end if

</code></pre>

<figure><img src="/files/spPOR7uPMihlUufafW8e" alt=""><figcaption></figcaption></figure>

```
Numerical Domain
(x,y) in [-2,2]x[-2,2]
Nx = Ny = 400
CFL = 0.125
Nt = 5000

Initial conditions
k0 = 15 pi
aX = 0.15
aY = 0.15
psi = (2/pi/aX/aY)**0.5 * exp(-((x+0.6)/aX)**2 - ((y+1.2)/aY)**2)
      * exp(cmplx(0,k0*(cos(34*pi/180)*x+y*sin(34*pi/180))))
      
Potential
if (x <= 0) then
    V = 0
else
    V = 750
end if

```

<figure><img src="/files/t0N2fMbLklLYtZngVJze" alt=""><figcaption></figcaption></figure>

```
Numerical Domain
(x,y) in [-1.5,1.5]x[-1.5,1.5]
Nx = Ny = 300
CFL = 0.125
Nt = 6000

Initial conditions
k0 = 10 pi
aX = 0.15
aY = 0.15
psi = (2/pi/aX/aY)**0.5* exp(-((x+0.7)/aX)**2 - (y/aY)**2) 
    * exp(cmplx(0.0d0,k0*x))
      
Potential
V = 500 * exp(-0.5*(x**2+y**2)/(0.3)**2)

```
