Skip to content

Add symmetry-free MPS network to Hubbard and Ising models - #212

Merged
hzhangxyz merged 2 commits into
mainfrom
copilot/add-mps-to-hubbard-ising
Mar 5, 2026
Merged

Add symmetry-free MPS network to Hubbard and Ising models#212
hzhangxyz merged 2 commits into
mainfrom
copilot/add-mps-to-hubbard-ising

Conversation

Copilot AI commented Mar 5, 2026

Copy link
Copy Markdown
Contributor

MPS (Matrix Product State) was available as a network architecture but not wired into the Hubbard or Ising model registries. Since MPS carries no symmetry constraints, it registers as "mps" (no /u1 or similar suffix).

Changes

  • qmp/models/hubbard.py — adds MpsConfig with virtual_dim (bond dimension, default 16); uses sites = m × n × 2 to account for spin-up/spin-down orbitals per lattice site
  • qmp/models/ising.py — adds MpsConfig with virtual_dim (default 16); uses sites = m × n

Both register under Model.network_dict["mps"].

Usage

# Hubbard 4×4, MPS bond dim 32
{"model": "hubbard", "model_config": {"m": 4, "n": 4}, "network": "mps", "network_config": {"virtual_dim": 32}}

# Ising 4×4 ZZ, MPS bond dim 16 (default)
{"model": "ising", "model_config": {"m": 4, "n": 4, "zh": 1}, "network": "mps"}
Original prompt

This section details on the original issue you should resolve

<issue_title>将mps网络添加到hubbard和ising中</issue_title>
<issue_description>注意这个是无对称性的ansatz, 所以直接称呼为 "mps" , 不需要 "/u1" 之类的后缀</issue_description>

Comments on the Issue (you are @copilot in this section)


🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

Co-authored-by: hzhangxyz <11623447+hzhangxyz@users.noreply.github.com>
Copilot AI changed the title [WIP] Add MPS network to Hubbard and Ising models Add symmetry-free MPS network to Hubbard and Ising models Mar 5, 2026
@hzhangxyz
hzhangxyz marked this pull request as ready for review March 5, 2026 23:16
Copilot AI review requested due to automatic review settings March 5, 2026 23:16
@hzhangxyz
hzhangxyz merged commit 2976d08 into main Mar 5, 2026
6 checks passed

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Wires the existing symmetry-free MPS network into the Hubbard and Ising model registries under the "mps" key.

Changes:

  • Add MpsConfig (with virtual_dim) and register it as Model.network_dict["mps"] for Ising.
  • Add MpsConfig (with virtual_dim) and register it as Model.network_dict["mps"] for Hubbard.
  • Use sites = m * n (Ising) vs sites = m * n * 2 (Hubbard, spin up/down orbitals).

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
qmp/models/ising.py Imports MPS wavefunction, adds MpsConfig, and registers "mps" network for Ising.
qmp/models/hubbard.py Imports MPS wavefunction, adds MpsConfig, and registers "mps" network for Hubbard (with * 2 sites).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.

将mps网络添加到hubbard和ising中

3 participants