Skip to content

Tensor-network backend: support Pauli generators beyond 2 bodies #7

Description

@Michele-Minervini

qbm/backends/tensor_network.py::_decompose raises for any generator acting on more than two sites:

generator {label} acts on N sites; the tensor-network backend supports
1- and 2-body Pauli generators only

That is a real restriction rather than a fundamental one — it exists because the Trotter gates are built as explicit 1- or 2-site matrices. Models built with pauli_pool(n, locality=3), or any 3-body coupling, simply cannot use this backend.

What to do

Either apply a k-site gate as an MPO, or decompose the k-body Pauli rotation into a CNOT-ladder of 2-site gates (the same structure qbm/circuits/builder.py::pauli_rotation already uses for circuits).

Acceptance

  • a 3-body generator agrees with the dense backend to the usual TN tolerance (~1e-6)
  • existing bond-dimension scaling is not degraded for 1-/2-body models

Getting oriented

Week 14 of the codebase tour.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    backendTouches the backend seamenhancementNew feature or capability

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions