Hybrid quantum–classical machine translation
摘要
This study investigates the feasibility of language translation using quantum natural language processing (QNLP) on noisy intermediate-scale quantum devices. Classical NLP struggles with large-scale computations, but QNLP leverages quantum properties to process linguistic data more efficiently, potentially advancing NLP applications. We propose a hybrid quantum–classical model for neural machine translation, which may outperform classical methods whenever practical quantum computers are available. Using the Shannon entropy, we demonstrate the importance of rotation gate angles in parameterised quantum circuits, enabling communication between circuits for different languages. We combine bag-of-words and compositional structure models, presenting the first proof-of-concept for compositional QNLP, where circuit parameters and structure are key to model interpretability. Focusing on sentences with similar structures, we implement an encoder–decoder model with long short-term memory (LSTM) networks for translation. Experiments on 160 English–Persian sentence pairs achieved the best results with Adam as the optimiser on a two-layer LSTM, minimising loss relative to both stochastic gradient descent and root-mean-square propagation (RMSprop).