qiskit-metapackage
qiskit-metapackage copied to clipboard
Solving combinatorial optimization problems using QAOA
In the example in the documentation of "https://qiskit.org/textbook/ch-applications/qaoa.html", the mixing and problem unitary are written as:
qc_mix.rx(2 * beta, i)
qc_p.rzz(2 * gamma, pair[0], pair[1])
Would you please let me know why the parameters "gamma" and "beta" are multiplied by 2. Thanks
It's because you want the expression \exp(-i \beta X), but the RX gate is defined as RX(\theta) = \exp(-i \theta X / 2) (and similar for ZZ) both in the literature and in Qiskit.