Skip to content

Commit

Permalink
Let U construct multi-qubit gates.
Browse files Browse the repository at this point in the history
  • Loading branch information
Krastanov committed May 1, 2021
1 parent 28ddd55 commit ad78f14
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Quantikz.jl
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,8 @@ struct U <: QuantikzOp
end

U(target::Integer) = U("\\;\\;", target)
U(targets::AbstractVector{<:Integer}) = MultiControlU("\\;\\;", targets)
U(str::AbstractString, targets::AbstractVector{<:Integer}) = MultiControlU(str, targets)

affectedqubits(u::U) = [u.target]
function update_table!(qtable,step,u::U)
Expand Down

0 comments on commit ad78f14

Please sign in to comment.