Qiskit Mentorship Program

This is my post about the Qiskit Mentorship Program. Since March, I started contributing to Qiskit and Retworkx. Overall, it has been a great experience and I plan to continue contributing after the mentorship ends.

In this post, I hope to answer some questions about the program. I will structure this as a Q&A instead of a detailed blogpost about transpile optimizations because I believe it makes more sense. If by chance you are interested in knowing more about Retworkx and the transpile passes that are in Qiskit, I invite you to send me a message on the Qiskit Slack.

Hence, let’s get started with the questions.

Q: What is the Qiskit Mentorship Program?

The Qiskit Mentorship Program is organized by the Qiskit Community and matches mentees to experienced contributors from Qiskit and IBM Quantum.

It runs for roughly three months, a period in which mentees work individually or as a team to work in a project that will be integrated to Qiskit. This was the first iteration of the mentorship program, and you can take a peak of the project proposals for this iteration here - there were many mentors and projects to choose from.

The mentorship is a great opportunity to start contributing to Qiskit and networkx with project maintainers, IBM researchers, and many other talented people.

Q: What did you work on during the mentorship period?

In my specific case, I worked on Retworkx. Retworkx is a graph theory library maintained by Qiskit, which was created with performance in mind.

It mind sound counterintuitive, but Qiskit uses graphs extensively. They are cleverly hidden from the end-user, but every quantum circuit is Qiskit is stored as a Directed Acyclic Graph (DAG). Take for example this circuit:

The same circuit can be represented in an equivalent form as a DAG:

I hope this gives some insight on why DAGs are important to Qiskit. Every circuit is a DAG, and hence we need to manipulate them efficiently. That allows Qiskit to scale to handle deeper circuits and circuits with more qubits.

Hence, my mentorship was focused mainly on three things: optimizing graph algorithms in Retwork and transpile passes in Qiskit; adding new graph algorithms to Retworkx; and maintaining an open-source project in general (bug fixes, code reviews, code style, etc).

Namely, my contributions were:

Performance & Optimization

Add New Methods and Algorithms

Maintenance, Documentation and Bugfixes

I will not dive deep into them, but I can affirm that after contributing I have a deeper understanding of how Qiskit works. That is very rewarding, and I might blog more about it later.

Q: Why should people contribute to Qiskit?

There are many reasons to choose from, I invite you to pick one from many:

  • Impact: if your code is in Qiskit, it will be downloaded by thousands of people
  • Purpose: help quantum computing grow via software development and research projects
  • Connections: network with maintainers and researchers - a very good move to start in the QC field
  • Personal Achievement: each contribution is a small victory, it is rewarding to overcome the challenges and see your work be accepted
  • And the list goes on!

Q: Do you think your contributions will be relevant?

Yes, I do. It is hard to measure, but I think most of the contributions to Qiskit are relevant, including. Do not let the fear that what you will do will not be important prevent you from starting. There is a lot of work to do in Qiskit - and they could use your help!

Take for example the Retworkx API documentation. I wrote the new organization of the API documentation, it scales better and makes things easier to find. Retworkx has a few thousand users outside of Qiskit - they will read my work and hopefully find the docs clearer too! And so will people using Retworkx interally in Qiskit.

Q: Do contributions need to be code? What are the options for people from a different background?

No, contributions do not need to be code and Software Developers are not the only people that participate in the mentorship. I decided to do more software development because that is what I like. There are people from backgrounds . Some projects focus more on Technical Writing, Physics, Chemistry, or Finance for example.

I will link to the The Ultimate Guide for Contributing to Qiskit — No Matter Your Background resource by Abby Mitchel. It outlines many ways to contribute - it can be writing code, creating a chapter on the textbook, translating documentation or even starting your own project using Qiskit.

Q: How to get started?

Ok, you have read me answering questions that lead to the conclusion: contributing to Qiskit is great. Perhaps you want to start doing it too. Where do you start? I think this can be split into two parts.

What to work on?

  • Check the issues in the Qiskit repositories - e.g. Retworkx Issues.
  • Select an issue which interests you - it could be one that you know how to solve or that you want to learn how to solve, for example
  • Ask questions: talk to the maintainers and the user that opened the issue. What do you need to know to work on this? E.g. for code contributions, which part of the code do you need to change?
  • Start working on it

Also, pro-tip: if you filter by Good First Issue, you will find beginner friendly issues. I recommend to start small with those begginer friendly issues and then keep growing it bigger.

Moreover, if there is an idea you want to work on but is not in the repository issues: you can create your own ticket with the idea and explain it to maintainers. They will help you polish it such that you can start working on it and guide you. I always emphasize on talking to maintainers - they know the code and can help you spend your time in a smarter way.

How to start working on it?

  • Read the CONTRIBUTING file, each repo has their own e.g. this is Retowrkx's file - this will give you an idea of the development workflow
  • Start coding - try to keep it focused on the specific issue you are working
  • Submit a Pull Request with your work and maintainers will help you from there

More resources

See How to Contribute to Open Source to see a general advice on how to contribute to open-source. Qiskit is an open-source project, so much of the advice transfer well.

Avatar
Ivan Carvalho
Software Developer

Always looking for a challenge!

Related