Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add n-mode gaussian transformation gate in TFbackend (#599)
* 1,2,3,4 in tfbackend codes * test for the new git config * changes in detail * modify the gradient part * move choi trick here to be differentiable * add the expression for C from S,d,t and put all codes in TF * new modifications for the parameters * add n_mode_gate code * fix problem from codefactor * fix * modify the n_mode_gate and add the tests for it * black the files * fix n_mode_gate nad gaussian_gate_matrix * add a Symplectic optimizer * delete optimizer for now and open a new PR for that * modify the functions from thewalrus * fix * balck files * fix * fix ns proble * minor addition on fock.py compiler * fix the problem about the *modes and register * fix trailing whitespace * modify the requirement for TheWalrus * requirements * https -> http * tests file modified * test 1 * parameter * modify tests * test 2 * add new test for gaussian gate * modify the dy inside the gradient of Ggate * modify the test * add the warning when initialize the Ggate to use the specific Symplectic Optimizer * black the file * move the warning from ops into the backend * fix warning * fix gradient problem: unconnected gradientgit add strawberryfields/backends/tfbackend/ops.py * once warning * fix import issue * change the requirement file for the version of thewalrus * blacked * fix tests * transpose the gate inside gaussian gate * blacked * changelog * test coverage changes or not * coverage upup * fix coverage * fix * ahhhh * last one * add tests * test * changelog + test file changed * change d->2N * blacked * new tests * Ggate test * test * test passed locally * 1 * test passed * remove the test of symplectic -> to be discussed * mayve_batch error fix * complex64 -> 128 * fix gradient of d proble, * comments fix * batch error * black ? * test * try to fix the test error * add cutoff param * try to fix test error * changes for req * req test * dicrease the cutoff dim in the test * make the test simple to see how is it going * git add tests/integration/test_ops_integration.py * fix error * optimize choi_trick func * try to change TF version * independence conflit * remove the tests * add one test * modify tests * modifyyyy * test 2 * error * modify the transp * hopefully fixes the last bugs * making codefactor happy * blacked * cover more * removes unused functions * put optimizer function inside ops (TOBE DISCUSSED) * add tests for optimizer * blacked * import update_symplectic in sf namespace * added blank lines for clarity * blacked * blacked tests * marked backend for tests * blacked * changes pytest mark * adds setup_backend fixture * removed tqdm * fixes Ggate test * blacked tests * trigger tests * fix [tfbackend/circuit] - gaussian_gate: pass dtype argument to gate implementation * refactor [tfbackend/ops] - gaussian_gate: use default tf dtype in class `FockStateTF` * fix [ops/gaussian_gate] - is_symplectic: lower atol for `tf.complex64` * fixed docstring * updated changelog * updated changelog * updated changelog * Update CHANGELOG.md * Update .github/CHANGELOG.md * Update requirements.txt * Update CHANGELOG.md * Update .github/CHANGELOG.md Co-authored-by: Theodor <theodor.isacsson@gmail.com> * def update_symplectic if tensorflow is installed * removed ns=None * fixes import * improved example * removed unnecessary return * improved warning message * blacked * improved import of update_symplectic * blacked Co-authored-by: Yuan Yao <yuanyao@YuandeMacBook-Pro.local> Co-authored-by: Nicolas Quesada <zeitus@gmail.com> Co-authored-by: ziofil <miatto@gmail.com> Co-authored-by: Theodor <theodor@xanadu.ai> Co-authored-by: ziofil <ziofil@users.noreply.github.com> Co-authored-by: Sebastián Duque Mesa <675763+sduquemesa@users.noreply.github.com> Co-authored-by: Josh Izaac <josh146@gmail.com> Co-authored-by: Theodor <theodor.isacsson@gmail.com>
- Loading branch information