diff --git a/.github/CHALLENGES.md b/.github/CHALLENGES.md deleted file mode 100644 index 0951c655a..000000000 --- a/.github/CHALLENGES.md +++ /dev/null @@ -1,59 +0,0 @@ -# :trophy: Strawberry Fields Challenges :trophy: - -Looking for inspiration for contributing to the Strawberry Fields community? Or just in it for the -Xanadu Swag™? Check out some ideas below to get started. If you get stuck, or have any questions, -simply ask over at our [Slack community](https://u.strawberryfields.ai/slack). - -For more details on contributing to Strawberry Fields, see our -[contributing guidelines](CONTRIBUTING.md). - -## Community :strawberry: - -* **Blog post/tutorial** - - Write a blog post or tutorial exploring your experience with Strawberry Fields, highlighting - any cool results you generate, or unique applications for Strawberry Fields. Send us the link - when you're done at support@xanadu.ai, and we may even add it to the Strawberry Fields gallery. - -## Quantum theory and research :mortar_board: - -* **Publish results using Strawberry Fields** - - If you've published a paper that utilizes Strawberry Fields for simulations, let us know, - and we will add it to our Strawberry Fields gallery. - -* **Contribute continuous-variable theory or algorithms to our documentation** - - Our aim is for the [Strawberry Fields documentation](http://strawberryfields.readthedocs.io) to - become an open-access online resource for everything continuous-variable. If you have any particular - algorithms or theory you wish to include, simply chat to us on our Slack channel. - -* **Write a non-physicist introduction to CV quantum computation** - - Quantum computation is a tricky field to break into for newcomers. One thing we are currently - missing in our documentation is a non-physicist introduction to CV quantum computation. - That is, a page that introduces the idea of quantum computation with no equations (or very few equations), - few references, lots of figures and pictures, and discusses more the application and potential than the theory. - The main goal for this challenge would be to introduce continuous-variable quantum computing - without having to first introduce the discrete-variable qubit model. - -## Coding contributions :computer: - -*Note*: please contact us, either via the [Slack channel](https://u.strawberryfields.ai/slack) or at support@xanadu.ai, -to let us know if you want to start working on any coding challenges currently marked as *open*, as well as the -corresponding GitHub repository. We will update the status below with a link to your repository. - - * **Add common expectation values to the state module** - - *Status: open* - - Currently, Strawberry Fields supports the `state.quad_expectation()` method to calculate the quadrature expectation - values x and p, as well as the quadrature variance \Delta x and \Delta p. In this challenge, modify the - Strawberry Fields `states.py` module to calculate other common expectation values, such as , , and others. - - * **Find an accurate and numerically efficient implementation of the cubic phase gate** - - *Status: open* - - This challenge would involve - finding a more accurate and numerically efficient method of implementing the cubic phase gate - in the Fock and/or Tensorflow backends of Strawberry Fields. - - * **Create a new Strawberry Fields backend** - - Strawberry Fields currently includes 3 backends; two Fock-basis backends (using NumPy and Tensorflow), - and one Gaussian backend (using NumPy). Some ideas for a new backend include: - - **Gaussian-Tensorflow**: (*status: open*) Duplicate the included Gaussian backend, and add Tensorflow support - - **MPI support**: (*status: open*) Add MPI support (using mpi4py) to one of the backends - ``` diff --git a/.github/CHANGELOG.md b/.github/CHANGELOG.md index db9c95b0e..beaefeafa 100644 --- a/.github/CHANGELOG.md +++ b/.github/CHANGELOG.md @@ -17,6 +17,10 @@

Documentation

+* Modified `CONTRIBUTING.md`, `PULL_REQUEST_TEMPLATE.md`, `README.md`, and `research.rst`, to clarify that we are not accepting Pull Requests for new features at this time. + +* Deleted `CHALLENGES.md` since we're no longer accepting contributions for anything other than bug fixes and docs fixes. +

Contributors

This release contains contributions from (in alphabetical order): diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 8720f8383..d6af00269 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -1,23 +1,19 @@ # Contributing to Strawberry Fields Thank you for taking the time to contribute to Strawberry Fields! -:strawberry: :confetti_ball: :tada: :fireworks: :balloon: Strawberry Fields is a collaborative effort with the quantum photonics and quantum computation -community - while we will continue working on adding new and exciting features to Strawberry Fields, -we invite you to join us and suggest improvements, research ideas, or even just to discuss how -Strawberry Fields fits into your workflow. - -If your contribution becomes part of Strawberry Fields, or is highlighted in our Gallery, we will -send you some exclusive Xanadu Swag™ - including t-shirts, stickers, and more. +community - while we are not currently working on adding new features to Strawberry Fields, +we invite you to make a fork of this repository to add improvements, test research ideas, or fit +Strawberry Fields into your workflow. ## How can I get involved in the community? -If you want to contribute but don't know where to start, start by checking out our +If you don't know where to start, start by checking out our [documentation](https://strawberryfields.readthedocs.io). Have a go working through some of the tutorials, and having a look at the Strawberry Fields API and code documentation to see how things work under the hood. -To chat directly with the team designing and building Strawberry Fields, as well as members of our +To chat directly with the team that designed and built 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 [Slack channel](https://u.strawberryfields.ai/slack). @@ -27,35 +23,20 @@ Sometimes, it might take us a couple of hours to reply - please be patient! It's up to you! -* **Be a part of our community** - chat to people in our Slack channel, respond to questions, and - provide exciting updates of the projects/experiments you are investigating with Strawberry Fields - - You can even write your own Strawberry Fields tutorials, or blog about your simulation results. - Send us the link, and we may even add it to our Gallery or our documentation as an external resource! +* **Be a part of our community** - chat to people in our Slack channel or our + [discussion forum](https://discuss.pennylane.ai/), respond to questions, and + provide exciting updates of the projects/experiments you are investigating with Strawberry Fields. -* **Test the cutting-edge Strawberry Fields releases** - clone our GitHub repository, and keep up to - date with the latest features. If you run into any bugs, make a bug report on our +* **Report bugs or contribute to our documentation** - we are not accepting Pull Requests + for new features at this time. We welcome contributions for bug fixes, security patches, and documentation + improvements only. Thank you for your understanding. If you run into any bugs, make a bug report on our [issue tracker](https://github.com/XanaduAI/strawberryfields/issues). -* **Report bugs** - even if you are not using the development branch of Strawberry Fields, if you come - across any bugs or issues, make a bug report. See the next section for more details on the bug - reporting procedure. - -* **Suggest new features and enhancements** - hop on to our Slack channel, or use the GitHub issue tracker - and let us know what will make Strawberry Fields even better for your workflow. - -* **Contribute to our documentation, or to Strawberry Fields directly** - we are hoping for our documentation - to become an online, open-source resource for all things continuous-variable. If you would like to add - to it, or suggest improvements/changes, let us know - or even submit a pull request directly. All authors - who have contributed to the Strawberry Fields codebase will be listed alongside the latest release. - * **Build an application on top of Strawberry Fields** - have an idea for an application, and Strawberry Fields provides the perfect computational backbone? Consider making a fully separate app that builds upon Strawberry Fields as a base. Ask us if you have any questions, and send a link to your application to support@xanadu.ai so we can highlight it in our documentation! -For some inspiration, you can also check out some preprepared [contribution challenges](./CHALLENGES.md). - Appetite whetted? Keep reading below for all the nitty-gritty on reporting bugs, contributing to the documentation, and submitting pull requests. @@ -81,85 +62,21 @@ To submit a bug report, please work your way through the following checklist: ## Suggesting features, document additions, and enhancements -To suggest features and enhancements, you can either use the GitHub tracker, or use the `#strawberryfields` slack -channel. There is no template required for feature requests and enhancements, but here are a couple of suggestions -for things to include. - -* **Use a clear and descriptive title** -* **Provide a step-by-step description of the suggested feature**. - - - If the feature is related to any theoretical results in continuous-variable quantum computation - or quantum photonics, provide any relevant equations. Alternatively, provide references to papers/preprints, - with the relevant sections/equations noted. - - If the feature is workflow-related, or related to the use of Strawberry Fields, - explain why the enhancement would be useful, and where/how you would like to use it. +We are not accepting Pull Requests for new features at this time. We welcome contributions for bug fixes, security patches, +and documentation improvements only. Thank you for your understanding. * **For documentation additions**, point us towards any relevant equations/papers/preprints, with the relevant sections/equations noted. Short descriptions of its use/importance would also be useful. -## Pull requests +## Forks -If you would like to contribute directly to the Strawberry Fields codebase, simply make a fork of the master branch, and -then when ready, submit a [pull request](https://help.github.com/articles/about-pull-requests). We encourage everyone -to have a go forking and modifying the Strawberry Fields source code, however, we have a couple of guidelines on pull -requests to ensure the main master branch of Strawberry Fields conforms to existing standards and quality. +If you need a new or modified Strawberry Fields feature, simply make a fork of the master branch. We encourage everyone +to have a go forking and modifying the Strawberry Fields source code. You will now have a copy of your own that you can modify! ### General guidelines * **Do not make a pull request for minor typos/cosmetic code changes** - make an issue instead. -* **For major features, consider making an independent app** that runs on top of Strawberry Fields, rather than modifying - Strawberry Fields directly. - -### Before submitting - -Before submitting a pull request, please make sure the following is done: - -* **All new features must include a unit test.** If you've fixed a bug or added code that should be tested, - add a test to the test directory! -* **All new functions and code must be clearly commented and documented.** Have a look through the source code at some of - the existing function docstrings - the easiest approach is to simply copy an existing docstring and modify it as appropriate. - If you do make documentation changes, make sure that the docs build and render correctly by running `make docs`. -* **Ensure that the test suite passes**, by running `make test`. You can also test individual backends by running - `make test-backendname`. For example, if you only make changes corresponding to the Gaussian backend, you can run `make test-gaussian`. -* **Make sure the modified code in the pull request conforms to the PEP8 coding standard.** The Strawberry Fields source code - conforms to [PEP8 standards](https://www.python.org/dev/peps/pep-0008/). We check all of our code against - [Pylint](https://www.pylint.org/). To lint modified files, simply install `pip install pylint`, and then from the source code - directory, run `pylint strawberryfields/path/to/file.py`. - -### Submitting the pull request -* When ready, submit your fork as a [pull request](https://help.github.com/articles/about-pull-requests) to the Strawberry - Fields repository, filling out the [pull request template](./PULL_REQUEST_TEMPLATE.md). This template is added automatically - to the comment box when you create a new issue. - -* When describing the pull request, please include as much detail as possible regarding the changes made/new features - added/performance improvements. If including any bug fixes, mention the issue numbers associated with the bugs. - -* Once you have submitted the pull request, three things will automatically occur: - - - The **test suite** will automatically run on [GitHub actions](https://github.com/XanaduAI/strawberryfields/actions?query=workflow%3ATests) - to ensure that the all tests continue to pass. - - Once the test suite is finished, a **code coverage report** will be generated on - [Codecov](https://codecov.io/gh/XanaduAI/strawberryfields). This will calculate the percentage of Strawberry Fields - covered by the test suite, to ensure that all new code additions are adequately tested. - - Finally, the **code quality** is calculated by [Codacy](https://app.codacy.com/app/XanaduAI/strawberryfields/dashboard), - to ensure all new code additions adhere to our code quality standards. - - Based on these reports, we may ask you to make small changes to your branch before merging the pull request into the master branch. Alternatively, you can also - [grant us permission to make changes to your pull request branch](https://help.github.com/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork/). - -## I've made a contribution! Now how do I claim my Xanadu Swag? - -* If you've contributed code to Strawberry Fields, we'll contact you shortly after merging your pull - request to organise delivery of your Xanadu Swag™. - -* If you've created a Strawberry Fields application, produced content using Strawberry Fields, or simply - written an awesome Strawberry Fields tutorial, and we have linked it to our Gallery, you are eligible for some - Xanadu Swag™. We will contact you to organise delivery of your swag. - -If you haven't heard back from us, don't panic! Here at Xanadu we are working on projects on the cutting edge of -quantum technology, and sometimes get a little sidetracked. Simply send a reminder email to support@xanadu.ai regarding your -swag, and we'll get back to you ASAP. -:strawberry: Thank you for contributing to Strawberry Fields! :strawberry: +Thank you for being part of Strawberry Fields! \- The Strawberry Fields team diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 0741daf15..cb8d31c2b 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,5 +1,8 @@ ### Before submitting +We are not accepting Pull Requests for new features at this time. We welcome contributions for bug fixes, +security patches, and documentation improvements only. Thank you for your understanding. + Please complete the following checklist when submitting a PR: - [ ] All new features must include a unit test. diff --git a/README.md b/README.md index 8375908b8..f157e2804 100644 --- a/README.md +++ b/README.md @@ -58,7 +58,7 @@ ## Installation -Strawberry Fields requires Python version 3.7, 3.8, 3.9, or 3.10. Installation of Strawberry Fields, as +Strawberry Fields requires Python version 3.8, 3.9, or 3.10. Installation of Strawberry Fields, as well as all dependencies, can be done using pip: ```console @@ -81,25 +81,15 @@ Next, read more about using Strawberry Fields with [photonic hardware](https://strawberryfields.ai/photonics/hardware/index.html), including code demonstrations and an overview of Xanadu's quantum photonic hardware. -Developers can head to the -[development guide](https://strawberryfields.readthedocs.io/en/stable/development/development_guide.html) -to see how they can contribute to Strawberry Fields. - ## Contributing to Strawberry Fields -We welcome contributions — simply fork the Strawberry Fields repository, and then make a -[pull request](https://help.github.com/articles/about-pull-requests/) containing your contribution. -All contributors to Strawberry Fields will be listed as authors on the releases. - -We also encourage bug reports, suggestions for new features and enhancements, and even links to cool -projects or applications built on Strawberry Fields. +We are not accepting Pull Requests for new features at this time. We welcome contributions for bug fixes, +security patches, and documentation improvements only. Thank you for your understanding. See our [contributions page](https://github.com/XanaduAI/strawberryfields/blob/master/.github/CONTRIBUTING.md) and [changelog](https://github.com/XanaduAI/strawberryfields/blob/master/.github/CHANGELOG.md) -for more details, and then check out some of the Strawberry Fields -[challenges](https://github.com/XanaduAI/strawberryfields/blob/master/.github/CHALLENGES.md) -for some inspiration. +for more details. ## Authors diff --git a/doc/development/development_guide.rst b/doc/development/development_guide.rst index 0def9e68f..97f37ed73 100644 --- a/doc/development/development_guide.rst +++ b/doc/development/development_guide.rst @@ -6,15 +6,15 @@ Dependencies Strawberry Fields requires the following libraries be installed: -* `Python `_ >= 3.6 +* `Python `_ >= 3.8 as well as the following Python packages: * `NumPy `_ >= 1.17.4 * `SciPy `_ >= 1.0.0 * `NetworkX `_ >= 2.0 -* `Blackbird `_ >= 0.2.0 -* `The Walrus `_ >= 0.7.0 +* `Blackbird `_ >= 0.3.0 +* `The Walrus `_ >= 0.18.0 * `toml `_ If you currently do not have Python 3 installed, we recommend @@ -250,6 +250,11 @@ from within the top-level directory. To then build the HTML documentation, run The documentation can be found in the :file:`doc/_build/html/` directory. +Contributing to Strawberry Fields +--------------------------------- + +We are not accepting Pull Requests for new features at this time. We welcome contributions for bug fixes, +security patches, and documentation improvements only. Thank you for your understanding. Adding a new module to the docs ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -293,7 +298,7 @@ a module: Submitting a pull request -------------------------- +^^^^^^^^^^^^^^^^^^^^^^^^^ Before submitting a pull request, please make sure the following is done: diff --git a/doc/development/research.rst b/doc/development/research.rst index cd161ba34..79d5643e1 100644 --- a/doc/development/research.rst +++ b/doc/development/research.rst @@ -22,10 +22,7 @@ Strawberry Fields is an open-source library, with the up-to-date code available - **Source Code:** https://github.com/XanaduAI/strawberryfields - **Issue Tracker:** https://github.com/XanaduAI/strawberryfields/issues -We welcome contributions - simply fork the Strawberry Fields repository, and then make a -`pull request `_ containing your contribution. All contributers to Strawberry Fields will be listed as authors on the releases. - -We also encourage bug reports, suggestions for new features and enhancements, and even links to cool projects or applications built on Strawberry Fields. +We are not accepting Pull Requests for new features at this time. We welcome contributions for bug fixes, security patches, and documentation improvements only. Thank you for your understanding. Support -------- diff --git a/doc/introduction/introduction.rst b/doc/introduction/introduction.rst index 4439bc20d..c8c08120a 100644 --- a/doc/introduction/introduction.rst +++ b/doc/introduction/introduction.rst @@ -31,8 +31,9 @@ Users interested in applications of photonic quantum computers should check out the :doc:`applications` pages. Those wanting to dig deeper into the design of circuits can head to the :doc:`/introduction/circuits` page. -Developers can head to the :doc:`/development/development_guide` to see how -they can contribute to Strawberry Fields. +While we are no longer accepting Pull Requests for new features at this time, fix- and +documentation improvement-minded developers can head to the +:doc:`/development/development_guide` to see how they can contribute to Strawberry Fields. Quickstart guides ----------------- @@ -69,3 +70,4 @@ In the following sections you can learn more about the key features of Strawberr 6. :doc:`data` details the built-in datasets of pre-generated photonic samples provided by Strawberry Fields, for various graphs used in optimization, machine learning, and chemistry applications. + diff --git a/tests/integration/test_ops_integration.py b/tests/integration/test_ops_integration.py index f50fdd155..b441e8a3a 100644 --- a/tests/integration/test_ops_integration.py +++ b/tests/integration/test_ops_integration.py @@ -416,7 +416,7 @@ def test_multimode_gaussian_gate(self, setup_backend, pure): num_mode = 1 eng = sf.Engine("tf", backend_options={"cutoff_dim": 5}) prog = sf.Program(num_mode) - S = tf.Variable(random_symplectic(num_mode), dtype=tf.complex128) + S = tf.Variable(random_symplectic(num_mode, scale=0.5), dtype=tf.complex128) d = tf.Variable(np.random.random(2 * num_mode), dtype=tf.complex128) with prog.context as q: ops.Ggate(S, d) | q @@ -429,7 +429,7 @@ def test_gradient_gaussian_gate(self, setup_backend, pure): num_mode = 2 eng = sf.Engine("tf", backend_options={"cutoff_dim": 5}) prog = sf.Program(num_mode) - S = tf.Variable(random_symplectic(num_mode), dtype=tf.complex128) + S = tf.Variable(random_symplectic(num_mode, scale=0.5), dtype=tf.complex128) d = tf.Variable(np.random.random(2 * num_mode), dtype=tf.complex128) with prog.context as q: sf.ops.Ggate(S, d) | q