You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
using Tenet
using LinearAlgebra
mat =reshape(LinearAlgebra.I(4), 2, 2, 2, 2)
gate =Quantum(mat, [site"2", site"3", site"2'", site"3'"])
oinds =Dict(site"2"=>:B, site"3"=>:C)
tmpinds =Dict(site =>gensym(:tmp) for site insites(gate; set=:inputs))
replace!(gate, [inds(gate; at=site) => i for (site, i) in tmpinds])
# HERE IS THE BUGreplace!(gate, [inds(gate; at=site) => i for (site, i) in oinds])
The result of gate.sites is
julia> gate.sites
Dict{Site, Symbol} with 4 entries:3=>:C3'=>Symbol("##tmp#272")
2'=>Symbol("##tmp#271")
2=>:C
when it should be
julia> gate.sites
Dict{Site, Symbol} with 4 entries:3=>:C3'=>Symbol("##tmp#272")
2'=>Symbol("##tmp#271")
2=>:B
In simple_update!, I've fixed it by calling it twice with some temporary indices in between, but we have to fix it to make it work without this workaround.
replace!(gate, [inds(gate; at=site) =>gensym() for (site, i) in oinds])
replace!(gate, [inds(gate; at=site) => i for (site, i) in oinds])
The text was updated successfully, but these errors were encountered:
The result of
gate.sites
iswhen it should be
In
simple_update!
, I've fixed it by calling it twice with some temporary indices in between, but we have to fix it to make it work without this workaround.The text was updated successfully, but these errors were encountered: