pasqal-io / qadence

Digital-analog quantum programming interface
https://pasqal-io.github.io/qadence/latest/
Apache License 2.0
64 stars 17 forks source link

[Feature] Computing partial trace outputs for statevectors and density matrices #367

Open rajaiitp opened 3 months ago

rajaiitp commented 3 months ago

It would nice to have basic density matrix related functionalities that are part of basic quantum information theory computations (partial trace, entropy, fidelity, purity..)

Roland-djee commented 3 months ago

@rajaiitp Could you please be more specific about the mathematical formulation of these ? Thanks.

rajaiitp commented 3 months ago

$PT{ij}(\rho{ijkl}) = tr{ij}(\rho{ijkl}) =\sum{i=(0,1),j=(0,1)}\rho{ijkl}$

here sqrt is defined as diagonalize, sqrt and undiagonalize

Roland-djee commented 3 months ago

Hey @rajaiitp could you please make sure the formulae above are correct ? Thanks.

Roland-djee commented 3 months ago

In my opinion, this could go with the introduction of a Result type.

rajaiitp commented 3 months ago

@Roland-djee yes the formulae above are correct, just edited some brackets, didnt know we had support for latex on here. I dont know what a Result type is

Roland-djee commented 3 months ago

@Roland-djee yes the formulae above are correct, just edited some brackets, didnt know we had support for latex on here. I dont know what a Result type is

Yeah no worries, it is just an idea for us internally to handle what you suggested.