Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(spec): Clean up non-local edges CFG example (#1369)
Closes #248 There are still some visual glitches, but it should be more readable now. Adds two invisible order edges to the input nodes, changing this ```mermaid flowchart subgraph CFG direction TB subgraph Entry direction TB EntryIn["Input"] -- "P" --> Entry_["P?1"] Entry_ -- "[()|(P)]" --> EntryOut["Output"] F end subgraph BB1 direction TB BB1In["Input"] BB1_["Const"] -- "[()]" --> BB1Out["Output"] G -- "angle" --> BB1Out end subgraph BB2 direction TB BB2In["Input"] -- "P" --> H -- "P" --> BB2_["P?2"] BB2_ -- "[()|()]" --> BB2Out["Output"] end subgraph BB3 direction TB BB3In["Input"] BB3_["Const"] -- "[()]" --> BB3Out["Output"] C -- "angle" --> BB3Out end subgraph Exit end Entry -- "0" --> BB1 Entry -- "1" --> BB2 BB2 -- "0" --> BB1 BB2 -- "1" --> BB3 BB1 -- "0" --> Exit BB3 -- "0" --> Exit end A -- "P" --> CFG A -- "qubit" --> Rz_out["Rz"] CFG -- "angle" --> Rz_out Rz_out -- "qubit" --> B A == "angle" ==> F F == "angle" ==> G linkStyle 12,13,14,15,16,17 stroke:#ff3,stroke-width:4px; ``` into this ```mermaid flowchart subgraph CFG direction TB subgraph Entry direction TB EntryIn["Input"] -- "P" --> Entry_["P?1"] Entry_ -- "[()|(P)]" --> EntryOut["Output"] F end subgraph BB1 direction TB BB1In["Input"] BB1_["Const"] -- "[()]" --> BB1Out["Output"] G -- "angle" --> BB1Out BB1In ~~~ G end subgraph BB2 direction TB BB2In["Input"] -- "P" --> H -- "P" --> BB2_["P?2"] BB2_ -- "[()|()]" --> BB2Out["Output"] end subgraph BB3 direction TB BB3In["Input"] BB3_["Const"] -- "[()]" --> BB3Out["Output"] C -- "angle" --> BB3Out BB3In ~~~ C end subgraph Exit end Entry -- "0" --> BB1 Entry -- "1" --> BB2 BB2 -- "0" --> BB1 BB2 -- "1" --> BB3 BB1 -- "0" --> Exit BB3 -- "0" --> Exit end A -- "P" --> CFG A -- "qubit" --> Rz_out["Rz"] CFG -- "angle" --> Rz_out Rz_out -- "qubit" --> B A == "angle" ==> F F == "angle" ==> G linkStyle 12,13,14,15,16,17 stroke:#ff3,stroke-width:4px; ```
- Loading branch information