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
20 changes: 14 additions & 6 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

local_repository(
name = "pypi_setuptools",
path = "third_party/pypi_setuptools",
)

# TensorFlow's .bzl files, loaded later in this file, also load rules_python
# but we need a slightly newer version that is still compatible with TF's.
http_archive(
Expand Down Expand Up @@ -39,11 +44,14 @@ load("@pypi//:requirements.bzl", "install_deps")

install_deps()

EIGEN_COMMIT = "aa6964bf3a34fd607837dd8123bc42465185c4f8"
# Eigen commit used by TensorFlow / TFQ.
# This commit corresponds to Eigen version 3.4.90
# (verified via Eigen/src/Core/util/Macros.h).
EIGEN_COMMIT = "c1d637433e3b3f9012b226c2c9125c494b470ae6"

http_archive(
name = "eigen",
sha256 = "35ba771e30c735a4215ed784d7e032086cf89fe6622dce4d793c45dd74373362",
sha256 = "0992b93a590c39e196a9efdb5b4919fbf3fb485e7e656c6a87b21ddadb7f6ad2",
build_file_content = """
cc_library(
name = "eigen3",
Expand Down Expand Up @@ -71,10 +79,10 @@ http_archive(

http_archive(
name = "org_tensorflow",
patches = ["//third_party/tf:tf.patch"],
sha256 = "c8c8936e7b6156e669e08b3c388452bb973c1f41538149fce7ed4a4849c7a012",
strip_prefix = "tensorflow-2.16.2",
urls = ["https://github.com/tensorflow/tensorflow/archive/refs/tags/v2.16.2.zip"],
# patches = ["//third_party/tf:tf.patch"],
sha256 = "75d63eab5c4b41a831e39e2e3795e1f9dcc247e8fcca11bf3f3e1a6ac35e55d0",
strip_prefix = "tensorflow-2.17.1",
urls = ["https://github.com/tensorflow/tensorflow/archive/refs/tags/v2.17.1.zip"],
)


Expand Down
22 changes: 10 additions & 12 deletions release/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,31 +48,29 @@ def finalize_options(self):
REQUIRED_PACKAGES = [
"cirq-core==1.3.0",
"cirq-google==1.3.0",
"numpy<2.0",
"protobuf==4.25.8",
"scipy<=1.12.0",
"sympy==1.14",
"tf-keras~=2.16.0",

"tf-keras~=2.17.0",
# The following are transitive dependencies that need to be constrained to
# avoid incompatible versions or because some (e.g., contourpy 1.3.3)
# require Python 3.11+ and we want to maintain Python 3.9 compatibility.
# TODO: revisit after we reach compatibility with TensorFlow 2.19+.
"contourpy<=1.3.0",
"contourpy<=1.3.2",
"h5py==3.10.0",
"importlib_metadata<5",
"jax<0.4.24",
"jaxlib<0.4.24",
"jax<=0.5",
"matplotlib<3.10",
"networkx<3.3",
"pillow<=11.0",
"numpy<2.0",
"scipy<=1.12.0",
# The following makes it easier to get the right version on Colab. Once
# TFQ works with the latest version of TF, this may become unnecessary.
"protobuf==4.25.8",
]

# TF requirement is placed as an extras to avoid overwriting existing nightly TF
# installations. Users can run "pip install tensorflow-quantum[and-tensorflow]"
# to get everything in one go (or "pip install tensorflow tensorflow-quantum").
EXTRA_PACKAGES = {}
EXTRA_PACKAGES["and-tensorflow"] = ["tensorflow>=2.16,<2.17"]
EXTRA_PACKAGES["and-tensorflow"] = ["tensorflow>=2.17,<2.18"]
# "extras" was used before 0.7.4. Prefer "and-tensorflow" in 0.7.4+.
EXTRA_PACKAGES["extras"] = EXTRA_PACKAGES["and-tensorflow"]
# Add an alias in case people type an underscore instead of a dash.
Expand Down Expand Up @@ -119,10 +117,10 @@ def has_ext_modules(self):
"Intended Audience :: Education",
"Intended Audience :: Science/Research",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Scientific/Engineering",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Topic :: Scientific/Engineering :: Mathematics",
Expand Down
10 changes: 8 additions & 2 deletions requirements.in
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,14 @@
# scripts/generate_requirements.sh.
cirq-core~=1.3.0
cirq-google~=1.3.0
tensorflow>=2.16,<2.17
tf-keras~=2.16.0
tensorflow>=2.17,<2.18
keras==3.12.0
tf-keras~=2.17.0
setuptools==75.0.0
wheel==0.44.0
contourpy<=1.3.2
networkx<=3.4.2
scipy==1.15.3

# TODO: the next ones are not truly core requirements. A better place should be
# found for them (long with others needed by scripts/*). They're here as a
Expand Down
Loading
Loading