QuantumBFS / Yao.jl

Extensible, Efficient Quantum Algorithm Design for Humans.

Home Page:https://yaoquantum.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[TODO] Density Matrix Interfaces

GiggleLiu opened this issue · comments

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

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.

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.

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..