QuantumBFS / Yao.jl

Extensible, Efficient Quantum Algorithm Design for Humans.
https://yaoquantum.org
Other
910 stars 118 forks source link

Annotate a single line (for quantum error correction) #518

Closed GiggleLiu closed 1 week ago

GiggleLiu commented 1 week ago
image
julia> c = chain(put(5, 2=>X), put(5, 2=>line_annotation("!!!"; color="green")),  put(5, 3=>Y), control(5, 2, 3=>X))
nqubits: 5
chain
├─ put on (2)
│  └─ X
├─ put on (2)
│  └─ !!!
├─ put on (3)
│  └─ Y
└─ control(2)
   └─ (3,) X

julia> vizcircuit(c)