qiskit-algorithms icon indicating copy to clipboard operation
qiskit-algorithms copied to clipboard

[from qiskit] Two small improvements for EstimationProblem

Open ElePT opened this issue 1 year ago • 1 comments

What should we add?

Hello, I would like to suggest two small improvements:

  • The EstimationProblem, when not explicitely given a Grover oracle, automatically produces one. Unfortunately, this standard oracle uses the multi-controlled NOT with 'noancillas' mode (lines 168 and 172), which is highly inefficient in terms of circuit depth (it scales as 2**n, where n is the number of qubits, while other implementations scale as n, at the expense of a higher width - refer to mcx). This behavior is very bad as it may strongly affect the performances in applications. I suggest we expose the mcx_mode in the EstimationProblem function, as currently done in GroverOperator. We shall also discuss which value should be the default for mcx_mode: 'noancillas' for backward compatibility?
  • The EstimationProblem has a parameter is_good_state, but the standard QAE is not able to handle it, for obvious reasons. This fact is very confusing. I think we should have a variable to keep trace whether is_good_state is not the default one, and AmplitudeEstimation should throw an exception if given an EstimationProblem with a user-defined is_good_state

I can contribute with the code, if you agree.

ElePT avatar Aug 22 '23 09:08 ElePT