Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
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
879
static 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
890
static prob_vec state_to_probs(QStat& state)
891
{
Callers
nothing calls this directly
Calls
1
norm
Function · 0.85
Tested by
no test coverage detected