pasqal-io / qadence

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

[Refactor] Better use of projectors #268

Closed Roland-djee closed 1 month ago

Roland-djee commented 7 months ago

Projectors are basic operations in quantum mechanics defined in Qadence by being the outer product between ket and bra bitstrings. It is represented by the ProjectorBlock here.

More complex operations and algorithms can be built on top of projectors. However, there are few places in Qadence where projectors can be used as a replacement for built-in operations. In particular:

Roland-djee commented 2 months ago

@dominikandreasseitz @jpmoutinho Does it sound OK to you guys ?

jpmoutinho commented 2 months ago

Yes 👍

Should it really be changed in the Shadows though? There you use the matrix directly, not the block.

Roland-djee commented 2 months ago

Yes 👍

Should it really be changed in the Shadows though? There you use the matrix directly, not the block.

Yes, but you can block_to_tensor it.

king-p3nguin commented 1 month ago

Hi, I would like to work on this issue for unitaryhack.

Roland-djee commented 1 month ago

Hi, I would like to work on this issue for unitaryhack.

Hi @king-p3nguin thanks for your interest in working on Qadence ! Feel free to ask questions here if you find anything unclear and raise a PR for your solution.