Skip to content

Add dependency graph infrastructure #4

@shwestrick

Description

@shwestrick

We should incorporate Colin's dependency graph tool, for gate scheduling.

The script is currently available here. Usage: $ python3 depgraph.py circuit.qasm

@colin-mcd, can you add your tool to this repo?

dependency graph representation

Colin's script outputs JSON describing the dependencies between gates, for example:

{ 
  "nodes": [
    {"name": "x", "qargs": [0]},      // gate 0
    {"name": "cx", "qargs": [1, 0]},  // gate 1
    {"name": "x", "qargs": [0]},      // etc...
    {"name": "h", "qargs": [1]},
    {"name": "rz", "params": [3.141592653589793], "qargs": [1]}
  ],

  "edges": [
    [3, 4],   // gate 3 has to be executed before gate 4
    [1, 3]    // gate 1 has to be executed before gate 3
  ]
}

For the simulators, we'll just need to parse this JSON as input.

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