Skip to main content

View on GitHub

Open this notebook in GitHub to run it yourself

Introduction and Learning Objectives

This notebook is a deeply documented, educational resource for simulating the double slit experiment using both classical and quantum computational methods. It is intended for learners, researchers, and practitioners interested in quantum algorithms, numerical physics, and scientific computing.

What You Will Learn

  • The physical and mathematical background of the double slit experiment.
  • How to discretize and encode a wave equation on a 2D grid.
  • How to implement boundary conditions and obstacles (slits) in both classical and quantum settings.
  • The principles of Quantum Signal Processing (QSP) and Quantum Singular Value Transformation (QSVT) for quantum linear algebra.
  • How to visualize complex-valued fields using color and animation.
  • How to compare quantum and classical solutions quantitatively and visually.

Structure of the Notebook

Each section is introduced with a markdown cell that explains the purpose, background, and expected outcomes. Code cells are extensively commented, and mathematical steps are explained in context. You are encouraged to read the markdown, run the code, and experiment with parameters.

Key Concepts

  • Hamiltonian Construction: The Hamiltonian encodes the physics of the double slit experiment, including the Laplacian, boundary conditions, and slit geometry.
  • Classical Solution: Solving the linear system Hψ=sourceH \psi = \text{source} gives the field distribution.
  • Quantum Solution: The same problem is mapped to a quantum circuit, and QSP/QSVT is used to approximate the matrix inverse.
  • Visualization: Both amplitude and phase are visualized using HSV color mapping, and quantum results are animated to show phase evolution.
  • Fidelity: The overlap between quantum and classical solutions is computed to assess quantum algorithm accuracy.

How to Use This Notebook

  1. Read the explanations in each markdown cell.
  2. Run the code cells in order, observing the outputs and visualizations.
  3. Modify parameters (e.g., grid size, frequency, slit configuration) to explore different scenarios.
  4. Compare the results and reflect on the similarities and differences between classical and quantum approaches.
Continue to the next sections for detailed, step-by-step implementation and analysis.
Output:
output output
Output:
output
Output:
output