Coder Social home page Coder Social logo

qio-tsp-demo's Introduction

Quantum Inpired Optimization demo for the TSP problem

This website can be used as a demo to show how Quantum Inspired Compute can solve the Traveling Salesperson problem using an interactive map.

Requirements

  1. An Azure subscription with a Quantum Workspace.
  2. A Bing Maps API key. If you don't have one, follow these instructions.

How to use

Local

For the application settings you need to create a .env file in the root folder specifying following variables:

#These are the settings for your Azure Quantum Workspace
subscriptionId = 000000-000000-000000-000000-000000
resourceGroup = MY_RESOURCE_GROUP
quantumWorkspaceName = myworkspace
quantumLocation = westeurope

#these settings can be used if you are using a service principal to authenticate
directoryId = 000000-000000-000000-000000-000000
appId = 000000-000000-000000-000000-000000
appsecret = 000000-000000-000000-000000-000000

#Bingmaps API key.
bingkey = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

#You can set a password here if you want to use one otherwise leve blank
password = supersecretpass

# set as servicePrincipal if you want to use this to authenticate otherwise leave blank
loginMethod = servicePrincipal

First, add the Bing API key to the Bing url in the html file. Then debug the application in VSCode with the Fastapi setting (example), this loads the variables declared in the .env file.

On Azure

If you want to deploy this to Azure app service you can deploy this by running the included pipeline, it can be setup like this:

  1. Prepare the Azure enviorment. A. Create a Linux Python app service plan. B. Fetch the publish profile, you can do this by going the the App service in the Azure portal and click on Get publish profile. C. Create an Azure Quantum workspace. Note that if you want to use FPGAs you currently have to deploy to the West US region. D. Add a service principle account to the Azure Quantum workspace like this. Note down the service principle information including the secret.

  2. Fork this project.

  3. Navigate to the settings page and then the secrets tab.

  4. Add a new secret named DEPLOYMENT_PROFILE, paste the contents of the deployment profile there. Then add another new secret named BING_KEY and assign it the Bing Maps API key.

  5. Add the same settings as the in above .env file as application settings in the App service like this.

  6. Run the github action.

  7. Have fun =).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.