Package: amazon-braket-strawberryfields-plugin
This plugin provides aBraketEngineclass for running photonic quantum circuits created in Strawberry Fields on the Amazon Braket service.TheAmazon Braket Python SDKis an open source
library that provides a framework to interact with quantum computing hardware
devices and simulators through Amazon Braket.Strawberry Fieldsis an open source library for writing
and running programs for photonic quantum computers.The plugin documentation can be found here:https://amazon-braket-strawberryfields-plugin-python.readthedocs.io/en/latest/.FeaturesThis plugin provides the classesBraketEnginefor submitting photonic circuits to Amazon Braket andBraketJobfor tracking the status of the Braket task.BraketEngineandBraketJobhave the same interfaces asRemoteEnginein Strawberry Fields andJobin the Xanadu Cloud Client, respectively, and can be used as drop-in replacements:frombraket.strawberryfields_pluginimportBraketEngineeng=BraketEngine("arn:aws:braket:us-east-1::device/qpu/xanadu/Borealis")result=eng.run(prog,shots=1000)# Synchronous, returns sf.Resultjob=eng.run_async(prog,shots=1000)# Asychronous, returns BraketJobprint(job.status)InstallationBefore you begin working with the Amazon Braket Strawberry Fields Plugin, make sure
that you installed or configured the following prerequisites:Download and installPython 3.7.2or greater.
If you are using Windows, choose the optionAdd Python to environment variablesbefore you begin the installation.Make sure that your AWS account is onboarded to Amazon Braket, as per the instructionshere.Download and installStrawberry Fields:pipinstallstrawberryfieldsYou can then install the latest release of the Strawberry Fields-Braket plugin as follows:pipinstallamazon-braket-strawberryfields-pluginYou can also install the development version from source by cloning this repository and running a
pip install command in the root directory of the repository:gitclonehttps://github.com/aws/amazon-braket-strawberryfields-plugin-python.gitcdamazon-braket-strawberryfields-plugin-pythonpipinstall.You can check your currently installed version ofamazon-braket-strawberryfields-pluginwithpip show:pipshowamazon-braket-strawberryfields-pluginor alternatively from within Python:frombraketimportstrawberryfields_pluginstrawberryfields_plugin.__version__TestsMake sure to install test dependencies first:pipinstall-e"amazon-braket-strawberryfields-plugin-python[test]"Unit testsRun the unit tests using:tox-eunit-testsTo run an individual test:tox-eunit-tests---k'your_test'To run linters and unit tests:toxIntegration testsTo run the integration tests, set theAWS_PROFILEas explained in the amazon-braket-sdk-pythonREADME:exportAWS_PROFILE=Your_Profile_NameRun the integration tests with:tox-einteg-testsTo run an individual integration test:tox-einteg-tests---k'your_test'DocumentationTo build the HTML documentation, run:tox-edocsThe documentation can then be found in thedoc/build/documentation/html/directory.ContributingWe welcome contributions - simply fork the repository of this plugin, and then make apull requestcontaining your contribution.
All contributers to this plugin 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 with the plugin.SupportSource Code:https://github.com/aws/amazon-braket-strawberryfields-plugin-pythonIssue Tracker:https://github.com/aws/amazon-braket-strawberryfields-plugin-python/issuesGeneral Questions:https://quantumcomputing.stackexchange.com/questions/ask(add the tag amazon-braket)Strawberry Fields Forum:https://discuss.strawberryfields.aiIf you are having issues, please let us know by posting the issue on our Github issue tracker, or
by asking a question in the forum.LicenseThis project is licensed under the Apache-2.0 License.