Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sparse modeling analytic continuation of self energy #135

Merged
merged 61 commits into from
Aug 9, 2023

Conversation

danielguterding
Copy link
Contributor

@danielguterding danielguterding commented Jul 4, 2023

  • Renamed script dcore_pade.py to dcore_anacont_pade.py.
  • Added dependency cvxpy.
  • Implemented simple version of sparse modeling analytic continuation for self-energy in anacont_spm.py.
  • Added script for interactive (dcore_anacont_spm_interactive.py) and non-interactive (dcore_anacont_spm.py) analytic continuation via sparse modeling.

Open points:

  • How to test code? Unit tests for individual functions? End-to-end test with real data?

@danielguterding danielguterding marked this pull request as ready for review July 6, 2023 09:25
@danielguterding danielguterding changed the title Sparse Modeling analytic continuation of self energy Sparse modeling analytic continuation of self energy Jul 6, 2023
@danielguterding
Copy link
Contributor Author

Thank you for the suggestion. My current code only supports self-energies that are diagonal in orbital and spin indices. However, I would like to finish the current project and move on to something else. I could integrate your code during the next semester break (Q1 2024).

Also, what is your motivation to write your own ADMM solver? There are many industrial-grade solvers for this type of problem. With the configuration I am using, the solver usually runs for only a couple of seconds on a single core.

I have yet to add some tests to this PR. Most likely I will be done tomorrow.

@danielguterding
Copy link
Contributor Author

I believe we're complete now. Please have a look.

@shinaoka
Copy link
Contributor

Thank you!

Yes, let us first merge your code.

@k-yoshimi
Could you have a quick look?

Also, what is your motivation to write your own ADMM solver? There are many industrial-grade solvers for this type of
problem. With the configuration I am using, the solver usually runs for only a couple of seconds on a single core.
I am unaware of a Python library supporting semi-positive semidefinite constraints for complex matrices.
If it exits, it'd make sense to use it.

@danielguterding
Copy link
Contributor Author

That one failing test was unstable. I improved it. Please try again.

@danielguterding
Copy link
Contributor Author

I don't understand this test failure. I think we need to debug locally with the exact container that runs the tests.

@danielguterding
Copy link
Contributor Author

I simplified the test and removed explicit testing of U and VT matrices.

@k-yoshimi
Copy link
Contributor

@danielguterding
Thank you for improving the test.

I simplified the test and removed explicit testing of U and VT matrices.

I think there are phase degrees of freedom in U and VT and so different system or library versions may cause the discrepancy in U and VT. I think your simplification where only S is checked is a good modification.

@k-yoshimi
Copy link
Contributor

@shinaoka
I looked at the code and checked that it was safe to merge into develop branch.

@yomichi
I think you verified the self-energy analysis connection, could you run a sample if you have one?
If it is OK, it would be helpful if you could upload the input file you ran as a sample.

@danielguterding
Copy link
Contributor Author

@yomichi I think you verified the self-energy analysis connection, could you run a sample if you have one? If it is OK, it would be helpful if you could upload the input file you ran as a sample.

Can I help with that somehow? I have run quite a few test cases on my side, but didn't find the place where end-to-end tests live in DCore.

@shinaoka
Copy link
Contributor

Once @yomichi approves, it will be ready to merge the PR.

@yomichi
Copy link
Contributor

yomichi commented Jul 30, 2023

I'm sorry for the late reply, but I did run the code. I think the results are fine.
It would be good to have default values for some parameters such as spm.show_fit = false.

@k-yoshimi
Copy link
Contributor

@yomichi
Would you upload some samples, if you can?

@danielguterding
Copy link
Contributor Author

I'm sorry for the late reply, but I did run the code. I think the results are fine. It would be good to have default values for some parameters such as spm.show_fit = false.

Thank you for this suggestion. I added reasonable default values for all non-physical parameters.

@yomichi
Copy link
Contributor

yomichi commented Aug 2, 2023

I used U=4 Hubbard model on the square lattice with pomerol.

[model]
seedname = square
lattice = square
norb = 1
nelec = 1.0
t = -1.0
kanamori = [(4.0, 0.0, 0.0)]
nk0 = 8
nk1 = 8
nk2 = 1

[system]
T = 0.1
n_iw = 1000
fix_mu = True
mu = 2.0

[impurity_solver]
name = pomerol
exec_path{str} = /Users/yomichi/opt/pomerol/bin/pomerol2dcore
n_bath{int} = 3
fit_gtol{float} = 1e-6

[control]
max_step = 100
sigma_mix = 0.5
converge_tol = 1e-5

[tool]
knode = [(G,0,0,0),(X,0.5,0,0),(M,0.5,0.5,0),(G,0,0,0)]
nk_line = 100
omega_max = 6.0
omega_min = -6.0
Nomega = 401
broadening = 0.4

@danielguterding
Copy link
Contributor Author

Are there any questions that are still open?

@shinaoka
Copy link
Contributor

shinaoka commented Aug 9, 2023

No, ready to merge! (Sorry, we were stuck in a conference). Thank you for your contributions!

@shinaoka shinaoka merged commit 57019ee into issp-center-dev:develop Aug 9, 2023
@k-yoshimi
Copy link
Contributor

@danielguterding
Thank you for your contribution. We'll add the tutorial for analytical continuation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants