bsc-quantic / Qrochet.jl

Quantum Tensor Networks
https://bsc-quantic.github.io/Qrochet.jl/
Apache License 2.0
1 stars 0 forks source link

Integrate Quac with Qrochet #9

Closed Todorbsc closed 7 months ago

Todorbsc commented 7 months ago

Closes #7

codecov[bot] commented 7 months ago

Codecov Report

Attention: 3 lines in your changes are missing coverage. Please review.

Comparison is base (482ac90) 56.98% compared to head (65bc6bc) 60.76%. Report is 1 commits behind head on master.

:exclamation: Current head 65bc6bc differs from pull request most recent head c033992. Consider uploading reports for the commit c033992 to get more accurate results

Files Patch % Lines
ext/QrochetQuacExt.jl 86.95% 3 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #9 +/- ## ========================================== + Coverage 56.98% 60.76% +3.77% ========================================== Files 5 6 +1 Lines 186 209 +23 ========================================== + Hits 106 127 +21 - Misses 80 82 +2 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

Todorbsc commented 7 months ago

Three issues:

jofrevalles commented 7 months ago

I think the "all inner indices are not sites" condition can be too strict, but is ok for now. What do you think @jofrevalles?

Yes, I agree that it is too strict, but for now I think this test is OK. I would maybe add a test to see if the contraction of the TensorNetwork works and that's it.

mofeing commented 7 months ago

I would maybe add a test to see if the contraction of the TensorNetwork works and that's it.

It's better to not mix tests: That's a test for contract(::TensorNetwork), not for Quantum.

mofeing commented 7 months ago
  • Do we need to check if the gates' matrices (tensors) have the right values?

No, that is the responsability of Quac.

  • Is there any case of a quantum circuit where Biyections are needed to correctly build the sites?

I don't understand the question. Can you rephrase it?

  • Should we add a test with "Swap" quantum gates?

I don't think we need a special test for that. Do you have an edge case in mind?

Todorbsc commented 7 months ago
  • Do we need to check if the gates' matrices (tensors) have the right values?

No, that is the responsability of Quac.

Perfect!

  • Is there any case of a quantum circuit where Biyections are needed to correctly build the sites?

I don't understand the question. Can you rephrase it?

In Tenet, Biyections were used to find the sites (which was called interlayer) so I thought maybe that was necessary (https://github.com/bsc-quantic/Tenet.jl/blob/v0.3.0/ext/TenetQuacExt.jl#L35)

  • Should we add a test with "Swap" quantum gates?

I don't think we need a special test for that. Do you have an edge case in mind?

Well, I suggested a test for a quantum circuit with swap gates just to have a complete code coverage of the extension.

mofeing commented 7 months ago

In Tenet, Biyections were used to find the sites (which was called interlayer) so I thought maybe that was necessary (https://github.com/bsc-quantic/Tenet.jl/blob/v0.3.0/ext/TenetQuacExt.jl#L35)

Nope, that was another implementation.

Well, I suggested a test for a quantum circuit with swap gates just to have a complete code coverage of the extension.

Well, it's just another gate. Nothing special should happen. If you want to translate the Swap gate to a real swap of the tensor indices, then that is a Transformation and so, it's not the responsability of Quantum.