blueqatで量子もつれ その2

# 概要
量子もつれが、分からないので、copilotに聞いてみた。
実験してみた。
挫折編

# 環境
windows11
wsl1
ubuntu22

# 手順

## インストール

```
$ pip3 install blueqat
Defaulting to user installation because normal site-packages is not writeable
Collecting blueqat
  Downloading blueqat-2.0.4-py3-none-any.whl (68 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 68.9/68.9 KB 1.9 MB/s eta 0:00:00
Collecting matplotlib>=3.5.1
  Downloading matplotlib-3.10.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (8.6 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 8.6/8.6 MB 8.7 MB/s eta 0:00:00
Requirement already satisfied: networkx>=2.6.3 in ./.local/lib/python3.10/site-packages (from blueqat) (3.3)
Requirement already satisfied: numpy>=1.21.0 in ./.local/lib/python3.10/site-packages (from blueqat) (1.26.4)
Collecting opt-einsum>=3.3.0
  Downloading opt_einsum-3.4.0-py3-none-any.whl (71 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 71.9/71.9 KB 4.4 MB/s eta 0:00:00
Requirement already satisfied: scipy>=1.5 in ./.local/lib/python3.10/site-packages (from blueqat) (1.14.0)
Collecting quimb==1.4.0
  Downloading quimb-1.4.0-py3-none-any.whl (353 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 353.6/353.6 KB 8.8 MB/s eta 0:00:00
Collecting autoray>=0.2.5
  Downloading autoray-0.7.0-py3-none-any.whl (930 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 930.0/930.0 KB 8.2 MB/s eta 0:00:00
Collecting psutil>=4.3.1
  Downloading psutil-6.1.1-cp36-abi3-manylinux_2_12_x86_64.manylinux2010_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (287 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 287.5/287.5 KB 8.9 MB/s eta 0:00:00
Collecting numba>=0.39
  Downloading numba-0.60.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (3.7 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.7/3.7 MB 8.4 MB/s eta 0:00:00
Requirement already satisfied: tqdm>=4 in ./.local/lib/python3.10/site-packages (from quimb==1.4.0->blueqat) (4.66.5)
Collecting cytoolz>=0.8.0
  Downloading cytoolz-1.0.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.0 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.0/2.0 MB 8.9 MB/s eta 0:00:00
Collecting python-dateutil>=2.7
  Downloading python_dateutil-2.9.0.post0-py2.py3-none-any.whl (229 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 229.9/229.9 KB 1.9 MB/s eta 0:00:00
Collecting packaging>=20.0
  Downloading packaging-24.2-py3-none-any.whl (65 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 65.5/65.5 KB 7.0 MB/s eta 0:00:00
Collecting kiwisolver>=1.3.1
  Downloading kiwisolver-1.4.8-cp310-cp310-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (1.6 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.6/1.6 MB 7.5 MB/s eta 0:00:00
Collecting fonttools>=4.22.0
  Downloading fonttools-4.55.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.6 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 4.6/4.6 MB 9.0 MB/s eta 0:00:00
Collecting contourpy>=1.0.1
  Downloading contourpy-1.3.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (324 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 325.0/325.0 KB 6.2 MB/s eta 0:00:00
Requirement already satisfied: pyparsing>=2.3.1 in /usr/lib/python3/dist-packages (from matplotlib>=3.5.1->blueqat) (2.4.7)
Requirement already satisfied: pillow>=8 in ./.local/lib/python3.10/site-packages (from matplotlib>=3.5.1->blueqat) (10.4.0)
Collecting cycler>=0.10
  Downloading cycler-0.12.1-py3-none-any.whl (8.3 kB)
Collecting toolz>=0.8.0
  Downloading toolz-1.0.0-py3-none-any.whl (56 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 56.4/56.4 KB 5.6 MB/s eta 0:00:00
Collecting llvmlite<0.44,>=0.43.0dev0
  Downloading llvmlite-0.43.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (43.9 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 43.9/43.9 MB 5.2 MB/s eta 0:00:00
Requirement already satisfied: six>=1.5 in /usr/lib/python3/dist-packages (from python-dateutil>=2.7->matplotlib>=3.5.1->blueqat) (1.16.0)
Installing collected packages: toolz, python-dateutil, psutil, packaging, opt-einsum, llvmlite, kiwisolver, fonttools, cycler, contourpy, autoray, numba, matplotlib, cytoolz, quimb, blueqat
Successfully installed autoray-0.7.0 blueqat-2.0.4 contourpy-1.3.1 cycler-0.12.1 cytoolz-1.0.1 fonttools-4.55.3 kiwisolver-1.4.8 llvmlite-0.43.0 matplotlib-3.10.0 numba-0.60.0 opt-einsum-3.4.0 packaging-24.2 psutil-6.1.1 python-dateutil-2.9.0.post0 quimb-1.4.0 toolz-1.0.0

```

## pytho3 test0.pyでエラー

```
$ pip3 uninstall blueqat
Found existing installation: blueqat 2.0.4
Uninstalling blueqat-2.0.4:
  Would remove:
    /home/ore/.local/lib/python3.10/site-packages/blueqat-2.0.4.dist-info/*
    /home/ore/.local/lib/python3.10/site-packages/blueqat/*
Proceed (Y/n)? y
  Successfully uninstalled blueqat-2.0.4

$ pip3 install blueqat==1.0.4
Defaulting to user installation because normal site-packages is not writeable
Collecting blueqat==1.0.4
  Downloading blueqat-1.0.4-py3-none-any.whl (79 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 79.7/79.7 KB 1.6 MB/s eta 0:00:00
Requirement already satisfied: numpy>=1.19 in /home/ore/.local/lib/python3.10/site-packages (from blueqat==1.0.4) (1.26.4)
Requirement already satisfied: scipy>=1.5 in /home/ore/.local/lib/python3.10/site-packages (from blueqat==1.0.4) (1.14.0)
Installing collected packages: blueqat
Successfully installed blueqat-1.0.4
```

あきらめる。

## qiskitをインストール

```
$ pip3 install qiskit
Defaulting to user installation because normal site-packages is not writeable
Collecting qiskit
  Downloading qiskit-1.3.1-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (6.7 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 6.7/6.7 MB 7.1 MB/s eta 0:00:00
Requirement already satisfied: numpy<3,>=1.17 in /home/ore/.local/lib/python3.10/site-packages (from qiskit) (1.26.4)
Collecting rustworkx>=0.15.0
  Downloading rustworkx-0.15.1-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.0 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.0/2.0 MB 8.0 MB/s eta 0:00:00
Requirement already satisfied: python-dateutil>=2.8.0 in /home/ore/.local/lib/python3.10/site-packages (from qiskit) (2.9.0.post0)
Collecting dill>=0.3
  Downloading dill-0.3.9-py3-none-any.whl (119 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 119.4/119.4 KB 7.0 MB/s eta 0:00:00
Collecting sympy>=1.3
  Downloading sympy-1.13.3-py3-none-any.whl (6.2 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 6.2/6.2 MB 8.5 MB/s eta 0:00:00
Requirement already satisfied: typing-extensions in /home/ore/.local/lib/python3.10/site-packages (from qiskit) (4.12.2)
Requirement already satisfied: scipy>=1.5 in /home/ore/.local/lib/python3.10/site-packages (from qiskit) (1.14.0)
Collecting stevedore>=3.0.0
  Downloading stevedore-5.4.0-py3-none-any.whl (49 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 49.5/49.5 KB 3.8 MB/s eta 0:00:00
Collecting symengine<0.14,>=0.11
  Downloading symengine-0.13.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (49.7 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 49.7/49.7 MB 4.3 MB/s eta 0:00:00
Requirement already satisfied: six>=1.5 in /usr/lib/python3/dist-packages (from python-dateutil>=2.8.0->qiskit) (1.16.0)
Collecting pbr>=2.0.0
  Downloading pbr-6.1.0-py2.py3-none-any.whl (108 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 108.5/108.5 KB 7.0 MB/s eta 0:00:00
Collecting mpmath<1.4,>=1.1.0
  Downloading mpmath-1.3.0-py3-none-any.whl (536 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 536.2/536.2 KB 7.1 MB/s eta 0:00:00
Installing collected packages: mpmath, sympy, symengine, rustworkx, pbr, dill, stevedore, qiskit
Successfully installed dill-0.3.9 mpmath-1.3.0 pbr-6.1.0 qiskit-1.3.1 rustworkx-0.15.1 stevedore-5.4.0 symengine-0.13.0 sympy-1.13.3

$ pip3 install qiskit-aer
Defaulting to user installation because normal site-packages is not writeable
Collecting qiskit-aer
  Downloading qiskit_aer-0.15.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (12.3 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 12.3/12.3 MB 7.3 MB/s eta 0:00:00
Requirement already satisfied: psutil>=5 in /home/ore/.local/lib/python3.10/site-packages (from qiskit-aer) (6.1.1)
Requirement already satisfied: scipy>=1.0 in /home/ore/.local/lib/python3.10/site-packages (from qiskit-aer) (1.14.0)
Requirement already satisfied: qiskit>=1.1.0 in /home/ore/.local/lib/python3.10/site-packages (from qiskit-aer) (1.3.1)
Requirement already satisfied: numpy>=1.16.3 in /home/ore/.local/lib/python3.10/site-packages (from qiskit-aer) (1.26.4)
Requirement already satisfied: typing-extensions in /home/ore/.local/lib/python3.10/site-packages (from qiskit>=1.1.0->qiskit-aer) (4.12.2)
Requirement already satisfied: symengine<0.14,>=0.11 in /home/ore/.local/lib/python3.10/site-packages (from qiskit>=1.1.0->qiskit-aer) (0.13.0)
Requirement already satisfied: sympy>=1.3 in /home/ore/.local/lib/python3.10/site-packages (from qiskit>=1.1.0->qiskit-aer) (1.13.3)
Requirement already satisfied: rustworkx>=0.15.0 in /home/ore/.local/lib/python3.10/site-packages (from qiskit>=1.1.0->qiskit-aer) (0.15.1)
Requirement already satisfied: stevedore>=3.0.0 in /home/ore/.local/lib/python3.10/site-packages (from qiskit>=1.1.0->qiskit-aer) (5.4.0)
Requirement already satisfied: python-dateutil>=2.8.0 in /home/ore/.local/lib/python3.10/site-packages (from qiskit>=1.1.0->qiskit-aer) (2.9.0.post0)
Requirement already satisfied: dill>=0.3 in /home/ore/.local/lib/python3.10/site-packages (from qiskit>=1.1.0->qiskit-aer) (0.3.9)
Requirement already satisfied: six>=1.5 in /usr/lib/python3/dist-packages (from python-dateutil>=2.8.0->qiskit>=1.1.0->qiskit-aer) (1.16.0)
Requirement already satisfied: pbr>=2.0.0 in /home/ore/.local/lib/python3.10/site-packages (from stevedore>=3.0.0->qiskit>=1.1.0->qiskit-aer) (6.1.0)
Requirement already satisfied: mpmath<1.4,>=1.1.0 in /home/ore/.local/lib/python3.10/site-packages (from sympy>=1.3->qiskit>=1.1.0->qiskit-aer) (1.3.0)
Installing collected packages: qiskit-aer
Successfully installed qiskit-aer-0.15.1
```



以上。