Skip to content
learnqcPublic

About

No description, website, or topics provided.

Resources

Stars

6 stars

Watchers

2 watching

Forks

Latest commit

 

History

28 Commits

Folders and files

Repository files navigation

Building Quantum Software: A Developer's Guide

Building Quantum Software: A Developer's Guide will teach you the foundations of quantum computing, how to implement quantum computations, and when to take advantage of the benefits of quantum computing.

This repository contains additional resources for the book .

Setting up the code

Clone repository

Start by cloning the repository:

 git clone https://github.com/learnqc/code_plus

Code Setup

  1. Next, create a virtual environment where you can run the code.
python -m venv bqs-env
  1. Activate the new environment.
source bqs-env/bin/activate
  1. Install the dependencies for the repository in the virtual environment.
pip install -r requirements.txt

Run the interactive application

cd src 
python -m panel serve experiments/combined.py --show

Home Screen Frequency Encoding App

Run the single-qubit UI application

cd src 
python -m panel serve experiments/single_qubit.py --show

Single Qubit App

Run the any-qubit UI application

cd src 
python -m panel serve experiments/any_qubit.py --show

Any Qubit App

AI Assistant

.env file

Create a .env file in src with OPENAI_API_KEY and SINGLE_QUBIT_ASSISTANT_ID as variables:

OPENAI_API_KEY=
SINGLE_QUBIT_ASSISTANT_ID=

Create OpenAI Assistant

Use your OpenAI API Key (see https://platform.openai.com/api-keys) to populate the OPENAI_API_KEY variable in the .env file:

OPENAI_API_KEY=...

Create an OpenAI Assistant equipped with the single qubit circuit tools: in src:

 python ./openai_assistant/single_qubit/assistant_setup.py

Copy the assistant id from the terminal log:

Assistant(id='...', created_at

(or from your OpenAI list of assistants) and use it to populate the SINGLE_QUBIT_ASSISTANT_ID variable in the .env file:

SINGLE_QUBIT_ASSISTANT_ID=...

Run Browser Assistant

single_qubit_browser.mp4

In src:

python -m panel serve ./openai_assistant/single_qubit/single_qubit_panel_assistant.py --show

Run Terminal Assistant

In src:

 python ./openai_assistant/single_qubit/single_qubit_terminal_assistant.py

About

No description, website, or topics provided.

Resources

Stars

6 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages