Skip to content

DmcsObjective ​

The relative entropy and its gradient against numpy and a finite difference

3/3 passed in 625ms

TestWhat it doesResult
test_gradient_matchesThe analytic gradient agrees with a central finite difference of the explicit objective to 1e-3 relative along four random Hermitian directions.✅ pass
test_matches_numpyThe reduced objective agrees with an explicit construction of the Kraus image to 1e-12.✅ pass
test_objective_bracketedThe perturbed relative entropy stays between zero and log2⁡4 bits times the pass probability, at three excess noises with and without postselection.✅ pass