Skip to content

Commit 62bbf01

Browse files
committed
update
1 parent 8399730 commit 62bbf01

File tree

2 files changed

+1263
-56
lines changed

2 files changed

+1263
-56
lines changed
Lines changed: 126 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,126 @@
1+
{
2+
"cells": [
3+
{
4+
"cell_type": "code",
5+
"execution_count": null,
6+
"metadata": {},
7+
"outputs": [],
8+
"source": [
9+
"import numpy as np\n",
10+
"import matplotlib.pyplot as plt\n",
11+
"import scipy.linalg, scipy.integrate\n",
12+
"import do\n",
13+
"from IPython.display import display, clear_output\n",
14+
"from quantum_systems import ODQD, GeneralOrbitalSystem\n",
15+
"from matplotlib import animation\n",
16+
"%load_ext autoreload\n",
17+
"%autoreload 2"
18+
]
19+
},
20+
{
21+
"cell_type": "code",
22+
"execution_count": null,
23+
"metadata": {},
24+
"outputs": [],
25+
"source": [
26+
"### PARAMETERS ###\n",
27+
"l = 10 # Number of eigenstates of the HO potential --> we use these functions to generate the single particle WF\n",
28+
"grid_length = 10 # The width of the one-dimensional grid\n",
29+
"num_grid_points = 201 # The number of discretized points on the grid.\n",
30+
"alpha = 1 # The strength of the Coulomb interaction \n",
31+
"a = 0.25 # The shielding parameter in the Coulomb interaction potential\n",
32+
"Omega = 0.25 # The frequency of the harmonic oscillator trap\n",
33+
"omega = 8*Omega # frequency of the laser field\n",
34+
"epsilon0 = 1.0 # amplitude of the laser field\n",
35+
"nparticles = 2"
36+
]
37+
},
38+
{
39+
"cell_type": "code",
40+
"execution_count": null,
41+
"metadata": {},
42+
"outputs": [],
43+
"source": [
44+
"# Create the system and solve the ground state problem and print total energy: GENERAL CALSE\n",
45+
"ghf = do.GHF()\n",
46+
"epsilon, C0, energy_per_step, delta_per_step = ghf.solve_TIHF(tolerance=1e-6, max_iter=100, eval_energy_per_step=False, eval_delta_per_step=False)\n",
47+
"print(ghf.eval_total_energy(C0))"
48+
]
49+
},
50+
{
51+
"cell_type": "code",
52+
"execution_count": null,
53+
"metadata": {},
54+
"outputs": [],
55+
"source": [
56+
"# evaluate plot one-body density overlapped with the curve from the article: GENERAL CASE\n",
57+
"one_body_density = ghf.eval_one_body_density(C0)\n",
58+
"ghf.plot_one_body_density(one_body_density)"
59+
]
60+
},
61+
{
62+
"cell_type": "code",
63+
"execution_count": null,
64+
"metadata": {},
65+
"outputs": [],
66+
"source": [
67+
"# time-evolution of the system with the laser source active\n",
68+
"C, time, overlap, dipole, energy = ghf.solve_TDHF(tstart=0, dt=1e-3, t_max=2*np.pi/ghf.Omega, C0=C0, eval_overlap=False, eval_dipole=False, eval_energy=False, laser_ON=True)"
69+
]
70+
},
71+
{
72+
"cell_type": "code",
73+
"execution_count": null,
74+
"metadata": {},
75+
"outputs": [],
76+
"source": [
77+
"# Fourier analysis and plot of the results\n",
78+
"C2, time, dipole, overlap, xFFT, xfreqFFT, overlapFFT, overlapfreqFFT, energy = ghf.fourier_analysis(tolerance=1e-6, max_iter=100, t_laser_ON=10*np.pi, t_max=100*np.pi, dt=1e-3, eval_energy=False)\n",
79+
"ghf.plot_fourier_analysis(time, dipole, overlap, xFFT, xfreqFFT, overlapFFT, overlapfreqFFT)"
80+
]
81+
},
82+
{
83+
"cell_type": "code",
84+
"execution_count": null,
85+
"metadata": {},
86+
"outputs": [],
87+
"source": [
88+
"# Create the system and solve the ground state problem and print total energy: RESTRICTED CASE\n",
89+
"rhf = do.RHF()\n",
90+
"epsilon, C0, energy_per_step, delta_per_step = rhf.solve_TIHF(tolerance=1e-6, max_iter=100, eval_energy_per_step=False, eval_delta_per_step=False)\n",
91+
"print(rhf.eval_total_energy(C0))"
92+
]
93+
},
94+
{
95+
"cell_type": "code",
96+
"execution_count": null,
97+
"metadata": {},
98+
"outputs": [],
99+
"source": [
100+
"# evaluate plot one-body density overlapped with the curve from the article: RESTRICTED CASE\n",
101+
"one_body_density = rhf.eval_one_body_density(C0)\n",
102+
"rhf.plot_one_body_density(one_body_density)"
103+
]
104+
}
105+
],
106+
"metadata": {
107+
"kernelspec": {
108+
"name": "python385jvsc74a57bd07c50efc9c5e7cd6763e801f6499f1b1d25a18b544a090ecb533edb37b15d92c1",
109+
"display_name": "Python 3.8.5 64-bit ('base': conda)"
110+
},
111+
"language_info": {
112+
"codemirror_mode": {
113+
"name": "ipython",
114+
"version": 3
115+
},
116+
"file_extension": ".py",
117+
"mimetype": "text/x-python",
118+
"name": "python",
119+
"nbconvert_exporter": "python",
120+
"pygments_lexer": "ipython3",
121+
"version": "3.8.5"
122+
}
123+
},
124+
"nbformat": 4,
125+
"nbformat_minor": 4
126+
}

0 commit comments

Comments
 (0)