haiqu.vector_loading() to generate an arbitrary quantum state from a vector of amplitudes.
For a 12-qubit sin wave, traditional amplitude encoding requires 4083 CNOT gates and 4083 two-qubit gate depth. Haiqu’s method prepares the same state with 21 CNOT gates (194.4x improvement) and 11 two-qubit gate depth (371.2x improvement).
haiqu.vector_loading()
What does it do? Vector loading prepares a quantum state, which amplitudes match a given data vector. How do I use it? Pass a real or complex vector to create a data loading job, then retrieve results with job.result(). What are the options? Optional parameters include various hyperparameters for circuit synthesis such as num_layers, truncation_cutoff and fine_tuning_iterations. Which option do you recommend? Start with the default settings for basic use cases. Observe the state fidelity returned by the job result and increase number of layers and fine tuning iterations if necessary to achieve a better precision.
Having a bug or an issue?
Submit feedback
Initialize the benchmark
Import the necessary libraries, initialize the Haiqu SDK, create a desired quantum state.