Skip to content

Some feedbacks #49

Description

@GiggleLiu
  • simplify!(Rule{:lc}(), ::ZXDiagram) should not work, but it does not give an error.
  • the _ctrl in push_ctrl_gate! looks not necessary.
  • the naming of simplify! and replace! are not intuitive, should be something like simplify_recursive! and simplify_once!?
  • it would be nice to have a pipeline interface zxg |> srule!(:lc) |> srule!(:p1) |> srule_once!(:pab)
  • the following code looks confusing to me
  • do you mind changing name of phase to e.g. getphase`, because it conflicts with the phase gate in Yao.
julia> zxd = ZXDiagram(4);

julia> push_gate!(zxd, Val(:Z), 4);

julia> push_gate!(zxd, Val(:X), 4)
ZX-diagram with 10 vertices and 6 multiple edges:
(S_1{input} <-1-> S_2{output})
(S_3{input} <-1-> S_4{output})
(S_5{input} <-1-> S_6{output})
(S_7{input} <-1-> S_9{phase = 0//1π})
(S_8{output} <-1-> S_10{phase = 0//1π})
(S_9{phase = 0//1π} <-1-> S_10{phase = 0//1π})

X gate is push_gate!(zxd, Val(:X), 4, 0//1), Z gate is push_gate!(zxd, Val(:Z), 4, π)
Maybe just forbid this interface?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions