Skip to content

unexpected output from chimera/pegasus/zephyr_coordinates #258

@mahdiehmalekian

Description

@mahdiehmalekian

Description
zephyr_coordinates.linear_to_zephyr and zephyr_coordinates.zephyr_to_linear do not raise ValueError for invalid inputs. Similarly for chimera_coordinates and pegasus_coordinates.

To Reproduce

import dwave_networkx as dnx
Z3 = dnx.zephyr_graph(m=3, t=4)
1000 in Z3.nodes()

returns False. However,
dnx.zephyr_coordinates(m=3, t=4).linear_to_zephyr(1000)
returns (5, 6, 2, 1, 1), which is not a valid Zephyr coordinate.

Expected behavior
I expect invalid input to raise ValueError.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions