Cloud Architecture for Quantum Computing — with Azure

Sarang
Half Spin
Published in
7 min readDec 8, 2020

Quantum Computing, once a theoretical dream envisioned by some of the greatest scientists of the 20th century, is becoming a reality in front of our eyes. Even after a century since its invention, the word ‘quantum’ still rests under a shroud of mystery. This article, and possibly the subsequent ones aim to address some common questions, and look at quantum computing from the lens of an analytics architect and a technologist — playing with the delicate balance between technology and business.

My aim is not to write Q# or Qiskit code, which is done rather more elegantly by some of my favorite bloggers on the subject, but my aim is to talk about concepts and how they relate to this promising technology.

A (Qu)Bit of History

It is often said that quantum computing technology is currently (late 2010s -early 2020s) at a stage where once the classical computers were in 1940’s. Think of big rooms, electro-mechanical parts and super smart scientist-types working quietly on something the general public had a very little clue about. This picture is an example of the similarities between the two eras.

https://www.computerhistory.org/timeline/1944/#169ebbe2ad45559efbc6eb3572060ebd and https://www.ibm.com/blogs/research/2018/04/ibm-startups-accelerate-quantum/

The biggest similarity is the maturity of the technology. The ‘classical’ computers as they are called today, were mostly used in academic, research or military settings. Internet was still decades away and there was no way to send your mom a cat video on the phone . After the invention of transistors, computer sizes got smaller and the computing power increased at an exponential rate. First large scale applications of computers started showing up in finance, banking, logistics, insurance and other compute-heavy industries. Today the computers are an integral part of our lives and there is hardly any field where computers are totally absent.

Quantum computers enjoy similar patronage which classical computers once did. The first potential applications will emerge from the same industries which once started the computing age 60 years ago (finance, banking, logistics and insurance) with additional excitement in chemistry or bio-medicine/ pharma.

Overview

For quantum computing, all the parts for a perfect ecosystem are coming together. The depth and maturity of quantum algorithms are increasing at a rapid rate. The base consumers of this promising technology are waiting anxiously to see applications proving just the same.

The success of any new technology depends on how favorable these following factors are:

  • Theoretical understanding and experimental verification
  • Lineage of successful prototypes and early applications
  • Engineering and construction modalities
  • Academic and industry excitement
  • Social media coverage
  • Resource availability outside research domain
  • Communities of developers, entrepreneurs and students

We use the ‘Cloud’ platforms for almost everything knowingly or unknowingly, through various applications on our devices. The scale of computations carried out in data centers is already very large. Cloud capacities for storage and classical compute are virtually limitless, while the service levels are close to 100% for all major providers. This makes the pre-existing Cloud architecture the right choice to work in conjunction with quantum hardware platforms. Consumer-level applications on devices (mobile phones and tablets), backed by quantum algorithms will propel the field of quantum computing to its widespread adoption.

This article glimpses into the possible prototype architecture solution using Microsoft Azure Quantum along with other components in the Azure ecosystem while using Power Platform to deliver the applications right up to the user devices.

inspired by a similar diagram at Azure Quantum https://azure.microsoft.com/en-ca/services/quantum/

The Solution

Large scale consumer applications involving quantum speedup are still being developed or researched on various different platforms, so there hardly exists a reference architecture when it comes to deploying application using some type of quantum algorithm.

Components:

  • Q# and QDK: (pronounced Q-Sharp) is an open-source language created by Microsoft which is used for developing and running quantum algorithms. Q# is a part of a development kit called as QDK which supports Q# libraries, Q# extensions (for languages like Python and C#) and a quantum simulator.
  • Azure Quantum: This is a full-stack cloud service offering within Azure ecosystem. This service combines the power of hyper-scale cloud infrastructure with open source Q#, to run optimizations on an actual quantum hardware like Honeywell, IonQ or QCI.
  • Python: Python is a popular open source programming language chiefly used for data science and web programming. Python is used as a host language for quantum computing code written in Q#. Although there are multiple compilers available for Python, in this solution VS Code is used for creating a web application that accesses quantum computer.
  • Azure Functions: Azure is a cloud technology platform created by Microsoft. Functions is a part of Microsoft Azure which hosts the Python program and its dependencies from earlier step. Functions creates and publishes the Python web app and enables APIs to be used by front-end applications further down the stream.
  • Power Platform: It is a business applications suite created by Microsoft. Tools included here are:
  • PowerApps: a low-code tool for creating wide-reaching business apps on web/mobile interfaces.
  • Power Automate: Tool used for boosting productivity by automating various back-end processes, often used with Power Apps.
  • Power BI: popular business intelligence tool used for analytics and insights
  • Power Virtual Agents: No-code chatbot creation used with other Power Platform components

Selection:

The system architecture uses the best of the abilities of the individual components. Here is the rationale behind selecting every component:

  • Azure Quantum — to access the backend quantum computer directly, and to use other features like algorithms, error correction and noise reduction
  • Python — to act as a glue between hardware and software, also as a host language for Q#
  • Azure Functions — for the ability to host a web app on a very well-known platform and to create API for consumption
  • Power Platform — for the low-code high-effectiveness when it comes to creating innovative business applications

The architecture diagram will look like this:

Prototype architecture for quantum computing application

Flow:

Following steps describe the flow in the architecture:

  • Python used in VS Code is accesses Q# functions through a library. Using the Q#, suitable algorithms are chosen for the application being developed.
  • Once the Q# portion is taken care of, it is ensured that an entry point and an exit point with a return function is coded in the Python script. Return function can be as simple as a text/ table output of the results.
  • Additionally, Python script is set up to run as an Azure Functions package. In VS Code, this creates a wrapper structure and uploads the function to Azure.
  • Once in Azure, the function is exposed using OpenAPI standards and secure endpoints with Power Apps are created
  • Inside Power Apps, custom connector to Azure Functions is created.
  • Custom connector in the above step is used for developing front end application with low-code or with AI-Builder
  • Power Apps can be the host of such quick applications created based on quantum algorithms with Q#, on to the hands of consumers directly and on their mobile phones.

Example:

The example shown below is for a personal portfolio optimization application built with Ising Hamiltonian model.

VS Code + Q# and PowerApps
Optimizer App on a mobile phone

Considerations:

Following things should be considered when designing solutions based on the discussed approach:

  • Security: handled by the cloud platform- Azure, in this case
  • Access and accounts for Azure Quantum and Azure and Power Platform — Microsoft Azure AD/ Microsoft 365
  • Logging and application insights
  • Data Storage and Scheduling
  • Incompatibilities and systemic issues

Conclusion

For any new technology, consumer applications have always been important determinants for its success. Quantum computing with its big capacity to solve world’s problems can get benefitted by rapid developments in quantum computing technology and existing sustained innovations in cloud technology, put together in a constructive way. The architecture using Azure Quantum Q# and Microsoft Power Platform seems to promise the next generation of consumer apps with ease of creation and maintenance, while giving the computing power harnessed from the use of actual quantum hardware.

--

--

Sarang
Half Spin

Technology. Music. Science. Outdoors. Everything in between