Quantum Transformer
摘要
This chapter provides a comprehensive introduction to the quantum transformer algorithm. In Sect. 5.1 we first described what is the transformer architecture, with detailed explanation about its key subroutines. We also briefly mention the optimization and training. In Sect. 5.2, we provide a guide about designing each quantum subroutine, including quantum self-attention, quantum residual connection with layer norm, and quantum feed-forward neural networks, based on the quantum linear algebra. We further mention various numerical studies on the open-source large language models and provide a detailed discussion about the potential of quantum advantage in Sect. 5.3. Some basic codes are provided in Sect. 5.4. Finally in Sect. 5.5, we provide a bibliographic remark for readers who are interested to explore.