-
Notifications
You must be signed in to change notification settings - Fork 45
Add Bose-Hubbard example #342
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
Conversation
|
Your PR no longer requires formatting changes. Thank you for your contribution! |
Codecov Report✅ All modified and coverable lines are covered by tests.
... and 5 files with indirect coverage changes 🚀 New features to boost your workflow:
|
|
Unfortunately the docs preview doesn't build for a PR from a fork. It seems like there's no way around this. I built locally instead and had a look, and this looks really great. I already had a go at adding some more references (in particular to MPSKitModels.jl via DocumenterInterlinks) and fixed some math rendering issues (it seems documenter has trouble with block equations delineated by I still have to regenerate the actual markdown and notebook files from the example script, I'll have another look at the contents once that's done. |
|
I would actually prefer if we can move away from reflow markdown and just linebreak after each sentence. |
I'd be happy with this, but if this is something we want to do in general there should really be an automatic way to do this. The reflow thing is far from ideal, but at least it's a single keystroke without manually hunting for periods. |
|
@leburgel Didn't realize that we could reference documentation. Thanks for adding them. |
leburgel
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Spotless, up to a few commas that I switched to semicolons because of who I am as a person. Very great to have this in, thanks @20akshay00!
I'll just check about the formatting one last time before I approve and merge. My personal opinion is that while having a line break after every sentence is by far the best way to go, as long as there's no way to automate this for a given example, I personally still prefer reflowing on line length since at least that's automatic.
However, it's also not that much work to line break consistently, so it would be a one-time pain to format all the existing examples manually, and after that just insist on future contributions being properly formatted before they go in. I still like this less, but I'd be perfectly okay with it if it comes down to it.
And if we decide on the latter approach, it makes sense to start here and hunt some periods before actually merging.
What do you think @lkdvos?
leburgel
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Leaving the formatting decision for a later time, better to have this in already than not.
Added an introductory example exploring the 1D Bose-Hubbard model in the thermodynamic limit. Mostly reproducing https://journals.aps.org/prb/abstract/10.1103/PhysRevB.105.134502. Faced a few issues so I removed those parts:
They compute correlation length using a formula I don't recognize. This does not match with the usual way of extracting it from the transfer matrix. But also fitting the correlation lengths computed their way does not seem to give the right Luttinger parameter either. I've used the same bond dimensions and parameters, and am pretty sure the tolerance isn't the issue so I'm not sure why the discrepancy arises.
Not too sure how best to compute superfluid stiffness. Maybe with autodiff? Finite differences didn't cut it to make a decent phase diagram.
Otherwise, its a very basic tutorial which doesn't go into too much depth. I will try to add some FiniteMPS examples as well soon.