|
12 | 12 | },
|
13 | 13 | {
|
14 | 14 | "cell_type": "code",
|
15 |
| - "execution_count": 0, |
| 15 | + "execution_count": null, |
16 | 16 | "metadata": {
|
17 | 17 | "cellView": "form",
|
18 | 18 | "colab": {},
|
|
89 | 89 | },
|
90 | 90 | {
|
91 | 91 | "cell_type": "code",
|
92 |
| - "execution_count": 0, |
| 92 | + "execution_count": null, |
93 | 93 | "metadata": {
|
94 | 94 | "colab": {},
|
95 | 95 | "colab_type": "code",
|
|
112 | 112 | },
|
113 | 113 | {
|
114 | 114 | "cell_type": "code",
|
115 |
| - "execution_count": 0, |
| 115 | + "execution_count": null, |
116 | 116 | "metadata": {
|
117 | 117 | "colab": {},
|
118 | 118 | "colab_type": "code",
|
|
125 | 125 | },
|
126 | 126 | {
|
127 | 127 | "cell_type": "code",
|
128 |
| - "execution_count": 0, |
| 128 | + "execution_count": null, |
129 | 129 | "metadata": {
|
130 | 130 | "colab": {},
|
131 | 131 | "colab_type": "code",
|
|
150 | 150 | },
|
151 | 151 | {
|
152 | 152 | "cell_type": "code",
|
153 |
| - "execution_count": 0, |
| 153 | + "execution_count": null, |
154 | 154 | "metadata": {
|
155 | 155 | "colab": {},
|
156 | 156 | "colab_type": "code",
|
|
202 | 202 | },
|
203 | 203 | {
|
204 | 204 | "cell_type": "code",
|
205 |
| - "execution_count": 0, |
| 205 | + "execution_count": null, |
206 | 206 | "metadata": {
|
207 | 207 | "colab": {},
|
208 | 208 | "colab_type": "code",
|
|
278 | 278 | },
|
279 | 279 | {
|
280 | 280 | "cell_type": "code",
|
281 |
| - "execution_count": 0, |
| 281 | + "execution_count": null, |
282 | 282 | "metadata": {
|
283 | 283 | "colab": {},
|
284 | 284 | "colab_type": "code",
|
|
297 | 297 | " # Prep the inputs as tensors\n",
|
298 | 298 | " circuit_tensor = tfq.convert_to_tensor(circuits)\n",
|
299 | 299 | " values_tensor = tf.convert_to_tensor(\n",
|
300 |
| - " np.random.uniform(0, 2 * np.pi, (n_circuits, 1)).astype(float))\n", |
| 300 | + " np.random.uniform(0, 2 * np.pi, (n_circuits, 1)).astype(np.float32))\n", |
301 | 301 | "\n",
|
302 | 302 | " # Use TensorFlow GradientTape to track gradients.\n",
|
303 | 303 | " with tf.GradientTape() as g:\n",
|
|
327 | 327 | },
|
328 | 328 | {
|
329 | 329 | "cell_type": "code",
|
330 |
| - "execution_count": 0, |
| 330 | + "execution_count": null, |
331 | 331 | "metadata": {
|
332 | 332 | "colab": {},
|
333 | 333 | "colab_type": "code",
|
|
399 | 399 | },
|
400 | 400 | {
|
401 | 401 | "cell_type": "code",
|
402 |
| - "execution_count": 0, |
| 402 | + "execution_count": null, |
403 | 403 | "metadata": {
|
404 | 404 | "colab": {},
|
405 | 405 | "colab_type": "code",
|
|
455 | 455 | },
|
456 | 456 | {
|
457 | 457 | "cell_type": "code",
|
458 |
| - "execution_count": 0, |
| 458 | + "execution_count": null, |
459 | 459 | "metadata": {
|
460 | 460 | "colab": {},
|
461 | 461 | "colab_type": "code",
|
|
511 | 511 | "display_name": "Python 3",
|
512 | 512 | "language": "python",
|
513 | 513 | "name": "python3"
|
| 514 | + }, |
| 515 | + "language_info": { |
| 516 | + "name": "python", |
| 517 | + "version": "3.10.9 (main, Dec 7 2022, 13:47:07) [GCC 12.2.0]" |
| 518 | + }, |
| 519 | + "vscode": { |
| 520 | + "interpreter": { |
| 521 | + "hash": "916dbcbb3f70747c44a77c7bcd40155683ae19c65e1c03b4aa3499c5328201f1" |
| 522 | + } |
514 | 523 | }
|
515 | 524 | },
|
516 | 525 | "nbformat": 4,
|
|
0 commit comments