A key challenge in quantum machine learning (QML) applications is efficiently encoding classical data into quantum states. The trivial amplitude encoding, while requiring only a logarithmic number of qubits, results in deep circuits and low fidelity on quantum devices. The angular encoding, on the other hand, only allows encoding linearly many features (in the number of qubits), which is insufficient for most real-life datasets. Haiqu SDK contains feature loading methods, which address both of these limitations:Documentation Index
Fetch the complete documentation index at: https://docs.haiqu.ai/llms.txt
Use this file to discover all available pages before exploring further.
Entanglied Manifold Embedding and Block Vector Loading.
Entangled Manifold Embedding
Haiqu SDK introduces a novel feature loading methodEntangled Manifold Embedding. It embeds a classical feature vector in a sub-manifold of the full Hilbert space, consisting of states of a controllable entanglement. Each classical feature corresponds to a degree of freedom in this sub-manifold, independently and non-linearly affecting the resulting quantum state, which is synthesized into compact, linear-in-depth circuits.
The complexity of the encoding, or equivalently the entanglement is controlled by the feature density parameter . The number of features, which is possible to encode using qubits is approximately equal to . To encode a fixed number of features the user can set either the density or the desired number of qubits (the minimal possible density is then chosen automatically). When the Entangled Manifold Embedding is equivalent to the angular encoding.
To encode a real feature vector simply call haiqu.entangled_manifold_embedding(...).
The estimations are approximate and take into account the number of qubits available on the devices, and device’s Quantum Volume. The latter defines the largest random circuit of equal width and depth, which can be successfully run on a device with certain precision, and effectively quantifies the sensitivity of the device to noise. Large noise can effectively blur the distinction between different feature vectors.
| Hardware | D=2 | D=4 | D=8 |
|---|---|---|---|
| IBM Heron | 544 | 1,622 | 4,342 |
| IQM Emerald | 191 | 570 | 1,209 |
| IonQ Forte 1 | 129 | 380 | 779 |
| Rigetti Ankaa-3 | 303 | 891 | 834 |
| OQC Toshiko | 118 | 336 | 318 |
Block Vector Loading
Encoding a dataset of size with amplitude encoding requires qubits and may generate exponentially deep circuits to achieve high fidelity.Block Vector Loading encodes the data by splitting it into smaller blocks and loading them independently. It results in shallower quantum circuits at the cost of using more qubits. This approach introduces a practical trade-off between qubit count and fidelity.
Block Vector Loading enables data preparation for utility scale QML, particularly when the spatial dependencies within the data need to be preserved (e.g. for images).
To block-encode classical data vectors into a quantum state callhaiqu.block_vector_loading(...). For example,
HaiquCircuitGate with fidelity close to 1.
Entangled Manifold Embedding specifications
| Parameter | Details |
|---|---|
| Number of qubits | Up to 1000 qubits |
| Input data | 1D vector |
| Data type | Real values |
| Data size | Up to ~1M features in the vector |
| Density | From 1 to 8 |
| Runtime | 1-10 seconds with no fine-tuning; up to 2 minutes with fine-tuning |
| 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, arbitrary between blocks |
| 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 |