ToolboxEvolution
Quadratic-Hamiltonian evolution: symplectic, purity-preserving, validated
5/5 passed in 1ms
| Test | What it does | Result |
|---|---|---|
test_epr_coupled | x1x2 + p1p2 on Epr(0.8) stays bona fide and pure under a symplectic map. | ✅ pass |
test_purity_kept | A thermal state keeps purity 0.5 under a generic quadratic Hamiltonian. | ✅ pass |
test_rotation | evolve(I, t) matches rotate(0, -t): H = (x^2 + p^2)/2 turns clockwise where rotate turns counterclockwise. | ✅ pass |
test_squeezer | G = [[0, 1], [1, 0]] evolves the vacuum symplectically to variances e^2t/2, e^-2t/2. | ✅ pass |
test_validation | evolve rejects a non-symmetric G and a wrong-shaped G with ValueError. | ✅ pass |