paddle_quantum.biocomputing.algorithm

VQE algorithm to solve protein folding problem

class paddle_quantum.biocomputing.algorithm.ProteinFoldingSolver(penalty_factors, alpha, optimizer, num_iterations, tol=1e-08, save_every=1)

Bases: VQESolver

Parameters:
  • penalty_factors (List[float]) – penalty factor [lambda0, lambda1] used in building the protein’s Hamiltonian.

  • alpha (float) – the cutoff probability for CVaR expectation value calculation.

  • optimizer (Optimizer) – paddle’s optimizer used to perform parameter update.

  • num_iterations (int) – number of VQE iterations.

  • tol (float) – convergence criteria.

  • save_every (int) – number of steps between two recorded VQE loss.

solve(protein, ansatz, **optimizer_kwargs)

Run VQE to calculate the structure of the protein that satisfies various constraints.

Parameters:
Returns:

A tuple contains the final loss value and optimal basis state.

Return type:

Tuple[float, str]