pasqal-io / qadence

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

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

Open rajaiitp opened 8 months ago

rajaiitp commented 8 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..)

RolandMacDoland commented 8 months ago

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

rajaiitp commented 8 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

RolandMacDoland commented 8 months ago

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

RolandMacDoland commented 8 months ago

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

rajaiitp commented 8 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

RolandMacDoland commented 8 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.

mlahariya commented 4 days ago

This should be added to backend utils - and should be resolved in qadence 2. Refinement on implementation details is needed.

@rajaiitp Can you help us define the priority of this issue? Is it needed urgently?

rajaiitp commented 2 days ago

Rarely used. Its just a property of the state that sometimes people care to look into. (probably used once or twice so far at best)