MCPcopy Create free account
hub / github.com/QuEST-Kit/QuEST / doMatricesAgree

Function doMatricesAgree

tests/utils/compare.cpp:81–93  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

79}
80
81bool doMatricesAgree(qmatrix a, qmatrix b) {
82 DEMAND( a.size() == b.size() );
83
84 // assumed square and equal-size
85 size_t dim = a.size();
86
87 for (size_t i=0; i<dim; i++)
88 for (size_t j=0; j<dim; j++)
89 if (!doScalarsAgree(a[i][j], b[i][j]))
90 return false;
91
92 return true;
93}
94
95
96

Callers 2

isApproxUnitaryFunction · 0.85
isApproxCPTPFunction · 0.85

Calls 1

doScalarsAgreeFunction · 0.85

Tested by

no test coverage detected