| 21 | |
| 22 | |
| 23 | void demo_getInlinePauliStr() { |
| 24 | |
| 25 | reportStr("[demo_getInlinePauliStr]"); |
| 26 | |
| 27 | // can specify indices as {...} without temporary-array syntax |
| 28 | PauliStr a = getInlinePauliStr("XYZII", {4,3,2,1,0}); |
| 29 | reportPauliStr(a); |
| 30 | |
| 31 | // additionally accept 0-3 and lowercase |
| 32 | reportPauliStr( |
| 33 | getInlinePauliStr("0123ixyzIXYZ", {11,10,9,8, 7,6,5,4, 3,2,1,0}) |
| 34 | ); |
| 35 | |
| 36 | // can specify arbitrary qubit indices of Paulis |
| 37 | reportPauliStr( |
| 38 | getInlinePauliStr("XXYYZZ", {5,50, 10,60, 30,40}) |
| 39 | ); |
| 40 | } |
| 41 | |
| 42 | |
| 43 | void demo_getPauliStr() { |
no test coverage detected