Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Inconsistent existence of coordinate systems in node attributes

Open
#244 1 comment 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
python
Domain
data

Research direction

Start at the pegasus_graph entry point and compare node attributes for coordinates=False, coordinates=True, and nice_coordinates=True. Clarify the intended invariant for linear_index and pegasus_index, then add regression coverage showing consistent attributes across these initialization modes.

Written by the indexing model from the issue text.

Description

Graph node attributes contain inconsistent node attributes depending on initialization.
This makes downstream code unnecessarily complex and unreliable

Example:

import dwave_networkx as dnx

P = dnx.pegasus_graph(6, coordinates=False)
print(P.nodes[20])

P = dnx.pegasus_graph(6, coordinates=True)
print(P.nodes[0, 0, 4, 0])

P = dnx.pegasus_graph(6, nice_coordinates=True)
print(P.nodes[0, 0, 0, 0, 0])

outputs

{'pegasus_index': (0, 0, 4, 0)}
{'linear_index': 20}
{'linear_index': 20, 'pegasus_index': (0, 0, 4, 0)}
Dominant language
Python
Stars
95
Forks
62
Avg merge
8h 49m
Merged PRs (30d)
3

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

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.

More from dwavesystems/dwave-graphs

All issues in dwavesystems/dwave-graphs

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.