Notifications#

It is possible to receive an email or Slack notification when your job is finished, with details about your job. There are two options for specifying your notification details:

  1. Set your email address and/or Slack ID (see below how to obtain this) as environment variables in your shell:

    export SLACK_ID="<your slack id>"
    export EMAIL_ADDRESS="<your email address>"
    
  2. Configure your email address and/or Slack ID using the configure_notifications() method of the client. This will save your details so they can be used everytime you initialize the client with your tokens. When calling this method, test messages will be sent using the specified details and return errors if they occur. This is useful for identifying any issues with notifications if you are not receiving them.

    from fermioniq.client import Client
    
    client = Client()
    client.configure_notifications(email_address="example@domain.com", slack_id="ABC123")
    

    These details can be updated any time by rerunning the code block above.

Notifications can be turned on for a job by specifying the notification mode (“slack” or “email”) when creating an emulator job. See the tutorials in the next section for more information about creating and sending jobs.

from fermioniq.client import Client

client = Client()
emulator_job = fermioniq.EmulatorJob(circuit=circuit, notification_mode="slack")

Set up Slack notifications#

In order to receive notifications in Slack, you need to add our Fermioniq JobNoti app to your workspace:

Add to Slack

Note

You can find your Slack ID as follows:

  1. In your Slack workspace, click on your profile name or picture located at the bottom-left corner of the Slack interface.

  2. In the dropdown menu, click on “Profile” (or “View Profile”).

  3. Click the ellipses (three dots).

  4. Click on “Copy Member ID”. This is your Slack ID.