MCPcopy Create free account
hub / github.com/OriginQ/QPanda-2 / state_probs

Function state_probs

test/Core/QVM.test.cpp:879–888  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

877}
878
879static double state_probs(QStat& state)
880{
881 double result = 0.;
882 for (auto val : state)
883 {
884 result += std::norm(val);
885 }
886
887 return result;
888}
889
890static prob_vec state_to_probs(QStat& state)
891{

Callers

nothing calls this directly

Calls 1

normFunction · 0.85

Tested by

no test coverage detected