-
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
convert ZXDiagram to tensor network #16
Labels
Comments
Might be useful in the future.
|
The correspondence with Yao.jlθ = 0.5
@test mat(Rz(θ) * phase(θ/2)) ≈ ztensor(2, θ)
@test mat(Rx(θ) * phase(θ/2)) ≈ xtensor(2, θ)
@test mat(H) .* sqrt(2) ≈ htensor(2, π)
@test mat(shift(θ)) ≈ ztensor(2, θ) Some identities θ = 0.5
@test mat(Rz(θ) * Yao.phase(θ/2)) ≈ ztensor(2, θ)
@test mat(shift(θ)) ≈ ztensor(2, θ)
@test mat(Rx(θ) * Yao.phase(θ/2)) ≈ xtensor(2, θ)
@test mat(H) .* sqrt(2) ≈ htensor(2, π)
@test mat(T) ≈ ztensor(2, π/4)
@test mat(ConstGate.S) ≈ ztensor(2, π/2)
@test mat(chain(ConstGate.Sdag, X, ConstGate.S)) ≈ mat(Y)
@test mat(T) ≈ mat(Rz(π/4) * Yao.phase(π/8))
@test mat(ConstGate.S) ≈ mat(Rz(π/2) * Yao.phase(π/4)) For more, see https://github.com/QuantumBFS/YaoZX.jl |
This is implemented in #93 albeit for zxw diagram. I will close this for now. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
No description provided.
The text was updated successfully, but these errors were encountered: