Quipper is a functional programming language for quantum computing. Proto-Quipper is a family of languages aiming to provide a formal foundation for Quipper. In this paper, we extend Proto-Quipper-M with a construct called dynamic lifting, which is present in Quipper. By virtue of being a circuit description language, Proto-Quipper has two separate runtimes: circuit generation time and circuit execution time. Values that are known at circuit generation time are called parameters, and values that are known at circuit execution time are called states. Dynamic lifting is an operation that enables a state, such as the result of a measurement, to be lifted to a parameter, where it can influence the generation of the next portion of the circuit. As a result, dynamic lifting enables Proto-Quipper programs to interleave classical and quantum computation. We describe the syntax of a language we call Proto-Quipper-Dyn. Its type system uses a system of modalities to keep track of the use of dynamic lifting. We also provide an operational semantics, as well as an abstract categorical semantics for dynamic lifting based on enriched category theory. We prove that both the type system and the operational semantics are sound with respect to our categorical semantics. Finally, we give some examples of Proto-Quipper-Dyn programs that make essential use of dynamic lifting. A concrete categorical model is given in a companion paper [FKRS2022b].
翻译:Quipper 是量子计算的一种功能性编程语言 。 Proto- Quipper 是一组旨在为 Quipper 提供一个正式基础的语言。 在本文中, 我们扩展了 Proto- Quipper- M, 其构造称为 Quipper 。 Proto- Quipper 使用一种电路描述语言, 有两个单独的运行时间: 电路生成时间和电路执行时间。 在电路生成时间已知的值被称为参数, 在电路执行时间已知的值被称为状态。 动态提升是一种行动, 使一个状态, 如测量结果, 升至一个参数, 从而可以影响电路的下一代。 因此, Proto- Quipper 程序可以将经典和量计算分开。 我们描述一种语言的语系的语系符号。 其类型系统使用一种跟踪动态提升使用的方法系统。 我们还提供一种操作性语系, 以及一个抽象的解定式 Q- 系统, 使动态提升系统成为了我们最牢固的理论 。