GTorlai / PastaQ.jl

Package for Simulation, Tomography and Analysis of Quantum Computers
Apache License 2.0
142 stars 23 forks source link

Add vector of Index as optional input to `runcircuit`/`buildcircuit` #203

Open mtfishman opened 3 years ago

mtfishman commented 3 years ago

In cases where it is not clear what the index site ordering is, it would be good to have an interface for runcircuit/buildcircuit that accepts a vector of indices, for example:

ψ0 = qubits(N)
s = siteinds(ψ0)
ψ0 = MPS([ψ0[i] * ψ0[i+1] for i in 1:2:length(ψ0)])
ψ = runcircuit(ψ0, gates; siteinds = s)

In this case where MPS tensors get grouped together, internally it would be difficult to construct the gates since the site index ordering is not obvious (i.e. which site index on the first tensor is site 1 or 2 as specified in the gate list).