Skip to content
Vishal Bajpe edited this page Nov 15, 2022 · 23 revisions

Welcome to the IBM Quantum Challenge Fall 2022 wiki!

Here you shall find answers to some of the common queries and issues that arise! Please feel free to refer to this section before approaching mentors for assistance on technical issues!

Hints for the Challenge:

❗️ A message on Lab 3 ❗️


Q: I am experiencing longer-than-typical VQE runs in Lab 3, how can I speed it up?

A: We are currently investigating some Runtime issues that may come up for you during Lab 3. There are updated notebooks using a different method that you may use to progress on Lab 3 and submit your answers. You can access these new notebooks by refreshing the Challenge Portal and clicking on the Lab Notebook button. After doing so, you will taken to a new folder in Lab 3 with the new alternative fix that uses a local version of the runtime. Your previous progress is still saved and will be present in the folder in the prior directory in lab-3. Any correctly submitted answers will also not be lost; simply resume from which exercise you are up to in the new Lab 3 notebook, making sure to copy across any answers that future exercises may be dependent on.

Please ensure for lab 3 not to pass in options parameter for the Estimator call.

General Queries:


- 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.challenges.fall_2022 import grade_lab1_ex1

grade_lab1_ex1(bernstein_vazirani)

- 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-terra: >= 0.22.2
  • qiskit-ibm-runtime: >= 0.8.0
  • qiskit-nature: >= 0.4.0
  • qiskit-optimization: >= 0.4.0
  • prototype-zne: >= 1.0.0

You can check what Qiskit versions you have installed by running pip list | grep qiskit in a terminal window or by running 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. If you receive an error, try running pip install qiskit\[all].

In case your runtime version shows 0.7.0, you can upgrade to 0.8.0 by: !pip install qiskit-ibm-runtime==0.8.0 Note: Make sure to restart the kernel to use updated packages.


- Why is my VQE run taking so long?

As mentioned in the notebooks, the VQE run may take about 5-10 minutes to complete due to the huge number of jobs required to be sent on cloud solve the problem. Noisy simulation of VQE runs will take even longer due to the noise model applied in the simulators. Please be patient as the runs are complete! Feel free to head over to https://quantum-computing.ibm.com/jobs to check if there are jobs being sent on the portal!


- 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 setup the grader locally:

  • Make sure you install all the libraries above in your environment
  • Install the qc grader by running pip install git+https://github.com/qiskit-community/Quantum-Challenge-Grader.git
  • Set your environment variables
  • Set your token from the dashboard Do not add any quotes and DO NOT share this key with anyone
  • Test out to see if it works by running a grading cell

- How to check the grader version?

Please make sure you have installed the latest 0.13.6 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: / Failed: 401 Client Error: Unauthorized for url:

For 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, 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

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?

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

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-22-2', group='challenge-1', project='recFaSKO8ka85JBot')>]

- 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-2022 Slack channel.


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

We have a lot of participants at the moment. Please try again a while later! :)


- Optional exercise: leasy_busy error: IBMQError: 'Unable to find the least_busy backend from an empty list.'

If you encounter this error, please fix the imports to from qiskit_ibm_provider import least_busy instead of from qiskit.providers.ibmq import least_busy

Additionally, you also have an option proceed to enter the name of backends manually. The two backends you have access to for the challenge as ibm_nairobi and ibm_oslo. Please enter them as strings in the Session contruct as so:

with Session(service=service, backend='ibm_nairobi'):

or

with Session(service=service, backend='ibm_oslo'):

- 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 an IBM Quantum Challenge Fall 2022 Achievement digital Credly acclaimed badge for participating in the IBM Quantum Challenge Fall 2022 and successfully completing all four or partial completion of the labs by the deadline of 18 Nov, 09:00 AM (EDT).

You will receive a Foundational Badge for completing upto Lab 1, Intermediate Badge for completing upto Lab 2 and Lab 3 and an Advanced badge for completing upto Lab 4. More details will be shared once the challenge has completed.


IBM Quantum Lab Queries:


- Why am I seeing the error Failed: 401 Client Error: Unauthorised 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 2022 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.


Still have more questions?

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

Clone this wiki locally