ITensor / ITensor/NamedGraphs.jl
[ENHANCEMENT] Further improvements to graph indexing code logic
Open
Nobody has claimed this yet.
enhancement
- Dominant language
- Julia
- Stars
- 10
- Forks
- 5
- Avg merge
- 6h 43m
- Merged PRs (30d)
- 17
Description
Here are some potential followups to #115:
-
Vertexwrapper (likeVerticesbut indicating it is a single vertex). -
to_vertexfunction as an interface for canonicalizing single vertex inputs, such as convertingQuotientVertexVertexto a plain vertex (which is currently handled byto_graph_index). -
get_graph_indexcould call out to new interface functionsget_graph_vertexorget_graph_edge, and maybe callto_vertexorto_edgefor vertex/edge canonicalization (see the point above proposingto_vertex). -
get_graph_indicescould call out to new interface functionsget_graph_verticesorget_graph_edges, which could callto_verticesorto_edgesfor vertex/edge collection canonicalization (such as wrappingQuotientVertexVerticesin aQuotientVertexSlice). - Reevaluate
parent_graph_indices, maybe find a better name or see if it can be removed. - Reevaluate
graph_index_list_to_graph_indexname/interface. Maybe it could be calledflatten_graph_index_list? - Define
isassigned(g::AbstractNamedGraph, I) = false(and write it in terms of associated interface functionsis_graph_index_assigned, etc. which would get overloaded by DataGraphs). - Define and
ispartitioned(g)trait function and use it indepartition/unpartition, see the discussion here: https://github.com/ITensor/DataGraphs.jl/pull/55#discussion_r2774748837. - Reassess what is output by
add/rem_vertex!,add/rem_edge!, since it is not consistent with the output of those functions in Graphs.jl. Maybe we want to introduce other stricter interfaces likeinsert_vertex!,delete_vertex!,set_vertex!,unset_vertex!, etc. (modeled after the Dictionaries.jl interface).
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading issue #115 and the linked pull-request discussion. The issue lists several possible interface and naming changes but does not identify files, tests, or a single agreed scope. Before implementation, narrow it to one follow-up and define the expected interface behavior and completion criteria.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- data
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100