Skip to main content
IBM Quantum Platform

qiskit.circuit.library.excitation_preserving

qiskit.circuit.library.excitation_preserving(num_qubits, mode='iswap', entanglement='full', reps=3, skip_unentangled_qubits=False, skip_final_rotation_layer=False, parameter_prefix='θ', insert_barriers=False, name='ExcitationPreserving')

GitHub

発見的励起保存波動関数アサッツ。

excitation_preserving 回路は、 00|00\rangle01+10|01\rangle + |10\rangle11|11\rangle の各状態の比率を保持する。 この目的のために、この回路は次のような形の2量子ビット相互作用を用いる

(10000cos(θ/2)isin(θ/2)00isin(θ/2)cos(θ/2)0000eiϕ)\providecommand{\rotationangle}{\theta/2} \begin{pmatrix} 1 & 0 & 0 & 0 \\ 0 & \cos\left(\rotationangle\right) & -i\sin\left(\rotationangle\right) & 0 \\ 0 & -i\sin\left(\rotationangle\right) & \cos\left(\rotationangle\right) & 0 \\ 0 & 0 & 0 & e^{-i\phi} \end{pmatrix}

モード "fsim" の場合は eiϕ=1e^{-i\phi} = 1 を、モード "iswap" の場合は を使用する。

UCC-ansatzesのような他の波動関数も励起を保存することに注意。 しかし、これらの回路はすぐに複雑になってしまう。

この試行波動関数は、 ZZ の回転と2量子ビットのエンタングルメントからなる層で構成されています。 このエンタングルメントは、 XX+YYXX+YY の回転を用いて生成され、必要に応じてモードに対して位相制御 "fsim"ゲートが適用される。

例:

線形エンタングルメントでは、この回路は次式で与えられる:

from qiskit.circuit.library import excitation_preserving

ansatz = excitation_preserving(3, reps=1, insert_barriers=True, entanglement="linear")
ansatz.draw("mpl")
先のコードで出力された回路図。

エンタングルメント構造は、 entanglement 引数で明示的に指定することができる。 "fsim" モードには、各ブロックにパラメータ化された CPhaseGate が追加されています:

ansatz = excitation_preserving(3, reps=1, mode="fsim", entanglement=[[0, 2]])
ansatz.draw("mpl")
先のコードで出力された回路図。先のコードで出力された回路図。

パラメーター

  • num_qubits (int) – 量子ビットの数。
  • mode (str) – iswap "または "fsim "のエンタングラーモードを選択する。
  • reps (int) – 回転層の後にエンタングルメント層が続く構造が繰り返される頻度を指定する。
  • entanglement (str |Iterable[Iterable[int]] | Iterable[str |Iterable[Iterable[int]]] | Callable[[int], str |Iterable[Iterable[int]] | Iterable[str |Iterable[Iterable[int]]]]) – 入力ブロックが作用する量子ビットを指定するインデックス。 詳細については、を n_local() 参照してください。
  • skip_final_rotation_layer (bool) – 回路に最終回転層を追加するかどうか。
  • skip_unentangled_qubits (bool) – True の場合、回転ゲートはエンタングルされた量子ビットにのみ作用する。 False の場合、回転ゲートはすべての量子ビットに作用する。
  • parameter_prefix (str) – 自由パラメーターの名前。
  • insert_barriers (bool) – Trueの場合、各レイヤーの間にバリアが挿入される。 False の場合、バリアは挿入されない。
  • name (str) – 回路の名前。

戻り値

励磁保存回路。

戻りの型

QuantumCircuit

このページは役に立ちましたか?
バグや誤字の報告、またはコンテンツの要求はGitHubで行ってください。