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

Function isInterpretablePauliStrSumLine

quest/src/core/parser.cpp:344–352  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

342
343
344bool isInterpretablePauliStrSumLine(string line) {
345
346 // checks whether line has the expected format; a real, imaginary or
347 // complex number (expressed as an integer, decimal, or in scientific
348 // notation) followed by 1 or more space characters, then one or
349 // more pauli codes/chars. It does NOT determine whether the coeff
350 // can actually be instantiated as a qcomp
351 return regex_match(line, regexes::weightedPaulis);
352}
353
354
355bool isPauliStrSumCoeffWithinQcompRange(string line) {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected