HHLでの固有値反転のゲートレベルの実装
HHLアルゴリズムの固有値反転ステップのゲートレベルの実装がどのように機能するかを理解しようとしています。
私はこの参考文献に従っており、これは制御された回転を使用することで達成できると述べられています(補題4)。
$$ U_\theta: |\widetilde{\theta} \rangle |0 \rangle \rightarrow |\widetilde{\theta} \rangle \left(\cos \widetilde{\theta} |0\rangle + sin \widetilde{\theta} |1 \rangle \right ) $$
$$U_\theta = \sum_{\widetilde{\theta} \in \{0,1\}^n} |\widetilde{\theta}\rangle \langle \widetilde{\theta}| \otimes \exp \left(-i \widetilde{\theta} \sigma_y \right) $$
どこ $\widetilde{\theta}$ は角度のnビット有限精度表現です $\theta$、および $\sigma_y$ Yパウリ行列。
私の質問は、回転角はどうですか? $\widetilde{\theta}$ ユニタリーのために $U_\theta$ 固有値の事前知識なしで計算/適用 $\lambda_j$ システムマトリックスの $A$?
私は状態ベクトルを理解しています $|\widetilde{\theta} \rangle$ 固有値を抽出することにより、アルゴリズムの前のステップで取得されます $|\lambda_j \rangle$ の $A$ using QPE (and then applying an inverse + arcsin function as described here), but I am not sure how are these angles also applied as the parameters for the controlled-rotation gates (exponent parameter in $U_\theta$.)
FYI, I did see this other post where it is stated: "You... ...have (at least a good approximation to) your eigenvalues recorded on a register. If you control off that register, you can use it to decide the angle of the rotation for each eigenvector."
So my question is how do you "use it [the register containing $|\widetilde{\theta} \rangle$] to decide the angle of the rotation [$\widetilde{\theta}$ in the $\exp$ function of $U_\theta$]"?
Thanks!
回答
Using the register to decide the angle of rotation means the following: you have a register $|\tilde{\theta}\rangle$ (composed of potentially more than one qubit) and you apply rotations of another register controlled on the value of the qubits of $|\tilde{\theta}\rangle$. Different rotations that you apply result in different functions being implemented on your ancilla qubits. But that was possibly already known to you.
The question of which rotations to do for applying a specific function is much more complicated, and I am not aware of any general solution. For once, Qiskit has its own implementation of HHL, but I don't know up to which point it is general. There are however, other examples in which it is "easy" to implement, for instance, the eigenvalue inversion function required for HHL. In this paper, the authors implement an approximation of the eigenvalue inversion subroutine (the code in Quil
can be found in the associated GitLab repository) that is exact in the case of eigenvalues that are powers of 2. The reason why it is exact for powers of 2 is because in that case the inversion can be written as a combination of bit swaps, so the eigenvalue inversion subroutine is a collection of controlled SWAP gates (a pictorial representation of the circuit is in Fig. 3 in this paper). But, as I said before, I am not aware of general ways of implementing large classes of functions, so far.