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

Commit

Permalink
Merge pull request #555 from mtreinish/prepare-0.5.2
Browse files Browse the repository at this point in the history
Prepare 0.5.2 release
  • Loading branch information
chriseclectic authored Feb 8, 2021
2 parents 9599847 + 15b9dfd commit 76c4cd9
Show file tree
Hide file tree
Showing 13 changed files with 75 additions and 45 deletions.
43 changes: 35 additions & 8 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: [3.6, 3.7, 3.8]
os: ["macOS-latest", "ubuntu-latest"]
python-version: [3.6, 3.7, 3.8, 3.9]
os: ["ubuntu-latest"]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
Expand All @@ -31,12 +31,36 @@ jobs:
run: python -m pip install -U tox setuptools virtualenv wheel
- name: Install and Run Tests
run: tox -e py
if: runner.os != 'macOS'

tests-macos:
name: tests-python${{ matrix.python-version }}-${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: [3.6, 3.7, 3.8, 3.9]
os: ["macOS-latest"]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Pip cache
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-${{ matrix.python-version }}-pip-tests-${{ hashFiles('setup.py','requirements-dev.txt','constraints.txt') }}
restore-keys: |
${{ runner.os }}-${{ matrix.python-version }}-pip-tests-
${{ runner.os }}-${{ matrix.python-version }}-pip-
${{ runner.os }}-${{ matrix.python-version }}
- name: Install Deps
run: python -m pip install -U tox setuptools virtualenv wheel cvxopt
- name: Install and Run Tests
run: tox --sitepackages -e py
env:
QISKIT_IN_PARALLEL: TRUE
run: tox -e py
if: runner.os == 'macOS'

tests-no-opt:
name: tests-python3.8-no-optional-dependencies
runs-on: ${{ matrix.os }}
Expand Down Expand Up @@ -68,9 +92,11 @@ jobs:
runs-on: windows-latest
strategy:
matrix:
python-version: [3.6, 3.7, 3.8]
python-version: [3.6, 3.7, 3.8, 3.9]
steps:
- uses: actions/checkout@v2
- name: Add msbuild to PATH
uses: microsoft/[email protected]
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
Expand All @@ -90,6 +116,7 @@ jobs:
- name: Install and Run Tests
run: tox --sitepackages -epy
shell: bash -l {0}

lint:
name: lint
runs-on: ubuntu-latest
Expand Down Expand Up @@ -164,7 +191,7 @@ jobs:
git clone https://github.com/Qiskit/qiskit-tutorials --depth=1
python -m pip install --upgrade pip
pip install -U -r requirements-dev.txt -c constraints.txt
pip install -c constraints.txt git+https://github.com/Qiskit/qiskit-terra
pip install -c constraints.txt git+https://github.com/Qiskit/qiskit-terra@stable/0.16
pip install -c constraints.txt -e .
pip install -U "qiskit-ibmq-provider" "qiskit-aer" "z3-solver" "qiskit-ignis" "qiskit-aqua" "pyscf<1.7.4" "matplotlib<3.3.0" pylatexenc sphinx nbsphinx sphinx_rtd_theme cvxpy -c constraints.txt
python setup.py build_ext --inplace
Expand All @@ -175,7 +202,7 @@ jobs:
run: |
set -e
cd qiskit-tutorials
rm -rf tutorials/chemistry tutorials/circuits tutorials/circuits_advanced tutorials/finance tutorials/optimization tutorials/simulators
rm -rf tutorials/chemistry tutorials/circuits tutorials/circuits_advanced tutorials/finance tutorials/optimization tutorials/simulators tutorials/machine_learning tutorials/algorithms
sphinx-build -b html . _build/html
- uses: actions/upload-artifact@v2
with:
Expand Down
1 change: 1 addition & 0 deletions constraints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ astroid==2.3.3
pywin32==225
setuptools==49.6.0
pyfakefs==4.1.0
cvxpy==1.1.7
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
# The short X.Y version
version = ''
# The full version, including alpha/beta/rc tags
release = '0.5.1'
release = '0.5.2'

# -- General configuration ---------------------------------------------------

Expand Down
2 changes: 1 addition & 1 deletion qiskit/ignis/VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.5.1
0.5.2
8 changes: 4 additions & 4 deletions qiskit/ignis/mitigation/expval/ctmp_mitigator.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,8 @@ def expectation_value(self,
gamma = self.noise_strength(qubits)
bmat = self._sampling_matrix(qubits)
values = bmat.data
indices = np.asarray(bmat.indices, dtype=np.int)
indptrs = np.asarray(bmat.indptr, dtype=np.int)
indices = np.asarray(bmat.indices, dtype=int)
indptrs = np.asarray(bmat.indptr, dtype=int)

# Set a minimum number of CTMP samples
shots = sum(counts.values())
Expand Down Expand Up @@ -184,7 +184,7 @@ def generator_matrix(self, qubits: List[int] = None) -> sps.coo_matrix:
if qubits not in self._generator_mats:
# Construct G from subset generators
qubits_set = set(qubits)
g_mat = sps.coo_matrix(2 * (2**len(qubits),), dtype=np.float)
g_mat = sps.coo_matrix(2 * (2**len(qubits),), dtype=float)
for gen, rate in zip(self._generators, self._rates):
if qubits_set.issuperset(gen[2]):
# Keep generator
Expand Down Expand Up @@ -301,7 +301,7 @@ def _ctmp_inverse(

# Apply CTMP sampling
r_vals = rng.random(size=alphas.sum())
y_vals = np.zeros(x_vals.size, dtype=np.int)
y_vals = np.zeros(x_vals.size, dtype=int)
_markov_chain_compiled(y_vals, x_vals, r_vals, alphas, csc_data, csc_indices,
csc_indptrs)

Expand Down
2 changes: 1 addition & 1 deletion qiskit/ignis/mitigation/measurement/filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ def apply(self,
if data_label not in self._state_labels:
raise QiskitError("Unexpected state label '" + data_label +
"', verify the fitter's state labels "
"correpsond to the input data")
"correspond to the input data")
data_format = 0
# convert to form2
raw_data2 = [np.zeros(len(self._state_labels), dtype=float)]
Expand Down
2 changes: 1 addition & 1 deletion qiskit/ignis/verification/topological_codes/fitters.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
from qiskit import QuantumCircuit, execute

try:
from qiskit import Aer
from qiskit.providers.aer import Aer
HAS_AER = True
except ImportError:
from qiskit import BasicAer
Expand Down
19 changes: 19 additions & 0 deletions releasenotes/notes/0.5.2-release-notes-d1553293c80e2ec2.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
prelude: >
This release is a bugfix release that primarily fixes compatibility with
numpy 1.20.0. It is also the first release to include support for Python
3.9. Earlier releases (including 0.5.0 and 0.5.1) worked with Python 3.9
but did not indicate this in the package metadata, and there was no upstream
testing for those releases. This release fixes that and was tested on
Python 3.9 (in addition to 3.6, 3.7, and 3.8).
fixes:
- |
`networkx <https://networkx.org/>`__ is explicitly listed as a dependency
now. It previously was an implicit dependency as it was required for the
:mod:`qiskit.ignis.verification.topological_codes` module but was not
correctly listed as a depdendency as qiskit-terra also requires networkx
and is also a depdency of ignis so it would always be installed in practice.
However, it is necessary to list it as a requirement for future releases
of qiskit-terra that will not require networkx. It's also important to
correctly list the dependencies of ignis in case there were a future
incompatibility between version requirements.
4 changes: 2 additions & 2 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ sphinx-tabs>=1.1.11
sphinx-autodoc-typehints
stestr>=2.5.0
ddt>=1.2.0,!=1.4.0
jupyter
jupyter-sphinx
jupyter;python_version<'3.9'
jupyter-sphinx;python_version<'3.9'
reno
matplotlib
pyfakefs
2 changes: 2 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
requirements = [
"numpy>=1.13",
"qiskit-terra>=0.13.0",
"networkx>=2.2",
"scipy>=0.19,!=0.19.1",
"setuptools>=40.1.0",
"scikit-learn>=0.17",
Expand Down Expand Up @@ -72,6 +73,7 @@
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Topic :: Scientific/Engineering",
],
keywords="qiskit sdk quantum",
Expand Down
2 changes: 1 addition & 1 deletion test/verification/test_entanglement.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

import numpy as np

from qiskit.execute import execute
from qiskit import execute
from qiskit.providers.basicaer import BasicAer
from qiskit.ignis.verification.entanglement import linear

Expand Down
19 changes: 0 additions & 19 deletions tools/build_aer.py

This file was deleted.

14 changes: 7 additions & 7 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tox]
minversion = 2.1
envlist = py36, py37, py38, lint
envlist = py36, py37, py38, py39, lint
skipsdist = True

[testenv]
Expand All @@ -10,20 +10,20 @@ setenv =
VIRTUAL_ENV={envdir}
LANGUAGE=en_US
LC_ALL=en_US.utf-8
deps = numpy>=1.13
deps = numpy>=1.16.3
Cython>=0.27.1
setuptools>=40.1.0
cvxpy>=1.0.15
passenv = QISKIT_IN_PARALLEL
commands =
pip install -U -c constraints.txt git+https://github.com/Qiskit/qiskit-terra.git
pip install -U -c constraints.txt git+https://github.com/Qiskit/qiskit-terra.git@stable/0.16
pip install -U -c constraints.txt -r{toxinidir}/requirements-dev.txt
pip install -c constraints.txt cvxpy<1.1.8
pip check
stestr run {posargs}

[testenv:no-opt]
deps =
git+https://github.com/Qiskit/qiskit-terra.git
git+https://github.com/Qiskit/qiskit-terra.git@stable/0.16
qiskit-aer
ddt>=1.2.0,!=1.4.0
stestr>=2.5.0
Expand All @@ -35,7 +35,7 @@ commands =
[testenv:lint]
basepython = python3
deps =
git+https://github.com/Qiskit/qiskit-terra.git
git+https://github.com/Qiskit/qiskit-terra.git@stable/0.16
qiskit-aer
scikit-learn>=0.17
ddt
Expand All @@ -50,7 +50,7 @@ commands =
[testenv:docs]
basepython = python3
deps =
git+https://github.com/Qiskit/qiskit-terra.git
git+https://github.com/Qiskit/qiskit-terra.git@stable/0.16
-r{toxinidir}/requirements-dev.txt
qiskit-ibmq-provider
commands =
Expand Down

0 comments on commit 76c4cd9

Please sign in to comment.