Template Function Pennylane::Util::compute_diagonalizing_gates

Function Documentation

template<typename T>
void Pennylane::Util::compute_diagonalizing_gates(int n, int lda, const std::vector<std::complex<T>> &Ah, std::vector<T> &eigenVals, std::vector<std::complex<T>> &unitary)

Decompose Hermitian matrix into diagonal matrix and unitaries.

Template Parameters

T – Data type.

Parameters
  • n – Number of columns.

  • lda – Number of rows.

  • Ah – Hermitian matrix to be decomposed.

  • eigenVals – eigenvalue results.

  • unitaries – unitary result.