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
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..
put(n, i=>unitary_channel(...))
on density matrixThe text was updated successfully, but these errors were encountered: