ITensor / ITensor/NamedGraphs.jl

[ENHANCEMENT] Use AcceleratedArray (or something similar) as storage of named vertices

Open
#111 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Julia
Stars
10
Forks
5
Avg merge
6h 43m
Merged PRs (30d)
17

Description

Currently we use NamedGraphs.OrderedDictionaries.OrderedIndices as the storage format for NamedGraph vertices. The idea is that it is a Dictionaries.AbstractIndices subtype, so it acts like a set where the indices and values are the members of the set. The OrderedIndices type adds on a separate interface layer where you can index into the OrderedIndices by integer position using NamedGraphs.OrdinalIndexing, so it acts both like a set and like an array.

I've found that this design works pretty well, but I think it causes some awkward situations in generic code that assumes collections are "array-like", i.e. are primarily indexed by integer offsets/positions. Probably we should switch out OrderedIndices for a type that still acts like a set in terms of hashing/fast lookup, but is primarily indexed by integer positions of elements of the set. The closest example I know of in the Julia ecosystem is AcceleratedArrays.jl, we could try that directly or role our own version if it doesn't suit our purposes directly.

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 with src/lib/OrderedDictionaries/src/orderedindices.jl and the src/lib/OrdinalIndexing interface to understand the current vertex storage and indexing behavior. Evaluate whether AcceleratedArrays.jl provides the required set-like lookup and integer positional indexing, or whether a replacement is needed. Done means NamedGraphs uses the new storage while preserving both behaviors.

Written by the indexing model from the issue text.

Assessment

Tech stack
julia
Domain
backend
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.