Skip to content
This repository has been archived by the owner on Oct 12, 2023. It is now read-only.

My step by step guide to contribute to qiskit-terra

Notifications You must be signed in to change notification settings

Dpbm/qiskit-contributing-guide

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 

Repository files navigation

Guide

This repo, contains some step by step guide for contributing for qiskit-terra

Obs: This is not an official guide, so if you want to collaborate too, please, check the official documentation: qiskit.org. If you want to collaborate to qiskit-terra, check this one too.

Also, this repo aims to help who wants to fix some bugs. If you are adding a new feature, or making something different, you may need to check the full documentation first!!

I've created this just to remind me what I need to do before I create a pull request

tools

preparing the environment

  1. fork the qiskit project
  2. clone to a local directory:
#example:
git clone https://github.com/{Username}/qiskit-terra.git
cd qiskit-terra
  1. create conda environment
conda create -y -n QiskitDevenv python=3.8.15
conda activate QiskitDevenv
  1. install dependencies
pip install .
pip install -U tox reno
  1. create a new branch for you modifications
git checkout -b branch-name

Tests

To run your tests:

tox -n --

You can also specify the python version like:

#example for python 3.8
tox -epy38 -n --

Also specify a single test suite:

tox -- -n test/python/circuit/test_circuit_qasm.py

Lint

To check if your code follow the style patterns run:

tox -eblack
tox -elint

docs

After all changes, create a release note using reno. Make sure to follow the patterns!

reno new release-note-title
reno report

Finishing

In the end, just push your modifications to your fork, then make a pull request for qiskit-terra