haiqu.run(use_mitigation=True).
Haiqu SDK can automatically apply lightweight error mitigation to both sampling and expectation value estimation tasks For an adder circuit starting at around 17.3% success probability, mitigation can boost the success probability significantly up to 85% (4.9x)
Having a bug or an issue?
Submit feedback
haiqu.run(use_mitigation=True)
What does it do? This parameter enables quantum error mitigation when executing quantum circuits on supported devices, helping to improve the accuracy of results. How do I use it? You just need to set use_mitigation=True when calling haiqu.run(). The mitigation process will be applied automatically if supported by the backend. What are the options? Currently there are not additional options available for error mitigation. Customizable EM pipeline options will be added in future releases. Which option do you recommend? Start with testing out error mitigation on small scale sampling tasks. Then move to mitigating expectation values of observables and more complex circuits as you gain confidence.
Initialize the example
Import the necessary libraries, initialize the Haiqu SDK, and create a quantum circuit to demonstrate error mitigation. In this example we return to using quantum adder circuit. The adder circuit adds two integers m and k.
options parameter of the haiqu.run() function. We will use fake_torino as a device for demonstration purposes, but you can replace it with the real ibm_torino (or any other device) from the list obtained from using haiqu.list_devices() or haiqu.list_simulators(), as long as you have access to it.