Row 5102
Content Data
This page contains data entry 5102 from the Axioma AXP content repository. The structured data below represents the complete record for this entry.
​
Hello :D
​
So I'm working in juptyer lab comp. chem and I need to visualize schrodinger's equation at a specific energy level but I can't fix a mistake in the equation. For some reason, even though the specific resonance changed along with the energy values, the formula isn't changing its input. The output has to be in cylindrical coordinates as well. This is a similar to another equation posted but it didn't have the exact stuff I needed and the solutions for fixing the equation didn't seem to work.
here is the code, thank you in advance!
​
import numpy as np from scipy import sparse import matplotlib.pyplot as plt import scipy.integrate as integrate from matplotlib.animation import FuncAnimation from matplotlib import animation from IPython import display dx = 0.02 a= 15 deltak = 0.2 E=3.48 x0= 2 A=1.0 / (deltak * np.sqrt(np.pi)) # normalization hbar = 1 dt = 0.1 # time interval for snapshots t0 = 0.0 # initial time tf = 1.0 # final time t_eval = np.arange(t0, tf, dt) k = np.sqrt(2 * E) y0=15 x=np.linspace(-15,17,745) A=1.0 / (deltak * np.sqrt(np.pi)) V= 7.5 * x**2 * np.exp(-np.abs(x)) def psi_t2(t,psi): return (-1j * (((-0.5 * D2.dot(psi)) + V * psi))) psi0_ = np.sqrt(A) * np.exp(-(x-y0)**2 / (2.0 * deltak**2)) * np.exp(1j * k * x) sol_ = integrate.solve_ivp(psi_t2, t_span = [t0, tf], y0 = psi0_, t_eval = t_eval,method="RK23") fig=plt.figure() ax=plt.subplot(1,1,1) ax.set_xlim(-15, 20) ax.set_ylim(0, 5) title = ax.set_title('') line1, = ax.plot([], [], "k--") line2, = ax.plot([], []) def init(): line1.set_data(x, V) return line1, def animate(i): line2.set_data(x, np.abs(sol_.y[:,i])**2) title.set_text('Time = {0:1.3f}'.format(sol_.t[i])) return line1, anim = animation.FuncAnimation(fig, animate, init_func=init,frames=len(sol_.t), interval=50, blit=True) video = anim.to_html5_video() html = display.HTML(video) display.display(html) plt.close()
​
| Field | Value |
|---|---|
| text | ​ Hello :D ​ So I'm working in juptyer lab comp. chem and I need to visualize schrodinger's equation at a specific energy level but I can't fix a mistake in the equation. For some reason, even though the specific resonance changed along with the energy values, the formula isn't changing its input. The output has to be in cylindrical coordinates as well. This is a similar to another equation posted but it didn't have the exact stuff I needed and the solutions for fixing the equat… |
| label | r/quantumcomputing |
| dataType | post |
| communityName | r/QuantumComputing |
| datetime | 2024-04-26 |
| username_encoded | Z0FBQUFBQm5LakwySTFIdzRBWWZGendMMXVxcVluVWhVeVdVbmF3a21IWWdoSTdkTTJtV2JMcGZmM2UtdFpNcWJLU1U1anlMdG0xMWN6QTJsd0RVMHZxeVRLNVlIWnhDb3c9PQ== |
| url_encoded | Z0FBQUFBQm5Lak9Gc3I4ajVRS1MyYTFmb1BfdjByd2JiQ2hsXzVESG1Jcm1LNWFIRWhOMHpjQTRudVZ1eno4N0JVcHhCTXNYbERIbE9CN2RpdmZQdWRzT1E3X1B4ekJNMzN4X2QyM09JNkw4VTE0YkcyREhMeHZiczhtR0JTMnZNeDFCQU5HbTc3OVgxQkVJMlBzR3RVMTJ6cjgyNjdXMFdhVEdMWEdBY012YzNSMF9yLU5lX3EwTXllNHQ3eWxKbEpHWWxHWUh4SklOeUl4c2lEaHdiV09MVnlESzdmUnFydz09 |
Raw Record
{
"text": "​\n\nHello :D\n\n​\n\nSo I'm working in juptyer lab comp. chem and I need to visualize schrodinger's equation at a specific energy level but I can't fix a mistake in the equation. For some reason, even though the specific resonance changed along with the energy values, the formula isn't changing its input. The output has to be in cylindrical coordinates as well. This is a similar to another equation posted but it didn't have the exact stuff I needed and the solutions for fixing the equation didn't seem to work.\n\nhere is the code, thank you in advance!\n\n​\n\n import numpy as np\n from scipy import sparse\n import matplotlib.pyplot as plt\n import scipy.integrate as integrate\n from matplotlib.animation import FuncAnimation\n from matplotlib import animation\n from IPython import display\n \n dx = 0.02 \n a= 15\n deltak = 0.2 \n \n E=3.48\n x0= 2\n \n \n A=1.0 / (deltak * np.sqrt(np.pi)) # normalization \n \n hbar = 1 \n \n dt = 0.1 # time interval for snapshots\n t0 = 0.0 # initial time\n tf = 1.0 # final time\n \n t_eval = np.arange(t0, tf, dt)\n k = np.sqrt(2 * E) \n \n y0=15\n x=np.linspace(-15,17,745)\n \n A=1.0 / (deltak * np.sqrt(np.pi)) \n \n V= 7.5 * x**2 * np.exp(-np.abs(x))\n \n def psi_t2(t,psi):\n return (-1j * (((-0.5 * D2.dot(psi)) + V * psi)))\n \n psi0_ = np.sqrt(A) * np.exp(-(x-y0)**2 / (2.0 * deltak**2)) * np.exp(1j * k * x) \n \n sol_ = integrate.solve_ivp(psi_t2, t_span = [t0, tf], y0 = psi0_, t_eval = t_eval,method=\"RK23\")\n \n fig=plt.figure()\n ax=plt.subplot(1,1,1)\n \n ax.set_xlim(-15, 20)\n ax.set_ylim(0, 5)\n title = ax.set_title('')\n \n \n line1, = ax.plot([], [], \"k--\") \n line2, = ax.plot([], [])\n \n def init():\n line1.set_data(x, V)\n return line1,\n \n def animate(i):\n line2.set_data(x, np.abs(sol_.y[:,i])**2)\n title.set_text('Time = {0:1.3f}'.format(sol_.t[i])) \n return line1,\n \n anim = animation.FuncAnimation(fig, animate, init_func=init,frames=len(sol_.t), interval=50, blit=True)\n \n video = anim.to_html5_video()\n html = display.HTML(video)\n display.display(html)\n plt.close()\n\n​",
"label": "r/quantumcomputing",
"dataType": "post",
"communityName": "r/QuantumComputing",
"datetime": "2024-04-26",
"username_encoded": "Z0FBQUFBQm5LakwySTFIdzRBWWZGendMMXVxcVluVWhVeVdVbmF3a21IWWdoSTdkTTJtV2JMcGZmM2UtdFpNcWJLU1U1anlMdG0xMWN6QTJsd0RVMHZxeVRLNVlIWnhDb3c9PQ==",
"url_encoded": "Z0FBQUFBQm5Lak9Gc3I4ajVRS1MyYTFmb1BfdjByd2JiQ2hsXzVESG1Jcm1LNWFIRWhOMHpjQTRudVZ1eno4N0JVcHhCTXNYbERIbE9CN2RpdmZQdWRzT1E3X1B4ekJNMzN4X2QyM09JNkw4VTE0YkcyREhMeHZiczhtR0JTMnZNeDFCQU5HbTc3OVgxQkVJMlBzR3RVMTJ6cjgyNjdXMFdhVEdMWEdBY012YzNSMF9yLU5lX3EwTXllNHQ3eWxKbEpHWWxHWUh4SklOeUl4c2lEaHdiV09MVnlESzdmUnFydz09"
}
Entry Information
- Entry ID: 5102
- Repository: Axioma AXP
- Dataset: arrmlet/reddit_dataset_36
- Total Entries: 100,000