Skip to content

Commit

Permalink
Merge pull request #6 from GroenteLepel/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
GroenteLepel authored Dec 1, 2020
2 parents 7fbecab + b034552 commit 22aa61b
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 16 deletions.
13 changes: 5 additions & 8 deletions .github/workflows/test-project.yml
Original file line number Diff line number Diff line change
@@ -1,33 +1,30 @@
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: Test project

on:
push:
branches: [ master ]
branches: [ master, fix-pytest-action ]
pull_request:
branches: [ master ]

jobs:
build:

runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8]

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
python-version: 3.8
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 pytest
pip install -e .
pip install -e ./
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Lint with flake8
run: |
Expand Down
6 changes: 6 additions & 0 deletions pytest.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# pytest.ini
[pytest]
testpaths =
tests
python_files = test_*.py
addopts = -rf --import-mode=importlib
4 changes: 0 additions & 4 deletions qiskit_quantum_knn/qknn/qkneighborsclassifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -384,10 +384,6 @@ def setup_control_counts(control_counts: Dict[str, int]) -> Dict[str, int]:
ValueError: if the provided dictionary does not coincide with the
:py:class:`Result` from the QkNN.
"""
if len(control_counts) != 2:
raise ValueError("Provided dict not correct length. Should be 2,"
"but is {0:d}".format(len(control_counts)))

# constant describing the states possible in control_counts
control_states = np.array(['0', '1'])
# check if substition of 0 count value must be done
Expand Down
2 changes: 1 addition & 1 deletion qiskit_quantum_knn/qknn/qknn_construction.py
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ def initialise_qknn(log2_dim: int,

def state_transformation(qknn_circ: qk.QuantumCircuit,
oracle: qinst.Instruction) -> qk.QuantumCircuit:
"""applies :math:`H`-gates and the Oracle :math:`\mathcal{W}` to the
r"""applies :math:`H`-gates and the Oracle :math:`\mathcal{W}` to the
circuit, and applies the :math:`SWAP`-test.
Coincides with Step 2: the "state transformation" section from
Expand Down
3 changes: 2 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ notebook==6.1.4
ntlm-auth==1.5.0
numpy==1.19.2
packaging==20.4
pandas==1.1.2
pandas==1.1.4
pandocfilters==1.4.3
parso==0.7.1
pexpect==4.8.0
Expand Down Expand Up @@ -81,6 +81,7 @@ qiskit-aer==0.6.1
qiskit-aqua==0.7.5
qiskit-ibmq-provider==0.9.0
qiskit-ignis==0.4.0
-e git+https://github.com/GroenteLepel/qiskit-quantum-knn.git@8994adeb953ade67e777dc54556b552dbdfb9ad0#egg=qiskit_quantum_knn
qiskit-terra==0.15.2
Quandl==3.5.2
readme-renderer==26.0
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@

setuptools.setup(
name="qiskit_quantum_knn",
version="1.0.0a1",
author="Daniël J. Kok",
version="1.0.1",
author="Daniel J. Kok",
author_email="[email protected]",
long_description=long_description,
long_description_content_type="text/markdown",
Expand Down
File renamed without changes.

0 comments on commit 22aa61b

Please sign in to comment.