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 ofVQEorQAOA).encoding (
QuantumRandomAccessEncoding) – TheQuantumRandomAccessEncoding, which must have already beenencode()``ed with a ``QuadraticProgram.rounding_scheme (
Optional[RoundingScheme]) – The rounding scheme. IfNoneis 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 ofVQEorQAOA).encoding (
QuantumRandomAccessEncoding) – TheQuantumRandomAccessEncoding, which must have already beenencode()``ed with a ``QuadraticProgram.rounding_scheme (
Optional[RoundingScheme]) – The rounding scheme. IfNoneis 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
encodingprovided to the constructor.Attributes
encodingThe encoding.
min_eigen_solverThe minimum eigensolver.