haiqu.postprocess() to improve optimization results through classical post-processing.
For a 120-qubit QUBO problem, without post-processing we find a suboptimal solution. With post-processing, we achieve the optimal solution—no additional quantum circuit runs required.
Having a bug or an issue?
Submit feedback
haiqu.postprocess()
What does it do? Applies classical heuristics (e.g., bit-flip search) to measured bitstrings to find a better solution to the QUBO problem. How do I use it? Pass counts or probability distribution obtained by running circuits on any backend, and pass the corresponding QUBO problem object, then call postprocess(). What are the options?
postprocess_iterations (default 5) – controls the number of optimization passes. seed (optional) – set for reproducible post-processing results.
Which options do you recommend? Start with lowest postprocess_iterations=1; increase to 10 to see how it improves the solution quality. Set seed (e.g., seed=34) when you need reproducible post-processing results.
Initialize the benchmark
Import the necessary libraries, initialize the Haiqu SDK, and load a 120-qubit QUBO problem. We’ll compare raw quantum results against post-processed results.