haiqu.distribution_loading() to efficiently prepare a probability distribution in a quantum state.
Loading a log-normal distribution on 12 qubits traditionally requires 4083 CNOT gates and a two-qubit gate depth of 4083. With Haiqu, the same distribution is prepared using only 21 CNOT gates (~200x improvement) and a two-qubit gate depth of 11 (>350x improvement).
haiqu.distribution_loading()
What does it do? Distribution loading prepares a quantum state whose measurement statistics match a desired probability density function. How do I use it? Pass a scipy distribution name, its parameters and intervals, and size of the quantum register to haiqu.distribution_loading(). This will create a data loading job. The results can be retrieve with job.result().
What are the options? num_layers and truncation_cutoff for controling circut synthesis. Which option do you recommend? Start with the default settings. num_layer = 2 is usually more than enought for most distributions.
Having a bug or an issue?
Submit feedback
Initialize the benchmark
Import the necessary libraries, initialize the Haiqu SDK.