Skip to content
This repository has been archived by the owner on Jul 7, 2024. It is now read-only.

Integrate Quac with Qrochet #9

Merged
merged 13 commits into from
Feb 16, 2024
Merged

Integrate Quac with Qrochet #9

merged 13 commits into from
Feb 16, 2024

Conversation

Todorbsc
Copy link
Contributor

Closes #7

Copy link

codecov bot commented Feb 15, 2024

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.

❗ 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 ⚠️
Additional details and impacted files
@@            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     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Todorbsc
Copy link
Contributor Author

Todorbsc commented Feb 15, 2024

Three issues:

  • Do we need to check if the gates' matrices (tensors) have the right values?
  • Is there any case of a quantum circuit where Biyections are needed to correctly build the sites?
  • Should we add a test with "Swap" quantum gates?

test/runtests.jl Outdated Show resolved Hide resolved
test/integration/QrochetQuacExt_test.jl Outdated Show resolved Hide resolved
test/integration/QrochetQuacExt_test.jl Outdated Show resolved Hide resolved
Todorbsc and others added 3 commits February 15, 2024 17:32
Co-authored-by: Sergio Sánchez Ramírez <15837247+mofeing@users.noreply.github.com>
Copy link
Member

@mofeing mofeing left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes! This is the kind of tests I was referring to.

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

LGTM, but just suggested changes.

test/integration/QrochetQuacExt_test.jl Outdated Show resolved Hide resolved
test/integration/QrochetQuacExt_test.jl Outdated Show resolved Hide resolved
test/integration/QrochetQuacExt_test.jl Outdated Show resolved Hide resolved
Co-authored-by: Sergio Sánchez Ramírez <15837247+mofeing@users.noreply.github.com>
@jofrevalles
Copy link
Member

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 mofeing changed the title Integrate Quac in Qrochet Integrate Quac with Qrochet Feb 16, 2024
@mofeing
Copy link
Member

mofeing commented Feb 16, 2024

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
Copy link
Member

mofeing commented Feb 16, 2024

  • 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
Copy link
Contributor Author

Todorbsc commented Feb 16, 2024

  • 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
Copy link
Member

mofeing commented Feb 16, 2024

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.

@mofeing mofeing merged commit 71c761d into master Feb 16, 2024
0 of 2 checks passed
@mofeing mofeing deleted the fix/#7_integrate_quac branch February 16, 2024 11:21
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Integrate Quac with Qrochet
3 participants