Skip to content

TensorFlow Quantum 0.7.5

Latest

Choose a tag to compare

@mhucka mhucka released this 29 Dec 05:11
· 28 commits to master since this release
d748b2f

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

pip install tensorflow==2.16.2 tensorflow-quantum==0.7.5

TensorFlow Quantum is currently only compatible with Keras 2; however, TensorFlow 2.16 defaults to Keras 3. 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 program. Here is a code snippet you can place before the first import of tensorflow or tensorflow_quantum in your program:

# 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

Finally, we are pleased to welcome Grid Dynamics to the team of TensorFlow Quantum maintainers.