Emulation of Variational Quantum Circuits on Embedded Systems for Real-Time Quantum Machine Learning Applications
Abstract
1. Introduction
2. Analytical Simulation of Quantum Computing
2.1. Quantum Computing Basics
2.2. Quantum Gates
2.3. Multiple-Qubit Systems
2.4. Quantum State Measurement
3. Emulation of VQCs
3.1. Matrix-Based VQCs
- State Preparation: The input states, including the input voltage, inductor current, and output voltage, are processed through functions to generate parameter angles . These angles are then encoded into quantum states using parameterized rotation gates within the encoding layer.
- Tensor Product and Parameterization Layers: The encoded states undergo tensor product operations and pass through multiple parameterization layers. Each layer consists of CNOT and rotation gates that manipulate the qubit states according to the trained VQC model. This structure ensures that the qubits capture nonlinear relationships within the input data.
- Measurement and Output: After passing through the parameterization layers, the qubit states are measured to generate expectation values, , which are transformed into control actions, . These control actions determine the quantum-derived action.
- Closed-Loop Feedback: The system integrates real-time feedback, where the plant’s output is continuously monitored and fed back into the VQC, ensuring dynamic adjustments to maintain optimal performance.
3.2. Quantum State Encoding Procedure
3.3. Quantum State Decoding Procedure
4. Real-Time Quantum Machine Learning Design and Deployment
4.1. Objective Function and Training Procedure
4.2. Quantum State Encoding
4.3. VQC Architecture and Optimization
4.4. Output Decoding and Control Integration
4.5. Pseudocode
Algorithm 1 Pseudocode for the design procedure of the real-time VQC training algorithm | |
001. 1. Initialization: 002. - Randomly initialize , , and on FPGA 003. - Set , (10 µs cycle), , , 004. 2. Signal Sampling: 005. - Initialize buffer in FPGA memory for current 100 ms period // 10 Hz, 2 Vpp sawtooth 006. - Generate input samples within 10 µs cycle: 007. - 008. - 009. - If the new period starts at : 010. - 011. - 012. - 013. - Store in 014. 3. VQC Output Computation: 015. - For to : 016. - 017. - Encode State: 018. - 019. - 020. - Initialize 021. - For to : 022. - on qubit 023. - Apply VQC: 024. - For to : 025. - For to : 026. - Apply CNOT on qubits to 027. - Apply CNOT on qubits to 028. - Apply rotations: for all to 029. - 030. - 031. 4. Error Computation: 032. - Compute MSE: 033. 5. Parameter Update: 034. - If iteration < max_iterations: 035. - For to : 036. - 037. - 038. - 039. - 040. - 041. - Update , where 042. - Update : 043. - 044. - 045. - 046. - 047. - 048. - 049. - Else: 050. - Output Generation: 051. - For : 052. - 053. - 054. - Initialize 055. - For : 056. on qubit 057. - For to : 058. - For to : 059. - Apply CNOT on qubits to 060. - Apply CNOT on qubits to 061. - Apply rotations for all to 062. - 063. - 064. - | // 10 Hz, 2 Vpp sawtooth // 10 Hz cosine reference // Select 20 samples // Uniform samples in // Reference cosine samples // Within 10 µs cycle // Normalize to // Compute for encoding // Compute for encoding // 4-qubit state // Apply and to each qubit // Apply 4 layers // Measure expectation on qubit 1 // VQC output // Parallelized on FPGA // Parameter-shift rule // Gradient descent // Within 10 µs cycle // Apply encoding rotations // Apply VQC layers // Output real-time signal |
5. Experimental Results
- Processor: NXP QorlQ P5020, dual-core, 2 GHz;
- FPGA: Xilinx Kintex-7 (XC7K325T);
- I/O Interface: Analog inputs for signal injection and digital/PWM outputs for external device interfacing.
6. Conclusions
Author Contributions
Funding
Data Availability Statement
Conflicts of Interest
References
- Gyongyosi, L.; Imre, S. A survey on quantum computing technology. Comput. Sci. Rev. 2019, 31, 51–71. [Google Scholar] [CrossRef]
- LaPierre, R. Introduction to Quantum Computing; Springer Nature: Luxembourg, 2021. [Google Scholar]
- Chen, S.Y.-C.; Yang, C.-H.H.; Qi, J.; Chen, P.-Y.; Ma, X.; Goan, H.-S. Variational quantum circuits for deep reinforcement learning. IEEE Access 2020, 8, 141007–141024. [Google Scholar] [CrossRef]
- Du, Y.; Huang, T.; You, S.; Hsieh, M.-H.; Tao, D. Quantum circuit architecture search for variational quantum algorithms. Npj Quantum Inf. 2022, 8, 62. [Google Scholar] [CrossRef]
- Cirstoiu, C.; Holmes, Z.; Iosue, J.; Cincio, L.; Coles, P.J.; Sornborger, A. Variational fast forwarding for quantum simulation beyond the coherence time. Npj Quantum Inf. 2020, 6, 82. [Google Scholar] [CrossRef]
- McArdle, S.; Jones, T.; Endo, S.; Li, Y.; Benjamin, S.C.; Yuan, X. Variational ansatz-based quantum simulation of imaginary time evolution. Npj Quantum Inf. 2019, 5, 75. [Google Scholar] [CrossRef]
- Vanderbauwhede, W.; Benkrid, K. High-Performance Computing Using FPGAs; Springer: Berlin/Heidelberg, Germany, 2013. [Google Scholar]
- El-Araby, E.; Mahmud, N.; Jeng, M.J.; MacGillivray, A.; Chaudhary, M.; Nobel, M.A.I.; Riachi, A.E. Towards complete and scalable emulation of quantum algorithms on high-performance reconfigurable computers. IEEE Trans. Comput. 2023, 72, 2350–2364. [Google Scholar] [CrossRef]
- Liu, X.-Y.; Zhang, Z. Classical simulation of quantum circuits: Parallel environments and benchmark. Adv. Neural Inf. Process. Syst. 2023, 36, 67082–67102. [Google Scholar]
- Jones, T.; Brown, A.; Bush, I.; Benjamin, S.C. QuEST and high performance simulation of quantum computers. Sci. Rep. 2019, 9, 10736. [Google Scholar] [CrossRef]
- Suzuki, Y.; Kawase, Y.; Masumura, Y.; Hiraga, Y.; Nakadai, M.; Chen, J.; Nakanishi, K.M.; Mitarai, K.; Imai, R.; Tamiya, S. Qulacs: A fast and versatile quantum circuit simulator for research purpose. Quantum 2021, 5, 559. [Google Scholar] [CrossRef]
- Cerezo, M.; Verdon, G.; Huang, H.-Y.; Cincio, L.; Coles, P.J. Challenges and opportunities in quantum machine learning. Nat. Comput. Sci. 2022, 2, 567–576. [Google Scholar] [CrossRef]
- Tychola, K.A.; Kalampokas, T.; Papakostas, G.A. Quantum machine learning—An overview. Electronics 2023, 12, 2379. [Google Scholar] [CrossRef]
- Li, H.; Pang, Y. FPGA-accelerated quantum computing emulation and quantum key distillation. IEEE Micro 2021, 41, 49–57. [Google Scholar] [CrossRef]
- Fujishima, M.; Saito, K.; Hoh, K. 16-qubit quantum-computing emulation based on high-speed hardware architecture. Jpn. J. Appl. Phys. 2003, 42, 2182. [Google Scholar] [CrossRef]
- Ding, B.; Li, Z.; Li, Z.; Xue, Y.; Chang, X.; Su, J.; Sun, H. Cooperative Operation for Multiagent Energy Systems Integrated With Wind, Hydrogen, and Buildings: An Asymmetric Nash Bargaining Approach. IEEE Trans. Ind. Inform. 2025, 21, 6410–6421. [Google Scholar] [CrossRef]
- Belfore, I.; Lee, A. A Scalable FPGA Architecture for Quantum Computing Simulation. arXiv 2024, arXiv:2407.06415. [Google Scholar]
- Bag, K.; Goswami, M.; Kandpal, K. FPGA based resource efficient simulation and emulation of Grover’s search algorithm. In Proceedings of the 2022 IEEE 19th India Council International Conference (INDICON), Kochi, India, 24–26 November 2022; pp. 1–6. [Google Scholar]
- Conti, C.; Volpe, D.; Cirillo, G.A.; Graziano, M.; Zamboni, M.; Turvani, G. Towards Quantum Circuit Emulation on Low-Tier FPGAs. In Proceedings of the 2024 IEEE International Conference on Quantum Computing and Engineering (QCE), Montreal, QC, Canada, 15–20 September 2024; Volume 2, pp. 512–513. [Google Scholar]
- Mahmud, N.; Haase-Divine, B.; Kuhnke, A.; Rai, A.; MacGillivray, A.; El-Araby, E. Efficient computation techniques and hardware architectures for unitary transformations in support of quantum algorithm emulation. J. Signal Process. Syst. 2020, 92, 1017–1037. [Google Scholar] [CrossRef]
- Waidyasooriya, H.M.; Oshiyama, H.; Kurebayashi, Y.; Hariyama, M.; Ohzeki, M. A scalable emulator for quantum fourier transform using multiple-fpgas with high-bandwidth-memory. IEEE Access 2022, 10, 65103–65117. [Google Scholar] [CrossRef]
- Mujahid, U.; Khalid, M.; Najam-ul-Islam, M. FPGA Based Emulation of B92 QKD Protocol. In Proceedings of the 2023 57th Annual Conference on Information Sciences and Systems (CISS), Baltimore, MD, USA, 22–24 March 2023; pp. 1–5. [Google Scholar]
- Suzuki, T.; Miyazaki, T.; Inaritai, T.; Otsuka, T. Quantum AI simulator using a hybrid CPU–FPGA approach. Sci. Rep. 2023, 13, 7735. [Google Scholar] [CrossRef]
- Tomar, S.; Tripathi, R.; Kumar, S. Comprehensive Survey of QML: From Data Analysis to Algorithmic Advancements. arXiv 2025, arXiv:2501.09528. [Google Scholar]
- Mahmud, N.; El-Araby, E.; Caliga, D. caling reconfigurable emulation of quantum algorithms at high precision and high throughput. Quantum Eng. 2019, 1, e19. [Google Scholar] [CrossRef]
- Lee, Y.H.; Khalil-Hani, M.; Marsono, M.N. An FPGA-Based Quantum Computing Emulation Framework Based on Serial-Parallel Architecture. Int. J. Reconfigurable 2016, 2016, 5718124. (In English) [Google Scholar] [CrossRef]
- Mahmud, N.; El-Araby, E. A scalable high-precision and high-throughput architecture for emulation of quantum algorithms. In Proceedings of the 2018 31st IEEE International System-on-Chip Conference (SOCC), Arlington, VA, USA, 4–7 September 2018; pp. 206–212. [Google Scholar]
- Hillmich, S.; Markov, I.L.; Wille, R. Just Like the Real Thing: Fast Weak Simulation of Quantum Computation. In Proceedings of the 2020 57th ACM/IEEE Design Automation Conference (DAC), San Francisco, CA, USA, 20–24 July 2020. (In English). [Google Scholar] [CrossRef]
- Vinkhuijzen, L.; Coopmans, T.; Elkouss, D.; Dunjko, V.; Laarman, A. LIMDD: A decision diagram for simulation of quantum computing including stabilizer states. Quantum 2023, 7, 1108. [Google Scholar] [CrossRef]
- Pilch, J.; Długopolski, J. An FPGA-based real quantum computer emulator. J. Comput. Electron. 2019, 18, 329–342. [Google Scholar] [CrossRef]
- Choi, S.; Lee, W. Developing a Grover’s quantum algorithm emulator on standalone FPGAs: Optimization and implementation. AIMS Math. 2024, 9, 30939–30971. [Google Scholar] [CrossRef]
- Wei, K.; Amano, H.; Niwase, R.; Yamaguchi, Y.; Miyoshi, T. Qu-Trefoil: Large-scale Quantum Circuit Simulator Working on FPGA with SATA Storages. IEEE Trans. Comput. 2024, 74, 1306–1321. [Google Scholar] [CrossRef]
- Bergou, J.A.; Hillery, M.; Saffman, M. Quantum Information Processing; Springer: Berlin/Heidelberg, Germany, 2021. [Google Scholar]
- Benedetti, M.; Lloyd, E.; Sack, S.; Fiorentini, M. Parameterized quantum circuits as machine learning models. Quantum Sci. Technol. 2019, 4, 043001. [Google Scholar] [CrossRef]
- Mitarai, K.; Negoro, M.; Kitagawa, M.; Fujii, K. Quantum circuit learning. Phys. Rev. A 2018, 98, 032309. [Google Scholar] [CrossRef]
- Chen, S.Y.-C. Evolutionary optimization for designing variational quantum circuits with high model capacity. arXiv 2024, arXiv:2412.12484. [Google Scholar]
- Dong, D.; Chen, C.; Chen, Z. Quantum reinforcement learning. In Proceedings of the International Conference on Natural Computation, Changsha, China, 27–29 August 2005; pp. 686–689. [Google Scholar]
- Meyer, N.; Ufrecht, C.; Periyasamy, M.; Scherer, D.D.; Plinge, A.; Mutschler, C. A survey on quantum reinforcement learning. arXiv 2022, arXiv:2211.03464. [Google Scholar]
- Bergholm, V.; Izaac, J.; Schuld, M.; Gogolin, C.; Ahmed, S.; Ajith, V.; Alam, M.S.; Alonso-Linaje, G.; AkashNarayanan, B.; Asadi, A. Pennylane: Automatic differentiation of hybrid quantum-classical computations. arXiv 2018, arXiv:1811.04968. [Google Scholar]
- Zhai, X.Y.; Li, Z.N.; Li, Z.M.; Xue, Y.X.; Chang, X.Y.; Su, J.; Jin, X.L.; Wang, P.; Sun, H.B. Risk-averse energy management for integrated electricity and heat systems considering building heating vertical imbalance: An asynchronous decentralized approach. Appl. Energy 2025, 383, 125271. (In English) [Google Scholar] [CrossRef]
- Du, Y.; Xue, Y.; Wu, W.; Shahidehpour, M.; Shen, X.; Wang, B.; Sun, H. Coordinated planning of integrated electric and heating system considering the optimal reconfiguration of district heating network. IEEE Trans. Power Syst. 2023, 39, 794–808. [Google Scholar] [CrossRef]
Layer | Qubit | RX (°) | RY (°) | RZ (°) |
---|---|---|---|---|
1 | 0 | −9.958 | −15.934 | 18.123 |
1 | −26.757 | 91.673 | −43.934 | |
2 | 8.9381 | 108.18 | 84.763 | |
3 | −79.383 | 105.83 | 22.701 | |
2 | 0 | −62.63 | 45.751 | −7.4886 |
1 | 168.51 | 43.482 | −102.18 | |
2 | 116.4 | −122.56 | 99.826 | |
3 | 33.988 | −89.244 | −99.064 | |
3 | 0 | −104.04 | −108.13 | 138.78 |
1 | −107.76 | 148.22 | 180 | |
2 | −108.62 | −21.4 | −22.007 | |
3 | −10.863 | −124 | −140 | |
4 | 0 | −83.423 | 54.351 | −73.195 |
1 | −32.859 | 76.037 | −65.237 | |
2 | 34.16 | −100.17 | −27.301 | |
3 | −85.606 | −137.73 | 2.8304 | |
Optimized scaling factor a = 2.1515 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2025 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Masoudian, A.; Jakobsen, U.; Khooban, M.H. Emulation of Variational Quantum Circuits on Embedded Systems for Real-Time Quantum Machine Learning Applications. Designs 2025, 9, 87. https://doi.org/10.3390/designs9040087
Masoudian A, Jakobsen U, Khooban MH. Emulation of Variational Quantum Circuits on Embedded Systems for Real-Time Quantum Machine Learning Applications. Designs. 2025; 9(4):87. https://doi.org/10.3390/designs9040087
Chicago/Turabian StyleMasoudian, Ali, Uffe Jakobsen, and Mohammad Hassan Khooban. 2025. "Emulation of Variational Quantum Circuits on Embedded Systems for Real-Time Quantum Machine Learning Applications" Designs 9, no. 4: 87. https://doi.org/10.3390/designs9040087
APA StyleMasoudian, A., Jakobsen, U., & Khooban, M. H. (2025). Emulation of Variational Quantum Circuits on Embedded Systems for Real-Time Quantum Machine Learning Applications. Designs, 9(4), 87. https://doi.org/10.3390/designs9040087