From 73591ec077e74dc2367cd79e568d8b63d50748f4 Mon Sep 17 00:00:00 2001 From: Gavin Crooks Date: Thu, 1 Jan 2026 23:45:11 -0800 Subject: [PATCH 01/13] Update python version tests and requirement constraints --- .github/workflows/python-build.yml | 2 +- pyproject.toml | 15 +++++++++++---- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/.github/workflows/python-build.yml b/.github/workflows/python-build.yml index f2393be..82a874d 100644 --- a/.github/workflows/python-build.yml +++ b/.github/workflows/python-build.yml @@ -17,7 +17,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ['3.10', '3.11', '3.12'] + python-version: ['3.10', '3.11', '3.12', '3.13', '3.14'] os: [ubuntu-latest, macos-latest, windows-latest] steps: diff --git a/pyproject.toml b/pyproject.toml index 90b79f1..59f55bf 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -44,11 +44,11 @@ classifiers = [ dependencies = [ "typing_extensions >= 4.1.1", - "numpy <2.0", + "numpy", "scipy ", # v1.10 breaks tests "sympy >= 1.6", "networkx", - "decorator < 5.0.0", # 5.0 breaks networkx dependancy + "decorator ", # 5.0 breaks networkx dependancy "opt_einsum", "pillow != 9.1.0", # 9.1.0 has problems on some versions of MacOS # https://github.com/python-pillow/Pillow/issues/6179 @@ -87,8 +87,7 @@ dev = [ "cirq >= 0.8.0", "qiskit >= 0.24.0", "qiskit-aer", - "ruamel.yaml", # Additional requirement for pyquil - "pyquil >= 2.28.0", + "pyquil ; python_version < '3.13'", # 2026-01-01 Pyquil won't install on python 3.13 or 3.14 "qsimcirq >= 0.10.2 ; python_version < '3.11'", # PEP508 environment marker "qutip", "qutip-qip", @@ -174,6 +173,14 @@ exclude_lines = [ # Suppresses error about unresolved imports (i.e. from numpy) ignore_missing_imports = true +[tool.uv.workspace] +members = [ + ".", +] + +[tool.uv.sources] +quantumflow = { workspace = true } + # Disallows functions without type annotations # disallow_untyped_defs = true From 8dabad5e23805400748be6c166930455ac6893a0 Mon Sep 17 00:00:00 2001 From: Gavin Crooks Date: Thu, 1 Jan 2026 23:56:21 -0800 Subject: [PATCH 02/13] Fix typecheck --- quantumflow/decompositions.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/quantumflow/decompositions.py b/quantumflow/decompositions.py index 578b806..9d12d40 100644 --- a/quantumflow/decompositions.py +++ b/quantumflow/decompositions.py @@ -186,9 +186,9 @@ def kronecker_decomposition(gate: Gate, euler: str = "ZYZ") -> Circuit: R = U.reshape(2, 2, 2, 2) R = R.transpose(0, 2, 1, 3) - R = R.reshape(4, 4) + R44 = R.reshape(4, 4) - u, s, vh = np.linalg.svd(R) + u, s, vh = np.linalg.svd(R44) A = np.sqrt(s[0]) * u[:, 0].reshape(2, 2) B = np.sqrt(s[0]) * vh[0, :].reshape(2, 2) From 4c2920bfb6612ce6db11e5b3b91df8ff4d5eb3ef Mon Sep 17 00:00:00 2001 From: Gavin Crooks Date: Thu, 1 Jan 2026 23:56:53 -0800 Subject: [PATCH 03/13] m --- pyproject.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 59f55bf..5274959 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -85,8 +85,8 @@ docs = [ ] dev = [ "cirq >= 0.8.0", - "qiskit >= 0.24.0", - "qiskit-aer", + "qiskit >= 0.24.0 ; python_version < '3.14'", + "qiskit-aer ; python_version < '3.14'", # 2026-01-01 qiskit-aer won't install on python 3.14 "pyquil ; python_version < '3.13'", # 2026-01-01 Pyquil won't install on python 3.13 or 3.14 "qsimcirq >= 0.10.2 ; python_version < '3.11'", # PEP508 environment marker "qutip", From 22d24a6b5b7bccd17804352750b0fd33645dcb24 Mon Sep 17 00:00:00 2001 From: Gavin Crooks Date: Thu, 1 Jan 2026 23:58:37 -0800 Subject: [PATCH 04/13] m --- pyproject.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 5274959..40b1a2c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -87,8 +87,8 @@ dev = [ "cirq >= 0.8.0", "qiskit >= 0.24.0 ; python_version < '3.14'", "qiskit-aer ; python_version < '3.14'", # 2026-01-01 qiskit-aer won't install on python 3.14 - "pyquil ; python_version < '3.13'", # 2026-01-01 Pyquil won't install on python 3.13 or 3.14 - "qsimcirq >= 0.10.2 ; python_version < '3.11'", # PEP508 environment marker + "pyquil ; python_version < '3.13'", # 2026-01-01 Pyquil won't install on python 3.13 or 3.14 + "qsimcirq >= 0.10.2", "qutip", "qutip-qip", "amazon-braket-sdk", From 6c732299dcfc93e4bb474053fb1edf560d11affe Mon Sep 17 00:00:00 2001 From: Gavin Crooks Date: Fri, 2 Jan 2026 00:00:45 -0800 Subject: [PATCH 05/13] m --- pyproject.toml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 40b1a2c..0df38c2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -43,16 +43,16 @@ classifiers = [ dependencies = [ - "typing_extensions >= 4.1.1", - "numpy", - "scipy ", # v1.10 breaks tests - "sympy >= 1.6", + "typing_extensions >= 4.1.1", + "numpy >= 1.21", + "scipy >= 1.9", + "sympy >= 1.6", "networkx", - "decorator ", # 5.0 breaks networkx dependancy + "decorator !=5.0", # 5.0 breaks networkx dependancy "opt_einsum", - "pillow != 9.1.0", # 9.1.0 has problems on some versions of MacOS - # https://github.com/python-pillow/Pillow/issues/6179 - "matplotlib", + "pillow != 9.1.0", # 9.1.0 has problems on some versions of MacOS + # https://github.com/python-pillow/Pillow/issues/6179 + "matplotlib >= 3.5", ] From 61692c8159097279d70104e7ea5724d7d30ecbe7 Mon Sep 17 00:00:00 2001 From: Gavin Crooks Date: Fri, 2 Jan 2026 00:07:19 -0800 Subject: [PATCH 06/13] Fix type error --- quantumflow/xcirq.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/quantumflow/xcirq.py b/quantumflow/xcirq.py index 562bcce..dc283cd 100644 --- a/quantumflow/xcirq.py +++ b/quantumflow/xcirq.py @@ -100,8 +100,7 @@ def run(self, ket: Optional[State] = None) -> State: qubits = self.qubits ket = zero_state(qubits=qubits) - tensor = ket.tensor.flatten() - tensor = np.asarray(tensor, dtype=np.complex64) + tensor = np.asarray(ket.tensor.flatten(), dtype=np.complex64) sim = cirq.Simulator() res = sim.simulate(self._cqc, initial_state=tensor) tensor = res.state_vector() # type:ignore # Needed for cirq <0.10.0 From e50dd031d7613f74c43052a940756978d839f3c8 Mon Sep 17 00:00:00 2001 From: Gavin Crooks Date: Fri, 2 Jan 2026 00:08:35 -0800 Subject: [PATCH 07/13] m --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 0df38c2..a5b37d1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -91,7 +91,7 @@ dev = [ "qsimcirq >= 0.10.2", "qutip", "qutip-qip", - "amazon-braket-sdk", + "amazon-braket-sdk", ; python_version < '3.14'", # 2026-01-01 braket tests failing on python 3.14 "sphinx", "sphinxcontrib-bibtex", From f60c6dbe9d41323456e4aeeddb4da2242f09225b Mon Sep 17 00:00:00 2001 From: Gavin Crooks Date: Fri, 2 Jan 2026 00:10:30 -0800 Subject: [PATCH 08/13] m --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index a5b37d1..5893a0e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -91,7 +91,7 @@ dev = [ "qsimcirq >= 0.10.2", "qutip", "qutip-qip", - "amazon-braket-sdk", ; python_version < '3.14'", # 2026-01-01 braket tests failing on python 3.14 + "amazon-braket-sdk ; python_version < '3.14'", # 2026-01-01 braket tests failing on python 3.14 "sphinx", "sphinxcontrib-bibtex", From 3a3f61d1fd56b572de9e9880f5fb80dc5a642bd3 Mon Sep 17 00:00:00 2001 From: Gavin Crooks Date: Fri, 2 Jan 2026 08:03:28 -0800 Subject: [PATCH 09/13] m --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 5893a0e..aa46131 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -85,7 +85,7 @@ docs = [ ] dev = [ "cirq >= 0.8.0", - "qiskit >= 0.24.0 ; python_version < '3.14'", + "qiskit >= 0.24.0 ", "qiskit-aer ; python_version < '3.14'", # 2026-01-01 qiskit-aer won't install on python 3.14 "pyquil ; python_version < '3.13'", # 2026-01-01 Pyquil won't install on python 3.13 or 3.14 "qsimcirq >= 0.10.2", From 4adfe78ae2cbc1a6dac53a6aad06ae8cf4bce0c5 Mon Sep 17 00:00:00 2001 From: Gavin Crooks Date: Fri, 2 Jan 2026 08:31:39 -0800 Subject: [PATCH 10/13] Skip test_qiskitsimulator if qiskit-aer not installed (Which does not currenlty install on python 3.14) --- quantumflow/xqiskit_test.py | 1 + 1 file changed, 1 insertion(+) diff --git a/quantumflow/xqiskit_test.py b/quantumflow/xqiskit_test.py index 36473da..dd73fed 100644 --- a/quantumflow/xqiskit_test.py +++ b/quantumflow/xqiskit_test.py @@ -155,6 +155,7 @@ def test_circuit_to_qiskit() -> None: def test_qiskitsimulator() -> None: + pytest.importorskip("qiskit-aer") circ = qf.Circuit() circ += qf.H(1) circ += qf.X(0) From 5a49a5a4eb405d341d1ee1fe1f24f561fda7c72c Mon Sep 17 00:00:00 2001 From: Gavin Crooks Date: Fri, 2 Jan 2026 08:58:15 -0800 Subject: [PATCH 11/13] . --- .github/workflows/python-build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/python-build.yml b/.github/workflows/python-build.yml index 82a874d..1ce8002 100644 --- a/.github/workflows/python-build.yml +++ b/.github/workflows/python-build.yml @@ -17,7 +17,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ['3.10', '3.11', '3.12', '3.13', '3.14'] + python-version: ['3.10', '3.11', '3.12', '3.13'] os: [ubuntu-latest, macos-latest, windows-latest] steps: @@ -74,7 +74,7 @@ jobs: run: | sphinx-build -M html docs docs/_build - name: Test notebooks (against main) - if: runner.os == 'Linux' + if: runner.os == 'Linux' && ${{ matrix.python-version != '3.14' }} run: | pytest --nbmake tutorial From 3beb9efaa47a2ea8086a266c9929fe20fad47523 Mon Sep 17 00:00:00 2001 From: Gavin Crooks Date: Fri, 2 Jan 2026 09:13:45 -0800 Subject: [PATCH 12/13] . --- .github/workflows/python-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-build.yml b/.github/workflows/python-build.yml index 1ce8002..b2a85fd 100644 --- a/.github/workflows/python-build.yml +++ b/.github/workflows/python-build.yml @@ -74,7 +74,7 @@ jobs: run: | sphinx-build -M html docs docs/_build - name: Test notebooks (against main) - if: runner.os == 'Linux' && ${{ matrix.python-version != '3.14' }} + if: runner.os == 'Linux' run: | pytest --nbmake tutorial From a0ff7de4bf78976c5d2a2ad6f3089129f528b1f0 Mon Sep 17 00:00:00 2001 From: Gavin Crooks Date: Fri, 2 Jan 2026 09:32:43 -0800 Subject: [PATCH 13/13] m --- pyproject.toml | 7 ------- 1 file changed, 7 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index aa46131..da688dd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -173,13 +173,6 @@ exclude_lines = [ # Suppresses error about unresolved imports (i.e. from numpy) ignore_missing_imports = true -[tool.uv.workspace] -members = [ - ".", -] - -[tool.uv.sources] -quantumflow = { workspace = true } # Disallows functions without type annotations # disallow_untyped_defs = true