Closed sylviemonet closed 3 years ago
Hi @sylviemonet --- This is a very exciting contribution. If I understand correctly you implement both the transformation and the gradient. I'd suggest you have a look at the function fock_tensor
which given a Symplectic matrix and vector of displacements calculates the Fock representation of the operation. Note that this function does not calculate the gradients.
Hi @sylviemonet --- This is a very exciting contribution. If I understand correctly you implement both the transformation and the gradient. I'd suggest you have a look at the function
fock_tensor
which given a Symplectic matrix and vector of displacements calculates the Fock representation of the operation. Note that this function does not calculate the gradients.
What is the purpose of looking at fock_tensor
?
@ziofil : could be useful as a reference and to check things are being done correctly. fock_tensor
does half the job of what @sylviemonet is implementing here. It is likely slower than a properly implemented jitted code.
I have no idea why the ci/circleci: osx-wheels fails here...
@sylviemonet it seems to be failing with a Segmentation Fault,
osx-wheels/thewalrus/tests/test_quantum.py Fatal Python error: Segmentation fault
Very odd 🤔
@sylviemonet it seems to be failing with a Segmentation Fault,
osx-wheels/thewalrus/tests/test_quantum.py Fatal Python error: Segmentation fault
Very odd 🤔
And I haven't touched this test_quantum.py file...
Merging #251 (957b2bc) into master (415e132) will not change coverage. The diff coverage is
100.00%
.
@@ Coverage Diff @@
## master #251 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 21 21
Lines 1381 1413 +32
=========================================
+ Hits 1381 1413 +32
Impacted Files | Coverage Δ | |
---|---|---|
thewalrus/__init__.py | 100.00% <100.00%> (ø) |
|
thewalrus/_hermite_multidimensional.py | 100.00% <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 415e132...957b2bc. Read the comment docs.
Ok, so it seems that once the linting issues are fixed, this PR will be ready for review.
It is really looking like this is close to ready for review! Great work @sylviemonet !
As I mentioned before, the main idea is to create the n-mode gaussian transformation and its gradient from the recursive relation, which is parametrized by the parameters C, mu, Sigma in the paper.
We know that the gaussian transformation can also be parameterized by its symplectic matrix and displacement vector, which are S, d we are referring to. And we have also a choi_trick function inside the test file to transform from S, d to its corresponding C, mu, Sigma. However, except for the test, we would keep the C, mu, Sigma as the main parameters for the gaussian gate and its gradients inside TheWalrus.
We'll (for sure) work with S and d for further implementation in Strawberryfields.
tests are all passing :D
@ziofil Hi Filippo, maybe you could help me to solve this conflict? (It demands someone with wrtie access)
Hi @sylviemonet --- I have solved the merge conflict. It also seems to me that, pending the test passing, this should be ready for review.
Also, once it is ready, don't forget to update the .github/CHANGELOG.md
This is the PR for our work of N-mode general gaussian transformation code with my supervisor @ziofil.
The main idea is to create the n-mode gaussian transformation and its gradient from the recursive parameters C, mu, Sigma in the paper.
Work in progress now.