-
Notifications
You must be signed in to change notification settings - Fork 31
Make fock non-mutating
#438
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
Conversation
|
@albertomercurio But I just want to say that the tests are failing. |
|
Yes there was a typo. It should work now |
|
OK, I was too lazy not to run the tests locally. Let me do it, and then I’ll push it. |
|
Should it be By the way, I was thinking, would it be more efficient if we just create the sparse one, and then do |
|
Yes, indeed. Just pushed right now. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #438 +/- ##
==========================================
- Coverage 94.39% 94.39% -0.01%
==========================================
Files 47 47
Lines 2998 2997 -1
==========================================
- Hits 2830 2829 -1
Misses 168 168 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
I don't know why the format test failed. Everything is formatted, and it is detecting non formatted files that I didn't touch in this PR |
|
The format error is due to the update of JuliaFormatter.jl. This will be fixed in a separate PR |
Checklist
Thank you for contributing to
QuantumToolbox.jl! Please make sure you have finished the following tasks before opening the PR.make test.juliaformatted by running:make format.docs/folder) related to code changes were updated and able to build locally by running:make docs.CHANGELOG.mdshould be updated (regarding to the code changes) and built by running:make changelog.Request for a review after you have completed all the tasks. If you have not finished them all, you can also open a Draft Pull Request to let the others know this on-going work.
Description
Here I do a small change in the generation of a
fockstate, using comprehension instead of creating a zero vector and then mutating one element. This would support Zygote.jl differentiation, as it doesn't support mutating arrays.