IPhysicsBackend interface and provides time evolution for the spatial amplitude representation.
Backend Architecture
HamiltonianBackend
The Hamiltonian backend applies a learned spectral operator to single-channel wavefunctions. Architecture:- Input: Single-channel field (1, G, G) where G=16 is the grid size
- Hidden dimension: 32 channels
- Spectral layers: 2 layers of frequency-domain convolution
- Output: Evolved field (1, G, G)
[ψ_real, ψ_imag]:
weights/latest.pth
The Hamiltonian backend falls back to analytical Laplacian evolution if the checkpoint is unavailable.
SchrodingerBackend
The Schrödinger backend operates on 2-channel[real, imag] wavefunctions using an expanded spectral network.
Architecture:
- Input: 2-channel wavefunction (2, G, G)
- Hidden dimension: 32 channels
- Expansion dimension: 64 channels for deeper representation
- Spectral layers: 2 frequency-domain convolution layers
- Output: Evolved 2-channel wavefunction (2, G, G)
weights/schrodinger_crystal_final.pth
If the Schrödinger checkpoint is missing, the backend automatically falls back to the HamiltonianBackend for evolution.
DiracBackend
The Dirac backend operates on 4-component relativistic spinors, expanding each amplitude into particle/antiparticle components. Architecture:- Input: 8-channel spinor [4 components × (real, imag)] → (8, G, G)
- Hidden dimension: 32 channels
- Expansion dimension: 64 channels
- Spectral layers: 2 frequency-domain layers
- Output: Evolved 8-channel spinor (8, G, G)
weights/dirac_phase5_latest.pth
Spectral Convolution Layer
All three backends share the same spectral convolution architecture:Configuration
Backend parameters are configured viaSimulatorConfig:
Usage Example
Backend Comparison
| Backend | Input Channels | Output Channels | Expansion | Use Case |
|---|---|---|---|---|
| Hamiltonian | 1 (single field) | 1 | None | Basic operator application |
| Schrödinger | 2 (real, imag) | 2 | 32→64→32 | Standard quantum circuits |
| Dirac | 8 (4 spinor × 2) | 8 | 32→64→32 | Relativistic effects |
Constraint Preservation
All three backends preserve quantum mechanical constraints without explicit enforcement:- Norm preservation:
Sum_k |α_k|² = 1maintained to machine precision - Phase coherence: Relative phases preserved across gate operations
- Unitarity: Entropy remains constant under unitary gates
- Test suite: 22/22 algebraic identities pass (HZH=X, HXH=Z, XX=I, etc.)