De Dirac à Wheeler–DeWitt : six équations, un seul moteur Rust
From Dirac to Wheeler–DeWitt: Six Equations, One Rust Engine
26 septembre 2026 September 26, 2026 28 min de lecture 28 min read Mel & HFThot Research
📖 Résumé📖 Abstract
Cet article suit une seule idée — quantifier, puis rendre relativiste, puis rendre géométrique — depuis l'équation de Schrödinger (1926) jusqu'à celle de Wheeler–DeWitt (1967), en passant par Dirac, Maxwell, Aharonov–Bohm et la décomposition ADM. Chaque équation est résolue par le cœur Rust compilé de pysic-rs, puis notée contre une référence indépendante : une forme close quand elle existe.This article follows a single idea — quantise, then make it relativistic, then make it geometric — from Schrödinger's equation (1926) to Wheeler–DeWitt (1967), by way of Dirac, Maxwell, Aharonov–Bohm and the ADM decomposition. Each equation is solved by the compiled Rust core of pysic-rs and then graded against an independent reference: a closed form wherever one exists.
Le résultat est un parcours reproductible : un notebook compagnon exécuté de bout en bout, où aucun nombre n'est affirmé sans être comparé. En chemin, cette discipline a mis au jour quatre solveurs faux dans notre propre bibliothèque. Nous les détaillons, parce que la manière dont un bug survit est plus instructive que le bug lui-même.The result is a reproducible walk-through: a fully executed companion notebook in which no number is asserted without being compared. Along the way that discipline surfaced four incorrect solvers in our own library. We document them, because how a bug survives is more instructive than the bug itself.
En 1926 Schrödinger cherche une équation d'onde dont les solutions stationnaires reproduisent les niveaux d'énergie de Bohr. Il la trouve, et elle fonctionne remarquablement bien. Mais elle porte un défaut structurel : elle est du premier ordre en temps et du second ordre en espace.In 1926 Schrödinger went looking for a wave equation whose stationary solutions would reproduce Bohr's energy levels. He found one, and it worked remarkably well. But it carries a structural flaw: it is first order in time and second order in space.
Cette asymétrie est fatale en relativité restreinte, où l'espace et le temps doivent apparaître sur le même pied. C'est exactement ce défaut qui motivera Dirac deux ans plus tard.That asymmetry is fatal in special relativity, where space and time must enter on the same footing. It is precisely this flaw that motivated Dirac two years later.
`pysic-rs` résout l'évolution par split-step Fourier (découpe de Strang) : l'opérateur cinétique est diagonal en $k$, le potentiel diagonal en $x$, et on alterne. Chaque facteur est unitaire, donc la norme est conservée par construction.`pysic-rs` evolves it with a split-step Fourier scheme (Strang splitting): the kinetic operator is diagonal in $k$, the potential diagonal in $x$, and you alternate. Each factor is unitary, so the norm is conserved by construction.
import numpy as np, pysicrs as ps
N, L = 1024, 80.0
dx = L / N
x = (np.arange(N) - N/2) * dx
psi0 = (1/(2*np.sqrt(np.pi)))**0.5 * np.exp(-x**2/8) * np.exp(1j*x)
re, im = ps.schrodinger_split_step_1d(
psi0.real.tolist(), psi0.imag.tolist(),
[0.0]*N, dx, dt=0.005, n_steps=200,
)
Mesuré : pour un paquet gaussien libre, la forme close $\sigma(t)=\sigma_0\sqrt{1+(\hbar t/m\sigma_0^2)^2}$ est reproduite à 1,6×10−14 près — la précision machine — avec une norme conservée à 2×10−14.Measured: for a free Gaussian packet the closed form $\sigma(t)=\sigma_0\sqrt{1+(\hbar t/m\sigma_0^2)^2}$ is reproduced to 1.6×10−14 — machine precision — with the norm conserved to 2×10−14.
Pour les états liés, on diagonalise directement l'hamiltonien en différences finies. L'oscillateur harmonique donne $E_n=(n+\tfrac12)\hbar\omega$ à $10^{-5}$ près, et les vecteurs propres recouvrent les fonctions de Hermite exactes à $10^{-9}$. Le $n$-ième état porte exactement $n$ nœuds — à condition de ne pas compter le bruit d'arrondi dans les queues classiquement interdites, où $|\psi|\sim10^{-300}$.For bound states we diagonalise the finite-difference Hamiltonian directly. The harmonic oscillator returns $E_n=(n+\tfrac12)\hbar\omega$ to $10^{-5}$, and the eigenvectors overlap the exact Hermite functions to $10^{-9}$. The $n$-th state carries exactly $n$ nodes — provided you don't count round-off noise in the classically forbidden tails, where $|\psi|\sim10^{-300}$.
2. Dirac : la relativité force l'antimatière2. Dirac: relativity forces antimatter
Dirac veut une équation du premier ordre en temps et en espace, pour que la densité de probabilité reste positive. Il écrit $i\hbar\partial_t\psi = (c\,\boldsymbol\alpha\cdot\mathbf p + \beta mc^2)\psi$ et exige qu'en l'itérant on retrouve la relation relativiste $E^2=p^2c^2+m^2c^4$. Cela impose :Dirac wanted an equation first order in both time and space, so that the probability density stays positive. He wrote $i\hbar\partial_t\psi = (c\,\boldsymbol\alpha\cdot\mathbf p + \beta mc^2)\psi$ and demanded that iterating it recover the relativistic relation $E^2=p^2c^2+m^2c^4$. That forces:
Des nombres ne peuvent pas anticommuter. Les coefficients doivent donc être des matrices, et $\psi$ un spineur. Deux conséquences tombent sans avoir été postulées : le spin 1/2 apparaît dans la structure de l'équation, et le spectre contient une branche d'énergie négative. Dirac l'interprète en 1931 comme une nouvelle particule ; Anderson photographie le positron en 1932.Numbers cannot anticommute. So the coefficients must be matrices, and $\psi$ a spinor. Two consequences fall out without being postulated: spin 1/2 appears in the structure of the equation, and the spectrum contains a negative-energy branch. Dirac interpreted it in 1931 as a new particle; Anderson photographed the positron in 1932.
Le spectre de Dirac a deux branches séparées par un gap $2mc^2$. La branche inférieure n'est pas un artefact mathématique dont on pourrait se débarrasser : elle est imposée par l'algèbre, et c'est l'antimatière.The Dirac spectrum has two branches separated by a $2mc^2$ gap. The lower branch is not a mathematical artefact you can discard: it is forced by the algebra, and it is antimatter.
Vérifié : les matrices de Pauli renvoyées par `pysic-rs` sont hermitiennes, de carré l'identité, et leurs anticommutateurs croisés sont nuls à la précision machine. Le propagateur de Dirac conserve la norme à 1,4×10−12 sur 5000 pas.Verified: the Pauli matrices returned by `pysic-rs` are Hermitian, square to the identity, and their cross anticommutators vanish to machine precision. The Dirac propagator conserves the norm to 1.4×10−12 over 5000 steps.
Cette dernière phrase n'aurait pas pu être écrite il y a une semaine. Le même appel faisait passer la norme de 1,77 à 3,6×1057. Voir la section 7.That last sentence could not have been written a week ago. The same call took the norm from 1.77 to 3.6×1057. See section 7.
Un état localisé n'est pas un état propre d'énergie : il superpose les deux branches. L'interférence entre elles produit le Zitterbewegung — le « tremblement » identifié par Schrödinger en 1930. À impulsion nulle le hamiltonien se réduit à $mc^2\sigma_x$, et l'évolution d'un état initialement dans la composante haute est exactement soluble :A localised state is not an energy eigenstate: it superposes both branches. Interference between them produces Zitterbewegung — the “trembling motion” identified by Schrödinger in 1930. At zero momentum the Hamiltonian reduces to $mc^2\sigma_x$, and the evolution of a state initially in the upper component is exactly solvable:
La population de la composante basse oscille donc à la pulsation de Compton $\omega_{\rm zb}=2mc^2/\hbar$ — environ $1{,}6\times10^{21}$ rad/s pour un électron. C'est une forme close, donc une note et non une illustration.The lower-component population therefore oscillates at the Compton frequency $\omega_{\rm zb}=2mc^2/\hbar$ — about $1.6\times10^{21}$ rad/s for an electron. It is a closed form, so it is a grade rather than an illustration.
Mesuré : le pic de la transformée de Fourier tombe à 0,44 bin de $2mc^2/\hbar$ — c'est-à-dire sous la résolution spectrale, donc compatible avec la prédiction.Measured: the FFT peak lands 0.44 bins from $2mc^2/\hbar$ — that is, below the spectral resolution, hence consistent with the prediction.
Le piège que nous avons failli publier. Une première version intégrait jusqu'à $t=1{,}2$ alors que la période vaut $\pi$ — soit moins d'un demi-cycle. La FFT renvoyait une pulsation fausse de 160 %, sans erreur ni avertissement. Une fréquence ne se mesure pas sur une fraction de période, et un solveur correct ne protège pas d'un protocole de mesure faux.The trap we nearly published. A first version integrated to $t=1.2$ when the period is $\pi$ — less than half a cycle. The FFT returned a frequency 160% wrong, with no error and no warning. You cannot measure a frequency over a fraction of a period, and a correct solver is no defence against a wrong measurement protocol.
4. Maxwell & Aharonov–Bohm : la phase devient physique4. Maxwell & Aharonov–Bohm: phase becomes physical
Maxwell unifie l'électricité et le magnétisme en 1865. Pendant près d'un siècle, les potentiels $(\phi,\mathbf A)$ passent pour de simples commodités de calcul : seuls $\mathbf E$ et $\mathbf B$ seraient physiquement réels, puisque seuls eux sont invariants de jauge.Maxwell unified electricity and magnetism in 1865. For nearly a century the potentials $(\phi,\mathbf A)$ were taken for calculational conveniences: only $\mathbf E$ and $\mathbf B$ were physically real, since only they are gauge invariant.
Aharonov et Bohm montrent en 1959 que c'est faux. Un électron contournant un solénoïde — dans une région où $\mathbf B=0$ partout sur son trajet — acquiert une phase mesurable. Chambers l'observe en 1960.Aharonov and Bohm showed in 1959 that this is wrong. An electron going around a solenoid — through a region where $\mathbf B=0$ everywhere along its path — picks up a measurable phase. Chambers observed it in 1960.
Le potentiel porte une information que les champs locaux ne contiennent pas. L'électromagnétisme est une théorie de jauge, et la quantité observable est une phase géométrique — le cas particulier, découvert avant l'heure, de ce que Berry généralisera en 1984.The potential carries information the local fields do not. Electromagnetism is a gauge theory, and the observable quantity is a geometric phase — an early special case of what Berry would generalise in 1984.
L'électron ne traverse jamais la région où $\mathbf B\neq0$, et pourtant la figure d'interférence se décale avec le flux enlacé. Seul le potentiel, intégré le long du chemin, en rend compte.The electron never passes through the region where $\mathbf B\neq0$, yet the interference pattern shifts with the enclosed flux. Only the potential, integrated along the path, accounts for it.
Mesuré : la phase de Berry d'une boucle équatoriale de spineurs vaut exactement $-\pi$ ($\gamma=-3{,}1415926536$, écart nul), et les nombres d'enroulement de $e^{in\theta}$ sont les entiers exacts pour $n=\pm1,\pm2,\pm3$. Les lois de Maxwell donnent les pentes log-log canoniques : $-2$ pour le champ coulombien, $+2$ pour Larmor, $+4$ pour le dipôle.Measured: the Berry phase of an equatorial spinor loop is exactly $-\pi$ ($\gamma=-3.1415926536$, zero deviation), and the winding numbers of $e^{in\theta}$ are exact integers for $n=\pm1,\pm2,\pm3$. Maxwell returns the canonical log-log slopes: $-2$ for the Coulomb field, $+2$ for Larmor, $+4$ for the dipole.
La quantification de l'enroulement n'est pas cosmétique : c'est elle qui rend l'effet AB robuste au désordre, et c'est le même invariant topologique qui réapparaît comme nombre de Chern dans l'effet Hall quantique — que `pysic-rs` calcule également, via l'équation de Harper qui dessine le papillon de Hofstadter du logo.The quantisation of winding is not cosmetic: it is what makes the AB effect robust to disorder, and it is the same topological invariant that reappears as the Chern number in the quantum Hall effect — which `pysic-rs` also computes, through the Harper equation that draws the Hofstadter butterfly in the logo.
5. ADM : la gravitation comme contrainte5. ADM: gravity as a constraint
En 1959, Arnowitt, Deser et Misner reformulent la relativité générale en découpant l'espace-temps en tranches spatiales. La métrique à quatre dimensions se décompose en une métrique spatiale $\gamma_{ij}$, une fonction lapse $N$ et un vecteur shift $N^i$.In 1959 Arnowitt, Deser and Misner recast general relativity by slicing spacetime into spatial hypersurfaces. The four-dimensional metric splits into a spatial metric $\gamma_{ij}$, a lapse function $N$ and a shift vector $N^i$.
Le résultat est frappant : les équations d'Einstein se scindent en six équations d'évolution et quatre contraintes qui ne contiennent aucune dérivée temporelle.The result is striking: Einstein's equations split into six evolution equations and four constraints containing no time derivative at all.
Autrement dit : le hamiltonien total de la relativité générale est une contrainte, $\mathcal H\approx0$. Il ne génère pas une évolution dans un temps extérieur — il n'y a pas de temps extérieur. C'est ce fait, anodin en apparence, qui produira le problème du temps en gravitation quantique.In other words: the total Hamiltonian of general relativity is a constraint, $\mathcal H\approx0$. It does not generate evolution in an external time — there is no external time. That innocuous-looking fact is what produces the problem of time in quantum gravity.
Mesuré : les trois formes closes ($0$, $-16\pi\rho$, $6c^2$) sont reproduites avec un écart exactement nul. Et Schwarzschild, solution du vide, donne un scalaire de Ricci de $\sim10^{-8}$ — le résidu de différences finies — à tout rayon et tout angle polaire.Measured: all three closed forms ($0$, $-16\pi\rho$, $6c^2$) are reproduced with exactly zero deviation. And Schwarzschild, a vacuum solution, gives a Ricci scalar of $\sim10^{-8}$ — the finite-difference residual — at every radius and every polar angle.
6. Wheeler–DeWitt : quand le temps disparaît6. Wheeler–DeWitt: when time disappears
Si le hamiltonien est une contrainte, la quantification canonique — remplacer les observables par des opérateurs agissant sur une fonctionnelle d'onde de la géométrie — donne immédiatement $\hat{\mathcal H}\Psi=0$. C'est l'équation de Wheeler–DeWitt (1967).If the Hamiltonian is a constraint, canonical quantisation — replacing observables by operators acting on a wave functional of geometry — immediately gives $\hat{\mathcal H}\Psi=0$. This is the Wheeler–DeWitt equation (1967).
Elle ne contient aucune dérivée temporelle. L'état de l'univers n'évolue pas : il est. C'est le problème du temps — et il n'est toujours pas résolu.It contains no time derivative. The state of the universe does not evolve: it is. This is the problem of time — and it remains unresolved.
En minisuperespace, on gèle tous les degrés de liberté sauf le facteur d'échelle $a$. L'équation devient une EDO du second ordre, donc gradable :In minisuperspace you freeze every degree of freedom except the scale factor $a$. The equation becomes a second-order ODE, and therefore gradable:
Le potentiel s'annule au point tournant $a_t$, qui sépare le régime classiquement interdit de l'univers en expansion. Sa traversée par effet tunnel est le mécanisme de création d'univers de Vilenkin et de Hartle–Hawking. En linéarisant autour de $a_t$ on trouve $U\simeq-2\sqrt{3/\Lambda}\,(a-a_t)$, et l'équation se réduit à $\Psi_{zz}=z\Psi$ : c'est l'équation d'Airy.The potential vanishes at the turning point $a_t$, which separates the classically forbidden regime from the expanding universe. Tunnelling through it is the universe-creation mechanism of Vilenkin and of Hartle–Hawking. Linearising about $a_t$ gives $U\simeq-2\sqrt{3/\Lambda}\,(a-a_t)$, and the equation reduces to $\Psi_{zz}=z\Psi$: the Airy equation.
Mesuré : l'intégration par le RK45 adaptatif de `pysic-rs` (48 pas) recolle à la fonction d'Airy de scipy — une référence indépendante — à 9,2×10−3 près dans la fenêtre de validité de la linéarisation. L'écart croît en s'éloignant de $a_t$, ce qui est la signature attendue : c'est la linéarisation qui se dégrade, pas l'intégrateur.Measured: integration by the adaptive RK45 of `pysic-rs` (48 steps) matches scipy's Airy function — an independent reference — to 9.2×10−3 within the window where the linearisation holds. The deviation grows as you move away from $a_t$, which is the expected signature: it is the linearisation degrading, not the integrator.
7. Quatre bugs, et comment ils ont survécu7. Four bugs, and how they survived
Écrire cet article a cassé notre propre bibliothèque. En gradant chaque solveur contre une forme close, quatre d'entre eux se sont révélés faux. Voici ce qu'ils étaient, et surtout pourquoi personne ne s'en était aperçu.Writing this article broke our own library. Grading each solver against a closed form exposed four of them as wrong. Here is what they were, and more importantly why nobody had noticed.
SolveurSolver
SymptômeSymptom
CauseCause
dirac_split_step_1d
norme 1,77 → 3,6×1057norm 1.77 → 3.6×1057
rotation de masse écrite exp(i·sinθ/2) (module 1) au lieu de i·sinθ/2 : la matrice de pas devenait [[1,-1],[-1,1]], de valeurs singulières 2 et 0mass rotation written exp(i·sinθ/2) (modulus 1) instead of i·sinθ/2: the step matrix became [[1,-1],[-1,1]], singular values 2 and 0
schrodinger_eigen_1d
32771 au lieu de 4,9332771 instead of 4.93
balayage de Jacobi à l'angle mal formé et aux mises à jour auto-référentielles, ne suivant jamais le remplissage tridiagonal ; renvoyait la diagonaleJacobi sweep with a malformed angle and self-referential updates that never tracked tridiagonal fill-in; it returned the diagonal
rk45_solve
renvoyait Nonereturned None
Ok(py.None()) derrière un // TODO ; l'estimateur d'erreur utilisait en outre de mauvais coefficientsOk(py.None()) behind a // TODO; the error estimator also used wrong coefficients
ricci_scalar
$R=-2/r^2$ sur le vide$R=-2/r^2$ in vacuum
métrique figée à $\theta=\pi/2$, donc $\partial_\theta g_{\varphi\varphi}=0$ : les termes angulaires ne se compensaient plusmetric frozen at $\theta=\pi/2$, so $\partial_\theta g_{\varphi\varphi}=0$: the angular terms stopped cancelling
Le point communThe common thread
Aucun de ces quatre solveurs n'avait de test le confrontant à une valeur connue. Le seul test de Dirac vérifiait une autre fonction. Le test de Ricci, lui, existait — mais il passait au solveur une métrique constante, qui ignorait ses coordonnées : toutes les dérivées étaient nulles et $R$ s'annulait trivialement. Sa tolérance de $0{,}1$ aurait de toute façon admis l'artefact de $-0{,}02$.None of these four solvers had a test comparing it to a known value. Dirac's only test checked a different function. The Ricci test did exist — but it handed the solver a constant metric that ignored its coordinates: every derivative was zero and $R$ vanished trivially. Its tolerance of $0.1$ would have admitted the $-0.02$ artefact anyway.
La leçon. Un test qui ne peut pas échouer ne vaut pas mieux que pas de test — il est pire, parce qu'il inspire confiance. Un test utile compare à une quantité que l'on connaît indépendamment, avec une tolérance ajustée à l'échelle du phénomène, et non à une constante commode.The lesson. A test that cannot fail is no better than no test — it is worse, because it inspires confidence. A useful test compares against a quantity you know independently, with a tolerance scaled to the phenomenon rather than to a convenient constant.
Les quatre sont corrigés et couverts par des tests en forme close : puits infini contre le spectre discret exact, oscillateur harmonique contre $(n+\tfrac12)\hbar\omega$, conservation de la norme de Dirac, décroissance exponentielle pour RK45, et platitude de Ricci de Schwarzschild à $r$ et $\theta$ quelconques — plus un test de régression qui épingle l'artefact $-2/r^2$. 54 tests passent.All four are fixed and covered by closed-form tests: the infinite well against the exact discrete spectrum, the harmonic oscillator against $(n+\tfrac12)\hbar\omega$, Dirac norm conservation, exponential decay for RK45, and Schwarzschild Ricci flatness at arbitrary $r$ and $\theta$ — plus a regression test pinning the $-2/r^2$ artefact. 54 tests pass.
8. Reproduire8. Reproduce it
Tout ce qui précède tient dans un notebook exécuté de bout en bout : 11 cellules de code, 10 figures, chacune précédée de son théorème et suivie de sa lecture.Everything above fits in one end-to-end executed notebook: 11 code cells, 10 figures, each preceded by its theorem and followed by its reading.
Physique mathématique, méthodes numériques et Rust. Nous publions les résultats négatifs et les bugs que nous trouvons chez nous — c'est ce qui rend les résultats positifs crédibles.Mathematical physics, numerical methods and Rust. We publish the negative results and the bugs we find in our own code — that is what makes the positive results credible.