@device function cnot_layer(configs::AbstractMatrix)
@inbounds for j in 1:size(configs, 2), i in 1:size(configs, 1)
if (i != j) && (configs[i, j] == true)
@ctrl i j=>X
end
end
return
end
returns nothing, but
@device function cnot_layer(configs::AbstractMatrix)
@inbounds for j in 1:size(configs, 2), i in 1:size(configs, 1)
if (i != j) && (configs[i, j] == true)
@ctrl i j=>X
end
end
end
MWE:
returns nothing, but
returns register