Skip to content
Astri edited this page Jun 14, 2024 · 4 revisions

Welcome to the IBM Quantum Challenge 2024 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!

The #1 piece of advice we have: Be kind and patient 😄

How does The IBM Quantum Challenge 2024 work?

The Challenge is a series of guided Labs in the form of Jupyter notebooks. Each Lab file is a mixture of tutorial content and coding exercises for you to learn from and prove your knowledge. The Labs are self-paced; you can work on them whenever you have time. They are also individual - every participant is trying to solve each Lab alone, but you can talk with others on the Challenge Discord, or however you prefer to chat.

What is a Credly Badge and how can I earn the IBM Quantum Challenge 2024 badge?

A Credly Badge is a digital credential that shows your accomplishment in completing the challenge. You can display your achievement on places like LinkedIn to highlight your skills to others. The badge claim process will be emailed after the challenge is over.

How can I download and run the challenge labs?

You can download the labs either from the Challenge Portal or via Github. Then to run the labs, you can choose use a cloud-based tool like Google Colab or qBraid. You can also run them locally as Jupyter notebooks, or in the cozy comfort of your favorite IDE. For some of you wild folks out there, maybe you're deep in your command line. See this blog post for further setup details.

You can run the labs however you like, but we highly recommend you first attempt Lab 0 to ensure that you correctly set up your environment to be able to successfully participate the challenge. We also suggest you watch watch this video to walk you through every step of the process for setting up and using Qiskit.

Do I need to take the labs and exercises in order?

We encourage you complete the labs and exercises in the given order as this is the intended structure for the challenge, however, you may take the exercises in any order. Please keep in mind that the labs have a staggered release.

Why Don't I See Any Labs Yet? Where Is Lab 3? Why is my Challenge Portal missing Labs?

The labs will have a staggered release:
Labs 0 & 1: 9am EST / 3pm CEST on Wednesday, June 5
Lab 2: 4am EST / 10am CEST on Thursday, June 6
Lab 3 onwards: TBC

How do I submit an answer?

Within each exercise notebook you will find guidelines to submit an answer. For example in the lab 0 notebook, for exercise 1:

# Submit your answer using following code

grade_lab0_ex1(observables)

Make sure you have run all the code cells previously including where the grader functions are imported. Run this code cell like any other cell to grade your answer. You will need an internet connection to grade your work. It's important to remember that when you change code in any cell, you need to run that cell before submitting to the grader again.

I need some help with a lab exercise, where can I find help?

There are plenty of resources available to support you! We have a Discord server this year available for you to join. On this server, there are dedicated channels for each lab, language channels, and plenty of mentors to help out.

Only registered users received the email to the Discord. If you registered and still did not get this email, check your spam folder. If it's not there, then likely there was a typo when you submitted your email.

We understand not everyone is able to join Discord, so we also plan to send occasional updates via email during the event, as well as frequently update this Wiki with more tips and tricks as the challenge progresses.

I am experiencing issues when I log into IBM Quantum Platform. What should I do?

If you have access to the challenge Discord server, send a message in #general-support and describe the issue you are experiencing so we can best figure out how to assist you. Please do not send any personal information in a public channel - try your best to describe your issue without those details. We will reach out if we need more information from you!

If you cannot access the Discord and are experiencing login issues, please send an email to: [email protected]

I need to create an IBMid for the first time. What should I do to ensure I do not have any login issues?

  • Go to IBM.com and click the person icon in the top right, then select “Log In”

  • You’ll be taken to a login page where you can click “Create an IBMid”

  • Follow the prompts, input your info, validate your email and you’ll have your account set up! Use your institution email if you have one (e.g. college or university email). Try not to access IBM Quantum Platform through a Virtual Private Network (VPN).

What is a Challenge Party and how can I host one?

In recent years we’ve seen an exciting increase in the number of local Challenge get-togethers held by Qiskit community members. We encourage you all to get a group together in your community to tackle the Challenge! Please reach out to us via the Challenge Discord or [email protected] and let us know if you do end up hosting a Challenge Party!

What's the difference between the ! command vs % command in a jupyter notebook?

! command will run the command in your shell. ie if you want to run directly into the terminal / command prompt, it's recommended to use the ! command. % command is the magic command developed by the jupyter team to make sure commands are shimmed to be sent to the jupyter / python kernel you are currently using. Heres some more fun action available with the magic command: https://medium.com/@marc.bolle/learn-these-15-magic-commands-in-jupyter-notebook-to-save-time-a864ca9b15c7

Why is this useful?

Running pip install via the ! can have some dire issues. In fact, the ! may install packages into the base conda environment both locally or even on qBraid which is the base environment where all your subsequent conda environments are created. Therefore, you run the risk of a trickle down affect where pip installing into the original base conda environment can mangle future environments.

In addition, I saw a few users who !pip install and ran into the issue where they installed the environment, but the kernel didn't recognize the package. This goes back to having installed the package into the base (wrong) enironment. The current kernel may detect that it's installed since it inherits from the base environment, but may not be able to import said package since it's not in the /python/site-packages it is referencing!

In general most users who use jupyterlab run a local solution or a single environment solution where you can get away with using the !, but the jupyter team have explicitly developed a solution to avoid mangling environments (which at qBraid we also add another layer of abstraction to take care of dependcies and conflicts).

Please use the above features to save yourself the time and hassle 🙂

If you are receiving a "401 Error" while trying to connect to Qiskit Runtime:

Please log in to IBM Quantum Platform to refresh your IBM Quantum API token and optionally run QiskitRuntimeService.save_account(channel="ibm_quantum", token="<MY_IBM_QUANTUM_TOKEN>", set_as_default=True, overwrite=True) to update your saved credentials. Full documentation for this issue can be found here

Common issues and solutions:

Issue: (ModuleNotFoundError: No module named 'qiskit_transpiler_service') Solution: Restart your kernel and run this cell along with your other installs !pip install qiskit-transpiler-service --upgrade

Issue: 401 error, 403 error, or "[Errno 2] No such file or directory: 'C:\Users\name.qiskit\qiskit-ibm.json'" Possible solutions: Please log in to IBM Quantum Platform to refresh your IBM Quantum API token and run: QiskitRuntimeService.save_account( channel="ibm_quantum", token="<MY_IBM_QUANTUM_TOKEN>", set_as_default=True, # Use 'overwrite=True' if you're updating your token. overwrite=True, ) service = QiskitRuntimeService() to update your saved credentials and save your account locally. Full documentation for this issue can be found here

OR for 401 Client Error

If you have been logging in with a third party, you may need to create an IBMid with your email in order to move forward. For those facing 401 error, please make sure that you run the cell in the Setup section of EACH lab that contains %set_env QXToken=. You need to run that every time you restart a kernel or changing from one notebook to another. Please also make sure that there is no space or other characters after =. In addition, do so BEFORE importing the grader. If you have already run the cell that imports the grader, you need to restart the kernel, run %set_env QXToken= and then import the grader.

Lab 2 - Graphviz

Tip: You may have to install graphviz for Lab 2. You can find installation instructions here: https://graphviz.org/download/

Lab 3 Tips

  • For the Lab 3 serverless notebook, you may see a message: Could not find a version that satisfies the requirement ray<3,>=2.9.3 (from qiskit-serverless). Ensure your Python version is 3.10 and less than 3.12. This is required by the ray module. Python version 3.12 will not work with ray.
  • Please upgrade your grader client to version 0.18.11 for Lab 3 grading! Grader can be updated to the laters version with %pip install git+https://github.com/qiskit-community/Quantum-Challenge-Grader.git --upgrade
  • Ensure the function titles are vqe and transpile_parallel for grading. For real-world deployment, the titles can be arbitrary; this restriction is only for grading purposes.
  • For workloads that you want to deploy to Qiskit Serverless, we recommend you create a working directory solely for your program files. When you run upload(), this entire directory will be tarballed and uploaded

For example, if you have transpile_parallel.py, we recommend you create a /source directory, and put your your working files in /source/transpile_parallel.py

Later, when you setup your workload, add that /source directory to your working_dir parameter:

transpile_parallel_function = QiskitFunction( title=" # Add your code here ", entrypoint=" # Add your code here ", working_dir="./source", dependencies=["qiskit-transpiler-service"] )

Please ensure all empty sections are filled in the python files.

  • If you are getting Oops 😕! 'list' object has no attribute 'get' please review your answer and try again. Please update your graders to version 0.18.12

Lab 4 Tips

  • Ex7 - Please specify dynamical_decoupling and the sequence_type for both options