Skip to content

Commit

Permalink
Release 0.12.1 (#1776)
Browse files Browse the repository at this point in the history
* Bump version strings to prepare for release

* Remove redundant wheel dep from pyproject.toml (#1741)

Remove the redundant `wheel` dependency, as it is added by the backend automatically.

Listing it explicitly in the documentation was a historical mistake and has been fixed since,
see: [pypa/setuptools@f7d30a9](pypa/setuptools@f7d30a9).

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

* add code-formatting with black for python and with clang-format for c++ (#1630)

* add black and clang-format

* apply black and clang-format

* manually format codes that were not covered in black and clang-format

* add targets of clang-format and clean up tox.ini

* apply black with new configuration

* Update CONTRIBUTING.md

Co-authored-by: Matthew Treinish <mtreinish@kortar.org>

* Update .github/workflows/tests.yml

Co-authored-by: Matthew Treinish <mtreinish@kortar.org>

* reformat qiskit_aer, test, tools, and setup.py with length 100

---------

Co-authored-by: Matthew Treinish <mtreinish@kortar.org>

* Add git blame ignore file (#1745)

This commit adds a new file with the SHA1 of commits to ignore when
running git blame. This is important because of the recent adoption of
black and clang-format as our code formatting tool in #1630 we caused a
large amount of code churn to change the code formatting. However, using
the ignore file is a local opt-in feature for git and not something we
can enable globally by default. To facilitate this a section is added to
the bottom of the contributing guide to document how this file can be
used.

* deploy documentation in qiskit.org/ecosystem (#1748)

* deploy documentation in qiskit.org/ecosystem

* comment

* Remove a release note in an invalid location (#1750)

Essentially equivalent content is already incorporated in #1739.

* Fix how to reference to config.cuStateVec_enable (#1749)

* Fix how to reference to config.cuStateVec_enable

* Add a release note

* Update fix-cuStateVec_enable-0936f2269466e3be.yaml

---------

Co-authored-by: Hiroshi Horii <hhorii@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

* use `omp_set_max_active_levels` instead of `omp_set_nested` (#1752)

omp_set_nested was deprecated since OpenMP 3.0 and this commit
replaces it with omp_set_max_active_levels.

* use omp_set_max_active_levels instead of omp_set_nested
* use omp_set_nested in WIN
* Update releasenotes/notes/use_omp_set_max_active_levels-7e6c1d301c4434a6.yaml
* use _OPENMP to select omp_set_max_active_levels or omp_set_nested
---------

Co-authored-by: Jake Lishman <jake@binhbar.com>

* Ensure QuantumCircuit.metadata is always a dict (#1761)

* Ensure QuantumCircuit.metadata is always a dict

This is for compatibility with Qiskit/qiskit#9849

* fix order

* fix typo :(

* revert object->object() change

* make backportable

* Add Tutorials to Documentation Page (#1768)

* Add tutorials

* Add pandoc installation

---------

Co-authored-by: Hiroshi Horii <hhorii@users.noreply.github.com>

* Defer gathering backends until they are needed (#1760)

* Defer gathering backends until they are needed

* Disable the not-an-iterable warning

Pylint infers _get_backends to always return None, even if we add type
annotations. Suppress the warning.

* Add @staticmethod to AerProvider._get_backends

---------

Co-authored-by: Hiroshi Horii <hhorii@users.noreply.github.com>

* Fix wrong set of parameters in circuits with barriers (#1775)

* Fix wrong set of parameters in circuits with barriers

`AerCircuit` is created from a circuit by iterating its instrucitons
while skpping barrier. This leads inconsistency with positions of
parameter bindings. This commit adds barrier instruction to the class
and keeps positions of parameter bindings.

* fix lint error in test

* remove unused variable in test

* Add API docs for QuantumCircuit methods (#1753)

* Add new doc for circuit method apis

* Remove QuantumCircuit description

---------

Co-authored-by: Hiroshi Horii <hhorii@users.noreply.github.com>

* Resolve regression from introduction of AER::Config (#1747)

This commit reduces redundant copy in `AER::Transpile::CircuitOptimization`.
Since 0.12.0, configuration is `AER::Config` instead of `json_t`. This new class
has many fields and then its copy overheads become high. Reduction of
redundant copy improves performance especially for low-qubit simulation.

* Remove REQUIRED to find PythonLibs in FindPybind11 (#1786)

* pin the version of scikit-build to 0.17.2

* Pin scikit-build version by 0.17.2

Co-authored-by: Matthew Treinish <mtreinish@kortar.org>

* remove REQUIRED to find PythonLibs in FindPybind11

---------

Co-authored-by: Matthew Treinish <mtreinish@kortar.org>

* Remove Sampler.close, assert DeprecationWarning of opflow, and update dependency (#1804)

Since qiskit-terra 0.24, `Sampler` does not have `close()` but Aer's `Sampler` still have the method. This commit takes the method as well as upgrade of Python versions in tutorial tests from 3.7 to 3.8.

* rm close
* assert DeprecationWarning
* update dependency

* Fix setting MPI processes and ranks (#1808)

0.12.0 accidentally removed MPI support if application does not use qobj. This commit reverts the change.

* Fix library path to cuQuantum and cuTENSOR (#1801)

Co-authored-by: Hiroshi Horii <hhorii@users.noreply.github.com>

* Activate jQuery in docs (#1802)

Sphinx 6 no longer activates jQuery by default but `qiskit_sphinx_theme` still uses it.
This commits enables jQuery by adding the theme to extensions in conf.py.

---------

Co-authored-by: Hiroshi Horii <hhorii@users.noreply.github.com>

* fix cuQuantum static linking (#1812)

Co-authored-by: Hiroshi Horii <hhorii@users.noreply.github.com>

* Update standard_errors.py (#1799)

There was a typo in the rendering of the mathematical text on Depolarizing Error Page (https://qiskit.org/ecosystem/aer/stubs/qiskit_aer.noise.depolarizing_error.html)

Co-authored-by: Hiroshi Horii <hhorii@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

* Add implicit cast of argument types (#1770)

* Add implicit cast of argument types

Since 0.12.0, AerConfig is used to configure simulation, which
is directly bound to a AER::Config object through pybind.
This change requires application to specify strictly correct types
of configuration options. This commit allows implicit casting
to arguments if application specifies them with wrong types.
This commit resolves #1754.

* does not warning in cast of numpy classes if they are compatible with expected type
* fix lint issue
* simplify class checking

* Fix handling of None in noise model construction from BackendV2 (#1818)

Fixes `NoiseModel.from_backend` not to fail when calling it with a V2 backend having
faulty qubits such that T1 and T2 are `None` in the `target.qubit_properties`. 

* fix handling of None in noise model construction from BackendV2
* add reno
* simplify a bit
* update docs

* Add Getting Started page (#1780)

This commit adds documentation "Getting Started" page.

* Add Get Started page
* Remove unused class

---------
Co-authored-by: Hiroshi Horii <hhorii@users.noreply.github.com>

* avoid kernel crash from blas call errors (#1791)

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

* fix fail of qobj run without run_options (#1792)

* fix fail of qobj run without run_options

* fix lint error

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

* Support parameterized global phase (#1814)

* Support parameterized global phase

Though `ParameterExpression` can be set to `QuantumCircuit.global_phase`,
Aer does not bind parameter values to it in simulation phase. This commit fixes
this problem by resolving values of `global_phase` with specified `parameter_binds`
in `AerSimulator.run`.

* define AER::CONFIG::GLOBAL_PHASE_POS and its pybind
* fix lint issues
---------
Co-authored-by: Jun Doi <doichan@jp.ibm.com>

* check parameter_binds arguments for parameterized circuits (#1817)

Aer raises an error if `parameter_binds` is not specified though circuits have parameters.
This resolves the following issue:
#1773

* Set the number of qubits with the coupling map (#1825)

* Set n_qubits from coupling map

* Add a test and release notes

* Fix lint

---------

Co-authored-by: Hiroshi Horii <hhorii@users.noreply.github.com>

* Fixing some typos (#1827)

* Update aer_densitymatrix.py

* Update aer_statevector.py

* Update README.md

* Update CONTRIBUTING.md

---------

Co-authored-by: Hiroshi Horii <hhorii@users.noreply.github.com>

* Use transpile and run instead of execute in docstring (#1830)

* use transpile and run instead of execute in docstring

* use backend.run instead of execute in README

* use fake_provider for noise_model example

* Revert edits on README.md

* Update examples in docstring for qiskit_aer.noise

* Fix depolarizing noise model example

* Remove incorrect markup in noise/__init__.py

---------

Co-authored-by: Hiroshi Horii <hhorii@users.noreply.github.com>

* Fix typos in aer_simulator, qasm_simulator docs (#1833)

* Fix typos.

* Add missing aer_simulator options.

* Update reference to SaveProbabilities according comment to PR.

* Upgrade to qiskit_sphinx_theme 1.12 (#1822)

* Warn if approximation=False and shots=None in Estimator (#1823)

* fix 1820

* rm unnecessary comment

* update docs

---------

Co-authored-by: Hiroshi Horii <hhorii@users.noreply.github.com>

* Fix the grouping index bug in Estimator (#1839)

* Fix the bug

* lint

* Validate parameters of each gate in a circuit (#1834)

This commit adds checks of arguments (A number of qubits, clbits,
and parameters) for each gate to prevent from unexpected memory access
when a user defines wrong custom gate with a number of a standard gate.

* validate parameters of each gate in a circuit
* fix lint error
* fix lint error

* Correct a type of variance from complex to real (#1767)

Previously Aer Estimator wrongly returned a complex value as variance of estimation values.
This commit fixes this behavior to return a real value.

* update version in docs/conf.py

* Do not use circuit metadata to internally manage simulation results (#1772)

* Stop using circuit metadata to internaly manage simulation results

This fixes `AerSimulator` to use circuit metadata to maintain mapping
from input and output of an executor call. This fixes an issue
#1723.

* add index of AER::Circuit and ExperimentResult

* add a link to an input circuit in each experiment result

* fix MPI build break (#1842)

* Batch QuantumCircuit with multiple parameter_binds (#1840)

`Estimator` in Aer did not use parameter bindings appropriately. Backend is called multiple times 
to simulate a circuit with multiple parameter-sets. This commit is to call backend once for multiple
parameter-sets for a circuit.

* WIP
* refactor
* lint
* add reno

* add release note with prelude

* *Support initialize with int (#1841)

Previously `QuantumCircuit.initialize` was not correctly preocessed
if initial state is specified with single `int` value. This commit
fixes this issue by decomposing initialize instructions.

---------

Co-authored-by: Sam James <sam@cmpct.info>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: Matthew Treinish <mtreinish@kortar.org>
Co-authored-by: Luciano Bello <bel@zurich.ibm.com>
Co-authored-by: derwind <uncertainty_principle_ss@yahoo.co.jp>
Co-authored-by: Jake Lishman <jake@binhbar.com>
Co-authored-by: Ian Hincks <ian.hincks@gmail.com>
Co-authored-by: Hitomi Takahashi <hitomi@jp.ibm.com>
Co-authored-by: Jonathan Coates <git@squiddev.cc>
Co-authored-by: Ikko Hamamura <ikkoham@users.noreply.github.com>
Co-authored-by: Jun Doi <doichan@jp.ibm.com>
Co-authored-by: Eric Arellano <14852634+Eric-Arellano@users.noreply.github.com>
Co-authored-by: Deji Oyerinde <deji725@gmail.com>
Co-authored-by: Toshinari Itoko <15028342+itoko@users.noreply.github.com>
Co-authored-by: INNAN Nouhaila <64653897+Innanov@users.noreply.github.com>
Co-authored-by: Davide Gessa <gessadavide@gmail.com>
Co-authored-by: Oleksii Borodenko <kosunix@gmail.com>
  • Loading branch information
18 people authored Jun 13, 2023
1 parent 2377d2e commit 462bade
Show file tree
Hide file tree
Showing 395 changed files with 37,887 additions and 30,940 deletions.
3 changes: 3 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
BasedOnStyle: LLVM
AlwaysBreakTemplateDeclarations: Yes
RemoveBracesLLVM: No
1 change: 1 addition & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
8c9cfb3a2cde607dd0fe3236cc5ea53e6d06b2fe
1 change: 1 addition & 0 deletions .github/workflows/docs-publish.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
name: Docs Publish
on:
workflow_dispatch:
push:
tags:
- "*"
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
pip install -U pip virtualenv wheel
pip install -U tox
sudo apt-get update
sudo apt-get install -y build-essential libopenblas-dev
sudo apt-get install -y build-essential libopenblas-dev pandoc
shell: bash
- name: Run Docs Build
run: tox -edocs
Expand All @@ -50,7 +50,7 @@ jobs:
needs: [docs]
strategy:
matrix:
python-version: [3.7]
python-version: [3.8]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,15 @@ jobs:
pip install -U pip wheel
pip install -U -c constraints.txt -r requirements-dev.txt qiskit-terra numpy scipy
shell: bash
- name: Run clang-format
run: |
set -e
sh tools/clang-format.sh --Werror -n
shell: bash
- name: Run Lint
run: |
set -e
pycodestyle --ignore=E402,W503,W504 --max-line-length=100 qiskit_aer
black --check qiskit_aer test tools setup.py
pylint -j 2 -rn qiskit_aer
sdist:
runs-on: ${{ matrix.platform.os }}
Expand Down
45 changes: 22 additions & 23 deletions .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ persistent=yes
# List of plugins (as comma separated values of python modules names) to load,
# usually to register additional checkers.
load-plugins=pylint.extensions.docparams, # enable checking of docstring args
pylint.extensions.docstyle # basic docstring stle checks
pylint.extensions.docstyle, # basic docstring style checks

# Use multiple processes to speed up Pylint.
jobs=1
Expand All @@ -33,8 +33,7 @@ unsafe-load-any-extension=no
# A comma-separated list of package or module names from where C extensions may
# be loaded. Extensions are loading into the active Python interpreter and may
# run arbitrary code
extension-pkg-whitelist=

extension-pkg-allow-list=

[MESSAGES CONTROL]

Expand All @@ -43,10 +42,10 @@ extension-pkg-whitelist=
confidence=

# Enable the message, report, category or checker with the given id(s). You can
# either give multiple identifiers separated by comma (,) or put this option
# either give multiple identifier separated by comma (,) or put this option
# multiple time (only on the command line, not in the configuration file where
# it should appear only once). See also the "--disable" option for examples.
#enable=
enable=use-symbolic-message-instead

# Disable the message, report, category or checker with the given id(s). You
# can either give multiple identifiers separated by comma (,) or put this
Expand All @@ -57,7 +56,8 @@ confidence=
# --enable=similarities". If you want to run only the classes checker, but have
# no Warning level messages displayed, use"--disable=all --enable=classes
# --disable=W"
disable=no-self-use, # disabled as it is too verbose
disable=spelling, # way too noisy
no-self-use, # disabled as it is too verbose
fixme, # disabled as TODOs would show up as warnings
protected-access, # disabled as we don't follow the public vs private
# convention strictly
Expand All @@ -70,8 +70,13 @@ disable=no-self-use, # disabled as it is too verbose
unnecessary-pass, # allow for methods with just "pass", for clarity
no-else-return, # relax "elif" after a clause with a return
docstring-first-line-empty, # relax docstring style
unsubscriptable-object, # pylint can't determine this for numpy types
bad-continuation, bad-whitespace # differences of opinion with black
import-outside-toplevel,
bad-continuation, bad-whitespace, # differences of opinion with black
import-error, # overzealous with our optionals/dynamic packages
consider-using-f-string, # pass re-lint old commits
broad-exception-raised, # pass re-lint old commits
unsubscriptable-object # pass re-lint old commits




Expand All @@ -83,12 +88,6 @@ disable=no-self-use, # disabled as it is too verbose
# mypackage.mymodule.MyReporterClass.
output-format=text

# Put messages in a separate file for each module / package specified on the
# command line instead of printing them on stdout. Reports (if any) will be
# written in a file name "pylint_global.[txt|html]". This option is deprecated
# and it will be removed in Pylint 2.0.
files-output=no

# Tells whether to display a full report or only the messages
reports=yes

Expand Down Expand Up @@ -117,8 +116,8 @@ evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / stateme
# pi = the PI constant
# op = operation iterator
# b = basis iterator
good-names=i,j,k,n,m,ex,v,w,x,y,z,Run,_,logger,q,c,r,qr,cr,qc,nd,pi,op,b,ar,br,dt,
__unittest
good-names=a,b,i,j,k,d,n,m,ex,v,w,x,y,z,Run,_,logger,q,c,r,qr,cr,qc,nd,pi,op,b,ar,br,p,cp,dt,
__unittest,iSwapGate,mu

# Bad variable names which should always be refused, separated by a comma
bad-names=foo,bar,toto,tutu,tata
Expand Down Expand Up @@ -171,16 +170,16 @@ attr-rgx=[a-z_][a-z0-9_]{2,30}$
attr-name-hint=[a-z_][a-z0-9_]{2,30}$

# Regular expression matching correct argument names
argument-rgx=[a-z_][a-z0-9_]{2,30}$
argument-rgx=[a-z_][a-z0-9_]{2,30}|ax|dt$

# Naming hint for argument names
argument-name-hint=[a-z_][a-z0-9_]{2,30}$

# Regular expression matching correct variable names
variable-rgx=[a-z_][a-z0-9_]{2,30}$
variable-rgx=[a-z_][a-z0-9_]{1,30}$

# Naming hint for variable names
variable-name-hint=[a-z_][a-z0-9_]{2,30}$
variable-name-hint=[a-z_][a-z0-9_]{1,30}$

# Regular expression matching correct class attribute names
class-attribute-rgx=([A-Za-z_][A-Za-z0-9_]{2,30}|(__.*__))$
Expand Down Expand Up @@ -212,7 +211,7 @@ max-nested-blocks=5
[FORMAT]

# Maximum number of characters on a single line.
max-line-length=100
max-line-length=105

# Regexp for a line that is allowed to be longer than the limit.
ignore-long-lines=^\s*(# )?<?https?://\S+>?$
Expand Down Expand Up @@ -279,7 +278,7 @@ spelling-dict=
spelling-ignore-words=

# A path to a file that contains private dictionary; one word per line.
spelling-private-dict-file=
spelling-private-dict-file=.local-spellings

# Tells whether to store unknown words to indicated private dictionary in
# --spelling-private-dict-file option instead of raising a message.
Expand All @@ -296,7 +295,7 @@ ignore-mixin-members=yes
# (useful for modules/projects where namespaces are manipulated during runtime
# and thus existing member attributes cannot be deduced by static analysis. It
# supports qualified module names, as well as Unix pattern matching.
ignored-modules=matplotlib.cm,numpy.random,qiskit.providers
ignored-modules=numpy

# List of class names for which member attributes should not be checked (useful
# for classes with dynamically set attributes). This supports the use of
Expand Down Expand Up @@ -333,7 +332,7 @@ callbacks=cb_,_cb

# List of qualified module names which can have objects that can redefine
# builtins.
redefining-builtins-modules=six.moves,future.builtins,tools.compiler
redefining-builtins-modules=six.moves,future.builtins


[CLASSES]
Expand Down
12 changes: 6 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ if(AER_THRUST_SUPPORTED)
set(CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS} ${AER_CUDA_ARCH_FLAGS_EXPAND} -DAER_THRUST_CUDA -I${AER_SIMULATOR_CPP_SRC_DIR} -isystem ${AER_SIMULATOR_CPP_SRC_DIR}/third-party/headers -use_fast_math --expt-extended-lambda")

set(AER_COMPILER_DEFINITIONS ${AER_COMPILER_DEFINITIONS} THRUST_DEVICE_SYSTEM=THRUST_DEVICE_SYSTEM_CUDA)
set(THRUST_DEPENDENT_LIBS "")
set(THRUST_DEPENDANT_LIBS "-L${CUDA_TOOLKIT_ROOT_DIR}/lib64")
if(NOT DEFINED CUQUANTUM_ROOT)
if(DEFINED ENV{CUQUANTUM_ROOT})
set(CUQUANTUM_ROOT $ENV{CUQUANTUM_ROOT})
Expand All @@ -283,14 +283,14 @@ if(AER_THRUST_SUPPORTED)
set(AER_COMPILER_DEFINITIONS ${AER_COMPILER_DEFINITIONS} AER_CUSTATEVEC AER_CUTENSORNET)
if(DEFINED CUQUANTUM_ROOT)
set(AER_COMPILER_FLAGS "${AER_COMPILER_FLAGS} -I${CUQUANTUM_ROOT}/include")
set(THRUST_DEPENDANT_LIBS "-L${CUQUANTUM_ROOT}/lib")
set(THRUST_DEPENDANT_LIBS "${THRUST_DEPENDANT_LIBS} -L${CUQUANTUM_ROOT}/lib/${CUDA_VERSION_MAJOR}")
endif()
if(DEFINED CUTENSOR_ROOT)
set(AER_COMPILER_FLAGS "${AER_COMPILER_FLAGS} -I${CUTENSOR_ROOT}/include")
set(THRUST_DEPENDANT_LIBS "${THRUST_DEPENDANT_LIBS} -L${CUTENSOR_ROOT}/lib/11")
set(THRUST_DEPENDANT_LIBS "${THRUST_DEPENDANT_LIBS} -L${CUTENSOR_ROOT}/lib/${CUDA_VERSION_MAJOR}")
endif()
if(CUQUANTUM_STATIC)
set(THRUST_DEPENDANT_LIBS "${THRUST_DEPENDANT_LIBS} -lcustatevec_static -lcutensornet_static -lcutensor -lcublas")
set(THRUST_DEPENDANT_LIBS "${THRUST_DEPENDANT_LIBS} -lcustatevec_static -lcutensornet_static -lcutensor_static -lmetis_static -lcusolver_static -lcusparse_static -lcusolver_lapack_static -lcublas_static -lcublasLt_static -lculibos")
else()
set(THRUST_DEPENDANT_LIBS "${THRUST_DEPENDANT_LIBS} -lcustatevec -lcutensornet -lcutensor")
endif()
Expand All @@ -299,9 +299,9 @@ if(AER_THRUST_SUPPORTED)
set(AER_COMPILER_DEFINITIONS ${AER_COMPILER_DEFINITIONS} AER_CUSTATEVEC)
set(AER_COMPILER_FLAGS "${AER_COMPILER_FLAGS} -I${CUSTATEVEC_ROOT}/include")
if(CUSTATEVEC_STATIC)
set(THRUST_DEPENDANT_LIBS "-L${CUSTATEVEC_ROOT}/lib -L${CUSTATEVEC_ROOT}/lib64 -lcustatevec_static -L${CUDA_TOOLKIT_ROOT_DIR}/lib64 -lcublas")
set(THRUST_DEPENDANT_LIBS "${THRUST_DEPENDANT_LIBS} -L${CUSTATEVEC_ROOT}/lib -L${CUSTATEVEC_ROOT}/lib/${CUDA_VERSION_MAJOR} -lcustatevec_static -lcusolver_static -lcusparse_static -lcusolver_lapack_static -lcublas_static -lcublasLt_static -lculibos")
else()
set(THRUST_DEPENDANT_LIBS "-L${CUSTATEVEC_ROOT}/lib -L${CUSTATEVEC_ROOT}/lib64 -lcustatevec")
set(THRUST_DEPENDANT_LIBS "${THRUST_DEPENDANT_LIBS} -L${CUSTATEVEC_ROOT}/lib -L${CUSTATEVEC_ROOT}/lib/${CUDA_VERSION_MAJOR} -lcustatevec")
endif()
endif()
elseif(AER_THRUST_BACKEND STREQUAL "TBB")
Expand Down
61 changes: 55 additions & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ please ensure that:
1. The code follows the code style of the project and successfully
passes the tests. For convenience, you can execute `tox` locally,
which will run these checks and report any issues.

If your code fails the local style checks, you can use `tox -eblack`
and `tox -eclang` to automatically fix and update the code formatting
in python and C++, respectively.

2. The documentation has been updated accordingly. In particular, if a
function or class has been modified during the PR, please update the
*docstring* accordingly.
Expand All @@ -34,7 +39,7 @@ automation. This works through a combination of the git log and the pull
request. When a release is tagged and pushed to GitHub, the release automation
bot looks at all commit messages from the git log for the release. It takes the
PR numbers from the git log (assuming a squash merge) and checks if that PR had
a `Changelog:` label on it. If there is a label it will add the git commit
a `Changelog:` label on it. If there is a label, it will add the git commit
message summary line from the git log for the release to the changelog.

If there are multiple `Changelog:` tags on a PR, the git commit message summary
Expand Down Expand Up @@ -64,7 +69,7 @@ understand if they need to update their program which uses Qiskit, and how they
would go about doing that. It ideally should explain why they need to make
this change too, to provide the necessary context.

To make sure we don't forget a release note or if the details of user-facing
To make sure we don't forget a release note if the details of user-facing
changes over a release cycle, we require that all user facing changes include
documentation at the same time as the code. To accomplish this, we use the
[reno](https://docs.openstack.org/reno/latest/) tool which enables a git-based
Expand Down Expand Up @@ -181,10 +186,29 @@ https://github.com/Qiskit/qiskit/blob/master/docs/release_notes.rst)

Building The release notes are part of the standard qiskit-aer documentation
builds. To check what the rendered HTML output of the release notes will look
like for the current state of the repo, you can run: `tox -edocs` which will
like for the current state of the repo, you need to install
[pandoc](https://pandoc.org/installing.html), then you can run: `tox -edocs` which will
build all the documentation into `docs/_build/html` and the release notes in
particular will be located at `docs/_build/html/release_notes.html`

## Style and lint

Qiskit Aer uses 3 tools for verifying code formatting and lint checking. The
first tool is [black](https://github.com/psf/black) which is a Python code formatting
tool that will automatically update the code formatting to a consistent style.
The second tool is [pylint](https://www.pylint.org/) which is a code linter
which does a deeper analysis of the Python code to find both style issues and
potential bugs and other common issues in Python. The third tool is
[clang-format](https://clang.llvm.org/docs/ClangFormat.html) which is a
C++ code formatting tool that will automatically update codes with a consistent style.

You can check that your local modifications conform to the style rules
by running `tox -elint` which will run `black`, `pylint` and `clang-format`
to check the local code formatting and lint. If black returns a code
formatting error you can run `tox -eblack` to automatically update the
code formatting to conform to the style. However, if `pylint` returns
any error you will have to fix these issues by manually updating your code.

### Development Cycle

The development cycle for qiskit-aer is all handled in the open using
Expand Down Expand Up @@ -216,7 +240,7 @@ When it is time to release a new minor version of qiskit-aer, we will:
1. Create a new tag with the version number and push it to github
2. Change the `main` version to the next release version.

The release automation processes will be triggered by the new tag and perform
The release automation processes will be triggered by the new tag and will perform
the following steps:

1. Create a stable branch for the new minor version from the release tag
Expand Down Expand Up @@ -439,7 +463,7 @@ As any other Python package, we can install from source code by just running:
qiskit-aer$ pip install .

This will build and install `Aer` with the default options which is probably suitable for most of the users.
There's another Pythonic approach to build and install software: build the wheels distributable file.
There's another Pythonic approach to building and installing software: build the wheels distributable file.


qiskit-aer$ python ./setup.py bdist_wheel
Expand Down Expand Up @@ -542,7 +566,7 @@ As any other Python package, we can install from source code by just running:
(QiskitDevEnv) qiskit-aer > pip install .

This will build and install `Aer` with the default options which is probably suitable for most of the users.
There's another Pythonic approach to build and install software: build the wheels distributable file.
There's another Pythonic approach to building and installing software: build the wheels distributable file.


(QiskitDevEnv) qiskit-aer > python ./setup.py bdist_wheel
Expand Down Expand Up @@ -1079,3 +1103,28 @@ Now we can run the Python interpreter and pass the arguments (the python file to
Target 0: (python) stopped.

After this, you can step through the code and continue with your debug session as always.


## Dealing with the git blame ignore list

In the qiskit-aer repository we maintain a list of commits for git blame to
ignore. This is mostly commits that are code style changes that don't change
the functionality but just change the code formatting (for example, when we
migrated to use black for code formatting). This file, `.git-blame-ignore-revs`
just contains a list of commit SHA1s you can tell git to ignore when using the
`git blame` command. This can be done one time with something like

```
git blame --ignore-revs-file .git-blame-ignore-revs qiskit/version.py
```

from the root of the repository. If you'd like to enable this by default you
can update your local repository's configuration with:

```
git config blame.ignoreRevsFile .git-blame-ignore-revs
```

which will update your local repositories configuration to use the ignore list
by default.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

**Qiskit** is an open-source framework for working with noisy quantum computers at the level of pulses, circuits, and algorithms.

Qiskit is made up of elements that each work together to enable quantum computing. This element is **Aer**, which provides high-performance quantum computing simulators with realistic noise models.
Qiskit is made up of elements that work together to enable quantum computing. This element is **Aer**, which provides high-performance quantum computing simulators with realistic noise models.

## Installation

Expand All @@ -14,7 +14,7 @@ We encourage installing Qiskit via the pip tool (a python package manager). The
pip install qiskit qiskit-aer
```

Pip will handle all dependencies automatically for us and you will always install the latest (and well-tested) version.
Pip will handle all dependencies automatically for us, and you will always install the latest (and well-tested) version.

To install from source, follow the instructions in the [contribution guidelines](CONTRIBUTING.md).

Expand All @@ -34,7 +34,7 @@ the same functionality found in the canonical `qiskit-aer` package, plus the
ability to run the GPU supported simulators: statevector, density matrix, and unitary.

**Note**: This package is only available on x86_64 Linux. For other platforms
that have CUDA support you will have to build from source. You can refer to
that have CUDA support, you will have to build from source. You can refer to
the [contributing guide](CONTRIBUTING.md#building-with-gpu-support)
for instructions on doing this.

Expand Down Expand Up @@ -84,9 +84,9 @@ print('Counts(noise):', counts_noise)
## Contribution Guidelines

If you'd like to contribute to Qiskit, please take a look at our
[contribution guidelines](CONTRIBUTING.md). This project adheres to Qiskit's [code of conduct](CODE_OF_CONDUCT.md). By participating, you are expect to uphold to this code.
[contribution guidelines](CONTRIBUTING.md). This project adheres to Qiskit's [code of conduct](CODE_OF_CONDUCT.md). By participating, you are expected to uphold this code.

We use [GitHub issues](https://github.com/Qiskit/qiskit-aer/issues) for tracking requests and bugs. Please use our [slack](https://qiskit.slack.com) for discussion and simple questions. To join our Slack community use the [link](https://qiskit.slack.com/join/shared_invite/zt-fybmq791-hYRopcSH6YetxycNPXgv~A#/). For questions that are more suited for a forum we use the Qiskit tag in the [Stack Exchange](https://quantumcomputing.stackexchange.com/questions/tagged/qiskit).
We use [GitHub issues](https://github.com/Qiskit/qiskit-aer/issues) for tracking requests and bugs. Please use our [slack](https://qiskit.slack.com) for discussion and simple questions. To join our Slack community use the [link](https://qiskit.slack.com/join/shared_invite/zt-fybmq791-hYRopcSH6YetxycNPXgv~A#/). For questions that are more suited for a forum, we use the Qiskit tag in the [Stack Exchange](https://quantumcomputing.stackexchange.com/questions/tagged/qiskit).

## Next Steps

Expand Down
2 changes: 1 addition & 1 deletion cmake/FindPybind11.cmake
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
find_package(PythonLibs REQUIRED)
find_package(PythonLibs)

message(STATUS ${PYTHON_INCLUDE_DIRS})
message(STATUS "PYTHON EXECUTABLE: ${PYTHON_EXECUTABLE}")
Expand Down
Loading

0 comments on commit 462bade

Please sign in to comment.