tfrederiksen / inelastica

Python package for eigenchannels, vibrations and inelastic electron transport based on SIESTA/TranSIESTA DFT
https://tfrederiksen.github.io/inelastica
GNU Lesser General Public License v3.0
33 stars 16 forks source link

Optimizations - fewer matrix multiplications, einsum, and optional noise #66

Open jonaslb opened 3 years ago

jonaslb commented 3 years ago

This PR reduces the number of matrix multiplications quite significantly. It also introduces use of np.einsum instead of the custom function (it's still custom, but it uses einsum). Noise calculation was made optional.

By a quick count I think the top part of calcTraces that is always executed goes from 19 to 14 matrix multiplications.

It cannot be merged after #64 cleanly so depending on which is merged first, the other will need a rebase.

tfrederiksen commented 3 years ago

Thanks a lot @jonaslb!