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

Function getRandomPauliStr

tests/utils/random.cpp:440–447  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

438
439
440PauliStr getRandomPauliStr(int numQubits) {
441
442 std::string paulis = "";
443 for (int i=0; i<numQubits; i++)
444 paulis += "IXYZ"[getRandomInt(0,4)];
445
446 return getPauliStr(paulis);
447}
448
449
450PauliStr getRandomPauliStr(vector<int> targs) {

Callers 5

getRandomRemainingArgsFunction · 0.50
SECTIONFunction · 0.50
SECTIONFunction · 0.50

Calls 2

getPauliStrFunction · 0.85
getRandomIntFunction · 0.70

Tested by

no test coverage detected