This paper presents QuantumSuperposition and PositronicVariables, two interlinked .NET libraries for modelling uncertainty, quantum-style superposition, and time-looped convergence in ordinary C# code. QuantumSuperposition provides (1) a generic superposition engine in the form of QuBit<T> and Eigenstates<T> with complex amplitudes, arithmetic, LINQ integration and non-destructive sampling, and (2) a physicsflavoured quantum layer with multi-qubit QuantumSystem, entanglement management, gate catalogues, canonical states, and bundled implementations of the Quantum Fourier Transform (QFT) and Grover’s search algorithm. PositronicVariables builds on the same superposition semantics to model reversible temporal logic: variables that can participate in feedback loops, roll their state backwards and forwards through hypothetical timelines, and converge to a consistent fixed point (or, in pathological cases, a politely documented paradox). The resulting ecosystem lets .NET developers treat "maybe" and "many possible futures" as first-class values while still enjoying static typing, IDE autocompletion and the reassuring hum of the garbage collector. We describe the design and semantics of both layers, motivate their use as teaching and experimentation tools, and compare them to existing quantum SDKs and probabilistic programming languages. Our guiding design principle is simple: make the multiverse feel like idiomatic C#, with just enough weirdness to be fun but not enough to summon an actual physicist.
This paper presents QuantumSuperposition and PositronicVariables, two interlinked .NET libraries for modelling uncertainty, quantum-style superposition, and time-looped convergence in ordinary C# code. QuantumSuperposition provides (1) a generic superposition engine in the form of QuBit<T> and Eigenstates<T> with complex amplitudes, arithmetic, LINQ integration and non-destructive sampling, and (2) a physicsflavoured quantum layer with multi-qubit QuantumSystem, entanglement management, gate catalogues, canonical states, and bundled implementations of the Quantum Fourier Transform (QFT) and Grover’s search algorithm. PositronicVariables builds on the same superposition semantics to model reversible temporal logic: variables that can participate in feedback loops, roll their state backwards and forwards through hypothetical timelines, and converge to a consistent fixed point (or, in pathological cases, a politely documented paradox). The resulting ecosystem lets .NET developers treat "maybe" and "many possible futures" as first-class values while still enjoying static typing, IDE autocompletion and the reassuring hum of the garbage collector. We describe the design and semantics of both layers, motivate their use as teaching and experimentation tools, and compare them to existing quantum SDKs and probabilistic programming languages. Our guiding design principle is simple: make the multiverse feel like idiomatic C#, with just enough weirdness to be fun but not enough to summon an actual physicist.
Quantum computing is a promising approach of computation that is based on equations from Quantum Mechanics. A simulator for quantum algorithms must be capable of performing heavy mathematical matrix transforms. The design of the simulator itself takes one of three forms: Quantum Turing Machine, Network Model or circuit model of connected gates or, Quantum Programming Language, yet, some simulators are hybrid. We studied previous simulators and then we adopt features from three simulators of different implementation languages, different paradigms, and for different platforms. They are Quantum Computing Language (QCL), QUASI, and Quantum Optics Toolbox for Matlab 5. Our simulator for quantum algorithms takes the form of a package or a programming library for Quantum computing, with a case study showing the ability of using it in the circuit model. The .NET is a promising platform for computing. VB.NET is an easy, high productive programming language with the full power and functionality provided by the .NET framework. It is highly readable, writeable, and flexible language, compared to another language such as C#.NET in many aspects. We adopted VB.NET although its shortage in built-in mathematical complex and matrix operations, compared to Matlab. For implementation, we first built a mathematical core of matrix operations. Then, we built a quantum core which contains: basic qubits and register operations, basic 1D, 2D, and 3D quantum gates, and multi-view visualization of the quantum state, then a window for demos to show you how to use and get the most of the package.
This paper introduces a novel approach to uncertainty quantification (UQ) by drawing inspiration from quantum mechanics. Traditional UQ methods, particularly Monte Carlo simulations, often struggle with the curse of dimensionality, exhibiting diminishing returns as the number of variables increases. We propose a framework utilizing simulated quantum measurement processes to efficiently explore probability spaces, aiming for significant improvements in both speed and accuracy. The core concept involves translating probabilistic programming logic into a sequence of simulated quantum measurements, mimicking the principles of superposition and entanglement. This approach moves beyond the limitations of classical sampling techniques and potentially unlocks exponential speedups in complex system modeling. The presented methodology focuses on a new programming language and runtime designed specifically for this quantum-inspired probabilistic programming paradigm. We explore the theoretical underpinnings and outline the key components of this system, highlighting the advantages it offers over conventional UQ methods. The design prioritizes computational efficiency and scalability, crucial aspects for tackling real-world problems characterized by high-dimensional uncertainty. The ultimate goal is to develop a robust and practical tool for accurately assessing risk and making informed decisions in complex, uncertain environments.
The Quantum Cookbook: Recipes for Programming Real Qubits is a hands-on programming book that teaches working engineers how to write and run real quantum circuits on real quantum hardware. Organized as 19 recipes that build on each other — from a first "Hello, Qubit" circuit through entanglement (Bell and GHZ states), quantum teleportation, superdense coding, Grover's search, the Quantum Fourier Transform and Shor's algorithm, VQE, and QAOA — the book treats quantum programming the way a culinary cookbook treats cooking: each recipe lists its ingredients (qubits, gates, classical bits), walks through the method step by step, shows the code in two languages side by side, and ends with tasting notes on what the result means. Every recipe is presented in both Qiskit (IBM's Python SDK) and OpenQASM 3.0 (the standardized assembly-level language), and runs on the IBM Quantum Platform via the SamplerV2 and EstimatorV2 primitives, with 10 minutes of free real-hardware time per month on the Open Plan. Unlike a traditional textbook, the book assumes the reader is an engineer, not a physicist, and grounds every concept in runnable code: qubits as 2-dimensional complex vectors, gates as unitary matrices, and multi-qubit states as tensor products are the four math tools the recipes use and nothing more. A math primer, API reference, OpenQASM 3.0 reference, glossary, and citation appendix support the recipes, while dedicated chapters on error mitigation, logical qubits and the fault-tolerance roadmap, and the state of the field in 2026 keep the focus firmly on what runs on a real QPU today and what will run on one tomorrow. Released under the Apache 2.0 License (DOI: 10.5281/zenodo.21863658), it is written for anyone who wants to move past toy simulators and start programming real qubits.
The two main notions of control in quantum programming languages are often referred to as "quantum control" and "classical control". With the latter, the control flow is based on classical information, potentially resulting from a quantum measurement, and this paradigm is well-suited to mixed state quantum computation. Whereas with quantum control, we are primarily focused on pure quantum computation and there the "control" is based on superposition. The two paradigms have not mixed well traditionally and they are almost always treated separately. In this work, we show that the paradigms may be combined within the same system. The key ingredients for achieving this are: (1) syntactically: a modality for incorporating pure quantum types into a mixed state quantum type system; (2) operationally: an adaptation of the notion of "quantum configuration" from quantum lambda-calculi, where the quantum data is replaced with pure quantum primitives; (3) denotationally: suitable (sub)categories of Hilbert spaces, for pure computation and von Neumann algebras, for mixed state computation in the Heisenberg picture of quantum mechanics.
We survey recent strides made towards building a software framework that is capable of compiling quantum algorithms from a high-level description down to physical gates that can be implemented on a fault-tolerant quantum computer. We discuss why compilation and design automation tools such as the ones in our framework are key for tackling the grand challenge of building a scalable quantum computer. We then describe specialized libraries that have been developed using the LIQUi|〉 programming language. This includes reversible circuits for arithmetic as well as new, truly quantum approaches that rely on quantum computer architectures that allow the probabilistic execution of gates, a model that can reduce time and space overheads in some cases. We highlight why these libraries are useful for the implementation of many quantum algorithms. Finally, we survey the tool Revs that facilitate resource efficient compilation of higher-level irreversible programs into lower-level reversible circuits while trying to optimize the memory footprint of the resulting reversible networks. This is motivated by the limited availability of qubits for the foreseeable future.
This paper describes a quantum programming environment called $Q|SI\rangle $ . It is a platform created in the .NET language to support quantum programming as a quantum extension of the while-language. This platform includes a compiler for the quantum while-language and a chain of tools for the simulation of quantum computations, optimization of quantum circuits, and analysis and verification of quantum programs. Throughout the paper, $Q|SI\rangle $ is used to simulate quantum behaviors on classical platforms and demonstrate the combination of components. The scalable framework allows users to program customized functions on the platform. The compiler works as the core of $Q|SI\rangle $ , bridging the gap between quantum hardware and quantum software. The built-in decomposition algorithms enable universal quantum computation on current quantum hardware.