qiskit-metapackage icon indicating copy to clipboard operation
qiskit-metapackage copied to clipboard

Solving combinatorial optimization problems using QAOA

Open saraphys opened this issue 3 years ago • 1 comments

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

saraphys avatar Jan 11 '22 23:01 saraphys

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.

jakelishman avatar Feb 04 '22 16:02 jakelishman