qrao.QuantumRandomAccessOptimizer

class QuantumRandomAccessOptimizer(min_eigen_solver, encoding, rounding_scheme=None)[source]

Quantum Random Access Optimizer.

Parameters:
  • min_eigen_solver (Union[MinimumEigensolver, MinimumEigensolver]) – The minimum eigensolver to use for solving the relaxed problem (typically an instance of VQE or QAOA).

  • encoding (QuantumRandomAccessEncoding) – The QuantumRandomAccessEncoding, which must have already been encode()``ed with a ``QuadraticProgram.

  • rounding_scheme (Optional[RoundingScheme]) – The rounding scheme. If None is provided, SemideterministicRounding() will be used.

__init__(min_eigen_solver, encoding, rounding_scheme=None)[source]
Parameters:
  • min_eigen_solver (Union[MinimumEigensolver, MinimumEigensolver]) – The minimum eigensolver to use for solving the relaxed problem (typically an instance of VQE or QAOA).

  • encoding (QuantumRandomAccessEncoding) – The QuantumRandomAccessEncoding, which must have already been encode()``ed with a ``QuadraticProgram.

  • rounding_scheme (Optional[RoundingScheme]) – The rounding scheme. If None is provided, SemideterministicRounding() will be used.

Methods

__init__(min_eigen_solver, encoding[, ...])

type min_eigen_solver:

Union[MinimumEigensolver, MinimumEigensolver]

get_compatibility_msg(problem)

Checks whether a given problem can be solved with the optimizer implementing this method.

is_compatible(problem)

Checks whether a given problem can be solved with the optimizer implementing this method.

solve([problem])

Tries to solves the given problem using the optimizer.

solve_relaxed()

Solve the relaxed Hamiltonian given the encoding provided to the constructor.

Attributes

encoding

The encoding.

min_eigen_solver

The minimum eigensolver.