You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, the diagonalize method of StarkMap objects calculates the eigenvalues and eigenvectors for all value of the electric field. But, while all the eigenvalues are saved in the 'y' attribute, for each perturbed eigenstate only the four top contributing eigenvector components (or the top components that comprise 0.95 of the total perturbed state composition) are saved in the 'composition' attribute.
I would like to include keyword arguments in the diagonalize method that would allow the user to choose how many basis states to save, or what total contribution to target, with the option of saving all the basis components. This was useful for me for calculating effective dipole matrix elements between arbitrary states, but I believe there could be several situations where people could find it useful.
I've forked the project and amended the code to include this capability. I can create a pull request if it is appropriate. Let me know if this is a bad idea for some reason or if more information is needed. Full disclosure, I've never tried to contribute back to a project before so I could be doing it wrong :)
The text was updated successfully, but these errors were encountered:
That sounds amazing! Thank you for taking time to write a contribution! Please do submit a pull request. I will do a quick check then, and merge it to the main code to be released. Since you will be adding a new keyword argument, it would be great just if you can add in a docstring of a methods that were changed a short explanation how to use them (if you haven’t already added that). This way the change will be reflected in documentation too.
Let me know if you need any help with this.
And once again, thank you very much for taking time to contribute!
Thanks so much! I've submitted a pull request, let me know if it makes sense or if you have any questions/concerns. It's not a big change so hopefully not much room for error :)
Currently, the diagonalize method of StarkMap objects calculates the eigenvalues and eigenvectors for all value of the electric field. But, while all the eigenvalues are saved in the 'y' attribute, for each perturbed eigenstate only the four top contributing eigenvector components (or the top components that comprise 0.95 of the total perturbed state composition) are saved in the 'composition' attribute.
I would like to include keyword arguments in the diagonalize method that would allow the user to choose how many basis states to save, or what total contribution to target, with the option of saving all the basis components. This was useful for me for calculating effective dipole matrix elements between arbitrary states, but I believe there could be several situations where people could find it useful.
I've forked the project and amended the code to include this capability. I can create a pull request if it is appropriate. Let me know if this is a bad idea for some reason or if more information is needed. Full disclosure, I've never tried to contribute back to a project before so I could be doing it wrong :)
The text was updated successfully, but these errors were encountered: