Skip to content

FidelityAnchors ​

Fidelity against Fock-basis values the covariance formula never sees

6/6 passed in 2ms

TestWhat it doesResult
test_coherent_pairTwo coherent states overlap as exp⁡(−|d|2/2) under α=(x+ip)/2 -- the factor of 2 that the 2 in the quadratures hides.✅ pass
test_coherent_thermalF(|α⟩,ρth)=exp⁡(−|α|2/(n¯+1))/(n¯+1), π times the thermal Husimi Q: the one anchor pinning both prefactor and exponent.✅ pass
test_self_identityF(ρ,ρ)=1 for coherent, squeezed, thermal, displaced-squeezed and vacuum states.✅ pass
test_thermal_pairTwo thermal states match the Fock-basis sum 1/((n1+1)(n2+1)(1−x1x2)2), exercising the Λ term that is zero for every pure pair.✅ pass
test_vacuum_squeezedF(|0⟩,S(r)|0⟩)=1/cosh⁡r.✅ pass
test_vacuum_thermalF(|0⟩,ρth)=1/(n¯+1), the thermal ground-state weight.✅ pass