arXiv:2611.04274quant-phNov 2026

Manuscript Offprint

arXiv:2611.04274

Reasoning about Shared-Qubit Concurrency in Quantum Computing

Mingsheng Ying

Abstract

In this paper, we develop a semantic model for the parallel execution of quantum circuits, providing a formal foundation for studying shared-qubit concurrency in quantum computing. As in classical shared-memory concurrency, parallel quantum circuits may interfere with one another through operations on shared qubits. However, quantum entanglement and the noncommutativeity of quantum operations introduce additional challenges for reasoning about their correctness. To address these challenges, we generalise the classical Owicki–Gries method to quantum computing at the level of quantum circuits. Our approach enables compositional reasoning about parallel quantum circuits by separating the verification of individual components from the analysis of interference between them. We formulate proof rules for establishing the correctness of parallel quantum circuits and prove their soundness with respect to the proposed semantic model.

Keywords: Quantum circuits, parallel execution, shared qubits, concurrency, semantics, interference freedom, proof rules

1. Introduction

Shared-memory concurrency is an important technique in classical programming, allowing multiple components of a program to cooperate through a common memory. It provides a natural way to express computations in which different tasks access and modify shared data. However, designing and reasoning about shared-memory parallel programs are notoriously challenging. An internal survey at Microsoft [9] revealed that concurrency is widely used within the company. However, 60% of respondents reported frequently encountering concurrency-related issues, and most concurrency bugs were considered to be of high severity.

In a shared-memory parallel program, an action performed by one component may modify the shared state on which another component depends, thereby invalidating assumptions that would hold during its isolated execution. Consequently, the behaviour of a parallel program depends not only on the computations performed by its individual components, but also on the order in which their actions are interleaved.

A similar challenge arises in quantum computing when the components of a parallel quantum circuit operate on shared qubits. For components acting on disjoint registers, their operations commute, and their combined behaviour can be described by the tensor product of their respective transformations. When registers overlap, however, an operation performed by one component may alter the quantum state subsequently accessed by another. Different execution orders can therefore produce different transformations and different output states. To see this more clearly, let us consider a simple example:

Example 1.1. Let SWAP and H stand for the swapping gate and Hadamard gate, respectively. Consider the following parallel execution of two quantum circuits performed on a system of three qubits q1,q2,q3q_1, q_2, q_3:

P≡SWAP[q1,q2]∥H[q1].P\equiv SWAP[q_1,q_2]\parallel H[q_1].

Note that quantum gates SWAP and H in PP share qubit q1q_1. The actual implementation of SAWP on hardware may be:

SWAP[q1,q2]≡CNOT[q1,q2]; CNOT[q2,q1]; CNOT[q1,q2].SWAP^{[q_1,q_2]}\equiv CNOT[q_1,q_2];\ CNOT[q_2,q_1];\ CNOT[q_1,q_2].

Let us write:

P′≡SWAP′[q1,q2]∥H[q1].P^{\prime}\equiv SWAP^{\prime}[q_1,q_2]\parallel H[q_1].

Then the question is whether PP and P′P' are equivalent? The answer is No. Indeed, if SWAP is considered as an atomic action, then executing PP with input ∣1⟩q1∣0⟩q2∣0⟩q3|1\rangle_{q_1}|0\rangle_{q_2}|0\rangle_{q_3} yields final state ∣+⟩q1∣1⟩q2∣0⟩q3|+\rangle_{q_1}|1\rangle_{q_2}|0\rangle_{q_3} or ∣0⟩q1∣−⟩q2∣0⟩q3|0\rangle_{q_1}|-\rangle_{q_2}|0\rangle_{q_3}, where ∣±⟩=12(∣0⟩±∣1⟩)|\pm\rangle=\frac{1}{\sqrt{2}}(|0\rangle\pm|1\rangle). However, the following execution of P′P' with the same input ∣1⟩q1∣0⟩q2∣0⟩q3|1\rangle_{q_1}|0\rangle_{q_2}|0\rangle_{q_3} yields a final state that is different from any final state of PP:

∣1,0⟩∣0⟩→CNOT[q1,q2]∣1,1⟩∣0⟩→H[q1]∣−,1⟩∣0⟩→CNOT[q2,q1]∣−,−,1⟩∣0⟩→CNOT[q1,q2]12(∣10⟩−∣01⟩)∣0⟩.|1,0\rangle|0\rangle\xrightarrow{CNOT_{[q_1,q_2]}}|1,1\rangle|0\rangle\xrightarrow{H_{[q_1]}}|-,1\rangle|0\rangle\xrightarrow{CNOT_{[q_2,q_1]}}|-,-,1\rangle|0\rangle\xrightarrow{CNOT_{[q_1,q_2]}}\frac{1}{\sqrt{2}}(|10\rangle-|01\rangle)|0\rangle.

It is interesting to note that the final state of PP are all product state, but the final state of P′P' in (1.1) is an entangled state.

From the above example, we observe that, as in classical computing, the individual components of a parallel quantum circuit can interfere with one another by updating shared qubits. Thus, the input/output behaviour of a parallel quantum circuit is not determined solely by the input/out behaviour of its components. On the other hand, quantum memory introduces features that distinguish this problem from its classical counterpart. In particular, shared registers may be entangled with other registers, so reasoning about the reduced state of a shared register alone can lose correlations relevant to the computation. An operation on one register can change these correlations even when the reduced state of another register remains unchanged.

Shared-qubit concurrency thus raises a fundamental question:

  • How can we understand and reason about the behaviour of a quantum computation whose components interact through a common quantum memory?

In classical computing, one of the major approaches to reasoning about shared-memory parallel programs is the Owicki–Gries method [14, 15] (see also Chapters 7 and 10 of the textbooks [1, 6], respectively). Its central idea is to separate the verification of the correctness of individual components from checking that they do not interfere with one another. First, each component is annotated with assertions and verified using Hoare logic as if it were executed in isolation. Then, interference freedom is established by checking that every atomic action of one component preserves the assertions used in the proofs of the other components, whenever both the action's precondition and the relevant assertion hold. These checks ensure that each component's correctness proof remains valid under arbitrary interleavings of the components' atomic actions. The method therefore combines local correctness proofs with explicit compatibility conditions to establish the correctness of the parallel program as a whole. Formally, the Owicki–Gries method can be presented as the proof rule (R-PC) in Figure 1, where P1∥⋯∥PnP_1 \parallel \cdots \parallel P_n is a shared-memory parallel program. In the premises of this rule, the correctness of each component PiP_i is expressed by a Hoare triple {φi}Pi{ψi}\{\varphi_i\}P_i\{\psi_i\}, where the precondition φi\varphi_i and postcondition ψi\psi_i are first-order logical formulas. Subject to the non-interference conditions, the correctness of the parallel program P1∥⋯∥PnP_1 \parallel \cdots \parallel P_n is then inferred, with precondition ⋀i=1nφi\bigwedge_{i=1}^n \varphi_i and postcondition ⋀i=1nψi\bigwedge_{i=1}^n \psi_i.

(R−PC)Proofs of {φi}Pi{ψi} (i=1,...,n) are interference free{⋀i=1nφi}P1∥⋯∥Pn{⋀i=1nψi}\mathrm{(R-PC)}\quad \frac{\mathrm{Proofs~of~}\{\varphi_{i}\}P_{i}\{\psi_{i}\}\ (i=1,...,n)\ \mathrm{are~interference~free}}{\{\bigwedge_{i=1}^{n}\varphi_{i}\}P_{1}\|\cdots\|P_{n}\{\bigwedge_{i=1}^{n}\psi_{i}\}}

Figure 1: Proof Rule for Parallel Composition.

Contributions of this paper:. The aim of this paper is to generalise the Owicki–Gries method to quantum computing. We achieve this goal for the special case where P1,…,PnP_1,\ldots,P_n are quantum circuits without mid-circuit measurements. In this setting, following the approach of Birkhoff–von Neumann quantum logic [2], it suffices to use subspaces of the underlying Hilbert spaces as preconditions and postconditions, since we are concerned with characterising the possible output pure quantum states arising from a given set of input pure quantum states. The main technical challenge is to develop a satisfactory treatment of interference that accounts for both the ordering of operations and their effects on the joint quantum state, which may be entangled.

However, we emphasise that extending this approach to general quantum programs with control flow, such as conditional statements based on mid-circuit measurements and loops, remains a largely open problem. In this more general setting, correctness is concerned not only with the possible output states but also with the expected values of observables in the output states, as specified by quantum Hoare triples whose preconditions and postconditions are general Hermitian operators [5, 19].

Organisation of the paper:. The remainder of this paper is organised as follows. Section 2 reviews some technical preliminaries. Section 3 defines the syntax and semantics of quantum circuits and introduces a semantic model for their parallel execution. Section 4 defines correctness formulas for quantum circuits. Section 5 presents proof rules for reasoning about the sequential execution of quantum circuits. Section 6 develops a notion of proofs for quantum circuits containing atomic regions. The main result of this paper is presented in Section 7, where we develop proof rules for reasoning about the parallel execution of quantum circuits with shared qubits. Section 8 illustrates the application of these rules through a case study. Section 9 discusses related work, and Section 10 concludes the paper.