-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implementation of ZW Diagram #99
Conversation
Codecov ReportAttention:
... and 2 files with indirect coverage changes 📢 Thoughts on this report? Let us know!. |
I have sorted functions in docs based on their module. There is still a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this pull request is great overall. I only have a few minor comments to make.
src/parameter.jl
Outdated
@@ -1,3 +1,5 @@ | |||
using .ZXW:Parameter, PiUnit, Factor |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a space is missing after :
src/planar_multigraph.jl
Outdated
pmg2::PlanarMultigraph{T}, | ||
verbose::Bool, | ||
) where {T<:Integer} | ||
function print_nonoverlaping(dict1, dict2) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be better to move these functions outside of ==
?
src/planar_multigraph.jl
Outdated
end | ||
|
||
end | ||
function equiv_v2he(pmg1::PlanarMultigraph, pmg2::PlanarMultigraph) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same as above
src/planar_multigraph.jl
Outdated
return false | ||
end | ||
if nhe(pmg1) != nhe(pmg2) | ||
|
||
function equiv_f2he(pmg1::PlanarMultigraph, pmg2::PlanarMultigraph) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same
src/zw_diagram.jl
Outdated
ZWDiagram( | ||
pmg::PlanarMultigraph{T}, | ||
st::Dict{T,ZWSpiderType}, | ||
P::Type = Rational, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be better to change the function arguments to ZWDiagram(pmg::PlanarMultigraph{T}, st::Dict{T, ZWSpiderType}, scalar::Scalar{P})
so that the user can customize the scalar?
src/zw_diagram.jl
Outdated
ZWDiagram( | ||
pmg::PlanarMultigraph{T}, | ||
st::Vector{ZWSpiderType}, | ||
P::Type = Rational, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same as above
src/zw_utils.jl
Outdated
binZ(p) => p | ||
monoZ(p) => p | ||
Input(q) || Output(q) => q | ||
_ => Parameter(Val(:PiUnit), 0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Return nothing
here?
src/zw_utils.jl
Outdated
add_spider!(zwd, spider, connect = []) | ||
|
||
Add a new spider `spider` with appropriate parameter | ||
connected to the half edges`connect`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a missing space before connect
Start to implement ZWDiagram from Planar Multigraph data structure.
I try to implement the following ADTs that are generators of pW fragment, fragment for local fermionic mode quantum computer, universal quantum computer fragment.
It should be noted that I need to prove that binary Z spider and one-nary Z spider together with other generators can generate n-nary Z spider.