Quantinuum / Quantinuum/portgraph

Get all unconnected inputs or outputs in a canonical order

Open
#259 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement question
Dominant language
Rust
Stars
17
Forks
6
Avg merge
19m
Merged PRs (30d)
3

Description

Sorry if this is already possible, but I did not seem to find a documented way to do this.

Is there any way to iterate over all the unconnected inputs or outputs of the graph, in some predictable canonical order?

Furthermore, is the order stable across deletion of nodes or links? Say that a graph contains nodes A, B, C and I know that the inputs of A would be iterated over before the inputs of C. If I then delete B, am I guaranteed that the relative ordering of A's inputs and C's inputs are preserved?

I was developing my own implementation of port graphs before stumbling on this crate, and was thinking of abandoning my own crate to contribute to this one. I have already implemented this feature in my crate, so I would be happy to implement this feature myself.

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 locating the crate's existing APIs for iterating unconnected inputs and outputs, then inspect how node and link deletion affects iteration order. Define focused tests for canonical ordering and for preserving relative order after deletion; the issue is complete when both behaviors are documented and verified.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.