GTorlai / PastaQ.jl

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

Add LPDO type #67

Closed mtfishman closed 4 years ago

mtfishman commented 4 years ago

This introduces the LPDO type. Currently it has pretty minimal functionality (see lpdo.jl for defined functions), but you can use the MPS/MPO underlying the LPDO L with L.X.

The main useful functions are ket(L, j) and bra(L, j), which return the bra and ket of the jth site. That means the density matrix on site j is basically ket(L, j) * bra(L, j). You can see how it is used in the lognormalize! function, but note that function could have simply been transcribed by using M = L.X and nothing would have needed to be changed.

The next goal would be to start using the LPDO type anywhere that is appropriate in the code, and add some new functionality where useful.