qiskit-advocate / qamp-fall-21

Qiskit advocate mentorship program (QAMP) fall 21 cohort (Sep - Dec 2021)
30 stars 6 forks source link

Qiskit Metal to cloud-ready #16

Open marcolincs opened 3 years ago

marcolincs commented 3 years ago

Description

Empowering a new community of students, academics and professionals with the latest and greatest Quantum design tools is an exciting endeavor, yet very challenging. One of the major roadblocks can be the accessibility of those tools. Open Source distribution grants access to the code, but it hardly helps when it comes to lowering the usability gap. Indeed, downloading, installing, setting-up, using and editing the application can at times become a major undertaking.

What if we were to provide the tool as a service? Following the Qiskit example, the Qiskit Metal team is looking into how to best make this new tool easy to access. Whether it is containers, cloud functions, other server-based or server-less approaches, we are looking for help and brains to build a plan and make this a reality. This is your chance to set this tool directions!

Mentor/s

@marcolincs, Qiskit Metal core developer

Type of participant

Proficient in moving applications to the web/cloud

Number of participants

1 or 2

Deliverable

web-enabled back-end for Qiskit Metal, and ideas/prototypes for the front-end.

tula3and commented 3 years ago

I am interested in this project! I worked for two cloud projects using IBM Cloud: (1) Making a database for cloud and (2) Quantum Ugly Duckling.

VedDharkar commented 3 years ago

Interested to know more about it and to work on it!

HuangJunye commented 3 years ago

@scottwn Can you please comment in the issue so that I can assign you?

scottwn commented 3 years ago

@HuangJunye please assign this issue to me

HuangJunye commented 3 years ago

@scottwn @tula3and Can you please upload your presentation here by the end of today? Thank you!

tula3and commented 3 years ago

cloud-ready.pptx

HuangJunye commented 3 years ago

@tula3and Thanks for uploading the presentation. Can you please convert it to pdf format and rename "#16 Qiskit Metal to cloud-ready.pdf"?

tula3and commented 3 years ago

@HuangJunye Thanks for the correction! Always appreciate your support. 😄 #16 Qiskit Metal to cloud-ready.pdf

HuangJunye commented 3 years ago

@tula3and Thank you! Can't wait learn you have done so far!

tula3and commented 3 years ago

The 2nd checkpoint:

For the backend of the Qiskit Metal web app, we are planning to deploy a Flask app on IBM Cloud Code Engine. The Flask app will define necessary HTTP endpoints to interact with qiskit-metal Python functions. We intend for the app to be a lightweight, single Python module that imports qiskit-metal. For example, we have a proof of concept for get_design_name.

from flask import Flask
from qiskit_metal import designs
app = Flask(__name__)

@app.route('/get_design_name')
def get_design_name():
    design = designs.DesignPlanar()
    return design.get_design_name()

In order to run the app on Code Engine it needs to run in a Docker container. We are using IBM Cloud DevOps Toolchains to automatically pull the Flask code from GitHub and build the Docker image. We have a Tekton pipeline in the toolchain which will deploy the app to Code Engine after building the container.

Our current challenge is building a Docker image that can pip install qiskit-metal. Qiskit Metal requires a number of scientific computing libraries that can be relatively difficult to configure and install. Initially we tried to use a Python base image and install dependencies from various sources. This proved quite difficult, so the next try was to use an Intel scientific computing base image that included many dependencies. That image was extremely heavy and ran up against volume size issues in the toolchain. Next we are going to attempt to use an Anaconda base image.

Once we have qiskit-metal installed in a container, it should be straightforward to define the rest of the HTTP endpoints needed to support the app frontend.

We will also get a json file of user defined circuit from the frontend and then execute it. The result will be converted into a json file. We will visualize this data in the app frontend.

We do not have a sample yet, so we made a simple json file to test the visualization tool: data.json. You can check how the sample react app works like in the gif below. It just visualizes data.json to table and bar (from nivo). Types of graphs will be changed depending on the result file.

tula3and commented 3 years ago

Visualization - Chrome

tula3and commented 3 years ago

resized1920

obrienpja commented 3 years ago

Hi! Is it alright if I join in on this issue?

marcolincs commented 3 years ago

Hi @obrienpja , please reach out to @quantum-quant . You can chat with him on the Qiskit slack workspace.

tula3and commented 2 years ago

For the final showcase in session 1: #16 Qiskit Metal to cloud-ready.pdf

tula3and commented 2 years ago

Updated version of the first comment.


Description

(no changes)

Mentor/s

@marcolincs, @quantum-quant

Participants

@scottwn, @tula3and

Deliverable