Public
Edited
May 29, 2023
1 fork
1 star
Insert cell
Insert cell
Insert cell
dot`digraph {
node [fontcolor=black, fontname="Arial", color=orange]; edge [color=orange];
1 [xlabel="q1" fontcolor="orange"];
1 [label="ket(w=2)" fontcolor="black"];
2 [label="ket(w=3)" xlabel="q2"];
3 [label="map(+ 9, w=4)" xlabel="q3"];
3 -> 1;
4 [label="map(+, w=4)" xlabel="q4"];
4 -> 2; 4 -> 1;
5 [label="ket(w=3)" xlabel="q5"];
6 [label="map(> 4)"];
6 -> 5;
7 [label="map(* 2, w=4)"]; 7 -> 2;
8 [label="map(+ 10, w=4)"]; 8 -> 1;
9 [label="map(-, w=4)" xlabel="q6"]; 9 -> 8; 9 -> 7;
10 [label="map(== 11)"]; 10 -> 9;
}`
Insert cell
dot`digraph {
node [fontcolor=black, fontname="Arial", color=orange];
edge [color=orange];
1 [label="1: ket(w=2)"];
2 [label="2: ket(w=3)"];
{rank=max; 1; 2}
3 [label="3: map(+ 9, w=4)"]; 3 -> 1;
4 [label="4: map(+, w=4)"]; 4 -> 2; 4 -> 1;
// // 2 [label="ket(w=3)" xlabel="q2,q5"];
5 [label="5: map(> 4)"]; 5 -> 2;
6 [label="6: map(* 2, w=4)"]; 6 -> 2;
7 [label="7: map(+ 10, w=4)"]; 7 -> 1;
8 [label="8: map(-, w=4)"]; 8 -> 7; 8 -> 6;

// 1 [penwidth=4];
9 [label="9: map(== 11)"]; 9 -> 8;
}`
Insert cell
dot`digraph {
node [fontcolor=black, fontname="Arial", color=orange];
edge [color=orange];
1 [label="1: ket(w=2)"];
2 [label="2: ket(w=3)"];
{rank=max; 1; 2}
3 [label="3: map(+ 9, w=4)"]; 3 -> 1;
4 [label="4: map(+, w=4)"]; 4 -> 2; 4 -> 1;
// // 2 [label="ket(w=3)" xlabel="q2,q5"];

5 [label="5: map(> 4)"]; 5 -> 2;
6 [label="6: map(* 2, w=4)"]; 6 -> 2;
7 [label="7: map(+ 10, w=4)"]; 7 -> 1;
8 [label="8: map(-, w=4)"]; 8 -> 7; 8 -> 6;

// 1 [penwidth=4];
9 [label="9: map(== 11)"]; 9 -> 8;
2 [penwidth=4];
}`

Insert cell
html`
<style>
.selected { color: red; }
</style>
`
Insert cell
dot`digraph G {
"14: map (not)" -> "13: map (==)"
"13: map (==)" -> "3: where (op: <=)"
"3: where (op: <=)" -> "1: literal (width: 2)"
"3: where (op: <=)" -> "2: constant (2)"
"13: map (==)" -> "6: where (op: <=)"
"6: where (op: <=)" -> "4: literal (width: 2)"
"6: where (op: <=)" -> "5: constant (2)"
"22: map (and)" -> "16: map (not)"
"16: map (not)" -> "15: map (==)"
"15: map (==)" -> "6: where (op: <=)"
"6: where (op: <=)" -> "4: literal (width: 2)"
"6: where (op: <=)" -> "5: constant (2)"
"15: map (==)" -> "9: where (op: <=)"
"9: where (op: <=)" -> "7: literal (width: 2)"
"9: where (op: <=)" -> "8: constant (2)"
"22: map (and)" -> "21: map (and)"
"21: map (and)" -> "18: map (not)"
"18: map (not)" -> "17: map (==)"
"17: map (==)" -> "3: where (op: <=)"
"3: where (op: <=)" -> "1: literal (width: 2)"
"3: where (op: <=)" -> "2: constant (2)"
"17: map (==)" -> "9: where (op: <=)"
"9: where (op: <=)" -> "7: literal (width: 2)"
"9: where (op: <=)" -> "8: constant (2)"
"21: map (and)" -> "20: map (not)"
"20: map (not)" -> "19: map (==)"
"19: map (==)" -> "6: where (op: <=)"
"6: where (op: <=)" -> "4: literal (width: 2)"
"6: where (op: <=)" -> "5: constant (2)"
"19: map (==)" -> "12: where (op: <=)"
"12: where (op: <=)" -> "10: literal (width: 2)"
"12: where (op: <=)" -> "11: constant (2)"
}`
Insert cell
dot`graph {
node [shape=circle]
{rank=max; 1; 2}
{rank=min; 3; 4}
0 -- 1;
0 -- 2;
0 -- 3;
0 -- 4;
1 -- 2;
3 -- 4;
}`
Insert cell
dot`digraph G {
"18: map (eq)" -> "15: map (add_3)"
"15: map (add_3)" -> "13: literal (width: 3)"
"15: map (add_3)" -> "14: constant (3)"
"18: map (eq)" -> "17: map (multiply_5)"
"17: map (multiply_5)" -> "16: constant (2)"
"17: map (multiply_5)" -> "13: literal (width: 3)"
}`
Insert cell
import {qviz, render} from '@anpaz/quantum'
Insert cell
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more