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.
翻译:Quipper 是量子计算的一种功能性编程语言。 Proto- Quipper 是一组语言, 旨在为 Quipper 提供一个正式的基础 。 在本文中, 我们扩展Proto- Quipper- M, 其结构是 Quipper 中的“ 动态提升 ” 。 由于它是一条电路描述语言, Proto- Quipper 有两种不同的运行时间: 电路生成时间和电路执行时间。 电路生成时间已知的值被称为参数, 电路执行时间已知值被称为状态。 动态提升是一种行动, 使状态( 如测量结果) 升至一个参数, 从而能够影响电路下一部分的生成。 因此, Proto- Quipper 程序可以连接经典和量计算。 我们描述一种语言的语系的语系, 被称为 Proto- Quipper- Dyn 。 其类型系统使用一种跟踪动态提升使用的方法系统。 我们还提供一种操作的语系, 以及一种抽象的解定定定定的语系,, 使我们最终的系统成为了动态升级的系统, 。