Submitting jobs requires a user specific access_token_id and access_token_secret which are tied to your Fermioniq account. These are used for authenticating the jobs you send. There are two ways of providing these access tokens to the client, either as environment variables or as arguments when instantiating the client.


Do not share your access tokens with anyone. They are tied to your Fermioniq account and should be kept secret. If you are working on a project with multiple collaborators, consider adding the access tokens to a .gitignore file to avoid accidentally sharing them.

Environment variables#

You can set the access tokens as environment variables in your shell.

export FERMIONIQ_ACCESS_TOKEN_ID="<your access token id>"
export FERMIONIQ_ACCESS_TOKEN_SECRET="<your access token secret>"

When initializing the client, the access tokens will be read from the environment variables by default:

Arguments to the client#

You can also pass the ID and secret as arguments when instantiating the Client() within a Python script. It is recommended to not write the access tokens directly in the script, but to read them from a file. For example, by storing the contents below in a file fermioniq_access_token.json:

    "access_token_id": "<your access token id>",
    "access_token_secret": "<your access token secret>"

you can then easily initialize the client as follows:

import json
from fermioniq.client import Client

with open('fermioniq_access_token.json', 'r') as f:
    access_tokens = json.load(f)

client = Client(
    access_token_id = access_tokens['access_token_id'],
    access_token_secret = access_tokens['access_token_secret']

Getting Access#

If you don’t have a Fermioniq account but would like to get access to our services, please email or visit the Fermioniq website