You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello again, when running the example "1D_interactive_fermions" without potential (setting V=0 for both oscillator and coulomb), if I get the PSI purity it always return 0.5 (maximun entangled), when it must be 1, because if there is no potential particles can't be entagled. No matter the method I use, Crack or Split. If I initilize the psi with my own function(without potential and with kinetic move), it shows purity 1 like it must be. So what's going on?
def MyPsi2P(size, e1, e2, packetwidth, dt, barrierenergy, barrierwidth, initpos):
psi = np.zeros((size,size),dtype=complex)
centerX = math.floor(size*initpos)
centerY = size - centerX
k1 = math.sqrt(2*e1)
k2 = - math.sqrt(2*e2)
pw = pow(packetwidth,2)
for y in range (size):
for x in range (size):
x0=x-centerX
y0=y-centerY
envelope=math.exp(-(x0*x0+y0*y0) /pw)
phasemoveReal=math.cos(k1*x0)*math.cos(k2*y0) - math.sin(k1*x0)*math.sin(k2*y0)
phasemoveImag=math.cos(k1*x0)*math.sin(k2*y0) + math.sin(k1*x0)*math.cos(k2*y0);
psi[y][x] = complex(envelope * phasemoveReal, envelope * phasemoveImag)
`
And her is the function that measures purity, (with psi reshaped to 1D):
```
def shcroduingerpurity(psi):
size=int(len(psi)**0.5)
p=0
#xMaxm1 = size - 1
for xp in range(0,size,1):
for x in range(xp,size,1):
rhore = 0.0
rhoim = 0.0
for y in range(0,size,1):
i1 = x + size*y;
i2 = xp + size*y;
rhore =rhore + psi[i1].real * psi[i2].real + psi[i1].imag * psi[i2].imag
rhoim = rhoim + psi[i1].real * psi[i2].imag - psi[i2].real*psi[i1].imag
if x == xp:
p = p + rhore*rhore + rhoim*rhoim
else:
p = p + 2.*(rhore*rhore + rhoim*rhoim)
return p
```
```
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello again, when running the example "1D_interactive_fermions" without potential (setting V=0 for both oscillator and coulomb), if I get the PSI purity it always return 0.5 (maximun entangled), when it must be 1, because if there is no potential particles can't be entagled. No matter the method I use, Crack or Split. If I initilize the psi with my own function(without potential and with kinetic move), it shows purity 1 like it must be. So what's going on?
Beta Was this translation helpful? Give feedback.
All reactions