haiqu.block_vector_loading() to generate a quantum state for 1D and 2D large vectors with high fidelity. It slices the input vector or matrix into blocks, which are encoded independently. The method introduces a trade-off between loading smaller and simpler vectors into a quantum state but requiring more qubits to do so.
For the 64x64 pixels image Vector Loading prepares a state with ~87% fidelity, while Block Vector Loading achieves ~97% fidelity.
haiqu.block_vector_loading()
What does it do? Block Vector loading prepares a quantum state, which amplitudes match a given data vector, sliced into multiple blocks. How do I use it? Pass a real or complex vector or matrix and desired number of blocks 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 few blocks and observe the state fidelity returned by the job result as well as number of qubits required. If needed try to increase amount of blocks and synthesis parameters to achieve the desired fidelity.
Having a bug or an issue?
Submit feedback
Initialize the benchmark
Import the necessary libraries, initialize the Haiqu SDK, create a desired quantum state.