计算机科学与探索 ›› 2013, Vol. 7 ›› Issue (8): 762-768.DOI: 10.3778/j.issn.1673-9418.1303016

• 学术研究 • 上一篇    

量子程序设计语言NDQJava2处理系统——汇编程序与解释程序

朱正文1,2,徐家福1,2+   

  1. 1. 南京大学 软件新技术国家重点实验室,南京 210046
    2. 南京大学 计算机科学与技术系,南京 210046
  • 出版日期:2013-08-01 发布日期:2013-08-06

Quantum Programming Language NDQJava2 Processing System: Assembler and Interpreter

ZHU Zhengwen1,2, XU Jiafu1,2+   

  1. 1. State Key Laboratory for Novel Software Technology, Nanjing University, Nanjing 210046, China
    2. Department of Computer Science and Technology, Nanjing University, Nanjing 210046, China
  • Online:2013-08-01 Published:2013-08-06

摘要: NDQJava2是在NDQJava语言的基础上增添量子条件语句、量子循环语句、量子子程序、量子模块和量子异常处理机制等多种量子成分而成的一种混成式、结构化、命令式量子程序设计语言。为了在经典计算机上模拟执行NDQJava2语言书写的量子程序,给出了假想量子计算机的基本指令集与汇编指令集的设计,并用Java语言编写了相应的汇编程序和解释程序。结合处理系统的其他部分,验证了平衡函数判定问题的Deutsch算法。实验表明,该汇编程序与解释程序达到了预期目的。

关键词: NDQJava2, 量子程序设计语言, 汇编程序, 解释程序

Abstract: NDQJava2 is a hybrid, structured and imperative quantum programming language, which is an extension of NDQJava with some additional quantum components, such as quantum conditional statement, quantum loop statement, quantum subprogram, quantum module and quantum exception handling mechanism. To execute NDQJava2 programs on a classical computer, this paper gives the design of the basic instruction set and assembly instruction set of a conceivable quantum computer, and the implementation of the corresponding assembler and interpreter. Combined with the other parts of the processing system, the Deutsch algorithm is verified. Experiments show that the assembler and interpreter achieve the desired purpose.

Key words: NDQJava2, quantum programming language, assembler, interpreter