Q# is a standalone domain-specific programming language from Microsoft for writing and running quantum programs. Like most industrial languages, it was designed without a formal specification, which can naturally lead to ambiguity in its interpretation. We aim to provide a formal language definition for Q#, placing the language on a solid mathematical foundation and enabling further evolution of its design and type system. This paper presents $\lambda_{Q\#}$, an idealized version of Q# that illustrates how we may view Q# as a quantum Algol (algorithmic language). We show the safety properties enforced by $\lambda_{Q\#}$'s type system and present its equational semantics based on a fully complete algebraic theory by Staton.
翻译:这是微软为写作和运行量子程序提供的一种独立的域别编程语言。 与大多数工业语言一样, 它的设计没有正式的规格, 自然会导致解释上的模糊性。 我们的目标是为 {} 提供一个正式的语言定义, 将语言置于坚实的数学基础上, 并使其设计和类型系统得以进一步发展。 本文展示了 $\ lambda $, 一种理想化的 {} 版本, 说明我们如何将 ⁇ 视为 量子 Algol ( 算法语言) 。 我们展示了 $@ lambda $ 的型号系统所执行的安全特性, 并根据 Staton 完全完整的代数理论展示了它的方程式语义 。