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

Function paulis_getSeparateInds

quest/src/core/paulilogic.cpp:170–181  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

168
169
170std::array<vector<int>,3> paulis_getSeparateInds(PauliStr str) {
171
172 vector<int> iXYZ = paulis_getTargetInds(str);
173 vector<int> iX, iY, iZ;
174
175 vector<int>* ptrs[] = {&iX, &iY, &iZ};
176
177 for (int i : iXYZ)
178 ptrs[paulis_getPauliAt(str, i) - 1]->push_back(i);
179
180 return {iX, iY, iZ};
181}
182
183
184PauliStr paulis_getShiftedPauliStr(PauliStr str, int pauliShift) {

Calls 2

paulis_getTargetIndsFunction · 0.85
paulis_getPauliAtFunction · 0.85

Tested by

no test coverage detected