Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove redundant Qmat, Amat calls from generate_hafnian_sample #343

Merged
merged 3 commits into from
May 24, 2022
Merged

Remove redundant Qmat, Amat calls from generate_hafnian_sample #343

merged 3 commits into from
May 24, 2022

Conversation

thonic
Copy link
Contributor

@thonic thonic commented May 19, 2022

Context:
There is an extra call of the Qmat function in the generate_hafnian_sample function.

Description of the Change:
Remove redundant call of Qmat, Amat from generate_hafnian_sample.

Benefits:
Removed redundant code

Possible Drawbacks:
None

Related GitHub Issues:
None

@codecov
Copy link

codecov bot commented May 19, 2022

Codecov Report

Merging #343 (16c018b) into master (d15656c) will not change coverage.
The diff coverage is n/a.

@@            Coverage Diff            @@
##            master      #343   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           24        24           
  Lines         1726      1725    -1     
=========================================
- Hits          1726      1725    -1     
Impacted Files Coverage Δ
thewalrus/samples.py 100.00% <ø> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d15656c...16c018b. Read the comment docs.

Copy link
Contributor

@thisac thisac left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution @thonic! Great find! I only had a few minor comments that would be good to address. Let me know if you have any questions about them.

.github/CHANGELOG.md Outdated Show resolved Hide resolved
thewalrus/_version.py Outdated Show resolved Hide resolved
thewalrus/samples.py Outdated Show resolved Hide resolved
@thonic
Copy link
Contributor Author

thonic commented May 20, 2022

@thisac I agree with all the comments, I have changed the commits accordingly, thank you.

@thonic thonic changed the title generate_hafnian_sample should not pass Qmat as a covariance matrix Remove redundant Qmat, Amat calls from generate_hafnian_sample should May 20, 2022
@thonic thonic changed the title Remove redundant Qmat, Amat calls from generate_hafnian_sample should Remove redundant Qmat, Amat calls from generate_hafnian_sample May 20, 2022
.github/CHANGELOG.md Outdated Show resolved Hide resolved
Co-authored-by: Sebastián Duque Mesa <675763+sduquemesa@users.noreply.github.com>
@thonic
Copy link
Contributor Author

thonic commented May 23, 2022

@sduquemesa done

Copy link
Contributor

@thisac thisac left a comment

Choose a reason for hiding this comment

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

Looks great! Thanks for the contribution @thonic!

@thisac thisac merged commit d8def78 into XanaduAI:master May 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants