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

Merge the demo branch into master #319

Merged
merged 421 commits into from
Mar 19, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
421 commits
Select commit Hold shift + click to select a range
0efccb6
First draft
antalszava Feb 19, 2020
43f04ae
Add test for async job
Feb 19, 2020
be5c927
Simplify starship CLI
Feb 19, 2020
b24cf33
Fix bug with output logic
Feb 20, 2020
24952e0
Logic of load_config before testing
antalszava Feb 20, 2020
64da659
Linting and cleanup
Feb 20, 2020
821bf96
Linting, docs, cleanup
Feb 20, 2020
ef45130
Linting, formatting
Feb 20, 2020
1a38071
Consolidate exceptions
Feb 20, 2020
2818bc5
StarshipEngine.run() raises exception if remote job enters failed status
Feb 20, 2020
8d21922
Polish docstrings
Feb 20, 2020
a161fca
Add type hints
Feb 20, 2020
cf2db43
More tests
Feb 20, 2020
0ab1a1a
Cleanup
Feb 20, 2020
7d62a23
Testing config object creation, look_for_config_file function
antalszava Feb 21, 2020
1140d43
Request numpy job result directly from remote
Feb 21, 2020
c53a6aa
Bugfixes
Feb 21, 2020
abcbccb
Fix issues regarding job result dimensions
Feb 21, 2020
5a35393
Clean up docs
Feb 21, 2020
a95f14d
APIClient has been absorbed into the new classes
Feb 21, 2020
67f6321
Tests
Feb 21, 2020
7271f75
Add magic methods, polish docs, cleanup
Feb 21, 2020
d203d89
Connection.create_job() accepts Program directly instead of serialize…
Feb 21, 2020
e44a1b7
Unit tests for the parts making up load_config
antalszava Feb 21, 2020
a04131e
Fix Result.samples to have correct dims of (shots, modes)
Feb 21, 2020
e0afae1
Unit test for load_config; removing MagicMock from parse_environment_…
antalszava Feb 21, 2020
3ca6a5b
Marking xfail API Client tests (being refactored in another PR)
antalszava Feb 21, 2020
abdc0af
Marking xfail API Client tests (being refactored in another PR)
antalszava Feb 21, 2020
2995cd9
Adding xfail mark on another API Client test
antalszava Feb 21, 2020
0770172
Docstrings, reorganizing parse_environment_variables function, adding…
antalszava Feb 24, 2020
e7eb96a
Add create config object test with every keyword argument
antalszava Feb 24, 2020
e074ca5
Fix Result.samples to have correct dims of (shots, modes)
Feb 21, 2020
7bc48ca
Adding load_config tests using each units separately; change logic fo…
antalszava Feb 24, 2020
fc5619a
Test docstrings
antalszava Feb 24, 2020
9109a46
Default config refactor
antalszava Feb 24, 2020
653f566
Add absolute path test
antalszava Feb 24, 2020
6f50208
Tests
Feb 24, 2020
38a0e5c
Merge branch 'refactor-job-engines' of github.com:XanaduAI/strawberry…
Feb 24, 2020
3111492
Tests
Feb 24, 2020
ffa9c44
Tests
Feb 24, 2020
984c5a5
Saving path, linting, isort
antalszava Feb 24, 2020
b90ca00
Modify dict formatting in docstring
antalszava Feb 24, 2020
0e82fa1
Dimensions
Feb 24, 2020
2622e5a
Linting, comments, cleanup
Feb 24, 2020
18a5d33
Update tests/frontend/test_configuration.py
antalszava Feb 24, 2020
42071b0
Modifying docstrings based on comments
antalszava Feb 24, 2020
ec800c3
Merge branch 'config_refactor' of https://github.com/XanaduAI/strawbe…
antalszava Feb 24, 2020
c2e79d4
Modifying tests such that look_for_config_in_file returns a tuple;
antalszava Feb 24, 2020
b912be1
Update tests/frontend/test_configuration.py
antalszava Feb 24, 2020
2cef067
Updating test data
antalszava Feb 24, 2020
39538d3
Update tests/frontend/test_configuration.py
antalszava Feb 24, 2020
b5e8229
Update strawberryfields/configuration.py
antalszava Feb 24, 2020
47e483a
Update strawberryfields/configuration.py
antalszava Feb 24, 2020
66ad7da
Merge branch 'config_refactor' of https://github.com/XanaduAI/strawbe…
antalszava Feb 24, 2020
f8e2c29
Update strawberryfields/configuration.py
antalszava Feb 25, 2020
03e2e04
Docstring and comment
antalszava Feb 25, 2020
4fa68ad
Merge branch 'config_refactor' of https://github.com/XanaduAI/strawbe…
antalszava Feb 25, 2020
62b218d
merge master
josh146 Feb 25, 2020
0cf0369
Merge branch 'master' into demo
josh146 Feb 25, 2020
1f04d5c
Docstrings, renaming to load_config_file_if_found, adding defaults to…
antalszava Feb 25, 2020
b82c60f
Change function to get_config_filepath and adjust tests as well accor…
antalszava Feb 25, 2020
544b60c
Renaming create_config
antalszava Feb 25, 2020
228a0c4
Modifying tests to use setenv from monkeypatching in tests
antalszava Feb 25, 2020
c33c9da
Small change for readability
Feb 25, 2020
957536e
Rename 'terminal' to 'final'
Feb 25, 2020
58eacf2
Simplify request functions
Feb 25, 2020
2a61349
Rename 'complete' to 'completed' where relevant
Feb 25, 2020
4711ed4
Use MockResponse class
Feb 25, 2020
4787515
Update tests/frontend/test_engine.py
Feb 25, 2020
4614d83
Adding configuration options and environment variables to module docs…
antalszava Feb 26, 2020
09a3b3d
Removing redundant return None statement
antalszava Feb 26, 2020
ef68ab5
Remove update_config function, add keep_valid_options function and ad…
antalszava Feb 26, 2020
3ca025e
Addig DEFAULT_CONFIG_SPEC
antalszava Feb 26, 2020
3772015
Removed debug option for now
antalszava Feb 26, 2020
d21f3fe
Update strawberryfields/configuration.py
antalszava Feb 26, 2020
7c73d5c
Update strawberryfields/configuration.py
antalszava Feb 26, 2020
47eac17
Moving configuration details to page, updating the configuration page…
antalszava Feb 26, 2020
7bb97c8
Resolving conflicts
antalszava Feb 26, 2020
e0938a9
Update strawberryfields/configuration.py
antalszava Feb 26, 2020
17be8bb
Applying comments: Configuration page modification, removing redundan…
antalszava Feb 26, 2020
3d2aa7d
Merge branch 'config_refactor' of https://github.com/XanaduAI/strawbe…
antalszava Feb 26, 2020
6635879
CHANGELOG
antalszava Feb 26, 2020
0063663
Merge branch 'demo' into config_refactor
antalszava Feb 26, 2020
7a9ef04
Merge pull request #298 from XanaduAI/config_refactor
antalszava Feb 26, 2020
f235288
First draft of store_account
antalszava Feb 26, 2020
97b2a7f
Update strawberryfields/engine.py
Feb 26, 2020
0c0b109
Unit tests and docstrings
antalszava Feb 26, 2020
b0d12b8
Update strawberryfields/engine.py
Feb 26, 2020
2566163
Added extra unit test, modified the configuration.rst
antalszava Feb 26, 2020
684de21
Modified configuration page; renamed configuration location parameter…
antalszava Feb 26, 2020
ad2b353
Refactor Connection, Job, Result to modules under api namespace
Feb 26, 2020
795b3d1
Add non-recognized option and test
antalszava Feb 26, 2020
594bc73
Linting
antalszava Feb 26, 2020
8d5f5fa
Docstrings, adjusting webpage description
antalszava Feb 26, 2020
a033bee
Refactor tests into coherent modules
Feb 26, 2020
d042410
Merge demo branch
Feb 26, 2020
51a0448
Small test refactor
Feb 26, 2020
f2a9504
Check exception messages in tests
Feb 26, 2020
1a988ac
Don't raise error on refreshing final job
Feb 26, 2020
c46446a
Log warning instead of raising error if remote job fails
Feb 26, 2020
974d0dd
Parametrize numpy dtype in job result test
Feb 26, 2020
94381b3
Load default args for Connection from config module
Feb 26, 2020
98ff9cb
Add verbose mode for Connection
Feb 26, 2020
9a73417
Use prompt syntax for docstring examples in StarshipEngine and Connec…
Feb 26, 2020
04535b4
Update thewalrus dependency to pass CI
Feb 26, 2020
a77c0e8
Add test marker for API package
Feb 26, 2020
3079662
Add/update docstrings
Feb 26, 2020
e889047
Pylint, general cleanup
Feb 26, 2020
d3c26fe
Add argument check for cancel_job test
Feb 26, 2020
91d194d
Update tests/api/test_starship_engine.py
Feb 26, 2020
89417a3
Update tests/api/test_starship_engine.py
Feb 26, 2020
6792bf1
Update tests/api/test_result.py
Feb 26, 2020
e025d52
Update tests/api/test_job.py
Feb 26, 2020
b720f33
Update the link for thewalrus in requirements.txt
antalszava Feb 26, 2020
02f3d86
Merge remote-tracking branch 'origin/demo' into store_account
antalszava Feb 26, 2020
d0edc7f
Update error tests for job.cancel()
Feb 26, 2020
eff0f59
Move mock_return to conftest; pylint compliance
Feb 26, 2020
aa1ab17
Remove redundant return descriptions from property docstrings
Feb 26, 2020
f8468c8
Update strawberryfields/engine.py
Feb 26, 2020
86de974
Small changes to docstrings based on review
Feb 26, 2020
d3e8d3e
Merge branch 'refactor-job-engines' of github.com:XanaduAI/strawberry…
Feb 26, 2020
2aa76af
Update strawberryfields/engine.py
Feb 26, 2020
3068c4c
Clean up docstrings
Feb 26, 2020
7735378
Merge branch 'refactor-job-engines' of github.com:XanaduAI/strawberry…
Feb 26, 2020
009a6a3
Update strawberryfields/engine.py
Feb 26, 2020
5f96fb5
Update starship
Feb 26, 2020
714b99f
Update strawberryfields/api/result.py
Feb 26, 2020
ee097a0
Update strawberryfields/api/result.py
Feb 26, 2020
de45482
Update strawberryfields/api/result.py
Feb 26, 2020
5c47a7c
Update strawberryfields/api/result.py
Feb 26, 2020
370e893
Merge branch 'refactor-job-engines' of github.com:XanaduAI/strawberry…
Feb 26, 2020
b878bb0
Adding the testfilename fixture
antalszava Feb 26, 2020
35f7663
Update doc/introduction/configuration.rst
antalszava Feb 26, 2020
fdfc8db
Title adjustment
antalszava Feb 26, 2020
3b13979
Merge branch 'store_account' of https://github.com/XanaduAI/strawberr…
antalszava Feb 26, 2020
245b363
Update strawberryfields/configuration.py
antalszava Feb 26, 2020
d0eda0c
Update strawberryfields/configuration.py
antalszava Feb 26, 2020
8a22aa0
Update strawberryfields/configuration.py
antalszava Feb 26, 2020
cbb31b4
Applying suggested changes
antalszava Feb 26, 2020
4fbb410
Merge branch 'store_account' of https://github.com/XanaduAI/strawberr…
antalszava Feb 26, 2020
2186bb5
merge master
josh146 Feb 26, 2020
853004f
Reword configuration description
antalszava Feb 26, 2020
3ab60d0
Swap the default for location to user_config
antalszava Feb 26, 2020
00f7e36
Update doc/introduction/configuration.rst
antalszava Feb 27, 2020
3e45484
Use clearer 'blocking'/'non-blocking' terminology where relevant
Feb 27, 2020
37d9426
Merge demo
Feb 27, 2020
6329e0c
Remove obsolete exception
Feb 27, 2020
27ba93f
Fix Result.samples dimensions to (shots, modes)
Feb 27, 2020
f23dcfe
Read target from program
Feb 27, 2020
c8f1cde
Update imports
Feb 27, 2020
0a4ab59
Remove samples transpose in starship CLI
Feb 27, 2020
e5807c3
Clean up config loading logic
Feb 27, 2020
b244749
Simplify JobStatus string repr
Feb 27, 2020
1732433
Moving tmpdir.join calls to conftest -> changing to a function scoped…
antalszava Feb 27, 2020
5c7840c
Update configuration.rst
antalszava Feb 27, 2020
f7d1e56
Update strawberryfields/configuration.py
antalszava Feb 27, 2020
43bba9e
Update configuration.rst
antalszava Feb 27, 2020
77e1c7b
Update configuration.rst
antalszava Feb 27, 2020
f21a21c
Update configuration.rst
antalszava Feb 27, 2020
80f4a72
Update strawberryfields/configuration.py
antalszava Feb 27, 2020
211af5a
Update strawberryfields/configuration.py
antalszava Feb 27, 2020
fb4d7da
Updating __init__
antalszava Feb 27, 2020
a8843fa
Resolve merge conflict
antalszava Feb 27, 2020
6940dd1
Updating docstring to use raw strings
antalszava Feb 27, 2020
23cbcfa
Change job status property to string instead of enum
Feb 27, 2020
3096218
Update strawberryfields/api/result.py
Feb 27, 2020
3817436
Update strawberryfields/engine.py
Feb 27, 2020
2c1a44e
Clean up docstrings
Feb 27, 2020
bdd6c43
update store_account logic with no directory case
antalszava Feb 27, 2020
24a1a18
Add new api package to docs
Feb 27, 2020
65956cd
Fixed a couple of outdated docstring types
Feb 27, 2020
2ca57aa
Update strawberryfields/engine.py
Feb 27, 2020
175b035
Minor cleanup
Feb 27, 2020
a5cf31d
Add api package tests to makefile and travis config
Feb 27, 2020
8ddd9c2
Adding nested directory creation logic; adding tests
antalszava Feb 27, 2020
7b9f687
Reword warning message.
antalszava Feb 27, 2020
644814f
Mention committing the auth token
antalszava Feb 27, 2020
0e04cf4
Reword description of local config
antalszava Feb 27, 2020
34d1f0b
Adjust ordering in toctree to be alphabetical
Feb 27, 2020
a3b8410
Adding examples to the docstring
antalszava Feb 27, 2020
3e0ca15
Update docstring
antalszava Feb 27, 2020
4c7cce1
Reverting to having the test data in the tests instead of in fixtures
antalszava Feb 27, 2020
6aea2fa
cloud -> Cloud
antalszava Feb 27, 2020
f344807
Rewording
antalszava Feb 27, 2020
cdfde55
Revert test changes, minor modifications
antalszava Feb 27, 2020
7a754d5
Update doc/introduction/configuration.rst
antalszava Feb 28, 2020
95e2447
Update doc/introduction/configuration.rst
antalszava Feb 28, 2020
5a21881
Update strawberryfields/configuration.py
antalszava Feb 28, 2020
0d9a694
Update strawberryfields/configuration.py
antalszava Feb 28, 2020
5f6aa73
Update strawberryfields/configuration.py
antalszava Feb 28, 2020
081264e
Update strawberryfields/configuration.py
antalszava Feb 28, 2020
aa46046
Update strawberryfields/configuration.py
antalszava Feb 28, 2020
08c83b8
Update doc/introduction/configuration.rst
antalszava Feb 28, 2020
6ee1876
Update doc/introduction/configuration.rst
antalszava Feb 28, 2020
aff02bc
Modifications from comments
antalszava Feb 28, 2020
0ec33f0
Resolve conflicts
antalszava Feb 28, 2020
6f813e0
Fixes a bug in the MZgate convention by reversing the internal and ex…
josh146 Feb 28, 2020
5275040
Update docstring example
Feb 28, 2020
4ac548e
Remove token from CLI args - load using normal config logic
Feb 28, 2020
fa8b43d
Re-black with line length 100
Feb 28, 2020
4152851
Merge from demo
Feb 28, 2020
b840acd
Update changelog
Feb 28, 2020
9de85c3
CHANGELOG
antalszava Feb 28, 2020
fb2dd85
Linting
antalszava Feb 28, 2020
1d5c75e
Blacking; isort sf/__init__.py
antalszava Feb 28, 2020
9cf4467
Update strawberryfields/api/result.py
Feb 28, 2020
613a9fe
Remove unused import
Feb 28, 2020
a3e13b3
Merge branch 'refactor-job-engines' of github.com:XanaduAI/strawberry…
Feb 28, 2020
4b695d0
Merge pull request #306 from XanaduAI/store_account
antalszava Feb 28, 2020
ad9aea4
Merge pull request #294 from XanaduAI/refactor-job-engines
Feb 28, 2020
a6b48b9
Merge branch 'master' into demo
josh146 Mar 2, 2020
ff1e16d
merge master into demo
josh146 Mar 2, 2020
913840b
Change default hostname (#309)
antalszava Mar 4, 2020
e783f82
merge master
josh146 Mar 10, 2020
ae0aa33
fix tutorial teleportation
josh146 Mar 10, 2020
652cdf8
fix post-selection tutorial
josh146 Mar 10, 2020
7cf60f2
updated more tutorials
josh146 Mar 10, 2020
cf9800f
updated build
josh146 Mar 10, 2020
b709423
added new
josh146 Mar 10, 2020
b490baf
documentation fixes
josh146 Mar 10, 2020
02e3acc
more docs fixes
josh146 Mar 10, 2020
484108b
temporarily add tutorial cache
josh146 Mar 10, 2020
29f7c41
undo cache
josh146 Mar 10, 2020
a166e51
docs styling
josh146 Mar 10, 2020
df5812e
Updating io.load docstring
antalszava Mar 11, 2020
728cb8b
Updating the `io.load` function docstring. (#314)
antalszava Mar 11, 2020
039208d
Refactoring the starship CLI and adding unit tests (#312)
antalszava Mar 11, 2020
cce71d1
merge master
josh146 Mar 12, 2020
ca97281
Resolve conflict
antalszava Mar 12, 2020
5481a01
Update the usage occurrences in the docstrings, fix up missing assert…
antalszava Mar 13, 2020
7cdc53e
Update tests/frontend/test_starship.py
antalszava Mar 13, 2020
7fe39f3
Updating parser description
antalszava Mar 13, 2020
a097349
Rename StarshipEngine to RemoteEngine, starship CLI to sf (#316)
josh146 Mar 15, 2020
5a3c7cb
Merge branch 'demo' of https://github.com/XanaduAI/strawberryfields i…
antalszava Mar 16, 2020
27628d9
Resolve merge conflicts
antalszava Mar 16, 2020
557d1de
fixes
josh146 Mar 16, 2020
6ff028e
merge
josh146 Mar 16, 2020
eb78267
add sf_cli page
josh146 Mar 16, 2020
58dea23
Correct CLI docstring and test typos (#318)
antalszava Mar 16, 2020
4bbe0e3
merge cli fix
josh146 Mar 16, 2020
cb55b7c
reorder index
josh146 Mar 16, 2020
f19fa5d
updated changelog
josh146 Mar 16, 2020
e21945a
typo
josh146 Mar 16, 2020
5669673
update setup.py
josh146 Mar 16, 2020
f6a62b1
Apply suggestions from code review
josh146 Mar 16, 2020
728dfae
suggested changes
josh146 Mar 17, 2020
d745036
Apply suggestions from code review
josh146 Mar 17, 2020
a881a68
Apply suggestions from code review
josh146 Mar 18, 2020
447983a
Add apps example (#321)
trbromley Mar 18, 2020
08f69b6
Apply suggestions from code review
josh146 Mar 19, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .github/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<h3>New features since last release</h3>

* Adds initial support for the Xanadu cloud platform.
* Adds initial support for the Xanadu's photonic quantum hardware.
[(#101)](https://github.com/XanaduAI/strawberryfields/pull/101)
[(#148)](https://github.com/XanaduAI/strawberryfields/pull/148)
[(#294)](https://github.com/XanaduAI/strawberryfields/pull/294)
Expand All @@ -15,7 +15,7 @@
from strawberryfields import ops
from strawberryfields.utils import random_interferometer

# replace AUTHENTICATION_TOKEN with your Xanadu cloud token
# replace AUTHENTICATION_TOKEN with your Xanadu cloud access token
eng = RemoteEngine("chip2", token="AUTHENTICATION_TOKEN")
josh146 marked this conversation as resolved.
Show resolved Hide resolved
prog = sf.Program(8)

Expand Down Expand Up @@ -53,7 +53,7 @@
<br>

* New `sf` command line program for configuring Strawberry Fields for access
with the Xanadu cloud platform, as well as submitting and executing jobs from the
to the Xanadu cloud platform, as well as submitting and executing jobs from the
command line.
[(#146)](https://github.com/XanaduAI/strawberryfields/pull/146)
[(#312)](https://github.com/XanaduAI/strawberryfields/pull/312)
Expand All @@ -65,7 +65,7 @@

* `sf run input [--output FILE]`: submit and execute quantum programs from the command line

* `sf --ping`: verify your connection to the Xanadu cloud platform.
* `sf --ping`: verify your connection to the Xanadu cloud platform

For more details, see the
[documentation](https://strawberryfields.readthedocs.io/en/stable/code/sf_cli.html).
Expand Down Expand Up @@ -117,7 +117,7 @@

* Modified the rectangular decomposition to ensure that identity-like
unitaries are implemented with no swaps.
[#311](https://github.com/XanaduAI/strawberryfields/pull/311)
[(#311)](https://github.com/XanaduAI/strawberryfields/pull/311)

<h3>Bug fixes</h3>

Expand All @@ -141,7 +141,7 @@

This release contains contributions from (in alphabetical order):

Ville Bergholm, Tom Bromley, Jack Ceroni, Theodor Isacsson, Josh Izaac, Shreya P Kumar,
Ville Bergholm, Tom Bromley, Jack Ceroni, Theodor Isacsson, Josh Izaac, Nathan Killoran, Shreya P Kumar,
Nicolás Quesada, Jeremy Swinarton, Antal Száva, Paul Tan, Zeid Zabaneh


Expand Down
9 changes: 6 additions & 3 deletions doc/code/sf_cli.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ including:

* ``sf run input [--output FILE]``: submit and execute quantum programs from the command line

* ``sf --ping``: verify your connection to the Xanadu cloud platform.
* ``sf --ping``: verify your connection to the Xanadu cloud platform



Configure
Expand Down Expand Up @@ -42,8 +43,10 @@ Using the ``sf configure`` command to create a configuration file on Windows:

**Flags:**

* ``--token``: The authentication token to use.
* ``--local``: Whether or not to create the configuration file locally in the current directory.
* ``--token``: the authentication token to use

* ``--local``: whether or not to create the configuration file locally in the current directory


If not provided, the configuration file will be saved in the user's configuration directory.

Expand Down
4 changes: 2 additions & 2 deletions doc/development/research.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ Support
If you are having issues, please let us know by posting the issue on our Github issue tracker.

To chat directly with the team designing and building Strawberry Fields, as well as members of our
community - ranging from professors of quantum physics, to students, to those just interested in being a
part of a rapidly growing industry - you can join our `discussion forum <https://discuss.pennylane.ai>`_ and `Slack channel <https://u.strawberryfields.ai/slack>`_.
communityranging from professors of quantum physics, to students, to those just interested in being a
part of a rapidly growing industryyou can join our `discussion forum <https://discuss.pennylane.ai>`_ and `Slack channel <https://u.strawberryfields.ai/slack>`_.

Sometimes, it might take us a couple of hours to reply - please be patient!

Expand Down
2 changes: 1 addition & 1 deletion doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ Support

If you are having issues, please let us know by posting the issue on our Github issue tracker.

To chat directly with the team designing and building Strawberry Fields, as well as members of our communityranging from quantum computing researchers, to students, to those just interested in being a part of a rapidly growing industryyou can join our `discussion forum <https://discuss.pennylane.ai>`_ and `Slack channel <https://u.strawberryfields.ai/slack>`_.
To chat directly with the team designing and building Strawberry Fields, as well as members of our communityranging from quantum computing researchers, to students, to those just interested in being a part of a rapidly growing industryyou can join our `discussion forum <https://discuss.pennylane.ai>`_ and `Slack channel <https://u.strawberryfields.ai/slack>`_.

For more details on contributing or performing research with Strawberry Fields, please see
:ref:`research`.
Expand Down
6 changes: 3 additions & 3 deletions doc/introduction/configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ For more advanced configuration options see the :func:`~.configuration_wizard` p

**Flags:**

* ``--token``: The authentication token to use.
* ``--local``: Whether or not to create the configuration file locally in the current directory.
* ``--token``: the authentication token to use
* ``--local``: whether or not to create the configuration file locally in the current directory

If not provided, the configuration file will be saved in the user's configuration directory.

Expand All @@ -91,7 +91,7 @@ scanning the following three directories in order of preference:
3. The default user configuration directory:

* On Linux: ``~/.config/strawberryfields``
* On Windows: ``~C:\Users\USERNAME\AppData\Local\Xanadu\strawberryfields``
* On Windows: ``C:\Users\USERNAME\AppData\Local\Xanadu\strawberryfields``
* On MacOS: ``~/Library/Application\ Support/strawberryfields``

The configuration file ``config.toml`` uses the `TOML standard <https://github.com/toml-lang/toml>`_,
Expand Down
16 changes: 8 additions & 8 deletions doc/introduction/remote.rst
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,11 @@ For this example, consider the following Blackbird script, which represents a qu
exactly the gate layout of the ``chip2`` photonic hardware device. We will save the following
Copy link
Member

Choose a reason for hiding this comment

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

The name chip2 isn't going to mean much to any readers on its own 🤔

Copy link
Member Author

Choose a reason for hiding this comment

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

This section is out of date, especially with the chips being renamed. Would like to rewrite this in a new PR post-merge.

file as ``test.xbb`` in our current working directory:
Copy link
Contributor

Choose a reason for hiding this comment

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

Could add a download link for this?


.. code-block:: python
.. code-block:: python3

name template_4x2_chip2 # Name of the program
version 1.0 # Blackbird version number
target chip2 (shots = 100) # This program will run on chip2 for 50 shots
target chip2 (shots = 100) # This program will run on chip2 for 100 shots

# define the squeezing amplitude
float r = 1.0
Expand Down Expand Up @@ -243,7 +243,7 @@ We can convert the samples into counts using the following function:
bitstrings = [tuple(i) for i in samples]
return {k:v for k, v in Counter(bitstrings).items()}

>>> samples = np.array([[0, 2],[1, 0],[0, 1],[0, 0],[0, 0],[2, 0],[0, 1],[0, 1]])
>>> samples = np.array([[0, 2], [1, 0], [0, 1], [0, 0], [0, 0], [2, 0], [0, 1], [0, 1]])
>>> counts = count(samples)
>>> print(counts)
{(0, 2): 1, (1, 0): 1, (0, 1): 3, (0, 0): 2, (2, 0): 1}
Expand Down Expand Up @@ -279,11 +279,11 @@ Furthermore, several automatic decompositions are supported:

For example, consider the following Blackbird script:

.. code-block:: python
.. code-block:: python3

name compilation_example # Name of the program
version 1.0 # Blackbird version number
target chip2 (shots=100) # This program will run on chip0 for 50 shots
target chip2 (shots=100) # This program will run on chip0 for 100 shots

# Define a unitary matrix
complex array U[4, 4] =
Expand Down Expand Up @@ -319,7 +319,7 @@ This program will execute following the same steps as above; :class:`~.RemoteEng
compile the program to match the layout of the chip.

You may wish to view the compiled program; this can be easily done in Python using
the ``Program.compile`` method:
the ``Program.print`` method:


>>> from strawberryfields import RemoteEngine
Expand Down Expand Up @@ -353,7 +353,7 @@ Rgate(1.902) | (q[0])
Rgate(-1.173) | (q[5])
MeasureFock | (q[0], q[1], q[2], q[3], q[4], q[5], q[6], q[7])

and even saved as a new Blackbird script using the :func:`~.io.save` function:
The compiled program can be saved as a new Blackbird script using the :func:`~.io.save` function:

>>> from strawberryfields.io import save
>>> save("test_compiled.xbb", prog)
Expand Down Expand Up @@ -409,7 +409,7 @@ values are of the form :math:`\{d, 0\}`.

# the following mean photon number per mode
# quantity is set to ensure that the singular values
# are scaled such that all squeezers have value 1
# are scaled such that all Sgates have value squeezing value r=1
josh146 marked this conversation as resolved.
Show resolved Hide resolved
m = 0.345274461385554870545

with prog.context as q:
Expand Down
2 changes: 1 addition & 1 deletion doc/introduction/tutorials.rst
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ Optimization and machine learning

We are currently making some huge changes to the TensorFlow backend
Copy link
Member

Choose a reason for hiding this comment

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

Which tutorial is unavailable? StateLearning? Optimization and machine learning with TensorFlow?

Copy link
Member Author

Choose a reason for hiding this comment

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

Currently, every tutorial in this section. This warning is badly worded though.

of Strawberry Fields, including upcoming TensorFlow 2.0 support. As a result,
this tutorial currently is unavailable. Please bear with us as we finish off the
the tutorials in this section are currently not supported. Please bear with us as we finish off the
work on our new TensorFlow backend!

.. customgalleryitem::
Expand Down
2 changes: 1 addition & 1 deletion doc/tutorials/tutorial_machine_learning.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Optimization & machine learning
###############################

.. warning:: We are currently making some huge changes to the TensorFlow backend of Strawberry Fields, including upcoming TensorFlow 2.0 support. As a result, this tutorial currently is unavailable. Please bare with us as we finish off the work on our new TensorFlow backend!
.. warning:: We are currently making some huge changes to the TensorFlow backend of Strawberry Fields, including upcoming TensorFlow 2.0 support. As a result, this tutorial currently not working. Please bare with us as we finish off the work on our new TensorFlow backend!

.. note:: The content in this page is suited to more advanced users who already have an understanding of Strawberry Fields, e.g., those who have completed the :ref:`teleportation tutorial <tutorial>`. Some basic knowledge of `Tensorflow <https://www.tensorflow.org/>`_ is also helpful.

Expand Down
4 changes: 2 additions & 2 deletions doc/tutorials/tutorial_teleportation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ in our truncated Fock basis. We now have all the parameters ready to initialize

We can now execute our quantum program ``prog`` on the engine via the :func:`Engine.run` method:

.. code-block:: python
.. code-block:: python3

result = eng.run(prog, run_options={"shots":1, "modes":None}, compile_options={})

Expand Down Expand Up @@ -240,7 +240,7 @@ Once the engine has been run, we can extract results of measurements and the qua
.. code-block:: pycon

>>> result.samples
[2.9645296452964534, -2.9465294652946525, None]
[[2.9645296452964534, -2.9465294652946525, None]]

If a mode has not been measured, this attribute simply returns ``None``.

Expand Down
2 changes: 1 addition & 1 deletion strawberryfields/api/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class Connection:
retrieves an existing job.

>>> connection = Connection(token="abc")
>>> success = connection.ping() # `True` if successful, `False` if the connection fails
>>> success = connection.ping() # `True` if successful, `False` if the connection fails
>>> job = connection.create_job("chip2", program, shots=123)
>>> job
<Job: id=d177cbf5-1816-4779-802f-cef2c117dc1a, ...>
Expand Down
2 changes: 1 addition & 1 deletion strawberryfields/circuitspecs/chip2.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Circuit class specification for the chip0 class of circuits."""
"""Circuit class specification for the chip2 class of circuits."""
import textwrap

import numpy as np
Expand Down
10 changes: 5 additions & 5 deletions strawberryfields/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def load_config(filename="config.toml", **kwargs):
2. data contained in environmental variables (if any)
3. data contained in a configuration file (if exists)

Kwargs:
Keyword Args:
filename (str): the name of the configuration file to look for

Additional configuration options are detailed in
Expand Down Expand Up @@ -89,7 +89,7 @@ def create_config(authentication_token=None, **kwargs):
If called without passing any keyword arguments, then a default
configuration object is created.

Kwargs:
Keyword Args:
Configuration options as detailed in :doc:`/introduction/configuration`

Returns:
Expand Down Expand Up @@ -124,7 +124,7 @@ def get_config_filepath(filename="config.toml"):
* The directory specified by the environment variable SF_CONF (if specified)
* The user configuration directory (if specified)

Kwargs:
Keyword Args:
filename (str): the configuration file to look for

Returns:
Expand Down Expand Up @@ -235,7 +235,7 @@ def store_account(authentication_token, filename="config.toml", location="user_c
This global user configuration directory differs depending on the operating system:

* On Linux: ``~/.config/strawberryfields``
* On Windows: ``~C:\Users\USERNAME\AppData\Local\Xanadu\strawberryfields``
* On Windows: ``C:\Users\USERNAME\AppData\Local\Xanadu\strawberryfields``
* On MacOS: ``~/Library/Application Support/strawberryfields``

By default, Strawberry Fields will load the configuration and account credentials from the global
Expand Down Expand Up @@ -289,7 +289,7 @@ def store_account(authentication_token, filename="config.toml", location="user_c
authentication_token (str): API token for authentication to the Xanadu cloud platform.
This is required for submitting remote jobs using :class:`~.RemoteEngine`.

Kwargs:
Keyword Args:
location (str): determines where the configuration file should be saved
filename (str): the name of the configuration file to look for

Expand Down