Yao.jl icon indicating copy to clipboard operation
Yao.jl copied to clipboard

[TODO] Density Matrix Interfaces

Open GiggleLiu opened this issue 2 years ago • 3 comments

  • [ ] noise channels
  • [ ] partial transpose
  • [ ] POVM measurement
  • [ ] Master equation
  • [ ] Define the apply function for put(n, i=>unitary_channel(...)) on density matrix

GiggleLiu avatar May 29 '22 06:05 GiggleLiu

I was looking into implementing intermediate measurements with measure!() for DensityMatrixes. One option is to reimplement most of the YaoAPI.measure!() logic here for density matrices. The other option is to implement focus! and relax! for density matrices. As far as I can tell, it should be possible to implement focus! and relax! s.t. density matrices are 4-dimensional arrays and instruct! still works correctly. Tough the downside of that would be that a lot of the stuff like von_neumann_entropy, mutual_information etc. will need to reshape the 4-dimensional dm.state to a 2-dimensional matrix to work.

jlbosse avatar Mar 06 '23 11:03 jlbosse

Implementing focus! and relax! for density matrices may not be easy easy. These two functions are for selecting system qubits, which may cause loss of information for density matrices. I would suggest implementing measure! directly.

GiggleLiu avatar Mar 09 '23 01:03 GiggleLiu

I am not sure I follow. How would focus! and relax! loose information?

My idea was to change DensityMatrix is a 2^nactive × 2^nremain × 2^nactive × 2^nremain array (assuming qubits, remain 2 with nlevel for qudits). Of course, this would imply quite a few changes for all functions that currently use matrix algebra, like tr, mutual_information etc..

jlbosse avatar Mar 09 '23 11:03 jlbosse