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

Function getRandomDiagPauliStr

tests/utils/random.cpp:460–467  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

458
459
460PauliStr getRandomDiagPauliStr(int numQubits) {
461
462 std::string paulis = "";
463 for (int i=0; i<numQubits; i++)
464 paulis += "IZ"[getRandomInt(0,2)];
465
466 return getPauliStr(paulis);
467}
468
469
470PauliStrSum createRandomNonHermitianPauliStrSum(int numQubits, int numTerms) {

Callers

nothing calls this directly

Calls 2

getPauliStrFunction · 0.85
getRandomIntFunction · 0.70

Tested by

no test coverage detected