iqm.qaoa.tree_calculation.tree_calculation

iqm.qaoa.tree_calculation.tree_calculation#

The main module for the tree angle calculation.

Functions

a24_a25(a_m, a_minus_m, b_m_minus_1, ...)

Calculates the term surrounded in the big parentheses in equations A24 and A25.

big_g(a_t, beta_t)

Calculates the function \(G(a_t)\) from equations (A45) and (A46) from [].

big_g_tilde(a_t, beta_t)

Calculates the function \(\tilde{G}(a_t)\) from equations (A47) and (A48) from [].

exp_gamma(big_d, h, big_gamma_pruned, a, b)

Calculates the complex exponential in the 2nd half of (A23).

get_big_h_fixed_points_from_scratch(p, ...)

Recursively implements equations (A23), (A24) and (A25) to obtain the fixed points of the calculation.

get_exp_vals(p, big_d, h, big_gamma, big_beta)

Calculates the expectation values of <Z> and <ZZ> terms.

get_f(p, a, big_beta)

Represents the function \(f(\mathbb{a})\) defined in (9) and (10) in [7].

pair(ai, aj, beta_i)

Represents the equation (A12) in [7].

prune_angles(layer, big_gamma, big_beta)

The function to take the full array of Gamma / Beta angles and shorten them to those relevant for layer layer.

small_g(m_minus_1, b, big_beta)

Represents the function \(g(b^{(m-1)})\) defined in (A26) in [7].