qiskit-advocate / qamp-spring-22

Qiskit advocate mentorship program (QAMP) spring 22 cohort (Mar - Jun 2022)
13 stars 1 forks source link

Add matrix exponentiation via diagonalization to Qiskit Dynamics #25

Closed miamico closed 2 years ago

miamico commented 2 years ago

Description

When taking the matrix exponential of an Hermitean matrix M (for example to compute the time evolution operator from the Hamiltonian of a closed system) it is sometimes faster to first diagonalize the matrix M = V D V^{dagger} and then exponentiate the diagonal matrix D (which is given by exponentiating the diagonal elements) instead of using the built-in method in scipy expm directly on the matrix M.

Since fixed-step solvers are meant to work for arbitrary generators (even ones that cannot be diagonalized) but this method is faster for diagonalizable generators (in particular anti-hermitian), then it would be worth adding this implementation as an option for the user and to choose this option automatically in some higher level interfaces (e.g. when using a Solver instance that only has Hamiltonian information).

There is an open issue which aims at implementing this feature here

Deliverables

Implement the feature for Qiskit dynamics through a PR.

Mentors details

Number of mentees

1

Type of mentees

HuangJunye commented 2 years ago

Closing this issue as it was not paired with any mentee. Thank you for suggesting the project idea!