ITensor / ITensor/ITensorNetworks.jl

Generalize `contract(::ITensorNetwork, ::AbstractEdge)`

Open
#12 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Julia
Stars
128
Forks
23
Avg merge
4d 7h
Merged PRs (30d)
7

Description

Generalize contract(::ITensorNetwork, ::AbstractEdge) by connecting it to the generic graph function merge_vertices!(::Graph, vertices). contract can be implemented as merge_vertices! with a custom reduction/merge operation on the metadata of the vertices that are being merged. This could naturally encompass the operation of contracting a set of vertices (a region of the ITensorNetwork) with a custom contraction algorithm backend, and also generalize to contracting/merging vertices of an IndsNetwork.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the existing contract(::ITensorNetwork, ::AbstractEdge) implementation and the referenced Graphs.merge_vertices!(::Graph, vertices) API. Define how a custom metadata reduction or merge operation would connect them, including contraction of vertex regions and analogous merging for IndsNetwork. Done means the generalized contract operation supports those cases without leaving the current API behavior undefined.

Written by the indexing model from the issue text.

Assessment

Tech stack
julia
Domain
backend-api-design
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.