Skip to content

Commit

Permalink
Merge pull request #278 from atilag/stable-0.2.2
Browse files Browse the repository at this point in the history
Stable 0.2.2
  • Loading branch information
atilag authored Jul 10, 2019
2 parents e975026 + f9bceca commit c67018d
Show file tree
Hide file tree
Showing 55 changed files with 1,850 additions and 1,097 deletions.
44 changes: 20 additions & 24 deletions .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ 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
load-plugins=pylint.extensions.docparams, # enable checking of docstring args
pylint.extensions.docstyle # basic docstring stle checks

# Use multiple processes to speed up Pylint.
jobs=1
Expand All @@ -32,16 +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=numpy

# Allow optimization of some AST trees. This will activate a peephole AST
# optimizer, which will apply various small optimizations. For instance, it can
# be used to obtain the result of joining multiple strings with the addition
# operator. Joining a lot of strings can lead to a maximum recursion error in
# Pylint and this flag can prevent that. It has one side effect, the resulting
# AST will be different than the one from reality. This option is deprecated
# and it will be removed in Pylint 2.0.
optimize-ast=no
extension-pkg-whitelist=


[MESSAGES CONTROL]
Expand All @@ -65,16 +57,20 @@ 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=print-statement,parameter-unpacking,unpacking-in-except,old-raise-syntax,backtick,import-star-module-level,apply-builtin,basestring-builtin,buffer-builtin,cmp-builtin,coerce-builtin,execfile-builtin,file-builtin,long-builtin,raw_input-builtin,reduce-builtin,standarderror-builtin,unicode-builtin,xrange-builtin,coerce-method,delslice-method,getslice-method,setslice-method,no-absolute-import,old-division,dict-iter-method,dict-view-method,next-method-called,metaclass-assignment,indexing-exception,raising-string,reload-builtin,oct-method,hex-method,nonzero-method,cmp-method,input-builtin,round-builtin,intern-builtin,unichr-builtin,map-builtin-not-iterating,zip-builtin-not-iterating,range-builtin-not-iterating,filter-builtin-not-iterating,using-cmp-argument,long-suffix,old-ne-operator,old-octal-literal,suppressed-message,useless-suppression,
no-self-use, # disabled as it is too verbose
disable=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
duplicate-code, # disabled as it is too verbose
redundant-returns-doc, # for @abstractmethod, it cannot interpret "pass"
# disable the "too-many/few-..." refactoring hints
too-many-lines, too-many-branches, too-many-locals, too-many-nested-blocks,
too-many-statements, too-many-instance-attributes, too-many-arguments,
too-many-public-methods, too-few-public-methods, too-many-ancestors
too-many-public-methods, too-few-public-methods, too-many-ancestors,
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




Expand Down Expand Up @@ -115,9 +111,12 @@ evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / stateme
# v,w = typical vectors
# x,y,z = typical axes
# _ = placeholder name
# qr,cr,qc = quantum and classical registers, and quantum circuit
# q,r,qr,cr,qc = quantum and classical registers, and quantum circuit
# pi = the PI constant
good-names=i,j,k,n,m,ex,v,w,x,y,z,Run,_,logger,qr,cr,qc,pi
# 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,
__unittest

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

# Regular expression matching correct method names
method-rgx=(([a-z_][a-z0-9_]{2,49})|(assert[A-Z][a-zA-Z0-9]{2,43}))$
method-rgx=(([a-z_][a-z0-9_]{2,49})|(assert[A-Z][a-zA-Z0-9]{2,43})|(test_[_a-zA-Z0-9]{2,}))$

# Naming hint for method names
method-name-hint=[a-z_][a-z0-9_]{2,30}$ or camelCase `assert*` in tests.
Expand Down Expand Up @@ -295,20 +294,17 @@ 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
ignored-modules=matplotlib.cm,numpy.random

# List of class names for which member attributes should not be checked (useful
# for classes with dynamically set attributes). This supports the use of
# qualified names.
ignored-classes=optparse.Values,thread._local,_thread._local
ignored-classes=optparse.Values,thread._local,_thread._local,QuantumCircuit

# List of members which are set dynamically and missed by pylint inference
# system, and so shouldn't trigger E1101 when accessed. Python regular
# expressions are accepted.
generated-members=self.circuit.*,qcs.h,qc1.h,qc2.cx,qc.h,self.u1,self.cx,self.ccx,trial_circuit
# self.circuit.*: false positives when self.circuit == QuantumCircuit, as it
# provides a "__getitem__" dynamic method and gate definition is dynamic.
# For qiskit.extensions.standard, self.foo is also needed.
generated-members=

# List of decorators that produce context managers, such as
# contextlib.contextmanager. Add to this list to register other decorators that
Expand All @@ -335,7 +331,7 @@ callbacks=cb_,_cb

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


[CLASSES]
Expand Down
12 changes: 8 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ stage_osx: &stage_osx

# Define the order of the stages.
stages:
# - lint
- lint
- test

# Define the job matrix explicitly, as matrix expansion causes issues when
Expand All @@ -94,9 +94,13 @@ jobs:
# "lint" stage
###########################################################################
# C++ and Python linters
# TODO!
# - stage: lint

# TODO: C++ clang-tidy!
- stage: lint
name: Python Style and Linter
<<: *stage_linux
script:
- pycodestyle --ignore=E402,W504 --max-line-length=100 qiskit/providers/aer
- pylint -j 2 -rn qiskit/providers/aer

# "test" stage
###########################################################################
Expand Down
164 changes: 164 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,164 @@
Changelog
=========

All notable changes to this project will be documented in this file.

The format is based on [Keep a
Changelog](http://keepachangelog.com/en/1.0.0/).

> **Types of changes:**
>
> - **Added**: for new features.
> - **Changed**: for changes in existing functionality.
> - **Deprecated**: for soon-to-be removed features.
> - **Removed**: for now removed features.
> - **Fixed**: for any bug fixes.
> - **Security**: in case of vulnerabilities.
[UNRELEASED](https://github.com/Qiskit/qiskit-aer/compare/0.2.1...HEAD)
=======================================================================

Added
-----
- Added multi-controlled phase gate to `QubitVector` and changed
multi-controlled Z and multi-controlled u1 gates to use this method (\# 258)
- Added optimized anti-diagonal single-qubit gates to QubitVector (\# 258)

Changed
-------
- Improve performance of matrix fusion circuit optimization and move fusion
code out of `QubitVector` class and into Fusion optimization class (\#255)

Removed
-------
- Remove `matrix_sequence` Op type from `Op` class (\#255)

Fixed
-----
- Change maximum parameter for depolarizing_error to allow for error channel
with no identity component. (\#243)
- Fixed 2-qubit depolarizing-only error parameter calculation in
basic_device_noise_model (\#243)
- Set maximum workers to ThreadPoolExecutor in AerJob to limit thread creation (\#259)

[0.2.1](https://github.com/Qiskit/qiskit-aer/compare/0.2.0...0.2.1) - 2019-05-20
================================================================================

Added
-----
- Added 2-qubit Pauli and reset approximation to noise transformation (\#236)
- Added `to_instruction` method to `ReadoutError` (\#257).

Changed
-------

- When loading qobj check if all instructions are conditional and raise an
exception if an unsupported instruction is conditional (\#271)
- Deprecate the use of \".as\_dict()\" in favor of \".to\_dict()\"
(\#228)
- Set simulator seed from \"seed\_simulator\" in qobj (\#210)

Removed
-------

Fixed
-----

- Fix memory error handling for huge circuits (\#216)
- Fix equality expressions in Python code (\#208)

[0.2.0](https://github.com/Qiskit/qiskit-aer/compare/0.1.1...0.2.0) - 2019-05-02
================================================================================

Added
-----

- Add multiplexer gate (\#192)
- Add [remap\_noise\_model]{.title-ref} function to noise.utils
(\#181)
- Add [\_\_eq\_\_]{.title-ref} method to NoiseModel, QuantumError,
ReadoutError (\#181)
- Add support for labelled gates in noise models (\#175).
- Add optimized mcx, mcy, mcz, mcu1, mcu2, mcu3, gates to QubitVector
(\#124)
- Add optimized controlled-swap gate to QubitVector (\#142)
- Add gate-fusion optimization for QasmContoroller, which is enabled
by setting fusion\_enable=true (\#136)
- Add better management of failed simulations (\#167)
- Add qubits truncate optimization for unused qubits (\#164)
- Add ability to disable depolarizing error on device noise model
(\#131)
- Add initialise simulator instruction to statevector\_state (\#117,
\#137)
- Add coupling maps to simulators (\#93)
- Add circuit optimization framework (\#83)
- Add benchmarking (\#71, \#177)
- Add wheels support for Debian-like distributions (\#69)
- Add autoconfiguration of threads for qasm simulator (\#61)
- Add Simulation method based on Stabilizer Rank Decompositions (\#51)

Changed
-------

- Add basis\_gates kwarg to NoiseModel init (\#175).
- Depreciated \"initial\_statevector\" backend option for
QasmSimulator and StatevectorSimulator (\#185)
- Rename \"chop\_threshold\" backend option to \"zero\_threshold\" and
change default value to 1e-10 (\#185).
- Add an optional parameter to [NoiseModel.as\_dict()]{.title-ref} for
returning dictionaries that can be serialized using the standard
[json]{.title-ref} library directly. (\#165)
- Refactor thread management (\#50)

Removed
-------

Fixed
-----

- Improve noise transformations (\#162)
- Improve error reporting (\#160)
- Improve efficiency of parallelization with max\_memory\_mb a new
parameter of backend\_opts (\#61)
- Improve u1 performance in statevector (\#123)
- Fix OpenMP clashing problems on MacOS for the Terra Addon (\#46)

[0.1.1](https://github.com/Qiskit/qiskit-aer/compare/0.1.0...0.1.1) - 2019-01-24
================================================================================

Added
-----

- Adds version information when using the standalone simulator (\#36)
- Adds a Clifford stabilizer simulation method to the QasmSimulator
(\#13)
- Improve Circuit and NoiseModel instructions checking (\#31)
- Add reset\_error function to Noise models (\#34)
- Improve error reporting at installation time (\#29)
- Validate n\_qubits before execution (\#24)
- Add qobj method to AerJob (\#19)

Removed
-------

- Reference model tests removed from the codebase (\#27)

Fixed
-----

- Fix Contributing guide (\#33)
- Fix an import in Terra integration tests (\#33)
- Fix non-OpenMP builds (\#19)

[0.1.0](https://github.com/Qiskit/qiskit-aer/compare/0.0.0...0.1.0) - 2018-12-19
================================================================================

Added
-----

- QASM Simulator
- Statevector Simulator
- Unitary Simulator
- Noise models
- Terra integration
- Standalone Simulators support
Loading

0 comments on commit c67018d

Please sign in to comment.