diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml
index b540962..f78d908 100644
--- a/.github/workflows/format.yml
+++ b/.github/workflows/format.yml
@@ -15,7 +15,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v2
with:
- python-version: 3.8
+ python-version: 3.9
- name: Install dependencies
run: pip install black
diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml
index 28da239..38fa070 100644
--- a/.github/workflows/tests.yml
+++ b/.github/workflows/tests.yml
@@ -11,7 +11,8 @@ jobs:
strategy:
matrix:
- python-version: [3.7, 3.8, 3.9, '3.10']
+ python-version: [3.9, '3.10', '3.11']
+
steps:
- name: Cancel Previous Runs
@@ -59,7 +60,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v2
with:
- python-version: 3.7
+ python-version: 3.9
- name: Install dependencies
run: |
diff --git a/.github/workflows/upload.yml b/.github/workflows/upload.yml
index b2ff6e9..6f4a62b 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.9
- name: Build and install Plugin
run: |
@@ -31,7 +31,7 @@ jobs:
python -m pytest tests --tb=native
- name: Publish
- uses: pypa/gh-action-pypi-publish@master
+ uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI }}
diff --git a/.readthedocs.yml b/.readthedocs.yml
index a5c4557..9abaf52 100644
--- a/.readthedocs.yml
+++ b/.readthedocs.yml
@@ -19,9 +19,14 @@ formats:
# Optionally set the version of Python and requirements required to build your docs
python:
- version: 3.8
install:
- requirements: doc/requirements.txt
+ - method: pip
+ path: .
build:
- image: latest
+ os: ubuntu-22.04
+ tools:
+ python: "3.9"
+ apt_packages:
+ - graphviz
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 0bf98b3..6212ef0 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,20 +1,73 @@
-# Release 0.25.0-dev
+# Release 0.33.0-dev
### New features since last release
+### Improvements 🛠
+
+### Breaking changes 💔
+
+### Deprecations 👋
+
+### Documentation 📝
+
+### Bug fixes 🐛
+
+### Contributors ✍️
+
+This release contains contributions from (in alphabetical order):
+
+---
+# Release 0.32.0
+
### Breaking changes
+* Support for Python 3.8 has been removed, and support for 3.11 has been added.
+ [(#55)](https://github.com/PennyLaneAI/pennylane-qulacs/pull/55)
+
### Improvements
-### Documentation
+* Added support for `qml.StatePrep` as a state preparation operation.
+ [(#54)](https://github.com/PennyLaneAI/pennylane-qulacs/pull/54)
-### Bug fixes
+### Contributors
+
+This release contains contributions from (in alphabetical order):
+
+Mudit Pandey,
+Jay Soni
+
+---
+# Release 0.29.0
+
+### Improvements
+
+* Removed support for in-place inversion of operations (e.g. `qml.PauliX(0).inv()`). Users should
+ use `qml.adjoint` instead.
+ [(#46)](https://github.com/PennyLaneAI/pennylane-qulacs/pull/46)
### Contributors
This release contains contributions from (in alphabetical order):
+Albert Mitjans Coma
+
---
+
+# Release 0.28.0
+
+### Breaking changes
+
+* Removes testing for Python 3.7.
+ [(#43)](https://github.com/PennyLaneAI/pennylane-qulacs/pull/43)
+
+### Contributors
+
+This release contains contributions from (in alphabetical order):
+
+Christina Lee
+
+---
+
# Release 0.24.0
### Improvements
diff --git a/README.rst b/README.rst
index 3dfc0f8..f2a2c3d 100644
--- a/README.rst
+++ b/README.rst
@@ -28,12 +28,12 @@ Dependencies
PennyLane-Qrack requires the following libraries be installed:
-* `Python `__ >= 3.6
+* `Python `__ >= 3.8
as well as the following Python packages:
-* `PennyLane `__ >= 0.9
-* `PyQrack `__ >= 0.12.1
+* `PennyLane `__ >= 0.32
+* `PyQrack `__ >= 0.13.0
If you currently do not have Python 3 installed, we recommend
diff --git a/doc/_static/logo.png b/doc/_static/logo.png
deleted file mode 100644
index d9a2590..0000000
Binary files a/doc/_static/logo.png and /dev/null differ
diff --git a/doc/_static/pennylane.svg b/doc/_static/pennylane.svg
deleted file mode 100644
index 2ad508a..0000000
--- a/doc/_static/pennylane.svg
+++ /dev/null
@@ -1,80 +0,0 @@
-
-
diff --git a/pennylane_qrack/_version.py b/pennylane_qrack/_version.py
index 40b16bd..2346728 100644
--- a/pennylane_qrack/_version.py
+++ b/pennylane_qrack/_version.py
@@ -16,4 +16,4 @@
Version number (major.minor.patch[-label])
"""
-__version__ = "0.4.2"
+__version__ = "0.5.0"
diff --git a/requirements.txt b/requirements.txt
index 6d98138..a7e1347 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,3 +1,3 @@
-pennylane>=0.15
+pennylane>=0.32
pyqrack>=0.13.0
numpy~=1.16
diff --git a/setup.py b/setup.py
index b1dcdad..2a4a695 100644
--- a/setup.py
+++ b/setup.py
@@ -21,10 +21,9 @@
requirements = [
- "pennylane>=0.15",
- "numpy",
- "scipy",
- "pyqrack>=0.12.1"
+ "pennylane>=0.32",
+ "pyqrack>=0.13.0",
+ "numpy~=1.16"
]
info = {
@@ -58,9 +57,9 @@
"Programming Language :: Python",
# Make sure to specify here the versions of Python supported
"Programming Language :: Python :: 3",
- "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",
]
diff --git a/tests/test_apply.py b/tests/test_apply.py
index a95203c..4d418a6 100755
--- a/tests/test_apply.py
+++ b/tests/test_apply.py
@@ -181,7 +181,7 @@ class TestStateApply:
)
def test_basis_state(self, state, tol):
"""Test basis state initialization"""
- dev = QrackDevice(4)
+ dev = QrackDevice(4, isTensorNetwork=False)
op = qml.BasisState(state, wires=[0, 1, 2, 3])
dev.apply([op])
@@ -207,7 +207,7 @@ def test_basis_state(self, state, tol):
@pytest.mark.parametrize("op_wires", [[0, 1], [1, 0], [2, 0]])
def test_basis_state_on_wires_subset(self, state, device_wires, op_wires, tol):
"""Test basis state initialization on a subset of device wires"""
- dev = QrackDevice(device_wires)
+ dev = QrackDevice(device_wires, isTensorNetwork=False)
op = qml.BasisState(state, wires=op_wires)
dev.apply([op])
@@ -223,7 +223,7 @@ def test_basis_state_on_wires_subset(self, state, device_wires, op_wires, tol):
def test_qubit_state_vector(self, init_state, tol):
"""Test QubitStateVector application"""
- dev = QrackDevice(1)
+ dev = QrackDevice(1, isTensorNetwork=False)
state = init_state(1)
op = qml.QubitStateVector(state, wires=[0])
@@ -238,7 +238,7 @@ def test_qubit_state_vector(self, init_state, tol):
@pytest.mark.parametrize("op_wires", [[0], [2], [0, 1], [1, 0], [2, 0]])
def test_qubit_state_vector_on_wires_subset(self, init_state, device_wires, op_wires, tol):
"""Test QubitStateVector application on a subset of device wires"""
- dev = QrackDevice(device_wires)
+ dev = QrackDevice(device_wires, isTensorNetwork=False)
state = init_state(len(op_wires))
op = qml.QubitStateVector(state, wires=op_wires)
@@ -253,7 +253,7 @@ def test_qubit_state_vector_on_wires_subset(self, init_state, device_wires, op_w
def test_invalid_qubit_state_vector(self):
"""Test that an exception is raised if the state
vector is the wrong size"""
- dev = QrackDevice(2)
+ dev = QrackDevice(2, isTensorNetwork=False)
state = np.array([0, 123.432])
with pytest.raises(ValueError, match="State vector must have shape \\(2\\*\\*wires,\\) or \\(batch_size, 2\\*\\*wires\\)."):
@@ -263,7 +263,7 @@ def test_invalid_qubit_state_vector(self):
@pytest.mark.parametrize("op,mat", single_qubit)
def test_single_qubit_no_parameters(self, init_state, op, mat, tol):
"""Test PauliX application"""
- dev = QrackDevice(1)
+ dev = QrackDevice(1, isTensorNetwork=False)
state = init_state(1)
dev.apply([qml.QubitStateVector(state, wires=[0]), op])
@@ -277,7 +277,7 @@ def test_single_qubit_no_parameters(self, init_state, op, mat, tol):
@pytest.mark.parametrize("op,func", single_qubit_param)
def test_single_qubit_parameters(self, init_state, op, func, theta, tol):
"""Test PauliX application"""
- dev = QrackDevice(1)
+ dev = QrackDevice(1, isTensorNetwork=False)
state = init_state(1)
op.data = [theta]
@@ -293,7 +293,7 @@ def test_single_qubit_parameters(self, init_state, op, func, theta, tol):
@pytest.mark.parametrize("op,func", single_qubit_two_param)
def test_single_qubit_two_parameters(self, init_state, op, func, phi, delta, tol):
"""Test PauliX application"""
- dev = QrackDevice(1)
+ dev = QrackDevice(1, isTensorNetwork=False)
state = init_state(1)
op.data = [phi, delta]
@@ -310,7 +310,7 @@ def test_single_qubit_two_parameters(self, init_state, op, func, phi, delta, tol
@pytest.mark.parametrize("op,func", single_qubit_three_param)
def test_single_qubit_three_parameters(self, init_state, op, func, phi, theta, omega, tol):
"""Test PauliX application"""
- dev = QrackDevice(1)
+ dev = QrackDevice(1, isTensorNetwork=False)
state = init_state(1)
op.data = [phi, theta, omega]
@@ -324,7 +324,7 @@ def test_single_qubit_three_parameters(self, init_state, op, func, phi, theta, o
@pytest.mark.parametrize("op, mat", two_qubit)
def test_two_qubit_no_parameters(self, init_state, op, mat, tol):
"""Test PauliX application"""
- dev = QrackDevice(2)
+ dev = QrackDevice(2, isTensorNetwork=False)
state = init_state(2)
dev.apply([qml.QubitStateVector(state, wires=[0, 1]), op])
@@ -339,7 +339,7 @@ def test_qubit_unitary(self, init_state, mat, tol):
"""Test QubitUnitary application"""
N = int(np.log2(len(mat)))
- dev = QrackDevice(N)
+ dev = QrackDevice(N, isTensorNetwork=False)
state = init_state(N)
op = qml.QubitUnitary(mat, wires=list(range(N)))
@@ -360,7 +360,7 @@ def test_invalid_qubit_state_unitary(self):
@pytest.mark.parametrize("op, mat", three_qubit)
def test_three_qubit_no_parameters(self, init_state, op, mat, tol):
- dev = QrackDevice(3)
+ dev = QrackDevice(3, isTensorNetwork=False)
state = init_state(3)
dev.apply([qml.QubitStateVector(state, wires=[0, 1, 2]), op])
@@ -372,7 +372,7 @@ def test_three_qubit_no_parameters(self, init_state, op, mat, tol):
@pytest.mark.parametrize("op, mat", four_qubit)
def test_four_qubit_no_parameters(self, init_state, op, mat, tol):
- dev = QrackDevice(4)
+ dev = QrackDevice(4, isTensorNetwork=False)
state = init_state(4)
dev.apply([qml.QubitStateVector(state, wires=[0, 1, 2, 3]), op])
@@ -386,7 +386,7 @@ def test_four_qubit_no_parameters(self, init_state, op, mat, tol):
@pytest.mark.parametrize("op,func", two_qubit_param)
def test_two_qubit_parameters(self, init_state, op, func, theta, tol):
"""Test parametrized two qubit gates application"""
- dev = QrackDevice(2)
+ dev = QrackDevice(2, isTensorNetwork=False)
state = init_state(2)
op.data = [theta]
@@ -404,7 +404,7 @@ def test_two_qubit_parameters(self, init_state, op, func, theta, tol):
@pytest.mark.parametrize("op,func", two_qubit_three_param)
def test_two_qubit_three_parameters(self, init_state, op, func, phi, theta, omega, tol):
"""Test parametrized two qubit gates application"""
- dev = QrackDevice(2)
+ dev = QrackDevice(2, isTensorNetwork=False)
state = init_state(2)
op.data = [phi, theta, omega]
@@ -418,7 +418,7 @@ def test_two_qubit_three_parameters(self, init_state, op, func, phi, theta, omeg
def test_apply_errors_qubit_state_vector(self):
"""Test that apply fails for incorrect state preparation."""
- dev = QrackDevice(2)
+ dev = QrackDevice(2, isTensorNetwork=False)
with pytest.raises(ValueError, match="Sum of amplitudes-squared does not equal one."):
dev.apply([qml.QubitStateVector(np.array([1, -1]), wires=[0])])
@@ -430,7 +430,7 @@ def test_apply_errors_qubit_state_vector(self):
def test_apply_errors_basis_state(self):
"""Test that apply fails for incorrect basis state preparation."""
- dev = QrackDevice(2)
+ dev = QrackDevice(2, isTensorNetwork=False)
with pytest.raises(
ValueError, match="BasisState parameter must consist of 0 or 1 integers."
@@ -458,7 +458,7 @@ def test_apply_errors_basis_state(self):
)
def test_expand_state(state, op_wires, device_wires, expected, tol):
"""Test that the expand_state method works as expected."""
- dev = QrackDevice(device_wires)
+ dev = QrackDevice(device_wires, isTensorNetwork=False)
res = dev._expand_state(state, op_wires)
assert np.allclose(res, expected, tol)