We introduce PUNQ, a novel quantum programming language with quantum control, which features higher-order programs that can be superposed, enabling quantum control via quantum conditionals. Our language boasts a type system guaranteeing both unitarity and polynomial-time normalization. Unitarity is achieved by using a special modality for superpositions while requiring orthogonality among superposed terms. Polynomial-time normalization is achieved using a linear-logic-based type discipline employing Barber and Plotkin duality along with a specific modality to account for potential duplications. This type discipline also guarantees that derived values have polynomial size. PUNQ seamlessly combines the two modalities: quantum circuit programs uphold unitarity, and all programs are evaluated in polynomial time, ensuring their feasibility.
翻译:我们提出PUNQ,一种新型的具有量子控制的量子编程语言,它支持可叠加的高阶程序,从而通过量子条件实现量子控制。我们的语言拥有一个类型系统,同时确保幺正性和多项式时间归一化。幺正性通过使用特殊模态实现叠加,同时要求叠加项之间保持正交性。多项式时间归一化则通过基于线性逻辑的类型规范实现,该规范采用Barber和Plotkin对偶性以及一个特定模态来处理潜在复制。该类型规范还保证派生值具有多项式大小。PUNQ无缝结合了这两种模态:量子电路程序保持幺正性,且所有程序均在多项式时间内求值,从而确保其可行性。