Getting Started - Bell State

Get Strange

Welcome to Strangeworks! You are probably here to start hacking on some quantum computers so let's look at how Strangeworks projects are created and organized. We will do this by creating a simple project and implementing a very basic quantum state, the Bell state, using several of the available frameworks. After you get the basics down we will point you to some other resources and guides, or you can just dive in and start coding!
A Strangeworks project is like any standard coding project in that it is simply collection of files and folders. On Strangeworks these files are your quantum programs -- circuits and algorithms that will make use of a few of the additional dimensions of computing power the universe has made available to us. These arcane codes of quantum lore will be written in the classic tongue (qasm) or the vernacular (regional python dialects). Once loaded into a Strangeworks project these quantum programs will be ready to be run on a simulator or quantum hardware provided by our numerous partners.
Your First Project
To get started we are going to create a project and jump into some code. You can initiate your project a few different ways.

Make a new empty project

As a clone of a git repository

As a copy of an existing project
Coding a Bell State
.qasm
or .py
you will have the ability to run your code.
Run QASM

bell-qasm.qasm
. Once the file is loaded into the code editor push the green Run Code
button. You will be given the opportunity to run multiple iterations, let's do 100 iterations.
The results page will load here and you will see a diagram of your circuit as well as the histogram of results from the 100 iterations. At the top is the run request information. This tells us everything we need to know about what backend we are using, the framework employed, number of iterations and any parameters used in the run. This information is saved and it is easy to come back to your results from previous runs by going to the results history on the right and finding the numbered result you are looking for.
While QASM gives us access to a complete set of quantum gates, we probably want some more tools. For this we can turn to frameworks that build on QASM and incorporate the patterns and abstractions we are used to with modern languages.
Python Quantum Frameworks

Quantum computing is growing and evolving rapidly. Here you have access to all the hottest frameworks 24/7. Strangeworks offers several different popular python frameworks for building quantum circuits. In this project you can see examples from qiskit, cirq, braket, blueqat, forest, and pennylane.

Qiskit
bell-qiskit.py
in the file list. qiskit
we also import strangeworks.qiskit
. This imports the Strangeworks library that wraps Qiskit
and gives us the ability to run on our own simulators, capture results, and render the output of the simulator in a visually appealing way. A quick look at the code shows us that we can also now set up the job iterations in the code directly instead of specifying it at runtime. Since many quantum algorithms rely on aggregated output to generate a probability distribution this abstraction is especially useful. 
Run Code
button in the top right.Other Frameworks
Keep Exploring
- Check out projects in our library
- Create a new project and start hacking!
- Dig through our documentation
- Love Jupyter Notebooks? We got those.
- Get started with some coursework in Open Quantum Systems