You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Mermaid diagrams are syntacticly simple and use indentation to follow the same hierarchical structure that HUGR has. The walker should be a perfect fit. Could replace the dot-string code base, or share the formatting code for names/ports etc.
Adds a `HugrView::mermaid_string` which produces things like
```mermaid
graph LR
subgraph 0 ["(0) DFG"]
direction LR
1["(1) Input"]
1--0:0-->3
1--1:1-->3
2["(2) Output"]
3["(3) test.quantum.CX"]
3--0:1-->4
3--1:0-->4
3-.2:2.-4
4["(4) test.quantum.CX"]
4--0:0-->2
4--1:1-->2
end
```
Note that edges in mermaid are unordered, so I had to add the port
indices explicitly.
The new code in `src/hugr/views/render.rs` is just moved from
`src/hugr/views.rs`.
Closes#696
Requires CQCL/portgraph#125
Mermaid diagrams are syntacticly simple and use indentation to follow the same hierarchical structure that HUGR has. The walker should be a perfect fit. Could replace the dot-string code base, or share the formatting code for names/ports etc.
Blocked by #626
The text was updated successfully, but these errors were encountered: