Skip to content

Instantly share code, notes, and snippets.

@hariby
Last active June 25, 2021 06:07
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hariby/7d4c354152d76d98bd4bf9f7562362ca to your computer and use it in GitHub Desktop.
Save hariby/7d4c354152d76d98bd4bf9f7562362ca to your computer and use it in GitHub Desktop.

Amazon Braket を使った量子機械学習入門 2

2021-06-25

Time Table

前半 (実機を使ったハンズオン)

ログイン方法などは前回のノートを参照。

後半 (量子機械学習)

宿題

  • Q1. 前回の演習 PennyLane 0_Getting_started.ipynb で扱った回路の最適解 -1 を与えるパラメータは、RX(0), RY($\pi$) でした。これが最適であることを、Amazon Braket Python SDK を使って確認しましょう。

  • Q2. 最適化されたパラメータ res.x を利用して、トレーニングデータセットに入っていない 10-bit 文字列に対する QNN の予測結果を確認してみましょう。そして、平均二乗誤差を計算しましょう。

    • ヒント: 正解ラベルはビット列のパリティを使うようになっています。
  • Q3 (おまけ). 量子機械学習のアルゴリズムを (既存手法何でもいいので好きに選んで) PennyLane や Amazon Braket Python SDK を使って実装してみよう。既存の実装 (e.g. Qulacs) を PennyLane で書き換える、というのでも大丈夫です。

参考文献

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment