Skip to content

Conversation

@20akshay00
Copy link
Contributor

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:

  1. 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.

  2. 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.

@github-actions
Copy link
Contributor

github-actions bot commented Oct 31, 2025

Your PR no longer requires formatting changes. Thank you for your contribution!

@lkdvos lkdvos added the documentation Improvements or additions to documentation label Oct 31, 2025
@codecov
Copy link

codecov bot commented Oct 31, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.

Files with missing lines Coverage Δ
src/algorithms/toolbox.jl 95.15% <ø> (ø)

... and 5 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@lkdvos lkdvos added documentation Improvements or additions to documentation and removed documentation Improvements or additions to documentation labels Nov 3, 2025
@leburgel leburgel self-assigned this Nov 17, 2025
@leburgel
Copy link
Member

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 $$ ... $$ if they span multiple lines in the markdown). I also added explicit line breaks for the paragraphs using Reflow Markdown, since this is a bit easier on git (and also I never have line wrapping enabled on .jl files, so the runscript was a bit problematic for me :) ).

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.

@lkdvos
Copy link
Member

lkdvos commented Nov 18, 2025

I would actually prefer if we can move away from reflow markdown and just linebreak after each sentence.
I really don't like having to reflow entire paragraphs when a single word changes, and it makes it really hard to spot in the git diffs which word actually changed.

@leburgel
Copy link
Member

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.

@20akshay00
Copy link
Contributor Author

20akshay00 commented Nov 18, 2025

@leburgel Didn't realize that we could reference documentation. Thanks for adding them.

Copy link
Member

@leburgel leburgel left a 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 leburgel assigned lkdvos and unassigned leburgel and lkdvos Nov 19, 2025
Copy link
Member

@leburgel leburgel left a 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.

@leburgel leburgel merged commit 32fbd39 into QuantumKitHub:main Nov 20, 2025
27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants