Skip to content

Commit

Permalink
was missing Statevector()
Browse files Browse the repository at this point in the history
  • Loading branch information
yiiyama committed May 22, 2023
1 parent ae84687 commit 97c5ddd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion source/ja/dynamics_simulation.md
Expand Up @@ -19,7 +19,7 @@ language_info:
name: python
nbconvert_exporter: python
pygments_lexer: ipython3
version: 3.10.6
version: 3.8.10
---

# 物理系を表現する
Expand Down
4 changes: 2 additions & 2 deletions source/ja/vqe.md
Expand Up @@ -599,15 +599,15 @@ target_state_2q = random_statevector(2)

```python
target_state_2q = np.array([1., 0., 0., 1.], dtype=complex) / np.sqrt(2.)
target_state_2q = Statevector(np.array([1., 0., 0., 1.], dtype=complex) / np.sqrt(2.))
```

として実行するとどうなるでしょうか。エンタングルさせる場合とさせない場合で大きな違いが見えるでしょう。

問題を3量子ビットに拡張し、GHZ状態([単純な量子回路をゼロから書く](https://utokyo-icepp.github.io/qc-workbook/circuit_from_scratch.html#ghz)を参照)

```python
target_state_3q = np.array([1.] + [0.] * 6 + [1.], dtype=complex) / np.sqrt(2.)
target_state_3q = Statevector(np.array([1.] + [0.] * 6 + [1.], dtype=complex) / np.sqrt(2.))
```

をターゲットにするなどして、遊んでみてください。
Expand Down

0 comments on commit 97c5ddd

Please sign in to comment.