Skip to content

Instantly share code, notes, and snippets.

@koba-e964
Last active March 6, 2019 04:30
Show Gist options
  • Save koba-e964/3822cc4f57760f24b15c20b4ca8727fb to your computer and use it in GitHub Desktop.
Save koba-e964/3822cc4f57760f24b15c20b4ca8727fb to your computer and use it in GitHub Desktop.
B1: 状態が直交しているので頑張ればできる。頑張ってpsi0を純粋状態に変換するとpsi1はそれと直交する別の状態になるので区別できる
PrepareArbitraryState君マジ神
B2: 難しい
C2: 2n qubits 使うとTLEなので3n/2 qubitでやる(つらい)
C3: ライブラリを使うのは甘え、自分で書け(TLEつらい)
D2: 下位ビットから見ていって適切なポイントで全H
D6: Givens transformationを連鎖させればよい。IntegerIncrementLEとかを使うと遅いので自前でDecrementを実装&&ControlledOnBitStringでやる
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment