UHFk to mVMC PairProduct bridge (SOC + APBC + SubShape > 1) - #76
Open
k-ido wants to merge 1 commit into
Open
Conversation
…> 1) Add a converter that builds mVMC PairProduct (fij) input from H-wave UHFk output, supporting spin-orbit coupling (spin-dependent hopping), anti-periodic boundary conditions, and SubShape > 1 sublattice folding. - tools/uhfk_to_mvmc.py + tools/_uhfk_to_mvmc/: converter CLI and modules (fij builders, orbital-index emitters/readers, transfer emission, hermiticity/density/energy gates, APBC boundary input) - src/hwave/solver/_apbc_phase.py: APBC phase helper, wired into solver/uhfk.py - tests/: unit tests plus tests/validation/uhfk_mvmc_pairproduct end-to-end harness (v3.6/v3.7 cases with recorded gate values) - docs/en, docs/ja: algorithm and file-specification pages for the bridge; minor updates to existing UHFk pages Validated on the pre-rebase development branch: full pytest suite (1439 passed / 100 skipped) and the E2E harness gates. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
tools/uhfk_to_mvmc.py, a bridge that converts an H-wave UHFkself-consistent solution into the initial PairProduct wave function of mVMC
(
InOrbital/InOrbitalAntiParallel/InOrbitalGeneral). The mVMCPairProduct state can then be initialized from an H-wave UHF Slater matrix.
The bridge covers, deterministically:
multi-direction APBC.
Rashba, Dresselhaus, general sigma_x / sigma_y one-body coupling),
emitting the Sz-non-conserving
Fcomponents.SubShapedividingCellShape, includingthe SOC + APBC +
SubShape > [1, 1, 1]combination.automatically from the orbitalidx metadata, its column form, and
enable_spin_orbital.The mapping conventions (positive-Bloch amplitude, sub_offset gauge composed
with the APBC twist, canonical-pair
F, partner balance, thetrans = -conj(v)Transfer rule) are documented indocs/{en,ja}/source/algorithm/uhfk_to_mvmc.rst; usage indocs/{en,ja}/source/uhfk/tools/uhfk_to_mvmc.rst.Validation
pyteston this branch (on top ofdevelop@ 5504b56):1457 passed / 124 skipped / 0 failed. The skips are optional-dependency
(sparse-ir, cupy) and intentional non-active-axis mutation no-ops. The
tracked tree stays clean after the test run.
trans.defagainst mVMC ComplexUHF (density, energy, topology gates):v3.7 four-fixture suite 28/28 PASS, v3.6 fixture PASS. Gate values match
every previously recorded digit, re-run on this branch.
Notes for reviewers
developtip (5504b56),so the diff is the bridge alone: no upstream file is modified beyond the
17 files listed below, and nothing is deleted.
tests/validation/(e.g.OneBodyG.dat) plus unit tests; the toolitself is
tools/uhfk_to_mvmc.py+tools/_uhfk_to_mvmc/..gitignore(adds bridge work-dirignores),
src/hwave/solver/uhfk.py(APBC phase handling via the new_apbc_phasehelper, plusoccupation/ boundary-condition output andSOC-aware greenone export), 12 docs
.rstpages (index wiring andcross-references), 2 UHFk tests extended for the new export/folding
behavior, and 1 whitespace-only cleanup
(
tests/test_uhfk_green_deflate_subshape.py).🤖 Generated with Claude Code and Codex (gpt-5.6-sol)