Skip to content

Commit

Permalink
checking in updates; vqc_machine_learning still crashing
Browse files Browse the repository at this point in the history
  • Loading branch information
yiiyama committed Apr 5, 2023
1 parent 3046de6 commit 0c96662
Show file tree
Hide file tree
Showing 8 changed files with 461 additions and 181 deletions.
2 changes: 1 addition & 1 deletion source/common/references.bib
Expand Up @@ -235,7 +235,7 @@ @incollection{cobyla
pages = {51--67}
}

@article{PhysRevA.98.032309,
@article{quantum_circuit_learning,
title = {Quantum circuit learning},
author = {Mitarai, K. and Negoro, M. and Kitagawa, M. and Fujii, K.},
journal = {Phys. Rev. A},
Expand Down
Binary file added source/data/vqe_result_1q_estimator.pkl
Binary file not shown.
Binary file added source/data/vqe_result_2q.pkl
Binary file not shown.
Binary file modified source/data/vqe_results.pkl
Binary file not shown.
Binary file added source/data/vqe_results_1q.pkl
Binary file not shown.
Binary file modified source/figs/vqe_u3.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 13 additions & 0 deletions source/ja/python_intro.md
Expand Up @@ -896,6 +896,19 @@ for key, value in d.items():
d.get('that', 39) # 39 (default value)
```

リスト、タプル、辞書などを生成するときに時々使う構文を紹介します。

```{code-cell} ipython3
# list comprehension: 一行の中でforループを回す
list(f'a{i}' for i in range(3)) # ['a0', 'a1', 'a2']
# dictは(キー, 値)のタプルの配列からも生成できる
dict((f'v{i}', i) for i in range(3)) # {'v0': 0, 'v1': 1, 'v2': 2}
# dictのタプル配列からの生成とzipの組み合わせ
dict(zip(['a', 'b', 'c'], [3, 4, 5])) # {'a': 3, 'b': 4, 'c': 5}
```

### NumPy

Pythonで数値計算をする際に今や欠かせない存在になっているのが、NumPy(「なむぱい」もしくは「なむぴー」)ライブラリです。NumPyは基本的には数値の(多次元)配列に対して効率的に数値計算をすることを目的に書かれていますが、サポートされている計算オペレーションの多様さも支持を広げる要因になっています。
Expand Down
627 changes: 447 additions & 180 deletions source/ja/vqe.md

Large diffs are not rendered by default.

0 comments on commit 0c96662

Please sign in to comment.