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

Function paulis_getTargetInds

quest/src/core/paulilogic.cpp:138–150  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

136
137
138vector<int> paulis_getTargetInds(PauliStr str) {
139
140 int maxInd = paulis_getIndOfLefmostNonIdentityPauli(str);
141
142 vector<int> inds(0);
143 inds.reserve(maxInd+1);
144
145 for (int i=0; i<=maxInd; i++)
146 if (paulis_getPauliAt(str, i) != 0) // Id
147 inds.push_back(i);
148
149 return inds;
150}
151
152
153qindex paulis_getTargetBitMask(PauliStr str) {

Calls 2

paulis_getPauliAtFunction · 0.85

Tested by

no test coverage detected