Running the Circuit
Note: these instructions have been tested on Windows and MacOS but not on Linux. They should work however, some modifications may be necessary.
You will have needed to install the dependencies. See the instructions here if not done already.
- In your Anaconda prompt on Windows or terminal on Mac/Linux activate the anaconda environment with
conda activate quantum
- Navigate to the location on your computer where you would like the code to be. Use the
cd
command. For example, if you want to store it in a documents directory use the commandcd ~/documents
. - Clone the repository with the command
git clone https://github.com/KSU-Quantum-Capstone/CS4850-DL1.git
- Go into the repository with the command
cd CS4850-DL1
- Start the Jupyter server with
jupyter lab
. This should open the repository in your browser. - Create a new file inside of the folder called
ibmqID.py
- Inside of this file, paste
token = INSERT IBM API TOKEN HERE
- Retrieve your API token from https://quantum-computing.ibm.com/account. An IBM Quantum account is required. Replace “INSERT IBM API TOKEN HERE” with your actual IBM API token.
- Open ALU.py inside of the Jupyter server.
- You are then able to run code by hitting the run button or selecting Run->Run All Cells.
- Alternatively, you are able to run the code in your favorite IDE as one file, instead of running it in a Jupyter server.
- To close the server, press
Ctrl+C
inside of your /Anaconda prompt/terminal. Then pressy
to confirm.