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

Function getExponentialOfPauliMatrix

tests/utils/linalg.cpp:348–354  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

346
347
348qmatrix getExponentialOfPauliMatrix(qcomp arg, qmatrix m) {
349
350 // exp(-i arg/2 m) where m = prod(paulis)
351 qmatrix id = getIdentityMatrix(m.size());
352 qmatrix out = std::cos(arg/2)*id - 1_i*std::sin(arg/2)*m;
353 return out;
354}
355
356
357qmatrix getExponentialOfNormalisedPauliVector(qreal arg, qreal x, qreal y, qreal z) {

Callers 3

operations.cppFile · 0.50
getReferenceMatrixFunction · 0.50
SECTIONFunction · 0.50

Calls 1

getIdentityMatrixFunction · 0.70

Tested by

no test coverage detected