Web Simulation 

 

 

 

 

1D Time-Dependent Schrödinger Equation Simulation 

This note provides an interactive, visual simulation of the 1D Time-Dependent Schrödinger Equation using the Visscher (Leapfrog) algorithm. The simulation allows you to observe quantum wave mechanics, including wave packet dispersion, quantum tunneling, and wave interference with potential barriers.

The Schrödinger equation is solved using the Visscher algorithm, which splits the complex wavefunction into real and imaginary parts for numerical stability. The simulation discretizes space into 500 points with spacing dx = 0.1, and uses a time step dt = 0.005 to maintain numerical stability. The algorithm preserves unitarity (probability conservation) by using a staggered time-stepping scheme.

You can interact with the simulation by drawing potential barriers (regions of high potential energy) on the canvas. The simulation starts with a Gaussian wave packet moving to the right, representing a quantum particle with a well-defined position and momentum. As the wave evolves, you can observe quantum phenomena such as dispersion (wave packet spreading), reflection and transmission at barriers, and quantum tunneling (particles passing through barriers even when their energy is less than the barrier height).

The simulation visualizes the probability density (|ψ|², shown as a cyan curve), the real part of the wavefunction (shown as a magenta line), and the imaginary part (shown as a green line). The probability density shows where the particle is likely to be found, while the real and imaginary parts reveal the underlying wave structure with oscillations and phase information. A 3D plot below shows the complex wavefunction as a cyan helix, with magenta, green, and yellow lines showing the real part, imaginary part, and amplitude projections. You can adjust the Y Scale to zoom in on small amplitudes and the Speed to observe the evolution at different rates.

NOTE : The simulation uses atomic units (ℏ = 1, m = 1) for simplicity. The wave packet speed is controlled by the initial momentum parameter k₀, not by a wave speed 'c' (which appears in the classical wave equation, not the Schrödinger equation). The simulation uses absorbing boundary conditions to minimize reflections at the domain edges.

Math behind the Simulation

The 1D Time-Dependent Schrödinger Equation describes the evolution of a quantum wavefunction:

iℏ ∂ψ/∂t = Ĥψ = (-ℏ²/2m · ∂²/∂x² + V(x)) ψ

where ψ(x,t) is the complex wavefunction, V(x) is the potential energy, is Planck's constant, and m is the particle mass. In atomic units (ℏ = 1, m = 1), this simplifies to:

i ∂ψ/∂t = (-½ · ∂²/∂x² + V(x)) ψ

The Visscher algorithm splits the wavefunction into real and imaginary parts: ψ = R + iI. The time evolution is computed using a staggered (leapfrog) scheme:

R[n+½] = R[n] + dt · (-½∇²I[n] + V·I[n])
I[n+1] = I[n] - dt · (-½∇²R[n+½] + V·R[n+½])

where the Laplacian ∇² is computed using finite differences: ∇²u[i] = (u[i+1] - 2u[i] + u[i-1])/dx². The initial wave packet is a Gaussian: ψ(x) = exp(-0.5((x-x₀)/σ)²) · exp(ik₀x), where x₀ is the initial position, σ is the width, and k₀ is the initial momentum (wave number).

 

Usage Example

Follow these steps to explore quantum wave mechanics and tunneling:

  1. Initial State: When you first load the simulation, a Gaussian wave packet appears on the left side of the canvas, moving to the right. This represents a quantum particle with a well-defined position and momentum. Click the "Play" button to start the simulation.
  2. Observe Quantum Dispersion: Watch the wave packet as it moves. Even without any barriers, you'll notice that the packet slowly spreads out and becomes wider over time. This is quantum dispersion - a fundamental quantum mechanical property where wave packets naturally broaden. The particle's position becomes less certain as time passes.
  3. Try the Tunneling Preset: Click the "Preset: Tunneling" button. This sets up a thin, high potential barrier in the middle of the domain and resets the wave packet. Watch what happens when the wave packet hits the barrier:
    • Most of the wave reflects back (the main peak bounces)
    • Look closely: A small portion of the wave appears on the other side of the barrier and continues moving - this is quantum tunneling!
    • The probability density (cyan curve) shows where the particle is likely to be found
    • The magenta line shows the real part of the wavefunction, revealing the underlying wave structure
    • The green line shows the imaginary part of the wavefunction, completing the complex picture
  4. Draw Your Own Barriers: Click and drag on the canvas to draw potential barriers (gray rectangles). These represent regions of high potential energy. Try creating different barrier configurations:
    • A single thick barrier to observe strong reflection
    • A thin barrier to see more tunneling
    • Two barriers to create a quantum well and observe interference
    • A box (barriers on both sides) to create standing wave patterns
  5. Observe Wave Interference: Create a box by drawing barriers on both sides. The wave will bounce back and forth, interfering with itself. You'll see standing wave patterns emerge - regions where the probability is high (antinodes) and regions where it's zero (nodes). This demonstrates quantum confinement.
  6. Study the Visualization: Pay attention to both visualizations:
    • Cyan curve (Probability Density): Shows |ψ|² = R² + I², representing where the particle is likely to be found. This is what you would measure in an experiment.
    • Magenta line (Real Part): Shows the real part of the wavefunction, revealing the underlying wave structure with oscillations and phase information.
    • Green line (Imaginary Part): Shows the imaginary part of the wavefunction, completing the complex wave picture.
  7. Interpret the 3D Plot: The 3D visualization below shows the wavefunction as a helix in the complex plane:
    • Cyan Helix: The main helix showing (R, I) rotating in the complex plane as it propagates along Z (spatial position). This visualizes the phase evolution of the quantum wave.
    • Magenta Line: Real part (R) projected onto the X-axis.
    • Green Line: Imaginary part (I) projected onto the Y-axis.
    • Yellow Line: Amplitude |ψ| = √(R² + I²) shown along the diagonal (X=Y).
  8. Reset and Experiment: Use "Reset Wave" to fire a new wave packet from the left. Use "Clear Barriers" to remove all potential barriers. Try different combinations:
    • Reset the wave while keeping barriers to see how the same barrier affects multiple packets
    • Clear barriers and observe pure dispersion in free space
    • Create complex barrier configurations and watch how the wave evolves
  9. Compare Classical vs Quantum: In classical mechanics, a particle with energy less than a barrier's height cannot pass through. In quantum mechanics, there's always a probability (however small) of tunneling through. Watch how even high barriers allow some transmission - this is impossible classically but fundamental to quantum mechanics.

Tip: The key quantum phenomena to observe are: (1) Dispersion - wave packets naturally spread out over time, (2) Tunneling - particles can pass through barriers even when their energy is less than the barrier height, and (3) Interference - waves can interfere with themselves, creating standing wave patterns in confined spaces. The probability density (cyan) shows what you'd measure, while the real part (magenta) and imaginary part (green) show the underlying quantum wave structure. The 3D plot provides a unique perspective on the complex wavefunction's phase evolution. Pay close attention when the wave hits a barrier - you'll see both reflection and transmission (tunneling) simultaneously!

Parameters

Followings are short descriptions on each parameters
  • Grid Resolution: The simulation discretizes space into 500 points (N = 500) for numerical computation. The spatial step size is dx = 0.1, giving a total domain length of 50 units. Higher resolution would provide smoother wavefunctions but requires more computation. The time step is dt = 0.05, chosen to maintain numerical stability with the Visscher algorithm.
  • Initial Wave Packet: The simulation starts with a Gaussian wave packet (a localized probability distribution) moving to the right. The packet is centered at x₀ = 10.0 with width σ = 2.0 and initial momentum k₀ = 5.0. This represents a quantum particle with a well-defined position and momentum. The wavefunction is ψ(x) = exp(-0.5((x-x₀)/σ)²) · exp(ik₀x), which is split into real and imaginary parts: R = envelope·cos(k₀x) and I = envelope·sin(k₀x).
  • Potential Energy V(x): The potential energy array V(x) is initially zero everywhere (free space). You can draw potential barriers by clicking and dragging on the canvas. Barriers are represented as regions where V(x) = 10.0 (high potential). These act as obstacles that the quantum wave encounters. The potential energy affects the wave evolution through the Hamiltonian operator in the Schrödinger equation.
  • Time Step (dt): The time step is fixed at dt = 0.05 in atomic units. This value is chosen to maintain numerical stability with the Visscher algorithm. Smaller time steps would be more accurate but slower, while larger time steps could cause numerical instability. The simulation runs multiple steps (5 steps) per animation frame to accelerate the evolution.
  • Spatial Step (dx): The spatial step is fixed at dx = 0.1. This determines the resolution of the spatial discretization. The Laplacian operator is approximated using finite differences: ∇²ψ[i] ≈ (ψ[i+1] - 2ψ[i] + ψ[i-1])/dx². Smaller dx would provide higher resolution but requires more computation.
  • Atomic Units: The simulation uses atomic units where ℏ = 1 (reduced Planck constant) and m = 1 (particle mass). This simplifies the Schrödinger equation to i∂ψ/∂t = (-½∇² + V)ψ. All energies, times, and lengths are in atomic units, making the simulation dimensionless and easier to interpret.

Buttons and Controls

Followings are short descriptions on each control
  • Play/Pause: Starts or pauses the Schrödinger equation simulation. When you click Play, the wave packet begins evolving according to the time-dependent Schrödinger equation. The button text changes to "Pause" during simulation, allowing you to pause and resume at any time. You can draw barriers and interact with the simulation even while it's running.
  • Reset Wave: Clears the current wavefunction and initializes a new Gaussian wave packet from the left side. The wave packet starts fresh with the same initial conditions (position, width, momentum). Potential barriers remain unchanged, so you can observe how the same barrier affects multiple wave packets.
  • Clear Barriers: Resets the potential energy V(x) to zero everywhere, removing all barriers. This returns the simulation to free space, where you can observe pure quantum dispersion without any obstacles. The wave packet continues evolving if the simulation is playing.
  • Preset: Tunneling: Automatically sets up a demonstration of quantum tunneling. This creates a thin, high potential barrier (V = 10.0) in the middle of the domain and resets the wave packet. When you click Play, watch the wave packet hit the barrier - most of it reflects, but a small portion tunnels through to the other side, demonstrating one of the most striking quantum phenomena.

Interaction and Visualization

  • Drawing Barriers: Click and drag on the canvas to draw potential barriers. The mouse position is converted to grid coordinates, and potential energy V(x) is set to 10.0 at the cursor location and nearby points (radius ~5 grid cells). Barriers are visualized as gray rectangles in the background. You can draw barriers at any time, even while the simulation is running. Drawing multiple barriers creates complex potential landscapes.
  • Color Code for 2D Plot: The 2D canvas visualization uses the following color scheme:
    • Cyan Curve (Probability Density |ψ|²): A thick, glowing cyan curve showing |ψ|² = R² + I². This represents the probability of finding the particle at each position - what you would measure in an experiment. The area under this curve is filled with a semi-transparent cyan to show the probability distribution. The curve has a glowing effect (shadow blur) to make it stand out.
    • Magenta Line (Real Part Re[ψ]): A thin magenta line showing the real part R(x) of the wavefunction. This reveals the underlying wave structure with oscillations and phase information. The real part is scaled down (50%) for visibility alongside the probability density.
    • Green Line (Imaginary Part Im[ψ]): A thin green line showing the imaginary part I(x) of the wavefunction. This completes the complex wave picture, showing the phase evolution of the quantum wave.
    • Gray Rectangles (Potential Barriers): Gray rectangles show regions of high potential energy V(x) > 0. The height of the rectangle indicates the barrier strength. These represent obstacles that the quantum wave encounters.
    • Dark Gray Center Line: A faint horizontal dashed line in dark gray marks the center (y = 0) for reference.
  • Color Code for 3D Plot: The 3D visualization below the 2D plot shows the complex wavefunction as a helix in 3D space with the following color scheme:
    • Cyan Helix (Complex Wavefunction): The main cyan helix visualizes the complex wavefunction (R, I) as it propagates along the Z-axis (spatial position). The helix rotates in the complex plane (X=Re[ψ], Y=Im[ψ]) showing the phase evolution of the quantum wave. This is the most prominent visualization, showing how the wavefunction evolves in both space and phase.
    • Magenta Line (Real Part Projection): A magenta line projected along the X-axis shows the real part R(x) of the wavefunction. This helps visualize the real component separately from the complex helix.
    • Green Line (Imaginary Part Projection): A green line projected along the Y-axis shows the imaginary part I(x) of the wavefunction. Together with the magenta line, this completes the complex plane visualization.
    • Yellow Line (Amplitude |ψ|): A yellow line along the diagonal (X=Y) shows the amplitude |ψ| = √(R² + I²) of the wavefunction. This represents the magnitude of the complex wavefunction, which is related to the probability density.

    3D Plot Axes: The 3D plot uses the following coordinate system:

    • X-axis: Real part of wavefunction (Re[ψ])
    • Y-axis: Imaginary part of wavefunction (Im[ψ])
    • Z-axis: Spatial position (propagation direction)
    The 3D plot provides a unique perspective on the complex wavefunction's phase evolution, showing how the wave rotates in the complex plane as it propagates through space. You can rotate the 3D view by clicking and dragging, zoom with the mouse wheel, or use the camera preset buttons in the bottom-right corner of the 3D plot.

  • Real-time Updates: During simulation, the wavefunction updates in real-time using requestAnimationFrame for smooth animation. The Visscher algorithm runs 5 steps per frame to accelerate the evolution while maintaining numerical stability. The visualization updates continuously, showing both the probability density and the real part of the wavefunction.
  • Quantum Evolution: The wavefunction evolves according to the time-dependent Schrödinger equation using the Visscher (Leapfrog) algorithm. This algorithm maintains unitarity (conserves probability) by updating the real and imaginary parts in a staggered fashion. The algorithm is energy-conserving and stable, making it ideal for long-time quantum simulations.
  • Quantum Phenomena: The simulation demonstrates several key quantum mechanical effects:
    • Dispersion: Wave packets naturally spread out over time, even in free space. This is a fundamental quantum property - the more localized a particle is, the faster it spreads.
    • Tunneling: Particles can pass through potential barriers even when their energy is less than the barrier height. This is impossible classically but fundamental to quantum mechanics.
    • Interference: Waves can interfere with themselves, creating standing wave patterns in confined spaces (quantum wells). This leads to discrete energy levels and quantization.
    • Reflection and Transmission: When a wave encounters a barrier, part of it reflects and part transmits (tunnels). The relative amounts depend on the barrier height and width.
  • Probability Conservation: The Visscher algorithm maintains unitarity, meaning the total probability ∫|ψ|²dx remains constant (normalized to 1). This ensures that the particle is always somewhere in the domain, and probability is neither created nor destroyed - a fundamental requirement of quantum mechanics.