The typical interface in Qiskit Optimzation for performing a quantum optimization is the OptimizationAlgorithm.solve(problem: QuadraticProgram) method. However, a lot happens "underneath the hood" when calling this, and when developing this prototype, we wanted to give users a bit more control over and understanding of what is happening. For instance, if one simply calls this method, they have no way of knowing beforehand how many qubits are necessary for the computation, so they won't know if it can run on a given piece of hardware until they try. So, we provided a more "explicit" interface, where the user must construct the QuantumRandomAccessEncoding explicitly, encode() it with a QuadraticProgram, and then pass it when constructing the optimizer.
However, it would be nice to implement the standard, implicit interface as well. One benefit is that users would then be able to use QRAO with the ADMM optimizer (and we should add a test case for this, once it becomes possible). Another benefit is that it is a prerequisite in case we want to enable the implicit conversion of any convertible QuadraticProgram into a QUBO (#10), just as the other optimization algorithms permit.
What is the expected enhancement?
The typical interface in Qiskit Optimzation for performing a quantum optimization is the
OptimizationAlgorithm.solve(problem: QuadraticProgram)
method. However, a lot happens "underneath the hood" when calling this, and when developing this prototype, we wanted to give users a bit more control over and understanding of what is happening. For instance, if one simply calls this method, they have no way of knowing beforehand how many qubits are necessary for the computation, so they won't know if it can run on a given piece of hardware until they try. So, we provided a more "explicit" interface, where the user must construct theQuantumRandomAccessEncoding
explicitly,encode()
it with aQuadraticProgram
, and then pass it when constructing the optimizer.However, it would be nice to implement the standard, implicit interface as well. One benefit is that users would then be able to use QRAO with the ADMM optimizer (and we should add a test case for this, once it becomes possible). Another benefit is that it is a prerequisite in case we want to enable the implicit conversion of any convertible
QuadraticProgram
into a QUBO (#10), just as the other optimization algorithms permit.Potentially related: https://github.com/Qiskit/qiskit-optimization/issues/325, if it results in a more general overhaul of the
solve()
interface.