---
title: 'Q-Sylvan: Parallel Quantum DD Toolkit'
url: https://www.emergentmind.com/topics/q-sylvan
type: topic
---

# Q-Sylvan: Parallel Quantum DD Toolkit

Searching arXiv for Q-Sylvan and closely related references.
Search query: "Q-Sylvan decision diagram quantum computing"
Q-Sylvan is a parallel decision-diagram package for quantum computing that supports the analysis and verification of quantum circuits by representing exponentially large quantum states and operators compactly as decision diagrams and executing the corresponding operations efficiently on multicore machines. It is built to bring the multicore decision-diagram framework Sylvan into the quantum setting, where the relevant structures are edge-valued decision diagrams (EVDDs) with complex-valued edges. The package implements two principal use cases—simulation and equivalence checking of quantum circuits—and is reported to be competitive with the state-of-the-art quantum DD tool MQT DDSIM on large single-core instances while achieving parallel speedups of up to $\times 18$ on 64 cores [2508.00514].

## 1. Problem setting and design objectives

Q-Sylvan is motivated by the rapid growth of quantum state and operator sizes: for $n$ qubits, states have size $2^n$ and unitary operators have size $2^n\times 2^n$. The work emphasizes that, although these problems are computationally hard, decision diagrams can exploit structure and sharing to represent many practical circuits compactly [2508.00514].

The package was developed to address four linked observations. Quantum circuit tools need to scale as qubit counts rise; decision diagrams work well in practice, especially for quantum simulation and equivalence checking; parallelizing quantum DDs has been difficult and prior attempts had limited speedups; and Sylvan already provided a strong multicore DD framework but did not support edge values, which are essential for quantum DDs. Q-Sylvan therefore fills the gap by providing an efficient, parallel implementation of quantum-style EVDDs on top of Sylvan and applying them to simulation and equivalence checking [2508.00514].

Within the broader tooling landscape, Q-Sylvan is positioned as a DD-based, exact or symbolic verification/simulation tool comparable to packages such as MQT DDSIM and MQT QCEC, but with a strong emphasis on parallelism [2508.00514]. A plausible implication is that the package is intended not merely as a data-structure prototype, but as a multicore backend for practical circuit analysis workloads.

## 2. EVDD representation of quantum states and operators

The central representation in Q-Sylvan is the edge-valued decision diagram, also called a QMDD in much of the quantum-computing literature. The structure is a rooted, directed, acyclic graph in which each internal node corresponds to a variable $x_i$, each node has two outgoing edges, edges carry complex values, and each path from root to terminal corresponds to one entry of the represented vector or matrix [2508.00514].

For an $n$-qubit state, variables are ordered as
$$
\{x_0, x_1, \dots, x_{n-1}\},
$$
and the DD is ordered, meaning every path respects
$$
x_0 \prec x_1 \prec \cdots \prec x_{n-1}.
$$
A path encodes a single amplitude by multiplying the edge labels along that path. The paper illustrates this by describing how $\psi(110)$ is obtained by following edges corresponding to $x_0=1$, $x_1=1$, $x_2=0$ and multiplying the edge values encountered on that path [2508.00514].

For matrices, the representation treats a $2^n\times 2^n$ matrix as a function
$$
f(\vec x,\vec x'),
$$
where $\vec x$ indexes rows and $\vec x'$ indexes columns. Row and column variables are interleaved,
$$
x_0 \prec x_0' \prec x_1 \prec x_1' \prec \cdots,
$$
which supports recursive decomposition into quadrants [2508.00514]. This interleaving is essential for the recursive matrix algorithms used later in simulation and verification.

The paper states that EVDDs and QMDDs are effectively equivalent in power, since one can be translated into the other in linear time [2508.00514]. This places Q-Sylvan within the established quantum-DD lineage while retaining terminology aligned with Sylvan’s implementation setting.

## 3. Parallelization, canonicalization, and value management

The primary technical obstacle addressed by Q-Sylvan is the efficient parallelization of quantum DD operations. EVDDs are attractive because they compress many structured quantum states and operators well, often better than MTBDDs, and are practically competitive with other advanced symbolic quantum representations. However, recursive DD algorithms have complicated data dependencies, node uniqueness must be maintained globally, edge values are floating-point or complex numbers, and concurrency requires careful lock-free or low-lock design [2508.00514].

Q-Sylvan addresses these issues through two mechanisms: fine-grained task parallelism and lock-free shared tables. The task parallelism is implemented via Lace, Sylvan’s work-stealing runtime, which provides `Spawn` to fork a task and `Sync` to join it later. The paper describes this as intra-operational parallelism: parallelism inside a single recursive DD operation rather than only across different top-level tasks [2508.00514]. In recursive vector addition, for example, one branch is spawned, the other is computed locally, and then synchronization is performed.

Lock-free shared state is used for both the node table and the edge-value table. Since all threads share these tables, Q-Sylvan avoids coarse locking and instead uses atomic compare-and-swap (CAS) operations, following the style of Sylvan’s lock-free node table and the shared-hash-table approach of Laarman et al. This is crucial because DD algorithms rely heavily on lookup, memoization, and canonical node reuse [2508.00514].

A further challenge is floating-point equality. Exact equality is too strict, as standard floating-point arithmetic can invalidate naive identity tests. Q-Sylvan therefore defines two values $a,b$ as equivalent if
$$
|a-b|<\delta,
$$
with default
$$
\delta = 10^{-14}.
$$
For complex values, the same condition must hold for both real and imaginary parts [2508.00514]. The paper presents this as a pragmatic tradeoff: a small nonzero $\delta$ allows node sharing despite rounding noise, whereas $\delta=0$ causes almost no merging in practice.

To manage approximate equality concurrently, Q-Sylvan stores edge values in a concurrent hash table via a `FindOrPut(c)` routine. The real and imaginary parts of $c$ are rounded to tolerance $\delta$, the rounded value is hashed to choose a bucket, CAS is used to insert the unrounded value if the bucket is empty, and otherwise the stored value is compared against $c$ under the tolerance criterion; if the values are not equivalent, linear probing is used [2508.00514]. This procedure enables concurrent deduplication of approximately equal complex values without abandoning canonical sharing.

Canonical form at the node level is enforced by normalizing edge tuples. The paper gives the example
$$
\langle 2,6,1\rangle \equiv \langle 1,3,2\rangle,
$$
which can be normalized using a suitable factor $\nu$. Four strategies are implemented: **norm-low**, **norm-min**, **norm-max**, and **norm-L2**. The first three set one edge to $1$, while the fourth uses a quantum-state style normalization
$$
(|\alpha|^2+|\beta|^2)\cdot e^{i\theta},
$$
with $\theta$ chosen so that $\alpha/\nu\in\mathbb{R}_+$ [2508.00514]. Empirically, the paper reports that norm-low and norm-min suffered significant numerical errors, norm-max and norm-L2 preserved correctness, and norm-max was faster in most cases and became the default.

## 4. Core recursive EVDD algorithms

The package implements recursive DD operations that serve as the computational core of simulation and verification. For vector addition, the paper describes a routine that returns the sum of terminal values if both arguments are terminals and otherwise checks the cache, recursively computes low and high parts, creates a node with `MakeNode`, memoizes, and returns [2508.00514].

The recurrence for vector addition uses the root edge values:
$$
R_0 \gets \mathrm{Plus}\bigl(val(A)\cdot A_0,\; val(B)\cdot B_0 \bigr),
$$
$$
R_1 \gets \mathrm{Plus}\bigl(val(A)\cdot A_1,\; val(B)\cdot B_1 \bigr),
$$
where $A_0,A_1$ and $B_0,B_1$ are the 0- and 1-children [2508.00514]. Because these two recursive calls are structurally independent, they are natural candidates for Lace-based intra-operational parallelism.

For matrix-vector multiplication, the matrix is recursively decomposed into quadrants,
$$
M=\begin{pmatrix}
M_{00} & M_{01}\\
M_{10} & M_{11}
\end{pmatrix},
$$
and combined with vector substructures. The recursive multiplication computes
$$
R_{00}, R_{01}, R_{10}, R_{11},
$$
then builds
$$
R_0 = \mathrm{MakeNode}(v, R_{00}, R_{10}), \qquad R_1 = \mathrm{MakeNode}(v, R_{01}, R_{11}),
$$
and finally combines them via `Plus` [2508.00514]. This operation is the basis of state evolution in quantum simulation, since circuit execution is repeated matrix-vector multiplication.

The paper’s discussion of these algorithms indicates that Q-Sylvan is not limited to static representation; its main contribution lies in making the recursive symbolic operations themselves efficiently parallel on shared-memory multicore systems [2508.00514].

## 5. Simulation and equivalence checking

Simulation in Q-Sylvan proceeds by constructing the DD for the initial all-zero state,
$$
\begin{pmatrix}
1 & 0 & 0 & \cdots & 0
\end{pmatrix}^T,
$$
updating the state by matrix-vector multiplication for each gate in the circuit, and then outputting the final state vector or sampling measurements from it [2508.00514]. The tool accepts **Open QASM 2.0** input and supports the full standard gate set from `qelib1.inc` [2508.00514]. This makes the simulation interface compatible with a common circuit-description format.

Equivalence checking asks whether two circuits $U$ and $V$ represent the same unitary up to a global phase:
$$
U \equiv V \iff \exists c \in \mathbb{C} \text{ such that } U = cV.
$$
Q-Sylvan implements two DD-based methods for this task [2508.00514].

The first is the **alternating method**, which rewrites the problem as
$$
UV^\dagger \equiv I
$$
and computes the product from the inside out, for example
$$
U_m \dots (U_2 (U_1 V_1^\dagger) V_2^\dagger) \dots V_\ell^\dagger.
$$
The intuition given in the paper is that if the circuits are identical or very similar, intermediate DDs may remain small, especially when cancellations occur [2508.00514].

The second is the **Pauli method**, based on the criterion
$$
U \equiv V \iff \forall j \in \{0,\dots,n-1\}: (U X_j U^\dagger = V X_j V^\dagger) \land (U Z_j U^\dagger = V Z_j V^\dagger).
$$
Here $X_j$ and $Z_j$ are Pauli-like operators on qubit $j$, described compactly as tensor products of identities and Pauli matrices. These computations are again carried out from the inside out; for example,
$$
U X_j U^\dagger = U_m \dots (U_2 (U_1 X_j U_1^\dagger) U_2^\dagger) \dots U_m^\dagger.
$$
The paper highlights this as the first DD-based implementation of the Pauli-style equivalence test [2508.00514].

These two application domains demonstrate that Q-Sylvan is not restricted to state simulation. It also functions as a symbolic verification tool whose internal DD operations are shared across simulation and equivalence-checking workflows.

## 6. Empirical performance and practical significance

The empirical evaluation compares Q-Sylvan with **MQT DDSIM** for simulation and with **MQT QCEC** and **Quokka-Sharp** for equivalence checking, with additional references to tools such as Quasimodo and SliQSim in discussion. The benchmarks include **MQT Bench**, **KetGPT-generated circuits**, and equivalence-checking benchmark sets from the literature [2508.00514].

For single-core simulation, the paper reports that Q-Sylvan is competitive with MQT DDSIM on large instances, while DDSIM is faster on smaller instances, likely due to better initialization. On larger instances where either tool takes at least 10 seconds, Q-Sylvan beats DDSIM on **61%** of MQT Bench circuits and **30%** of KetGPT circuits [2508.00514]. This establishes that the implementation is not only parallel but also effective in absolute single-core terms on harder cases.

For parallel simulation, the reported speedups reach up to **$\times 7.2$** on 8 cores and up to **$\times 18$** on 64 cores [2508.00514]. The paper further analyzes these results by DD sharing level. **No sharing** is easiest to parallelize but less interesting because DDs are large and less compressed; **high sharing** is hardest to parallelize because little work remains; and **some sharing** forms the most meaningful and practically relevant middle ground. The strongest reported 64-core speedup, $\times 18$, occurs on the **some sharing** category in the KetGPT set [2508.00514].

The paper notes that 64-core scaling is somewhat weaker on the two-socket machine than 8-core scaling, likely because of cross-socket communication overhead [2508.00514]. This suggests that the bottlenecks at higher core counts are not purely algorithmic, but also arise from shared-memory machine topology.

For equivalence checking, both the alternating and Pauli methods achieve about **$\times 5.8$** speedup on 8 cores on the benchmark sets considered [2508.00514]. Q-Sylvan is not always the fastest single-core equivalence checker, and QCEC often solves more instances due to portfolio-style strategies and a strong heuristic mix, but Q-Sylvan still solves some instances faster and shows strong parallel scaling [2508.00514]. The paper suggests that Q-Sylvan’s equivalence-checking routines could benefit from incorporation into a portfolio approach.

Taken together, the reported results support five conclusions stated in the paper: parallel DDs for quantum computing are viable; Q-Sylvan is competitive at the single-core level; parallel speedups are substantial; the approach supports both simulation and verification; and the work strengthens the role of symbolic methods in quantum computing alongside tensor-network methods, model counting, and ZX-calculus-based tools [2508.00514].

## 7. Nomenclature and distinction from unrelated “QS” literature

Q-Sylvan should be distinguished from several unrelated uses of similar notation in the arXiv literature. The q-analysis paper “q-Bernstein polynomials, q-Stirling numbers and q-Bernoulli polynomials” concerns Phillips q-Bernstein polynomials, q-Stirling numbers of the second kind, and q-Bernoulli polynomials; the term **“Q-Sylvan” does not appear anywhere in the paper**, and there is no obvious mathematical notion in that text that refers to Q-Sylvan [1008.4547]. Likewise, “Quillen-Segal objects and structures: an overview” uses **QS** to denote **Quillen-Segal** objects in model-category theory, a setting based on weak equivalences into structured targets in comma categories rather than quantum circuit decision diagrams [1406.7666]. The package **QS$^3$** is yet another unrelated object: an exact-diagonalization solver for spin-$\tfrac12$ XXZ models near saturation, using Lanczos and thick-restart Lanczos methods in symmetry-adapted bases [2107.00872].

This distinction matters because the leading “Q” in Q-Sylvan refers to its quantum-computing application domain and to its adaptation of Sylvan to quantum-style edge-valued DDs, not to q-calculus, Quillen-Segal theory, or the QS$^3$ spin-solver package. The evidence available in the cited sources therefore supports a narrow and specific definition: Q-Sylvan is a multicore EVDD-based package for quantum circuit simulation and equivalence checking, rather than a general “QS” framework across mathematics or physics [2508.00514].

Source: https://www.emergentmind.com/topics/q-sylvan