Quantum decision-diagram simulation
Classical simulation using shared recursive substructures to represent quantum vectors and matrices compactly when redundancy permits.
On this page
Definition, purpose and input assumptions
Quantum decision diagrams recursively split vectors or matrices by qubit indices and share identical or proportional substructures. Edge weights carry complex scaling factors. This can compress some states and operations dramatically, but arbitrary quantum objects can still require exponential size.
Mathematical mechanism
A statevector of n qubits can be split into upper and lower halves corresponding to one qubit value. Repeated sub-vectors can share one node with different edge weights. Canonical normalization rules and a fixed variable order help identify equivalent substructures. Floating-point tolerances complicate exact sharing and equality claims.
Fully solved reference example
The state |+>^n has equal amplitude 2^(-n/2) on every basis string. Its recursive halves are identical at every level, so a shared diagram can use a simple repeated structure rather than explicitly storing2^n amplitudes. For n=3, the vector is eight copies of 1/sqrt(8); each split points to the same smaller sub-vector with equal factors.
A generic vector with unrelated complex amplitudes lacks this repetition and may compress poorly. The fact that one highly superposed state is compact does not imply that every superposition or entangled circuit is easy to simulate.
Limitations and classical comparison
Performance depends on variable order, operation sequence and numerical representation. A diagram may temporarily grow large during a computation even if the final state is compact. Compare simulation and equivalence tasks separately, since they can exploit different structure.
Scientific relationships
Decision diagrams are an alternative classical representation to statevectors and tensor networks. They are used in simulation and circuit equivalence checking, with structure-dependent cost.
A weighted shared diagram with explicit phases
Consider |psi> = (1,2,i,2i,-1,-2,-i,-2i)/sqrt(20) in q0,q1,q2 order. It factors as (|0> - |1>)/sqrt(2) tensor (|0> + i|1>)/sqrt(2) tensor (|0> + 2|1>)/sqrt(5). A binary vector decision diagram can represent it with one nonterminal node per qubit level. The two outgoing weights at successive levels are (1,-1)/sqrt(2), (1,i)/sqrt(2), and (1,2)/sqrt(5), and both branches at each level point to the same remaining subdiagram.
This three-node representation retains unequal magnitudes and complex phases, not merely repeated probabilities. Multiplying the weights along a path gives the corresponding amplitude. For path 101, the product is -2/sqrt(20), matching the sixth vector entry in zero-based indexing. A common overall scalar can instead be stored at the root while node weights are normalized according to a fixed canonical rule. The represented state is unchanged if factors are moved consistently between incoming and outgoing edges.
Variable order changes sharing
Take four qubits in a Bell pair between q0 and q2 and another Bell pair between q1 and q3. In order q0,q1,q2,q3, the nonzero amplitudes are one half on 0000, 0101, 1010, and 1111. After fixing the first two bits, the remaining two-bit suffix is one of four distinct basis states. Those suffixes cannot be merged as proportional nonzero vectors, because their support locations differ.
For an ordered binary vector diagram with one node per retained variable level, shared proportional sub-vectors, a scalar terminal, and zero edges omitted from node counts, this state uses nine nonterminal nodes. The level counts are one, two, four, and two. Reordering the variables to q0,q2,q1,q3 groups each Bell pair together. The same physical state then uses six nodes, with level counts one, two, one, and two. These counts refer to the explicitly stated representation convention; another reduction rule or terminal accounting may report a different raw count.
The cut after the first two variables also changes. In the original order its Schmidt rank is four because both Bell pairs cross the cut. In the grouped order its Schmidt rank is one because the cut separates the two independent pairs. For m Bell pairs, placing all first partners before all second partners yields exponentially many distinct conditional basis suffixes, whereas grouping partners gives a linear-size repeated structure. Variable order is therefore a substantive simulation choice rather than a cosmetic display preference.
Canonical normalization and numerical equality
A diagram manager identifies nodes by their variable level, child targets, and normalized outgoing weights. One simple normalization divides by the first nonzero outgoing weight and moves that factor to the incoming edge. For exact arithmetic and a fixed ordering rule, proportional sub-vectors then share a canonical node. Zero sub-vectors require a separate convention because they have no nonzero pivot.
Floating-point arithmetic complicates this identity test. Two mathematically equal sub-vectors can acquire slightly different weights, preventing sharing. Conversely, merging weights that differ only by a tolerance introduces approximation error. A local tolerance does not automatically bound the final state error after many operations, especially when amplitudes interfere. Numerical hashing, pivot choice, and accumulated-error control belong in a precise implementation contract rather than being treated as exact algebra.
The examples above use simple integer phase ratios before their common normalization, so their structural counts can be checked without a near-equality decision. They do not demonstrate a robust floating-point canonicalization scheme for arbitrary circuits. An implementation can use more sophisticated normalization or exact coefficient representations, but their costs and supported gate families must be stated.
Simulation operations and intermediate growth
Applying a gate combines and transforms subdiagrams according to its support. Cached operations can reuse identical subproblems, and structural redundancy can keep the representation compact. Nevertheless, a short gate sequence can temporarily create many distinct sub-vectors even if its final action later cancels. Peak node count and operation count can therefore matter more than the size of the final diagram.
Matrix decision diagrams recursively split operators into four blocks per qubit level, which differs from the two-way split of a statevector. Simulation and equivalence checking exploit related sharing but may have different favorable instances. A compact operator does not guarantee that every state produced during its application is compact in the same ordering, and a compact state need not make every observable query equally cheap.
Sources
Verification scope
Recorded source check ·
Full author paper indexed: 16 pages, 801 lines. Weighted diagrams, simulation, verification and representation limits inspected.
This is an author technical review and tool description, not the first decision-diagram proposal. Placeholder journal/DOI text in the PDF is not promoted to bibliographic metadata. New node counts use an explicitly specified independent representation convention.