Skip to content

Solution estimator#16

Open
GeneralKenobiJP wants to merge 5 commits into
mainfrom
solution-estimator
Open

Solution estimator#16
GeneralKenobiJP wants to merge 5 commits into
mainfrom
solution-estimator

Conversation

@GeneralKenobiJP

@GeneralKenobiJP GeneralKenobiJP commented Jan 19, 2026

Copy link
Copy Markdown
Owner

Closes #5

  • Implemented a SolutionEstimator class that estimates the number of solutions and outputs results in a dictionary that maps the estimate to the counts
  • Added some tests that check some helper methods, make sure that the solution does not yield exception, and check if the outputs make some rough sense (technically the last ones are somewhat arbitrary and theoretically flaky, but I think they make some sense as a guideline)

BUG(?) & Notes:

  • Take an example instance of ([2,3,4,5], target = 14), bit_accuracy=6, eps=1/8. There is 1 solution, note that 14 is the max sum. The SolutionEstimator will output 1 and 15 as top answers with high margin over other outputs but little difference between the two. This happens for various if not all inputs. This maybe due to not implementing the oracle augmentation that the book speaks of, or maybe it is something inherent to the algorithm, I am unsure.
  • I was not able to implement oracle augmentation (adding another qubit to the oracle to double its search space) so that it gives reasonable output. I may have been doing something wrong
  • Using qiskit's built-in QPE (phase_estimation) has never resulted in a reasonable output for some reason, therefore I use my own QPE
  • Computational cost of stacking the Grover operators is quite high (it scales exponentially with the length of the counting register)

@GeneralKenobiJP GeneralKenobiJP self-assigned this Jan 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make a SolutionEstimator using phase estimation

1 participant