Skip to content

ToolboxInfo ​

Purity, entropy, symplectic spectrum and partial trace closed forms

6/6 passed in 7ms

TestWhat it doesResult
test_entropy_thermalThermal(0.5) entropy is 1.5log2(1.5) - 0.5log2(0.5) = 1.37744 bits.✅ pass
test_epr_entropyEpr(0.8) has entropy 0 while its half carries Thermal(sinh^2 r)'s entropy.✅ pass
test_keep_checkskeep rejects out-of-range, duplicate and empty mode lists with ValueError.✅ pass
test_keep_dropkeep([1]) of Epr(0.8) is the thermal state cosh(1.6)*I/2, and drop([0]) agrees.✅ pass
test_keep_orderkeep([1, 0]) puts mode 1 first.✅ pass
test_spectrum_ceilingEpr(r).spectrum() gives nu = 0.5 twice through r = 8 and first refuses at r = 8.17, ahead of the constructor's 8.45, the guard scaling with max|V| not a fixed 1e-9.✅ pass