This enables avoiding the clunky multiline string literal nuisance when the PauliStrSum contains only a few operations. Eg.
// C++
createInlinePauliStrSum(R"(
0.123 XX
1.23i YY
-1-6i IZ
)");
// C
createInlinePauliStrSum(
"0.123 XX \n"
"1.23i YY \n"
"-1-6i IZ \n"
);
// agnostic
createInlinePauliStrSum("0.123 XX \n 1.23i YY \n -1-6i IZ");
can become the more palatable
createInlinePauliStrSum("0.123 XX + 1.23i YY -1-6i IZ");
Beware that this cannot be done by retaining our existing parsing/regex/validation and simply prior substituting encountered + for \n. We would fail to include \n before negative coefficients, and mutilate scientific notation with positive exponents.