Loading the data vector
Here we introduce another loading procedure available in Haiqu SDK -Vector Loading — the process of embedding a classical data vector directly into the amplitudes of a quantum state resulting in compact, linear in depth, circuits.
The Haiqu SDK allows you to prepare custom quantum states from classical vectors by calling haiqu.vector_loading(...).
Data vector could be real or complex valued one-dimensional vector, which contains values to encode in the amplitudes. The function automatically adjusts to the closest minimal necessary number of qubits. Current supported max size of the vector is .
VectorLoadingBasics.ipynb.
Loading of utility-scale data vectors
Vector encoding of a dataset of size N requires qubits and often leads to deep circuits to achieve high fidelity of data state preparation. By splitting the data vector into smaller blocks, each block contains less data, making it easier to encode. This approach introduces a practical trade-off between qubit count and fidelity:More blocks → more qubits → shallower circuits → higher fidelity.
haiqu.block_vector_loading(...). For example,
gate circuit with fidelity close to .
For more details explore practical notebook BlockVectorLoadingBasics.ipynb.
Vector Loading specifications
| Parameter | Details |
|---|---|
| Number of qubits | Up to 20 qubits |
| Input data | 1D vector |
| Data type | Real and complex values |
| Data size | Up to ~1M features in the vector |
| Runtime | 0.5–2 minutes |
| Runtime scaling | Linear scaling with number of qubits |
| Circuit size (gates count) | O(n), n = number of qubits |
| Circuit depth | O(n/2), n = number of qubits |
| Circuit connectivity | Linear |
| Other circuit properties | - No mid-circuit measurements - Only CNOT and single-qubit rotation gates - No ancilla qubits - No post-selection required in state preparation |
| Returned metrics | Quantum state fidelity is returned for the ideal state prepared by the circuit |
Block Vector Loading specifications
| Parameter | Details |
|---|---|
| Number of qubits | 1000+ qubits; no more than 20 qubits for a single block |
| Input data | 1D vector 2D matrix |
| Data type | Real and complex values |
| Data size | Any, with no more than ~1M features for a single block |
| Runtime | 0.5–2 minutes per block |
| Runtime scaling | Linear scaling with number of qubits |
| Circuit size (gates count) | O(n), n = number of qubits |
| Circuit depth | O(m/2), m = number of qubits in each block |
| Circuit connectivity | Linear within each block |
| Other circuit properties | - No mid-circuit measurements - Only CNOT and single-qubit rotation gates - No ancilla qubits - No post-selection required in state preparation |
| Returned metrics | Quantum state fidelity is returned for the ideal state prepared by the circuit |