Back to Projects

Quantum Decoherence Visualization

A comprehensive Python package for simulating and visualizing quantum decoherence effects on tunneling and interference phenomena using Lindblad master equation and quantum trajectories

Table of Contents

Introduction

Quantum decoherence is a fundamental process in open quantum systems where quantum coherence is lost due to interaction with the environment. This simulation package provides tools to study decoherence effects on quantum tunneling and interference, using state-of-the-art numerical methods including the Lindblad master equation and quantum trajectories.

The simulation allows researchers and students to visualize how environmental interactions destroy quantum superpositions, leading from quantum to classical behavior. This is crucial for understanding quantum measurement, quantum computing, and the quantum-to-classical transition.

This package implements multiple decoherence models, supports various potential types, and provides real-time visualization through an interactive GUI, making it suitable for both research and educational purposes.

Features

Multiple Decoherence Models

Lindblad master equation, quantum trajectories, and stochastic unravelling methods

Flexible Potential Systems

Square barriers, double wells, Coulomb, Woods-Saxon, harmonic oscillator

Interactive GUI

Real-time parameter adjustment with live visualization of density matrices

Advanced Visualizations

Density matrix heatmaps, Wigner functions, purity/entropy tracking

Validation Tools

Built-in convergence tests and benchmark comparisons

Multiple Observables

Purity, von Neumann entropy, coherence, transmission probability

Physics Models

Lindblad Master Equation

The evolution of the density matrix with dissipative coupling is described by:

dρ/dt = -(i/ℏ)[H,ρ] + Σₖ γₖ(LₖρLₖ† - ½{Lₖ†Lₖ,ρ})

Key operators:

Quantum Trajectories

Monte Carlo wavefunction method for efficient large-scale simulations. Reduces memory cost from O(N²) to O(N) by evolving pure states stochastically rather than the full density matrix.

Supported Potentials

Decoherence Mechanisms

Installation

System Requirements

Installation Steps

  1. Ensure Python 3.8+ is installed
  2. Download the simulation code package
  3. Navigate to the project directory
  4. Install dependencies:
    pip install -r requirements.txt
  5. Verify installation:
    python -c "import numpy, scipy, matplotlib; print('All dependencies installed!')"

Quick Start

Option 1: Interactive GUI (Recommended)

python gui.py

The GUI allows you to:

Option 2: Simple Example

python run_example.py

This will create a Gaussian wavepacket incident on a square barrier, evolve it with dephasing decoherence, and generate plots showing purity, entropy, and coherence evolution.

Option 3: Validation Notebooks

Run scientific validation examples:

cd notebooks
python basic_example.py # Compare unitary vs decoherent evolution
python trajectory_comparison.py # Compare Lindblad vs trajectories
python gamma_sweep.py # Study decoherence effects on tunneling

Interactive GUI Controls

GUI Parameters

GUI Features

Tip: Start with smaller grids (N=100-200) for faster testing, then increase for higher accuracy. Use quantum trajectories for N > 300 to reduce memory usage.

Python API Usage

Basic usage example:

import numpy as np
from hamiltonian import Hamiltonian1D, create_gaussian_wavepacket
from lindblad import LindbladSolver, create_dephasing_operator
from observables import purity, von_neumann_entropy, coherence

# 1. Build system
H = Hamiltonian1D(N=200, x_min=-10, x_max=10,
                      potential_type='square',
                      potential_params={'V0': 1.5, 'width': 2.0})

# 2. Create initial state
psi0 = create_gaussian_wavepacket(H.x, x0=-5.0, sigma=1.0, k0=1.0)
rho0 = np.outer(psi0, psi0.conj())

# 3. Setup decoherence
gamma = 0.1
L = create_dephasing_operator(H.x, strength=1.0)
solver = LindbladSolver(H.get_matrix(), [L], [gamma])

# 4. Evolve
rho_t, t = solver.evolve(rho0, t_final=5.0)

# 5. Analyze
P_t = purity(rho_t) # Purity over time
S = von_neumann_entropy(rho_t[-1]) # Final entropy
C_t = coherence(rho_t) # Coherence over time

print(f"Final purity: {P_t[-1]:.4f}")
print(f"Final entropy: {S:.4f}")

Observables and Metrics

Purity

Definition: P = Tr(ρ²)

Von Neumann Entropy

Definition: S = -Tr(ρ log ρ)

Coherence

Definition: C = Σᵢ≠ⱼ |ρᵢⱼ|

Transmission Probability

Definition: T = ∫ᵦ |ψ(x)|² dx

Measures the tunneling probability through a potential barrier.

Wigner Function

Phase-space quasi-probability distribution providing complete quantum state information.

Example Results

Below is a visualization from the simulation using the animation preset demo parameters, which have been optimized to demonstrate dramatic decoherence effects. This example showcases how quantum coherence is lost over time, transitioning from a pure quantum state to a mixed state.

Demo Preset Parameters:

  • Grid Size: 180 points
  • Total Time: 5.0 (arbitrary units)
  • Time Steps: 150
  • Initial Wavepacket: x₀ = -6.0, σ = 1.2, k₀ = 1.5
  • Dephasing Rate γₓ: 0.6
  • Momentum Diffusion Rate γₚ: 0.2
  • Potential: Square barrier (V₀ = 1.0, width = 2.0)
Quantum Decoherence Visualization - Demo Preset Results

Quantum Decoherence Visualization: Four-panel display showing density matrix evolution, purity/entropy dynamics, probability distribution, and coherence decay over time.

Key Observations

Density Matrix (Top-Left)

The heatmap reveals a prominent diagonal structure with off-diagonal coherence elements. The dark blue peak centered around (x=0, x'=0) shows strong position correlation, while the fading off-diagonal elements indicate loss of coherence as the system evolves.

Purity and Entropy (Top-Right)

The dramatic evolution demonstrates clear decoherence signatures:

Probability Distribution (Bottom-Left)

The multimodal distribution shows multiple probability peaks:

This complex distribution reflects the interplay between quantum tunneling and decoherence, where environmental interactions modify the probability landscape.

Coherence Decay (Bottom-Right)

The exponential-like decay curve (log scale) shows:

Physical Interpretation: This visualization demonstrates the quantum-to-classical transition, where environmental coupling (via dephasing and momentum diffusion) destroys quantum superpositions. The simultaneous decrease in purity and increase in entropy confirm that the system is losing quantum coherence and evolving toward a classically mixed state, as predicted by open quantum systems theory.

Validation

The code includes built-in validation checks:

Numerical Methods

Monitoring: Always monitor purity to ensure it stays ≤ 1 at all times. This serves as a positivity check for the density matrix evolution.

Citation

If you use this software in your research or educational materials, please cite:

BibTeX

@software{uniphi_decoherence_2025,
  author = {UniPhi Collective},
  title = {Quantum Decoherence Visualization: A Python Simulation},
  year = {2025},
  note = {Lindblad master equation and quantum trajectories implementation}
}

References

License

This simulation is released under the MIT License. You are free to use, modify, and distribute it for educational and research purposes. Please maintain attribution to the original authors.