Skip to content

Commit b79dae4

Browse files
lock tf and qiskit in setup: two nonsense update with so many meaningless breaking changes, just pushing the users away...
1 parent a5745a9 commit b79dae4

File tree

2 files changed

+14
-3
lines changed

2 files changed

+14
-3
lines changed

setup.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@
1919
include_package_data=True,
2020
install_requires=["numpy", "scipy", "tensornetwork-ng", "networkx"],
2121
extras_require={
22-
"tensorflow": ["tensorflow"],
22+
"tensorflow": ["tensorflow<2.16"],
2323
"jax": ["jax", "jaxlib"],
2424
"torch": ["torch"],
25-
"qiskit": ["qiskit"],
26-
"cloud": ["qiskit", "mthree"],
25+
"qiskit": ["qiskit<1.0"],
26+
"cloud": ["qiskit<1.0", "mthree"],
2727
},
2828
classifiers=[
2929
"Programming Language :: Python :: 3",

tensorcircuit/__init__.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,5 +55,16 @@
5555
except ModuleNotFoundError:
5656
pass # in case torch is not installed
5757

58+
try:
59+
import qiskit
60+
61+
qiskit.QuantumCircuit.cnot = qiskit.QuantumCircuit.cx
62+
qiskit.QuantumCircuit.toffoli = qiskit.QuantumCircuit.ccx
63+
qiskit.QuantumCircuit.fredkin = qiskit.QuantumCircuit.cswap
64+
65+
# amazing qiskit 1.0 nonsense...
66+
except ModuleNotFoundError:
67+
pass
68+
5869
# just for fun
5970
from .asciiart import set_ascii

0 commit comments

Comments
 (0)