From 97c5dddfc950fc24ed58870a18dd9ae43da5c400 Mon Sep 17 00:00:00 2001 From: Yutaro Iiyama Date: Mon, 22 May 2023 14:43:13 +0900 Subject: [PATCH] was missing Statevector() --- source/ja/dynamics_simulation.md | 2 +- source/ja/vqe.md | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/source/ja/dynamics_simulation.md b/source/ja/dynamics_simulation.md index 3260cd76..829d7558 100644 --- a/source/ja/dynamics_simulation.md +++ b/source/ja/dynamics_simulation.md @@ -19,7 +19,7 @@ language_info: name: python nbconvert_exporter: python pygments_lexer: ipython3 - version: 3.10.6 + version: 3.8.10 --- # 物理系を表現する diff --git a/source/ja/vqe.md b/source/ja/vqe.md index a12285c0..856aa9ea 100644 --- a/source/ja/vqe.md +++ b/source/ja/vqe.md @@ -599,7 +599,7 @@ 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.)) ``` として実行するとどうなるでしょうか。エンタングルさせる場合とさせない場合で大きな違いが見えるでしょう。 @@ -607,7 +607,7 @@ target_state_2q = 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.)) ``` をターゲットにするなどして、遊んでみてください。