Skip to content

Commit

Permalink
Adds bosoniccircuit.py and its tests (#538)
Browse files Browse the repository at this point in the history
* Adds bosoniccircuit.py and its tests

* Codefactor changes

* ran black

* More codefactor

* You guessed it: more codefactor

* Update strawberryfields/backends/bosonicbackend/bosoniccircuit.py

* Update strawberryfields/backends/bosonicbackend/bosoniccircuit.py

* Passes black

* adds disable

* puts disables in right places

* puts disables in right places

* Fix bug in if statement

* Apply suggestions from code review

Applies minor suggestions from Antal and Theo

Co-authored-by: antalszava <antalszava@gmail.com>
Co-authored-by: Theodor <theodor@xanadu.ai>

* Ran black

* Tidying code

Based on Antal and Theo's comments:
- more info in some docstrings
- clearer variable names
- extensive commenting of the generaldyne sampling algorithm

* Ran black

* Apply suggestions from code review

Co-authored-by: antalszava <antalszava@gmail.com>

* Changes how Y mat is created

- Applies Nico's suggestion

* Minor modifications based on code review

* Adds reset function to class init

- modifies/fixes associated tests

* Splits mb_squeeze into two cases

- Average map directly applied Gaussian CPTP map
- Single shot case simulates ancilla measurement and feedforward

* Add missing word to docstring

* Apply suggestions from code review

Co-authored-by: antalszava <antalszava@gmail.com>

* Tests for add/del modes and expandXY

-plus some docstring tidying

* Splits up gaussian transformations test

and runs black

* Docstring edit/rerunning codecov

* ci update

Co-authored-by: Nicolas Quesada <zeitus@gmail.com>
Co-authored-by: antalszava <antalszava@gmail.com>
Co-authored-by: Theodor <theodor@xanadu.ai>
  • Loading branch information
4 people committed Feb 9, 2021
1 parent b39add3 commit 079191a
Show file tree
Hide file tree
Showing 4 changed files with 1,463 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ jobs:
access_token: ${{ github.token }}

- uses: actions/checkout@v2
with:
fetch-depth: 2

- name: Set up Python
uses: actions/setup-python@v2
Expand Down

0 comments on commit 079191a

Please sign in to comment.