Skip to main content
haiqu.state_compression(): compression_level Use the compression_level parameter in haiqu.state_compression() to control the trade-off between circuit compression and state quality. For a 15-step Heisenberg evolution circuit, compression level can reduce the number of noisy two-qubit gates by as much as 71%. Having a bug or an issue? Submit feedback haiqu.state_compression(): compression_level What does it do? This parameter controls how much of the circuit is compressed, balancing circuit size reduction with state quality. Higher compression reduces more gates but may decrease the quality of the compressed state. How do I use it? Pass compression_level as a parameter to haiqu.state_compression() when creating a compression job, then retrieve results with job.result(). What are the options? low – prioritizes quality over compression. Best for shallow circuits or low noise levels. balanced (default) – best performance for most circuits and noise profiles. high – compresses more of the circuit while maintaining acceptable quality. Best for very deep circuits. Which option do you recommend? Start with the default balanced setting for most use cases. Use low when state quality is critical and circuits are already shallow. Use high for very deep circuits where maximum compression is needed and some quality trade-off is acceptable. Initialize the benchmark Import the necessary libraries, initialize the Haiqu SDK, and create an adder circuit to demonstrate state compression. The adder circuit adds two integers m and k.
Run benchmark scenarios Run experiments comparing original circuit, compressed circuit, and compressed circuit with mitigation on a noisy device:
compression_level significantly changes the gates and depth reduction in the circuit. Summary of results:
Get in Touch Documentation portal docs.haiqu.ai Contact Support feedback.haiqu.ai Follow Us on LinkedIn latest news on LinkedIn Visit Our Website Learn more about Haiqu Inc. on haiqu.ai Business Inquiries Contact us at info@haiqu.ai