Skip to content

Conversation

@Yue-Zhengyuan
Copy link
Member

Motivated by #264, this PR adds the conversion of the SUWeight environment of an iPEPS to a product-state CTMRGEnv. The no-so-elegant syntax is

CTMRGEnv(wts::SUWeight, peps::InfinitePEPS)

The reason for needing peps is that wts is stored in such a way that the axis order of each weight is dependent on the arrow direction in the PEPS (see discussions in #239). E.g. for x-weights, it is either 1 ← x ← 2 or 2 → x → 1.

The conversion is tested by comparing the 1 x 1 reduced density matrices obtained by a manual construction and reduced_densitymatrix.

@codecov
Copy link

codecov bot commented Oct 16, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.

Files with missing lines Coverage Δ
src/environments/suweight.jl 87.23% <100.00%> (+3.02%) ⬆️

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

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

This looks great, and would be really good functionality to have.

It would be great to revisit #223 at some point and try to merge common functionality between the BPEnv there and the environment being constructed here. But at this point, I think it's good to have this as is.

@Yue-Zhengyuan Yue-Zhengyuan merged commit 899c5a5 into QuantumKitHub:master Oct 25, 2025
51 checks passed
@Yue-Zhengyuan Yue-Zhengyuan deleted the suweight-to-ctmrgenv branch October 25, 2025 01:23
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.

3 participants