Low-level API

Below we describe the low-level API to the Quantum Inspire platform. Quantum Inspire also offers a Software Development Kit (SDK) to advanced users that will allow programmatic control over all functionality using Python. For more information see the Software Development Kit page.

Application Programmer Interface (API)

The REST API can be found on https://api.quantum-inspire.com/. The API can be used from the browser by following the link, and clicking through the objects in the database.

Forms are provided at the bottom of most pages to create new objects or modify existing objects.

Core API

Detailed documentation is published on https://api.quantum-inspire.com/docs/#

To make programmatic access to the API easy, a Core API schema is published on https://api.quantum-inspire.com/schema.

A basic example consumer of this schema written in Python using the coreapi module might look like this:

        
          import coreapi
 
# Note: BasicAuthentication is not recommended, use the API token instead
server = r'https://api.quantum-inspire.com'
email='email'
password='password'
auth = coreapi.auth.BasicAuthentication(username=email, password=password)
 
# Initialize a client & load the schema document
client = coreapi.Client(auth=auth)
schema = client.get(f'{server}/schema')
 
# Interact with the API endpoint
action = ["projects", "list"]
result = client.action(schema, action)
print(result)
        
      

Direct access

It is of course also possible to directly access the API URL's, for example from within Python by using the requests module:

        
          import requests
from requests.auth import HTTPBasicAuth
 
server = r'https://api.quantum-inspire.com'
email='email'
password='password'
auth = HTTPBasicAuth(email, password)
 
result=requests.get(f'{server}/projects', auth=auth)
 
print(f'result status: {result.status_code}')
print(result.json())