Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/python-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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']
os: [ubuntu-latest, macos-latest, windows-latest]

steps:
Expand Down
28 changes: 14 additions & 14 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,16 +43,16 @@ classifiers = [


dependencies = [
"typing_extensions >= 4.1.1",
"numpy <2.0",
"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.0", # 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",
]


Expand Down Expand Up @@ -85,14 +85,13 @@ docs = [
]
dev = [
"cirq >= 0.8.0",
"qiskit >= 0.24.0",
"qiskit-aer",
"ruamel.yaml", # Additional requirement for pyquil
"pyquil >= 2.28.0",
"qsimcirq >= 0.10.2 ; python_version < '3.11'", # PEP508 environment marker
"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",
"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",
Expand Down Expand Up @@ -174,6 +173,7 @@ exclude_lines = [
# Suppresses error about unresolved imports (i.e. from numpy)
ignore_missing_imports = true


# Disallows functions without type annotations
# disallow_untyped_defs = true

Expand Down
4 changes: 2 additions & 2 deletions quantumflow/decompositions.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
3 changes: 1 addition & 2 deletions quantumflow/xcirq.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions quantumflow/xqiskit_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down