Skip to content

TensorFlow Quantum 0.7.6

Latest

Choose a tag to compare

@mhucka mhucka released this 25 Feb 16:45
· 9 commits to master since this release
4e6b822

This release pins the TensorFlow dependency to 2.18.1. The versions of Python supported are 3.10–3.12. You can install TensorFlow Quantum 0.7.6 using pip as follows:

pip install tensorflow==2.18.1 tensorflow-quantum==0.7.6

Release 0.7.6 is compatible with NumPy 2 and Cirq 1.5. TensorFlow Quantum continues to require Keras 2; to ensure your program loads the legacy version of Keras, set the environment variable TF_USE_LEGACY_KERAS to 1 before you import TensorFlow or TensorFlow Quantum in your Python program. Here is a code snippet you can place before the first import of tensorflow or tensorflow_quantum:

# Configure use of Keras 2 before importing TensorFlow or TensorFlow Quantum:
import os
os.environ["TF_USE_LEGACY_KERAS"] = "1"

If your code imports Keras directly, also alias keras to tf_keras:

import sys
import tf_keras
sys.modules["keras"] = tf_keras

A big thanks to all our contributors for this release!

@eileenpaula, @kenya-sk, @psamanoelton, @saksham-1304