Skip to content

Conversation

@leburgel
Copy link
Member

For a given particle number density n passed to bose_hubbard_model:

  • Modifies the charge shift to shift by U1Irrep(-n) such that the resulting physical charge density is U1Irrep(+n) as expected
  • Removes the n::Integer restriction to allow for halfinteger fillings

Fixes #46.

Note that this implementation will have to be changed once QuantumKitHub/MPSKit.jl#260 is resolved by changing the convention of MPSKit.add_physical_charge.

@codecov
Copy link

codecov bot commented Mar 18, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Files with missing lines Coverage Δ
src/models/hamiltonians.jl 38.28% <100.00%> (+11.71%) ⬆️

... and 3 files with indirect coverage changes

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

Copy link
Member

@lkdvos lkdvos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks okay to me. Any chance we can have test coverage for this? I'm somewhat okay with it if not really doable.

As a separate question, I guess fractional fillings aren't handled by this very well. If n is halfinteger, we should assert the unit cell length is even, and I'm okay with not supporting fractional fillings for now.

@leburgel
Copy link
Member Author

It's definitely doable to have coverage, but it's always tricky to find some concrete numerical values for basic observables as most reference go straight for full phase diagrams. I'm happy to keep this open until there's a test, at least it's some motivation.

I can add a unit cell check for halfinteger fillings, but it feels a little unusual to outright forbid this, no? Similarly, in the halfinteger spin Heisenberg model we also don't really check if the unit cell is compatible with this. It feels like this is more an MPS issue than an operator issue, although of course we would need a two-site MPO to be able to use a two-site MPS ansatz with it. So I'm happy to add the check, but it feels a bit inconsistent with the other model implementations.

I agree with not add fractional fillings here, I think this would really need a more in-depth example to be useful.

@lkdvos
Copy link
Member

lkdvos commented Mar 18, 2025

I guess if I ever get around adding support for coprime MPO-MPS lengths algorithms you are right... Let's leave out the check then.

@leburgel
Copy link
Member Author

leburgel commented Mar 18, 2025

Found some analytic large $U$ expression to test against, if lights turn green should be good to go then.

@lkdvos lkdvos merged commit a06d8cf into QuantumKitHub:master Mar 18, 2025
9 checks passed
@leburgel leburgel deleted the lb/bose_hubbard_density branch March 18, 2025 14:25
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.

Unintuitive behavior for particle number density keyword argument n in bose_hubbard_model

2 participants