| 334 | |
| 335 | |
| 336 | qmatrix getExponentialOfDiagonalMatrix(qmatrix m) { |
| 337 | DEMAND( isDiagonal(m) ); |
| 338 | |
| 339 | qmatrix out = getZeroMatrix(m.size()); |
| 340 | |
| 341 | for (size_t i=0; i<m.size(); i++) |
| 342 | out[i][i] = std::exp(m[i][i]); |
| 343 | |
| 344 | return out; |
| 345 | } |
| 346 | |
| 347 | |
| 348 | qmatrix getExponentialOfPauliMatrix(qcomp arg, qmatrix m) { |
nothing calls this directly
no test coverage detected