dwave_networkx.pegasus_coordinates.pegasus_to_linear#

pegasus_coordinates.pegasus_to_linear(q)[source]#

Converts a 4-term Pegasus coordinate into a linear index.

Parameters:

q (4-tuple) – Pegasus indices.

Examples

>>> dnx.pegasus_coordinates(2).pegasus_to_linear((0, 0, 4, 0))
4