Skip to content

Implement QFT Section IV.1 simulation - #1692

Open
Tatgithub02 wants to merge 4 commits into
Classiq:mainfrom
Tatgithub02:implement/qft-section-iv-1
Open

Implement QFT Section IV.1 simulation#1692
Tatgithub02 wants to merge 4 commits into
Classiq:mainfrom
Tatgithub02:implement/qft-section-iv-1

Conversation

@Tatgithub02

Copy link
Copy Markdown

Issue

Closes #580

What This Does

Implements the QFT simulation from Section IV.1 of the paper
Simulating Quantum Field Theories on Gate-Based Quantum Computers
by Gayathree M. Vinod and Anil Shaji.

Reproduces Fig. 2 — the oscillatory dynamics of a fermion transitioning
into a fermion-plus-boson pair in a 1+1D Yukawa theory on a 12-qubit register.

Implementation Details

Physics Setup:

  • 12 qubits: 3 fermionic modes (Jordan–Wigner), 3 antifermion modes (JW), 3 bosonic modes (2 qubits each)
  • Hamiltonian: 2257 Pauli strings
  • Initial state: |f⟩₂ (K=2, Q=1); Tracked state: |f⟩₁⊗|φ⟩₁ (K=2, Q=1)

Simulations:

  1. Exact evolution — SciPy expm_multiply (reference)
  2. Gate-based — Classiq Suzuki–Trotter (order=1, repetitions=10)

Results

Exact evolution reproduces paper Fig. 2:

  • Peak population: 0.2249 (paper reports ~0.225)
  • Period: 0.131 m_π⁻¹
  • P(t=0.2): 0.2238

Closed-form Rabi validation:

  • Max deviation from exact: 4×10⁻¹⁴ (two-level system is exact)

Conservation laws verified:

  • [H, K] = 0 (momentum conserved)
  • [H, Q] = 0 (charge conserved)

Gate-based Trotter simulation:

  • Circuit: 12 qubits, ~54k gates, ~19k CNOTs
  • Matches exact within validated window (t ≤ 0.2)

Files Included

  • qft_simulation.ipynb (46 cells, ~15–20 min runtime)
  • qft_simulation.qmod (~1.2 MB, compiled model)

Testing

pip install "classiq==1.19.1" numpy scipy matplotlib
jupyter notebook qft_simulation.ipynb
# Kernel → Restart & Run All

Checklist

  • Notebook runs with classiq==1.19.1
  • Files in research/qft_simulation/
  • File names unique and descriptive
  • Required files included: .ipynb, .qmod
  • Paper link included
  • Will run pre-commit before commit

Key Assumptions

  1. α_n renormalization: Uses authors' reference-code convention (required for Fig. 2)
  2. Mode cutoff N_max=3: Matches Section IV.1
  3. Coefficient rounding: 4 decimals (negligible perturbation)

References

@review-notebook-app

Copy link
Copy Markdown

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@github-actions

Copy link
Copy Markdown

🔥 New notebook just dropped!

@amir-naveh , @TomerGoldfriend — come check out this shiny new addition to our repo.

@Tatgithub02

Copy link
Copy Markdown
Author

@NadavClassiq please review the PR

@TomerGoldfriend

Copy link
Copy Markdown
Member

Thank you @Tatgithub02 for this contribution. We will review it :-).
There are some test failures:

  1. Could you please rebase your branch on the most updated main? This shall resolve the second test (this is due to a bug in our workflow that we fixed recently)
  2. There are some lint error, could you please run pre-commit and commit again?
pip install pre-commit
pre-commit install

Let us know if you have any questions.

- 12-qubit Hamiltonian: 2257 Pauli strings
- Exact evolution reproduces paper Fig. 2
- Classiq Suzuki-Trotter simulation
- Validation: conservation laws verified

Closes Classiq#580
@Tatgithub02
Tatgithub02 force-pushed the implement/qft-section-iv-1 branch from 76f7e60 to 487fa17 Compare August 2, 2026 12:21
@Tatgithub02

Copy link
Copy Markdown
Author

Thank you @Tatgithub02 for this contribution. We will review it :-). There are some test failures:

  1. Could you please rebase your branch on the most updated main? This shall resolve the second test (this is due to a bug in our workflow that we fixed recently)
  2. There are some lint error, could you please run pre-commit and commit again?
pip install pre-commit
pre-commit install

Let us know if you have any questions.

Thanks @TomerGoldfriend ! I've rebased onto the latest main and run pre-commit with the lint fixes committed. Let me know if anything else comes up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Simulating quantum field theories on gate-based quantum computers

2 participants