Skip to content

ToolboxEvolution ​

Quadratic-Hamiltonian evolution: symplectic, purity-preserving, validated

5/5 passed in 1ms

TestWhat it doesResult
test_epr_coupledx1x2 + p1p2 on Epr(0.8) stays bona fide and pure under a symplectic map.✅ pass
test_purity_keptA thermal state keeps purity 0.5 under a generic quadratic Hamiltonian.✅ pass
test_rotationevolve(I, t) matches rotate(0, -t): H = (x^2 + p^2)/2 turns clockwise where rotate turns counterclockwise.✅ pass
test_squeezerG = [[0, 1], [1, 0]] evolves the vacuum symplectically to variances e^2t/2, e^-2t/2.✅ pass
test_validationevolve rejects a non-symmetric G and a wrong-shaped G with ValueError.✅ pass