From 3ba2e04ca3016f1e8df92f70212df9032ce2e3a6 Mon Sep 17 00:00:00 2001 From: albi3ro Date: Fri, 25 Nov 2022 12:11:43 -0500 Subject: [PATCH 1/6] update ci to newer python versions --- CHANGELOG.md | 5 ++ tmp/tester.ipynb | 145 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 150 insertions(+) create mode 100644 tmp/tester.ipynb diff --git a/CHANGELOG.md b/CHANGELOG.md index f54b1c4a1..b409a49a0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,8 +4,12 @@ ### Breaking changes +* Removes testing for Python 3.7. + ### Improvements +* Adds testing for Python 3.11. + ### Documentation ### Bug fixes @@ -17,6 +21,7 @@ This release contains contributions from (in alphabetical order): +Christina Lee Matthew Silverman --- diff --git a/tmp/tester.ipynb b/tmp/tester.ipynb new file mode 100644 index 000000000..de69cc62c --- /dev/null +++ b/tmp/tester.ipynb @@ -0,0 +1,145 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 1, + "metadata": {}, + "outputs": [], + "source": [ + "import qiskit" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": {}, + "outputs": [], + "source": [ + "qc = qiskit.QuantumCircuit(3,1)" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": {}, + "outputs": [ + { + "ename": "AttributeError", + "evalue": "'InstructionSet' object has no attribute 'power'", + "output_type": "error", + "traceback": [ + "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", + "\u001b[0;31mAttributeError\u001b[0m Traceback (most recent call last)", + "\u001b[1;32m/Users/christina/Prog/plugins/pennylane-qiskit/tmp/tester.ipynb Cell 3'\u001b[0m in \u001b[0;36m\u001b[0;34m()\u001b[0m\n\u001b[0;32m----> 1\u001b[0m qc\u001b[39m.\u001b[39;49mx(\u001b[39m0\u001b[39;49m)\u001b[39m.\u001b[39;49mpower(\u001b[39m2\u001b[39m)\n", + "\u001b[0;31mAttributeError\u001b[0m: 'InstructionSet' object has no attribute 'power'" + ] + } + ], + "source": [ + "qc.x(0).power(2)" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "" + ] + }, + "execution_count": 4, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "qc" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": {}, + "outputs": [], + "source": [ + "from qiskit import extensions as ex" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "Instruction(name='unitary', num_qubits=1, num_clbits=0, params=[array([[0.28711035+0.45241353j, 0.71288965-0.45241353j],\n", + " [0.71288965-0.45241353j, 0.28711035+0.45241353j]])])" + ] + }, + "execution_count": 12, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "ex.XGate(0).power(exponent=0.64)" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "Instruction(name='x', num_qubits=1, num_clbits=0, params=[])" + ] + }, + "execution_count": 13, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "ex.XGate(0)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + } + ], + "metadata": { + "interpreter": { + "hash": "0e46f6e99659d20aee8ccda0244f02b43166fe8605fdb15c85f8f22ebd8231f9" + }, + "kernelspec": { + "display_name": "Python 3.8.9 ('qiskit-env')", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.9.6" + }, + "orig_nbformat": 4 + }, + "nbformat": 4, + "nbformat_minor": 2 +} From b12c6befbba1e6521559a15b141d851111fbcc31 Mon Sep 17 00:00:00 2001 From: albi3ro Date: Fri, 25 Nov 2022 12:13:19 -0500 Subject: [PATCH 2/6] remove tester file, actually stage the github folder --- .github/dependabot.yml | 2 +- .github/workflows/tests.yml | 2 +- .github/workflows/upload.yml | 2 +- tmp/tester.ipynb | 145 ----------------------------------- 4 files changed, 3 insertions(+), 148 deletions(-) delete mode 100644 tmp/tester.ipynb diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 4d3e5e554..e76f80376 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -12,4 +12,4 @@ updates: allow: - dependency-type: "all" assignees: - - "josh146" + - "albi3ro" diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index f065af614..8c9ddaeaf 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -11,7 +11,7 @@ jobs: strategy: matrix: - python-version: [3.7, 3.8, 3.9, '3.10'] + python-version: [3.8, 3.9, '3.10', '3.11'] steps: - name: Cancel Previous Runs diff --git a/.github/workflows/upload.yml b/.github/workflows/upload.yml index 2a2494955..6a5b80799 100644 --- a/.github/workflows/upload.yml +++ b/.github/workflows/upload.yml @@ -12,7 +12,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v2 with: - python-version: 3.7 + python-version: 3.10 - name: Build and install Plugin run: | diff --git a/tmp/tester.ipynb b/tmp/tester.ipynb deleted file mode 100644 index de69cc62c..000000000 --- a/tmp/tester.ipynb +++ /dev/null @@ -1,145 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": 1, - "metadata": {}, - "outputs": [], - "source": [ - "import qiskit" - ] - }, - { - "cell_type": "code", - "execution_count": 2, - "metadata": {}, - "outputs": [], - "source": [ - "qc = qiskit.QuantumCircuit(3,1)" - ] - }, - { - "cell_type": "code", - "execution_count": 6, - "metadata": {}, - "outputs": [ - { - "ename": "AttributeError", - "evalue": "'InstructionSet' object has no attribute 'power'", - "output_type": "error", - "traceback": [ - "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", - "\u001b[0;31mAttributeError\u001b[0m Traceback (most recent call last)", - "\u001b[1;32m/Users/christina/Prog/plugins/pennylane-qiskit/tmp/tester.ipynb Cell 3'\u001b[0m in \u001b[0;36m\u001b[0;34m()\u001b[0m\n\u001b[0;32m----> 1\u001b[0m qc\u001b[39m.\u001b[39;49mx(\u001b[39m0\u001b[39;49m)\u001b[39m.\u001b[39;49mpower(\u001b[39m2\u001b[39m)\n", - "\u001b[0;31mAttributeError\u001b[0m: 'InstructionSet' object has no attribute 'power'" - ] - } - ], - "source": [ - "qc.x(0).power(2)" - ] - }, - { - "cell_type": "code", - "execution_count": 4, - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "" - ] - }, - "execution_count": 4, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "qc" - ] - }, - { - "cell_type": "code", - "execution_count": 7, - "metadata": {}, - "outputs": [], - "source": [ - "from qiskit import extensions as ex" - ] - }, - { - "cell_type": "code", - "execution_count": 12, - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "Instruction(name='unitary', num_qubits=1, num_clbits=0, params=[array([[0.28711035+0.45241353j, 0.71288965-0.45241353j],\n", - " [0.71288965-0.45241353j, 0.28711035+0.45241353j]])])" - ] - }, - "execution_count": 12, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "ex.XGate(0).power(exponent=0.64)" - ] - }, - { - "cell_type": "code", - "execution_count": 13, - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "Instruction(name='x', num_qubits=1, num_clbits=0, params=[])" - ] - }, - "execution_count": 13, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "ex.XGate(0)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - } - ], - "metadata": { - "interpreter": { - "hash": "0e46f6e99659d20aee8ccda0244f02b43166fe8605fdb15c85f8f22ebd8231f9" - }, - "kernelspec": { - "display_name": "Python 3.8.9 ('qiskit-env')", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.9.6" - }, - "orig_nbformat": 4 - }, - "nbformat": 4, - "nbformat_minor": 2 -} From 74504b6c12dd768c6852beba171148a7daa913cd Mon Sep 17 00:00:00 2001 From: albi3ro Date: Fri, 25 Nov 2022 12:15:33 -0500 Subject: [PATCH 3/6] update setup.py --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index f9e375dea..79fc7277b 100644 --- a/setup.py +++ b/setup.py @@ -76,10 +76,10 @@ "Operating System :: Microsoft :: Windows", "Programming Language :: Python", 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.7', 'Programming Language :: Python :: 3.8', 'Programming Language :: Python :: 3.9', 'Programming Language :: Python :: 3.10', + 'Programming Language :: Python :: 3.11', 'Programming Language :: Python :: 3 :: Only', "Topic :: Scientific/Engineering :: Physics" ] From 448487a4f8aa374a142a76db93fffc61c71c6fe0 Mon Sep 17 00:00:00 2001 From: Christina Lee Date: Fri, 25 Nov 2022 12:16:39 -0500 Subject: [PATCH 4/6] Apply suggestions from code review --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b409a49a0..da8042764 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,10 +5,12 @@ ### Breaking changes * Removes testing for Python 3.7. + [(#237)](https://github.com/PennyLaneAI/pennylane-qiskit/pull/237) ### Improvements * Adds testing for Python 3.11. + [(#237)](https://github.com/PennyLaneAI/pennylane-qiskit/pull/237) ### Documentation From abd8bb4e6010baedccc89a6e5f1ca0f8399f144e Mon Sep 17 00:00:00 2001 From: albi3ro Date: Fri, 25 Nov 2022 12:17:32 -0500 Subject: [PATCH 5/6] update readme --- README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rst b/README.rst index 67b7ca3c2..a2105ea94 100644 --- a/README.rst +++ b/README.rst @@ -53,7 +53,7 @@ Features Installation ============ -This plugin requires Python version 3.7 and above, as well as PennyLane and Qiskit. +This plugin requires Python version 3.8 and above, as well as PennyLane and Qiskit. Installation of this plugin, as well as all dependencies, can be done using ``pip``: .. code-block:: bash From 182ae3015206d2189087882a720d17d13a59721a Mon Sep 17 00:00:00 2001 From: albi3ro Date: Mon, 28 Nov 2022 09:21:41 -0500 Subject: [PATCH 6/6] bump integration tests version --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 8c9ddaeaf..721210c41 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -63,7 +63,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v2 with: - python-version: 3.7 + python-version: 3.9 - name: Install dependencies run: |