Skip to content
//va edited this page Nov 18, 2022 · 32 revisions

Frequently Asked Questions

General

How do I submit an answer?

Within each exercise notebook, on the challenge portal, you will find guidelines to submit an answer. For example in the challenge 1 notebook, for exercise 1a:

# Submit your answer using following code
from qc_grader import grade_ex1a
grade_ex1a(qiskit_module_names)

Can I run the challenge notebooks on a local computer?

Yes it is possible. But we strongly recommend you solve the exercises on the challenge portal. If you really want to run the exercises locally, you can download the notebooks from the challenge repository and run using Jupyter notebook. Please make sure you have installed the following Qiskit version:

  • qiskit: 0.31.0
  • qiskit-terra: 0.18.3
  • qiskit-nature: 0.2.2
  • qiskit-finance: 0.2.1
  • qiskit-optimization: 0.2.3
  • qiskit-machine-learning: 0.2.1

You can check Qiskit versions by running !pip freeze | grep qiskit in a terminal or run the following code in a Jupyter notebook cell:

import qiskit.tools.jupyter
%qiskit_version_table

If you don't have the latest version installed. You can run pip install qiskit[all] in a terminal to install all of the Qiskit packages.

Can we check answers on a local computer?

Yes it is possible. But similar to the above question, we strongly recommend you solve the exercises and check answers on the challenge portal. If you really want to check answers on a local computer, you need to install the grading client in addition to downloading the notebooks.

For details on how to use the grader locally, Vishal Sharathchandra Bajpe - @mrvee-qC has created an awesome guide which you can check out here.

How to check the grader version?

Please make sure you have installed the latest 0.8.8 version of the grader. You can verify the grader version using the following code in a Jupyter notebook cell:

import qc_grader
qc_grader.__version__

I encountered this error Failed: 400 Client Error: Bad Request for url: https://auth-dev.quantum-computing.ibm.com/api/users/loginWithToken or Failed: 401 Client Error: Unauthorized for url: https://auth-dev.quantum-computing.ibm.com/api/users/loginWithToken while running the notebook locally, I have installed Grader already, What should I do?

You can try to run the following code in your local Jupyter notebook cell.

%env QXToken=YOUR_IBM_QUANTUM_TOKEN
%env QC_GRADING_ENDPOINT=https://qac-grading.quantum-computing.ibm.com
%env QXAuthURL=https://auth.quantum-computing.ibm.com/api
%env QC_GRADE_ONLY=true

You can may need to run these again every time after restarting kernel. You can verify these environmental variables by running the following code:

import os

print((os.environ['QXToken'],
os.environ['QC_GRADING_ENDPOINT'],
os.environ['QXAuthURL']))

If you follow these steps to find your IBM Quantum token.

How to save IBM Quantum account locally and use it to submit jobs?

  1. Go to IBM Quantum account details.
  2. Copy API Token
  3. In a Jupyter notebook on your local machine, type the following code:
from qiskit import IBMQ
IBMQ.save_account('YOUR_TOKEN')

You can follow the steps below to verify that you have setup the account correctly and has the challenge provider linked to your account.

How to check that I have challenge provider?

from qiskit import IBMQ
IBMQ.load_account()
IBMQ.providers()

You should see something like this in the output of the cell.

[<AccountProvider for IBMQ(hub='ibm-q', group='open', project='main')>,
 <AccountProvider for IBMQ(hub='iqc-fall-21-2', group='challenge-1', project='recFaSKO8ka85JBot')>]

The first provider is the open provider for every registered user and the second one is the challenge provider used specifically for this challenge.

How can I retrieve jobs that I have submitted?

Retrieve circuit jobs

For circuit jobs (not runtime), you can find the list of jobs you have submitted here. Find the job id and provider information of the job that you want to retrieve. Job id is a 24-bit string that looks like this 618263437fa11e475d5ad196 under the Id column on the Jobs page. Provider is shown in this format HUB_NAME/GROUP_NAME/PROJECT_NAME. Use this information to retrieve jobs with the following code:

from qiskit import IBMQ
IBMQ.load_account()
provider = IBMQ.get_provider(hub='HUB_NAME', group='GROUP_NAME', project='PROJECT_NAME')
backend = provider.get_backend('ibmq_qasm_simulator')
job = backend.retrieve_job('JOB_ID')
Retrieve runtime program jobs

For program jobs (runtime), you can find the list of jobs you have submitted here. Similar to retrieving ordinary circuit jobs, you will need the job id and provider information. The difference is that runtime job is retrieve on the provider level, not the backend level, with different method:

from qiskit import IBMQ
IBMQ.load_account()
provider = IBMQ.get_provider(hub='HUB_NAME', group='GROUP_NAME', project='PROJECT_NAME')
job = provider.runtime.job('JOB_ID')

Do we need to download the notebooks from github?

No, you can run all exercises on the challenge portal itself.

Do I need to take the exercises in order?

We encourage you complete the exercises in the given order as this is the intended structure for the challenge. However, you may take the exercises in any order.

Do I need an IBMid associated with my IBM Quantum Account?

Yes, you'll need an IBMid associated with your IBM Quantum account in order to complete some of the challenges. If you don't already have one, please register a new IBMid using the SAME email address associated with your IBM Quantum account. If you have any questions or face any issues, please let us know in the #challenge-fall-2021 Slack channel.

I encountered “Server error”. What should I do?

We have a lot of participants at the moment. Please be patient, wait and try again.

I encountered this error 401 : Unauthorized You are not Authenticated to do this (1) What should I do?

Please try the following on a notebook on Quantum Lab

import os
os.environ['QXToken'] = 'your token'
print(os.getenv('QXToken'))

You can find your token here: https://quantum-computing.ibm.com/account. Make sure the output matches the token you copied from the account page.

Run the code below to check if authentication is working. If you see a long string in the output, it means 401 error has been resolved.

from qc_grader.api import get_access_token
get_access_token()

Will I receive a badge and what are the qualifications?

You will receive the IBM Quantum Challenge Fall 2021 Achievement digital badge for participating in the IBM Quantum Challenge Fall 2021 and successfully completing all four of the challenges by the deadline of 5 Nov, 12:00 PM (EDT). More details will be shared once the challenge has completed.

YouTube livestream

We will have hosted YouTube Live lectures for four application modules prior to the challenge start.

You can watch the replay here if you missed the livestream.

IBM Quantum Lab

Why am I seeing the error "Failed: 401 Client Error: Unauthorized for URL"?

The challenge platform requires that you are logged in with a full IBMid, and not a social-media account like GitHub. If you are not using an IBMid to login, please register an account using the same email you registered with. This should resolve the above error.

Why am I seeing the error "Login with some authorized provider required."?

This error is shown if you are logging in with a social-media account like GitHub. Please see the solution given for the above question, Why am I seeing the error "Failed: 401 Client Error: Unauthorized for URL"?.

Why am I seeing the error "Your request cannot be processed. The System cannot process your request."?

This error may occur if you have two accounts and one is logging in automatically. To resolve this, navigate to ibm.com, disable auto login, logout, close all IBM tabs except one, and re-login to the challenge website.

Why am I seeing the error Failed: Gateway Time-out or Failed: Bad Gateway?

This is due to the grading process taking longer than the time-out limit of the grading server, which is 60 seconds. You can put Jupyter notebook line magic %%time in a cell to check the time it takes for grading (this is an example for grading challenge 4c):

%%time

grade_ex4c(job)

If the time is longer than 60s, it will cause the error. You should review your answer to make it simpler.

Why am I seeing "Error 524" when I load the IBM Quantum Lab?

The IBM Quantum Lab and IBM Quantum Challenge Fall 2021 teams may need to update the platform at certain points during the challenge. If you encounter this error, you should wait about 5-10 minutes before trying again. By that stage, the server should have successfully updated.

Why am I seeing "File Save Error for challenge-x.ipynb, Invalid Response: 403 Forbidden"?

  1. If you see this error for challenge-2.ipynb, remove/comment out the sections in the notebook that is related to the ProgressPlot python object.

  2. If you see this error for challenge-3.ipynb you have two options to fix this issue:
    Option 1: Go to Challenge 3b problem statement (green block) and replace normal quotation ('') with back quotations (``) for seed_simulator=1024 and `seed_transpiler=1024`.
    Option 2: Rename your current notebook to `challenge-3-anythingyoulike` and then go to the challenge dashboard and reload the page. You should see a new `challenge-3.ipynb` created under the challenge-3 folder. Copy-paste any code you wrote in the old notebook to the new one to start from where you left off. Then you can delete the old notebook to stop the error messages to reappear.

Challenge-specific

Still have more questions?

Please let us know if you have any additional questions in the #challenge-fall-2021 in the Qiskit Slack workspace.

Clone this wiki locally