@@ -10,14 +10,14 @@ There are a few ways to set up your environment to use TensorFlow Quantum (TFQ):
10
10
Python's pip package manager.
11
11
* Or build TensorFlow Quantum from source.
12
12
13
- TensorFlow Quantum is supported on Python 3.7 , 3.8 , and 3.9 and depends directly on [ Cirq] ( https://github.com/quantumlib/Cirq ) .
13
+ TensorFlow Quantum is supported on Python 3.9 , 3.10 , and 3.11 and depends directly on [ Cirq] ( https://github.com/quantumlib/Cirq ) .
14
14
15
15
## Pip package
16
16
17
17
### Requirements
18
18
19
- * pip 19.0 or later (requires ` manylinux2010 ` support)
20
- * [ TensorFlow == 2.11 .0] ( https://www.tensorflow.org/install/pip )
19
+ * pip 19.0 or later (requires ` manylinux2014 ` support)
20
+ * [ TensorFlow == 2.15 .0] ( https://www.tensorflow.org/install/pip )
21
21
22
22
See the [ TensorFlow install guide] ( https://www.tensorflow.org/install/pip ) to
23
23
set up your Python development environment and an (optional) virtual environment.
@@ -27,7 +27,7 @@ Upgrade `pip` and install TensorFlow
27
27
<!-- common_typos_disable -->
28
28
<pre class =" devsite-click-to-copy " >
29
29
<code class =" devsite-terminal " >pip3 install --upgrade pip</code >
30
- <code class =" devsite-terminal " >pip3 install tensorflow==2.11 .0</code >
30
+ <code class =" devsite-terminal " >pip3 install tensorflow==2.15 .0</code >
31
31
</pre >
32
32
<!-- common_typos_enable -->
33
33
@@ -57,13 +57,13 @@ The following steps are tested for Ubuntu-like systems.
57
57
58
58
### 1. Set up a Python 3 development environment
59
59
60
- First we need the Python 3.8 development tools.
60
+ First we need the Python 3.10 development tools.
61
61
<!-- common_typos_disable -->
62
62
<pre class =" devsite-click-to-copy " >
63
63
<code class =" devsite-terminal " >sudo apt update</code >
64
- <code class =" devsite-terminal " >sudo apt-get install pkg-config zip g++ zlib1g-dev unzip python3.8 </code >
65
- <code class =" devsite-terminal " >sudo apt install python3.8 python3.8 -dev python3.8 -venv python3-pip</code >
66
- <code class =" devsite-terminal " >python3.8 -m pip install --upgrade pip</code >
64
+ <code class =" devsite-terminal " >sudo apt-get install pkg-config zip g++ zlib1g-dev unzip python3.10 </code >
65
+ <code class =" devsite-terminal " >sudo apt install python3.10 python3.10 -dev python3.10 -venv python3-pip</code >
66
+ <code class =" devsite-terminal " >python3.10 -m pip install --upgrade pip</code >
67
67
</pre >
68
68
<!-- common_typos_enable -->
69
69
@@ -72,7 +72,7 @@ First we need the Python 3.8 development tools.
72
72
Go to your workspace directory and make a virtual environment for TFQ development.
73
73
<!-- common_typos_disable -->
74
74
<pre class =" devsite-click-to-copy " >
75
- <code class =" devsite-terminal " >python3.8 -m venv quantum_env</code >
75
+ <code class =" devsite-terminal " >python3.10 -m venv quantum_env</code >
76
76
<code class =" devsite-terminal " >source quantum_env/bin/activate</code >
77
77
</pre >
78
78
<!-- common_typos_enable -->
@@ -84,21 +84,20 @@ As noted in the TensorFlow
84
84
guide, the <a href =" https://bazel.build/ " class =" external " >Bazel</a >
85
85
build system will be required.
86
86
87
- Our latest source builds use TensorFlow 2.11.0. To ensure compatibility we use ` bazel ` version 5.3.0. To remove any existing version of Bazel:
88
-
87
+ Our latest source builds use TensorFlow 2.15.0. To ensure compatibility we use ` bazel ` version 6.5.0. To remove any existing version of Bazel:
89
88
<!-- common_typos_disable -->
90
89
<pre class =" devsite-click-to-copy " >
91
90
<code class =" devsite-terminal " >sudo apt-get remove bazel</code >
92
91
</pre >
93
92
<!-- common_typos_enable -->
94
93
95
- Download and install ` bazel ` version 5.3 .0:
94
+ Download and install ` bazel ` version 6.5 .0:
96
95
97
96
<!-- common_typos_disable -->
98
97
<pre class =" devsite-click-to-copy " >
99
- <code class =" devsite-terminal " >wget https://github.com/bazelbuild/bazel/releases/download/5.3.0/bazel_5.3 .0-linux-x86_64.deb
98
+ <code class =" devsite-terminal " >wget https://github.com/bazelbuild/bazel/releases/download/6.5.0/bazel_6.5 .0-linux-x86_64.deb
100
99
</code >
101
- <code class =" devsite-terminal " >sudo dpkg -i bazel_5.3 .0-linux-x86_64.deb</code >
100
+ <code class =" devsite-terminal " >sudo dpkg -i bazel_6.5 .0-linux-x86_64.deb</code >
102
101
</pre >
103
102
<!-- common_typos_enable -->
104
103
@@ -122,7 +121,7 @@ Finally, confirm installation of the correct `bazel` version:
122
121
### 4. Build TensorFlow from source
123
122
124
123
Here we adapt instructions from the TensorFlow [ build from source] ( https://www.tensorflow.org/install/source )
125
- guide, see the link for further details. TensorFlow Quantum is compatible with TensorFlow version  ; 2.11 .0.
124
+ guide, see the link for further details. TensorFlow Quantum is compatible with TensorFlow version  ; 2.15 .0.
126
125
127
126
Download the
128
127
<a href =" https://github.com/tensorflow/tensorflow " class =" external " >TensorFlow source code</a >:
@@ -131,7 +130,7 @@ Download the
131
130
<pre class =" devsite-click-to-copy " >
132
131
<code class =" devsite-terminal " >git clone https://github.com/tensorflow/tensorflow.git</code >
133
132
<code class =" devsite-terminal " >cd tensorflow</code >
134
- <code class =" devsite-terminal " >git checkout v2.11 .0</code >
133
+ <code class =" devsite-terminal " >git checkout v2.15 .0</code >
135
134
</pre >
136
135
137
136
Be sure the virtual environment you created in step 2 is activated. Then, install the TensorFlow dependencies:
@@ -141,7 +140,7 @@ Be sure the virtual environment you created in step 2 is activated. Then, instal
141
140
<code class =" devsite-terminal " >pip install -U pip six numpy wheel setuptools mock 'future>=0.17.1'</code >
142
141
<code class =" devsite-terminal " >pip install -U keras_applications --no-deps</code >
143
142
<code class =" devsite-terminal " >pip install -U keras_preprocessing --no-deps</code >
144
- <code class =" devsite-terminal " >pip install numpy==1.24.2 </code >
143
+ <code class =" devsite-terminal " >pip install numpy==1.23.5 </code >
145
144
<code class =" devsite-terminal " >pip install packaging requests</code >
146
145
</pre >
147
146
<!-- common_typos_enable -->
0 commit comments