Skip to content

Commit

Permalink
Transpose the matrix from Yao Blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
jofrevalles committed Sep 26, 2024
1 parent 2bf32ca commit e9fa9c8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ext/TenetYaoBlocksExt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ function Tenet.Quantum(circuit::AbstractBlock)
else
content(gate)
end
array = reshape(mat(operator), fill(nlevel(operator), 2 * nqubits(operator))...)
array = reshape(transpose(mat(operator)), fill(nlevel(operator), 2 * nqubits(operator))...)

inds = (x -> collect(Iterators.flatten(zip(x...))))(
map(occupied_locs(gate)) do l
Expand Down

0 comments on commit e9fa9c8

Please sign in to comment.