From ad78f14b6e61305387cff505da1819c429c2b961 Mon Sep 17 00:00:00 2001 From: Stefan Krastanov Date: Sat, 1 May 2021 18:13:07 -0400 Subject: [PATCH] Let U construct multi-qubit gates. --- src/Quantikz.jl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Quantikz.jl b/src/Quantikz.jl index e61b39a..da6af00 100644 --- a/src/Quantikz.jl +++ b/src/Quantikz.jl @@ -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)