Hi all,

I would like to propose implementing the ZZFeatureMap encoding for QDP
(GitHub issue #1008, JIRA GSOC-312).

Background
----------
ZZFeatureMap is widely used in quantum machine learning frameworks such as
Qiskit for quantum kernels and variational classifiers. Adding it to QDP
would complete the encoding suite alongside amplitude, angle, basis, and IQP
encodings.

Understanding
-------------
Each repetition layer consists of:

1. Applying Hadamard gates to all qubits
2. Applying RZ(x_i) rotations per feature
3. Applying exp(i x_i x_j Z_i Z_j) ZZ entangling interactions
4. Supporting configurable entanglement patterns (full, linear, circular)

Implementation Plan
-------------------

1. Rust Encoder
   - Implement QuantumEncoder trait
   - File: qdp-core/src/gpu/encodings/zzfeaturemap.rs
   - Parameters: num_qubits, reps, entanglement enum

2. CUDA Kernel
   - File: qdp-kernels/src/zzfeaturemap.cu
   - Parallel RZ application
   - Efficient ZZ interaction implementation
   - Optimized memory access for NVIDIA 30-series GPU
   (I have access to a compatible GPU.)

3. Python Bindings
   - Integrate via existing QDP API
   - Expose reps and entanglement configuration

4. Testing
   - Validate against Qiskit reference implementation
   - Numerical tolerance comparison
   - Unit tests for multiple entanglement modes

I would appreciate feedback on:
- Preferred API design for entanglement configuration
- Any architectural constraints to consider before implementation
- Whether exact Qiskit parity is desired or QDP-style adaptation

Looking forward to your feedback.

Best regards,
Alisha Gupta

Reply via email to