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无缝融合了这两种模态:量子电路程序保持酉性,所有程序均可在多项式时间内求值,从而确保了其可行性。