| 75 | |
| 76 | |
| 77 | qmatrix getMatrix(Qureg qureg) { |
| 78 | DEMAND( qureg.isDensityMatrix ); |
| 79 | |
| 80 | qindex numRows = 1; |
| 81 | qindex numCols = getPow2(qureg.numQubits); |
| 82 | qmatrix out = getZeroMatrix(numCols); |
| 83 | |
| 84 | for (size_t r=0; r<out.size(); r++) { |
| 85 | qcomp* arr[] = {out[r].data()}; |
| 86 | getDensityQuregAmps(arr, qureg, r, 0, numRows, numCols); |
| 87 | |
| 88 | } |
| 89 | |
| 90 | return out; |
| 91 | } |
| 92 | |
| 93 | |
| 94 |
no test coverage detected