Squared Circuits: Probabilistic Models & Quantum Circuits
- Squared circuits are computational graphs that square real or complex outputs to produce nonnegative densities, crucial for probabilistic modeling and quantum computation.
- They maintain properties like smoothness, decomposability, and structured decomposability, though squaring causes a quadratic increase in circuit size and computational cost.
- Squared circuits enable exponential succinctness in representing functions, underpinning models such as Born machines and optimized reversible quantum squaring circuits.
Squared circuits are computational graphs in which a real- or complex-valued circuit is converted into a nonnegative density or mass function by taking a square or modulus square, typically . In recent probabilistic modeling, this construction appears as squared probabilistic circuits and as a circuit generalization of squared tensor networks and Born machines, with exact inference inherited from smoothness, decomposability, and structured decomposability under appropriate constructions (Wang et al., 2024, Loconte et al., 2024, Loconte et al., 18 Dec 2025). The same phrase also has a separate arithmetic-circuit usage, referring to reversible or quantum circuits that compute from a binary input (Sultana et al., 2024).
1. Formal definitions and circuit semantics
In the probabilistic-circuit setting, a probabilistic circuit is a rooted DAG with input, product, and sum nodes. For a node ,
$f_{n} = \begin{cases} \prod_{n_i \in in(n)} f_{n_i} & \text{if } n \text{ is product},\[4pt] \sum_{n_i \in in(n)} w_{n,n_i} f_{n_i} & \text{if } n \text{ is sum}. \end{cases}$
A squared probabilistic circuit uses the circuit as a real-valued function and turns it into a non-negative density or mass function by squaring: The standard assumptions are smoothness and decomposability, and often structured decomposability (Wang et al., 2024).
A related tensorized formalism describes circuits as parameterized computational graphs with input layers, product layers, and sum layers. Input layers emit vectors of functions of a single variable; product layers combine inputs via Hadamard product or Kronecker product ; and sum layers apply a linear map $\vW$ to a child vector. A squared circuit is then obtained by taking a complex-valued circuit 0 and forming the modulus square
1
which is used to represent a probability distribution
2
This places squared circuits in direct continuity with squared tensor networks and Born-machine parameterizations (Loconte et al., 2024, Loconte et al., 18 Dec 2025).
The central modeling motivation is that the underlying amplitude 3 may use signed, negative, or complex parameters, while the squared output remains nonnegative. This separates the representation of the latent algebraic object 4 from the representation of the observable density 5, and it is precisely this separation that underlies both the expressiveness gains and the inference challenges discussed in the subsequent literature (Wang et al., 2024, Loconte et al., 18 Dec 2025).
2. Tractability, compilation, and the cost of squaring
The tractability of squared circuits depends on structural compatibility between the original circuit and its squared form. For structured-decomposable circuits, one can construct a new circuit 6 such that
7
with size and construction time 8. In the complex-valued setting, the corresponding identity is
9
The tractability statement is explicit: given a smooth and decomposable circuit 0, one can compute a smooth and decomposable circuit 1 such that
2
in 3 time, and if 4 is structured-decomposable then one can compute a structured-decomposable circuit 5 such that
6
in 7 time (Wang et al., 2024).
The same quadratic phenomenon appears in tensorized circuits. Squaring introduces pairwise combinations of basis components in each layer, so an input layer of width 8 becomes a squared layer of width 9, sum layers are parameterized by 0, and product layers expand accordingly. The partition function 1 generally takes time 2, where 3 is the number of layers and 4 is the maximum layer size; the same worst-case complexity applies to marginalization in squared PCs (Loconte et al., 2024).
This quadratic blow-up is not merely a notational inconvenience. It is the main obstacle to using squared circuits as generic tractable density estimators: the nonnegativity of 5 is immediate, but exact normalization and marginalization can become substantially more expensive than in the unsquared circuit unless additional structure is imposed (Loconte et al., 2024, Loconte et al., 18 Dec 2025).
3. Expressiveness relative to monotone probabilistic circuits
A monotone probabilistic circuit is one in which all weights and leaf functions are non-negative reals: 6 This guarantees that the circuit itself directly encodes a non-negative function. By contrast, a squared circuit allows real-valued parameters, including negative ones, and then squares the output to obtain a non-negative function. Negative coefficients allow compact algebraic representations, squaring restores non-negativity, and the price is that not every positive function has a compact square-root circuit (Wang et al., 2024).
One foundational result is that squared PCs can be exponentially more succinct than monotone PCs. A quoted theorem states that there exists a class of non-negative functions 7 such that there are structured-decomposable PCs 8 with
9
and $f_{n} = \begin{cases} \prod_{n_i \in in(n)} f_{n_i} & \text{if } n \text{ is product},\[4pt] \sum_{n_i \in in(n)} w_{n,n_i} f_{n_i} & \text{if } n \text{ is sum}. \end{cases}$0 polynomial in $f_{n} = \begin{cases} \prod_{n_i \in in(n)} f_{n_i} & \text{if } n \text{ is product},\[4pt] \sum_{n_i \in in(n)} w_{n,n_i} f_{n_i} & \text{if } n \text{ is sum}. \end{cases}$1, but the smallest structured-decomposable monotone PC $f_{n} = \begin{cases} \prod_{n_i \in in(n)} f_{n_i} & \text{if } n \text{ is product},\[4pt] \sum_{n_i \in in(n)} w_{n,n_i} f_{n_i} & \text{if } n \text{ is sum}. \end{cases}$2 satisfying
$f_{n} = \begin{cases} \prod_{n_i \in in(n)} f_{n_i} & \text{if } n \text{ is product},\[4pt] \sum_{n_i \in in(n)} w_{n,n_i} f_{n_i} & \text{if } n \text{ is sum}. \end{cases}$3
has size $f_{n} = \begin{cases} \prod_{n_i \in in(n)} f_{n_i} & \text{if } n \text{ is product},\[4pt] \sum_{n_i \in in(n)} w_{n,n_i} f_{n_i} & \text{if } n \text{ is sum}. \end{cases}$4 (Wang et al., 2024). A concrete separating family used elsewhere is based on the uniqueness disjointness function
$f_{n} = \begin{cases} \prod_{n_i \in in(n)} f_{n_i} & \text{if } n \text{ is product},\[4pt] \sum_{n_i \in in(n)} w_{n,n_i} f_{n_i} & \text{if } n \text{ is sum}. \end{cases}$5
for which a squared structured PC of size $f_{n} = \begin{cases} \prod_{n_i \in in(n)} f_{n_i} & \text{if } n \text{ is product},\[4pt] \sum_{n_i \in in(n)} w_{n,n_i} f_{n_i} & \text{if } n \text{ is sum}. \end{cases}$6 exists, while any monotonic structured PC needs size at least $f_{n} = \begin{cases} \prod_{n_i \in in(n)} f_{n_i} & \text{if } n \text{ is product},\[4pt] \sum_{n_i \in in(n)} w_{n,n_i} f_{n_i} & \text{if } n \text{ is sum}. \end{cases}$7 (Loconte et al., 2024).
The reverse separation also holds. One theorem states that there exists a class of non-negative functions $f_{n} = \begin{cases} \prod_{n_i \in in(n)} f_{n_i} & \text{if } n \text{ is product},\[4pt] \sum_{n_i \in in(n)} w_{n,n_i} f_{n_i} & \text{if } n \text{ is sum}. \end{cases}$8 such that there are monotone structured-decomposable PCs $f_{n} = \begin{cases} \prod_{n_i \in in(n)} f_{n_i} & \text{if } n \text{ is product},\[4pt] \sum_{n_i \in in(n)} w_{n,n_i} f_{n_i} & \text{if } n \text{ is sum}. \end{cases}$9 with
0
of polynomial size, but the smallest structured-decomposable PC 1 satisfying
2
has size 3 (Wang et al., 2024). A more concrete separating family is the sum function
4
over 5 Boolean variables; this family has a monotonic structured PC of size 6, but any squared PC 7 obtained by squaring a structured-decomposable circuit 8 needs
9
These results establish that monotone structured PCs and squared structured PCs are incomparable in expressive efficiency. The common misconception that squaring uniformly dominates monotonicity is therefore incorrect: subtractive or complex parameterizations can yield dramatic compression for some functions, while direct nonnegative representations remain strictly better for others (Wang et al., 2024, Loconte et al., 2024).
4. Generalizations beyond a single square
One response to the incomparability result is to enlarge the model class rather than choosing between monotone and squared forms. The model called InceptionPC introduces two categorical latent variables for each sum-node scope, 0 with cardinality 1 and 2 with cardinality 3, and defines an augmented circuit 4. The resulting distribution is
5
Given a smooth and structured decomposable circuit 6, one can compute a smooth and structured decomposable circuit 7 such that
8
in size and time 9. If 0, the model reduces to a monotone-PC-like form; if 1, it reduces to a squared PC (Wang et al., 2024).
A second generalization is the class of sum of compatible squares PCs, abbreviated SOCS PCs, defined by
2
where each 3 is a squared PC and all squared components are pairwise compatible. This class was introduced precisely because a single squared circuit can still be too weak. Theoretical separations show that there exists a class of non-negative functions with a SOCS representation of size 4, while any monotonic structured PC computing such a function requires size 5, and any single squared PC 6 obtained by squaring a structured-decomposable circuit requires 7. An alternative construction yields SOCS size 8, while monotonic PCs and squared PCs both need size 9 (Loconte et al., 2024).
SOCS also serves as a unifying framework. Every complex squared PC can be reduced efficiently to a real SOCS PC; PSD circuits and SOCS PCs are polynomial-time interreducible through eigendecomposition; and complex or hypercomplex squared constructions can be represented as SOCS PCs with explicit polynomial overheads (Loconte et al., 2024). A further structural result states that any structured circuit 0 over a finite domain can be represented as
1
in time and space 2 (Loconte et al., 2024). This suggests that sums of squares are not merely an incremental extension of single-squared models, but a broader decomposition language for structured circuit computation.
5. Orthonormality, unitarity, and faster marginalization
A major line of work addresses the quadratic overhead of squaring by constraining the circuit parameters so that partition functions and marginals can be computed without explicitly constructing the squared circuit. In tensorized circuits, a circuit is called orthonormal if each input layer encodes orthonormal functions,
3
and each sum-layer matrix is semi-unitary,
4
If 5 is structured-decomposable and orthonormal, then 6. This is the circuit analogue of a tensor-network canonical form (Loconte et al., 2024).
The same idea was later reframed more generally in terms of orthogonality and determinism-like constraints. For a sum node, pointwise determinism gives
7
because 8 for 9. Orthogonality relaxes this to an integral condition,
$\vW$0
so cross terms disappear after integration rather than pointwise. If $\vW$1 is smooth, decomposable, and orthogonal, then
$\vW$2
can be computed in $\vW$3; if the circuit is $\vW$4-orthogonal, then
$\vW$5
is computable in linear time for fixed $\vW$6 (Loconte et al., 18 Dec 2025).
These structural conditions yield concrete marginalization algorithms. One result proves that computing
$\vW$7
requires time
$\vW$8
where $\vW$9 are layers depending only on variables in 00 and 01 are layers depending on both kept and marginalized variables (Loconte et al., 2024). A later formulation writes the same principle as
02
with the best case
03
The algorithmic intuition is consistent across both accounts: layers depending only on marginalized variables collapse to identity matrices and need not be evaluated, layers depending only on retained variables need not be squared, and only mixed-scope layers incur the quadratic cost (Loconte et al., 18 Dec 2025).
The literature also identifies assumptions and limitations. Input functions must be integrable and efficiently evaluable; circuits are typically required to be smooth and decomposable for the main inference guarantees; for stronger “any subset” marginalization guarantees, every variable must satisfy the layer-wise orthogonality condition; and enforcing full orthogonality from an arbitrary smooth decomposable circuit is 04-hard (Loconte et al., 18 Dec 2025). A plausible implication is that orthonormal and unitary parameterizations are best understood not as universal normal forms, but as tractability-preserving parameter classes.
6. Empirical behavior and the distinct arithmetic-circuit usage
Empirical studies in density estimation report that complex-valued squared models often outperform real-valued ones and train more smoothly. On MNIST, the reported test BPD values are: MonotonePC 05, SquaredPC (real) 06, SquaredPC (complex) 07, InceptionPC 08 09, and InceptionPC 10 11; analogous improvements are reported on EMNIST Letters, EMNIST Balanced, and FashionMNIST, with the paper’s main takeaways being that complex squared PCs outperform real squared PCs consistently, InceptionPCs outperform both monotone and squared PCs on these image datasets, increasing 12 beyond 13 gives little additional gain, and real squared PCs are harder to optimize because training curves are noisier and converge less smoothly (Wang et al., 2024).
For SOCS and unitary variants, the reported pattern is similar. On UCI density-estimation tasks, a monotonic PC often outperforms a single real squared PC, but complex squared PCs consistently do better than both, and SOCS PCs with multiple squares do best or best among the compared tractable models. On MNIST and FashionMNIST, unitary squared PCs match baseline squared PCs in bits-per-dimension as model size grows, while their training is faster and uses less memory because they do not materialize the squared circuit; the same work reports successful training of a non-structured-decomposable squared unitary PC (Loconte et al., 2024, Loconte et al., 18 Dec 2025). These findings suggest that the representational benefits of complex amplitudes and sums of squares can survive additional tractability constraints.
In a distinct arithmetic-circuit literature, “squaring circuit” refers not to probability models but to hardware that computes numerical squares. In the fault-tolerant quantum setting, quantum squaring means a reversible circuit mapping
14
where 15 is an 16-bit unsigned integer. A 2024 design in the Clifford+T model is optimized for T-count, CNOT-count, T-depth, CNOT-depth, and 17, produces no garbage outputs, uses a novel arrangement of the generated partial products, and reduces the number of adders by 18. For even 19, the reported T-count is 20; for odd 21, it is 22. The paper states asymptotic reductions of 23 in T-count, 24 in T-depth, 25 in CNOT-count, 26 in CNOT-depth, and 27 in 28 relative to Thapliyal et al., and 29, 30, 31, 32, and 33, respectively, relative to Nagamani et al. (Sultana et al., 2024). An earlier arXiv title, "Reversible Squaring Circuit For Low Power Digital Signal Processing" (Singla et al., 2014), is listed in the supplied record, but that record does not provide paper text.
Across these strands, the phrase “squared circuits” therefore names two different research objects. In probabilistic machine learning it denotes tractable nonnegative models of the form 34, with ongoing work on expressiveness, orthogonality, and efficient marginalization. In arithmetic and quantum-circuit design it denotes reversible hardware for computing 35. The overlap is terminological rather than methodological, but in both cases the square operation is the source of both the model’s usefulness and its main structural constraints.