This website can be used as a demo to show how Quantum Inspired Compute can solve the Traveling Salesperson problem using an interactive map.
- An Azure subscription with a Quantum Workspace.
- A Bing Maps API key. If you don't have one, follow these instructions.
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.
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:
-
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 theWest US
region. D. Add a service principle account to the Azure Quantum workspace like this. Note down the service principle information including the secret. -
Fork this project.
-
Navigate to the settings page and then the secrets tab.
-
Add a new secret named
DEPLOYMENT_PROFILE
, paste the contents of the deployment profile there. Then add another new secret namedBING_KEY
and assign it the Bing Maps API key. -
Add the same settings as the in above
.env
file as application settings in the App service like this. -
Run the github action.
-
Have fun =).