|
20 | 20 | "id": "a3c9a6e8",
|
21 | 21 | "metadata": {},
|
22 | 22 | "outputs": [
|
23 |
| - { |
24 |
| - "name": "stderr", |
25 |
| - "output_type": "stream", |
26 |
| - "text": [ |
27 |
| - "<frozen importlib._bootstrap>:228: RuntimeWarning: scipy._lib.messagestream.MessageStream size changed, may indicate binary incompatibility. Expected 56 from C header, got 64 from PyObject\n" |
28 |
| - ] |
29 |
| - }, |
30 | 23 | {
|
31 | 24 | "name": "stdout",
|
32 | 25 | "output_type": "stream",
|
|
167 | 160 | "text": [
|
168 | 161 | "BatchResult: 2 results\n",
|
169 | 162 | "Result: ATOSDevice, MYQLM_PYLINALG\n",
|
170 |
| - " Expectation value: -3.4769999999999994\n", |
171 |
| - " Error/Variance: 0.10704925979198084\n", |
| 163 | + " Expectation value: -3.6279999999999997\n", |
| 164 | + " Error/Variance: 0.10472127540648739\n", |
172 | 165 | "Result: IBMDevice, AER_SIMULATOR\n",
|
173 |
| - " Expectation value: -3.6155\n", |
174 |
| - " Error/Variance: 22.003217250000002\n" |
| 166 | + " Expectation value: -3.2729999999999992\n", |
| 167 | + " Error/Variance: 22.060085000000004\n" |
175 | 168 | ]
|
176 | 169 | }
|
177 | 170 | ],
|
|
192 | 185 | },
|
193 | 186 | {
|
194 | 187 | "cell_type": "code",
|
195 |
| - "execution_count": 11, |
| 188 | + "execution_count": 9, |
196 | 189 | "id": "4ac9c7e0",
|
197 | 190 | "metadata": {},
|
198 | 191 | "outputs": [],
|
|
256 | 249 | },
|
257 | 250 | {
|
258 | 251 | "cell_type": "code",
|
259 |
| - "execution_count": 15, |
| 252 | + "execution_count": 10, |
260 | 253 | "id": "bc5ed517",
|
261 | 254 | "metadata": {},
|
262 | 255 | "outputs": [
|
|
290 | 283 | },
|
291 | 284 | {
|
292 | 285 | "cell_type": "code",
|
293 |
| - "execution_count": 16, |
| 286 | + "execution_count": 11, |
294 | 287 | "id": "06784ef3",
|
295 | 288 | "metadata": {},
|
296 | 289 | "outputs": [
|
|
299 | 292 | "output_type": "stream",
|
300 | 293 | "text": [
|
301 | 294 | "ps_2 = 1*I@Z + 2.555555555*Y@I + 1*X@Z + -1*X@Z\n",
|
302 |
| - " = 1*I@Z + 2.555555555*Y@I\n", |
| 295 | + " = 2.555555555*Y@I + 1*I@Z\n", |
303 | 296 | " ~= 1*I@Z + 2.6*Y@I + 1*X@Z + -1*X@Z\n",
|
304 | 297 | " ~= 1*I@Z + 2.5556*Y@I\n"
|
305 | 298 | ]
|
|
325 | 318 | },
|
326 | 319 | {
|
327 | 320 | "cell_type": "code",
|
328 |
| - "execution_count": 17, |
| 321 | + "execution_count": 12, |
329 | 322 | "id": "b9cadb08",
|
330 | 323 | "metadata": {},
|
331 | 324 | "outputs": [
|
|
347 | 340 | "\n",
|
348 | 341 | "Tensor product:\n",
|
349 | 342 | "(1*I@Z + -3*X@Y) @ Z = 1*I@Z@Z + -3*X@Y@Z\n",
|
350 |
| - "\n", |
351 | 343 | "(1*I@Z + -3*X@Y) @ (1*I@Z + 2.6*Y@I) = 1*I@Z@I@Z + -3*I@Z@X@Y + 2.6*Y@I@I@Z + -7.8*Y@I@X@Y\n"
|
352 | 344 | ]
|
353 | 345 | }
|
|
368 | 360 | "\n",
|
369 | 361 | "Tensor product:\n",
|
370 | 362 | "({ps_1}) @ Z = {ps_1@Z}\n",
|
371 |
| - "\n", |
372 | 363 | "({ps_1}) @ ({ps_2}) = {ps_1@ps_2}\"\"\")"
|
373 | 364 | ]
|
374 | 365 | },
|
|
382 | 373 | },
|
383 | 374 | {
|
384 | 375 | "cell_type": "code",
|
385 |
| - "execution_count": null, |
| 376 | + "execution_count": 13, |
386 | 377 | "id": "5b0537a1",
|
387 | 378 | "metadata": {},
|
388 | 379 | "outputs": [],
|
|
402 | 393 | },
|
403 | 394 | {
|
404 | 395 | "cell_type": "code",
|
405 |
| - "execution_count": null, |
| 396 | + "execution_count": 14, |
406 | 397 | "id": "1732e099",
|
407 | 398 | "metadata": {},
|
408 | 399 | "outputs": [
|
|
422 | 413 | "\n",
|
423 | 414 | "`obs1` created with Pauli string:\n",
|
424 | 415 | "Pauli string:\n",
|
425 |
| - "1*I@X + -3*X@Y\n", |
| 416 | + "1*I@Z + -3*X@Y\n", |
426 | 417 | "matrix:\n",
|
427 |
| - "[[0.+0.j 1.+0.j 0.+0.j 0.-3.j]\n", |
428 |
| - " [1.+0.j 0.+0.j 0.+3.j 0.+0.j]\n", |
429 |
| - " [0.+0.j 0.-3.j 0.+0.j 1.+0.j]\n", |
430 |
| - " [0.+3.j 0.+0.j 1.+0.j 0.+0.j]]\n" |
| 418 | + "[[ 1.+0.j 0.+0.j 0.+0.j 0.-3.j]\n", |
| 419 | + " [ 0.+0.j -1.+0.j 0.+3.j 0.+0.j]\n", |
| 420 | + " [ 0.+0.j 0.-3.j 1.+0.j 0.+0.j]\n", |
| 421 | + " [ 0.+3.j 0.+0.j 0.+0.j -1.+0.j]]\n" |
431 | 422 | ]
|
432 | 423 | }
|
433 | 424 | ],
|
|
458 | 449 | },
|
459 | 450 | {
|
460 | 451 | "cell_type": "code",
|
461 |
| - "execution_count": null, |
| 452 | + "execution_count": 15, |
462 | 453 | "id": "892f0b6e",
|
463 | 454 | "metadata": {},
|
464 | 455 | "outputs": [],
|
|
469 | 460 | },
|
470 | 461 | {
|
471 | 462 | "cell_type": "code",
|
472 |
| - "execution_count": null, |
| 463 | + "execution_count": 16, |
473 | 464 | "id": "745aa999",
|
474 | 465 | "metadata": {},
|
475 | 466 | "outputs": [
|
|
478 | 469 | "output_type": "stream",
|
479 | 470 | "text": [
|
480 | 471 | "BatchResult: 3 results\n",
|
481 |
| - "Result: IBMDevice, AER_SIMULATOR\n", |
482 |
| - " Expectation value: 0.08399999999999999\n", |
483 |
| - " Error/Variance: 9.98776\n", |
484 |
| - "Result: ATOSDevice, MYQLM_PYLINALG\n", |
485 |
| - " Expectation value: 0.010000000000000009\n", |
486 |
| - " Error/Variance: 0.10000486474653607\n", |
487 | 472 | "Result: ATOSDevice, MYQLM_CLINALG\n",
|
488 |
| - " Expectation value: -0.017999999999999933\n", |
489 |
| - " Error/Variance: 0.10001671531970716\n", |
490 |
| - "\n" |
| 473 | + " Expectation value: 0.08200000000000007\n", |
| 474 | + " Error/Variance: 0.10000294289963965\n", |
| 475 | + "Result: ATOSDevice, MYQLM_PYLINALG\n", |
| 476 | + " Expectation value: 0.12600000000000006\n", |
| 477 | + " Error/Variance: 0.10000590573151757\n", |
| 478 | + "Result: IBMDevice, AER_SIMULATOR\n", |
| 479 | + " Expectation value: 0.14800000000000002\n", |
| 480 | + " Error/Variance: 9.987479999999998\n" |
491 | 481 | ]
|
492 | 482 | }
|
493 | 483 | ],
|
|
0 commit comments