Skip to content

Nithinsaim/Quantum-Encryption-QFT-Taylor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

6 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ” Quantum Encryption Scheme Based on Taylor Series & Fourier Transform

Published in IEEE | Amrita Vishwa Vidyapeetham, Coimbatore

Python Qiskit IEEE Accuracy


πŸ“„ Abstract

This paper proposes a novel quantum encryption scheme combining Quantum Fourier Transform (QFT), Taylor Series, and quantum gates to establish a secure, key-based encryption and decryption pipeline. The scheme is designed to enable privacy-preserving machine learning and federated learning by performing computations directly on encrypted data using CKKS-based Homomorphic Encryption.

The proposed approach achieves identical accuracy on encrypted vs plaintext inference β€” 96.60% accuracy on a 2000-sample diabetes dataset β€” demonstrating that secure computation does not compromise model performance.


πŸ—οΈ System Architecture

Classical Data
      β”‚
      β–Ό
Ry Gates (encode data into quantum states)
      β”‚
      β–Ό
Quantum Fourier Transform (QFT) β€” domain transformation
      β”‚
      β–Ό
Rz Gates (public key β€” Euler phase shifts)
      β”‚
      β–Ό
Rx Gates (secret signal embedding from Taylor series)
      β”‚
      β–Ό
Encrypted Quantum State β†’ Measurement (1024 shots)
      β”‚
      β–Ό
Inverse QFT + Remove Taylor signal β†’ Decrypted State

πŸ“ Repository Structure

Quantum-Encryption-QFT-Taylor/
β”œβ”€β”€ README.md
β”œβ”€β”€ requirements.txt
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ ckks_encryption.py       # CKKS scheme with TenSEAL
β”‚   β”œβ”€β”€ quantum_circuit.py       # QFT + gate-based encryption circuit
β”‚   β”œβ”€β”€ taylor_keygen.py         # Taylor series private key generation
β”‚   β”œβ”€β”€ homomorphic_inference.py # Encrypted model inference
β”‚   └── evaluate.py              # Accuracy comparison: plaintext vs encrypted
β”œβ”€β”€ notebooks/
β”‚   └── Quantum_Encryption_Demo.ipynb
β”œβ”€β”€ results/
β”‚   β”œβ”€β”€ encrypted_state_distribution.png
β”‚   β”œβ”€β”€ decrypted_state_distribution.png
β”‚   └── classification_report.txt
β”œβ”€β”€ images/
β”‚   └── quantum_circuit_diagram.png
└── LICENSE

βš™οΈ Methods

1. CKKS Homomorphic Encryption

Parameter Value
Scheme CKKS (Cheon-Kim-Kim-Song)
Poly Modulus Degree 8192
Coeff Mod Bit Sizes [60, 40, 40, 60]
Global Scale 2^40
Library TenSEAL (Python)
  • Supports approximate arithmetic on encrypted real-valued data
  • Galois keys generated for rotation operations
  • Plaintext β†’ polynomial encoding β†’ encryption β†’ homomorphic ops β†’ decrypt

2. Proposed Quantum Encryption Scheme

Component Role
Ry Gates Encode classical data into quantum states
QFT Transform data into frequency domain
Rz Gates Apply public key (Euler phase shifts)
Rx Gates Embed Taylor series secret signal
Measurement 1024 shots over basis states {

3. Taylor Series Key Generation

The private key is derived from a Taylor expansion:

f(x) = Ξ£ (f^n(a)/n!) * (x-a)^n

The function f and expansion terms are known only to the key holder. The generated signal is added to data before QFT transformation.


πŸ“Š Results

CKKS Encrypted Inference β€” Diabetes Dataset

Metric Plaintext Encrypted
Accuracy (100 samples) 97.00% 97.00%
Accuracy (2000 samples) 96.60% 96.60%

Zero accuracy loss under homomorphic encryption β€” privacy-preserving inference confirmed.

Classification Report (Logistic Regression on Encrypted Data)

Class Precision Recall F1-Score Support
0 0.85 0.79 0.82 192
1 0.98 0.99 0.98 1808

Quantum State Measurement (1024 shots)

Quantum State Decrypted Encrypted
|00⟩ 277 246
|01⟩ 251 255
|10⟩ 236 246
|11⟩ 260 277

Near-uniform distributions confirm successful encryption. Decrypted distribution recovers original state.


πŸš€ Getting Started

pip install -r requirements.txt

Run CKKS Encrypted Inference

python src/homomorphic_inference.py --dataset diabetes

Run Quantum Circuit Demo

python src/quantum_circuit.py --shots 1024

Evaluate Plaintext vs Encrypted Accuracy

python src/evaluate.py

πŸ“¦ Requirements

tenseal==0.3.14
qiskit==0.44.1
numpy==1.24.3
scikit-learn==1.3.0
pandas==2.0.3
matplotlib==3.7.2

πŸ‘₯ Authors

Name Roll No.
Hari Sudharsan G CB.AI.U4AIM24113
Nithin S CB.AI.U4AIM24133
Amirthavarshini B CB.AI.U4AIM24154
Devadharshini M CB.AI.U4AIM24126

Institution: Amrita Vishwa Vidyapeetham, Coimbatore


πŸ“š Citation

@inproceedings{harisudharsan2024quantum,
  title     = {Quantum Encryption Scheme based on Taylor Series and Fourier Transform},
  author    = {Hari Sudharsan, G. and Nithin, S. and Amirthavarshini, B. and Devadharshini, M.},
  booktitle = {IEEE},
  year      = {2024},
  institution = {Amrita Vishwa Vidyapeetham, Coimbatore}
}

πŸ“œ References

  1. Hong, C. Recent advances of privacy-preserving ML based on Homomorphic Encryption. Security and Safety, 2025.
  2. Dutta et al. Federated Learning with Quantum Computing and FHE. arXiv:2409.11430, 2024.
  3. Patel, M. Diabetes prediction dataset. Kaggle, 2025.

πŸ“ Amrita Vishwa Vidyapeetham, Coimbatore, Tamil Nadu Β |Β  Published in IEEE

About

πŸ” Quantum Encryption using QFT + Taylor Series + Homomorphic Encryption (CKKS) | 96.60% Encrypted Accuracy | IEEE Published

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages