<jupyter_start><jupyter_text>Vortex Lattices The ground state wavefunction of a BEC in a rotating harmonic trap contains a regular Abrikosov lattice of nodes corresponding to single quantum vortices.<jupyter_code>import sys, os
sys.path.append(os.path.abspath('..'))

import numpy as np
from condensate import Wavefunction, Environment, utils
from copy import copy, deepcopy<jupyter_output><empty_output><jupyter_text>Few vortices<jupyter_code>steps = 2000
omega = 4
Omega = 0.5*omega*np.ones(steps)

e = Environment(DIM=256, fov=0.56e-3, N=5e5)
e.harmonic_potential(omega=omega)
e.rotating_frame(omegaR=Omega)
wf = Wavefunction(e)
wf.initialize_Psi(width=100, vortexnumber=5)
wf.relax(dt=2e-3, steps=steps, vmax=3e7, save_movie='output.mp4')
wf.evolve(steps=0, cooling=0.01)
wf.show_density()
wf.show_phase()<jupyter_output><empty_output><jupyter_text>Many vortices<jupyter_code>steps = 20000
omega = 4
Omega = 0.85*omega*np.ones(steps)

e = Environment(DIM=256, fov=0.76e-3, N=1.5e6)
e.harmonic_potential(omega=omega)
e.rotating_frame(omegaR=Omega)
e.spoon['type']='mouse'
wf = Wavefunction(e)
wf.initialize_Psi(width=100, vortexnumber=10)
wf.relax(dt=2e-3, steps=steps, vmax=1e7, save_movie='output.mp4')<jupyter_output><empty_output><jupyter_text>Note that setting steps=0 lets the wavefunction evolve indefinitely. Press ESC in the condensate window to return to python<jupyter_code>wf.evolve(dt=1e-4, steps=0, vmax=1e7, cooling=0.001)
wf.show_density()
wf.show_phase()<jupyter_output><empty_output><jupyter_text>Detect Vortices<jupyter_code>v = utils.phase_vortex_finder(wf.Psi,
                              blursigma=10,
                              blurthreshold=0.2,
                              debug=True)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.12178387650085763, 'fraction_numerical': 0.0411663807890223, 'mean_word_length': 5.653992395437262, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '5', 'dir': 'jupyter-structured-clean-dedup', 'id': '330758', 'license': 'MIT', 'n_tokens_mistral': 716, 'n_tokens_neox': 642, 'n_words': 117, 'path': 'notebooks/Vortex Lattices.ipynb', 'repo_name': 'Zwierlein/condensate', 'size': '1749'}