Appendix A. Set up your environment

 

The first step of starting a software project is setting up the development environment for it. If you’re already familiar with the language you’ve chosen to use for the projects in this book, feel free to skip the setup step and dive right in! In case you’re new to quantum programming or are comfortable with one of the languages and looking to add the other one to your toolbox, this appendix includes brief instructions for setting up the development environment for both Qiskit and Q#.

There are multiple environments that support Q# and Qiskit. Jupyter Notebooks, for example, are a great environment for getting started and learning the basic concepts, since they offer a broad variety of visualization tools. Azure Quantum and IBM Quantum Lab offer Jupyter Notebook-based cloud programming environments for Q# and Qiskit, respectively, allowing you to start coding without any local setup.

For larger projects, however, especially multi-file projects that involve unit tests like the ones discussed in this book, you’ll want to set up a local environment and use your preferred IDE and/or command line for building and running these projects. I recommend using Visual Studio Code to work with Q#. You can use any IDE that supports Python to develop Qiskit projects.

A.1 Qiskit

A.1.1 Run Qiskit online

You can run Qiskit code online using IBM Quantum Lab (https://quantum.ibm.com/lab).

A.1.2 Install Qiskit locally

A.2 Q#

A.2.1 Run Q# online

A.2.2 Install Q# locally

A.3 pytest

A.4 Getting the code