Papers
Topics
Authors
Recent
Search
2000 character limit reached

Squared Circuits: Probabilistic Models & Quantum Circuits

Updated 4 July 2026
  • 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 cc is converted into a nonnegative density or mass function by taking a square or modulus square, typically p(x)=Z1c(x)2p(\mathbf{x}) = Z^{-1}|c(\mathbf{x})|^2. 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 a2a^2 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 nn,

$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 fCf_C and turns it into a non-negative density or mass function by squaring: p2(V):=fC(V)2vfC(v)2.p_2(V) := \frac{f_C(V)^2}{\sum_v f_C(v)^2}. 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 \odot or Kronecker product \otimes; and sum layers apply a linear map $\vW$ to a child vector. A squared circuit is then obtained by taking a complex-valued circuit p(x)=Z1c(x)2p(\mathbf{x}) = Z^{-1}|c(\mathbf{x})|^20 and forming the modulus square

p(x)=Z1c(x)2p(\mathbf{x}) = Z^{-1}|c(\mathbf{x})|^21

which is used to represent a probability distribution

p(x)=Z1c(x)2p(\mathbf{x}) = Z^{-1}|c(\mathbf{x})|^22

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 p(x)=Z1c(x)2p(\mathbf{x}) = Z^{-1}|c(\mathbf{x})|^23 may use signed, negative, or complex parameters, while the squared output remains nonnegative. This separates the representation of the latent algebraic object p(x)=Z1c(x)2p(\mathbf{x}) = Z^{-1}|c(\mathbf{x})|^24 from the representation of the observable density p(x)=Z1c(x)2p(\mathbf{x}) = Z^{-1}|c(\mathbf{x})|^25, 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 p(x)=Z1c(x)2p(\mathbf{x}) = Z^{-1}|c(\mathbf{x})|^26 such that

p(x)=Z1c(x)2p(\mathbf{x}) = Z^{-1}|c(\mathbf{x})|^27

with size and construction time p(x)=Z1c(x)2p(\mathbf{x}) = Z^{-1}|c(\mathbf{x})|^28. In the complex-valued setting, the corresponding identity is

p(x)=Z1c(x)2p(\mathbf{x}) = Z^{-1}|c(\mathbf{x})|^29

The tractability statement is explicit: given a smooth and decomposable circuit a2a^20, one can compute a smooth and decomposable circuit a2a^21 such that

a2a^22

in a2a^23 time, and if a2a^24 is structured-decomposable then one can compute a structured-decomposable circuit a2a^25 such that

a2a^26

in a2a^27 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 a2a^28 becomes a squared layer of width a2a^29, sum layers are parameterized by nn0, and product layers expand accordingly. The partition function nn1 generally takes time nn2, where nn3 is the number of layers and nn4 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 nn5 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: nn6 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 nn7 such that there are structured-decomposable PCs nn8 with

nn9

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

fCf_C0

of polynomial size, but the smallest structured-decomposable PC fCf_C1 satisfying

fCf_C2

has size fCf_C3 (Wang et al., 2024). A more concrete separating family is the sum function

fCf_C4

over fCf_C5 Boolean variables; this family has a monotonic structured PC of size fCf_C6, but any squared PC fCf_C7 obtained by squaring a structured-decomposable circuit fCf_C8 needs

fCf_C9

(Loconte et al., 2024).

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, p2(V):=fC(V)2vfC(v)2.p_2(V) := \frac{f_C(V)^2}{\sum_v f_C(v)^2}.0 with cardinality p2(V):=fC(V)2vfC(v)2.p_2(V) := \frac{f_C(V)^2}{\sum_v f_C(v)^2}.1 and p2(V):=fC(V)2vfC(v)2.p_2(V) := \frac{f_C(V)^2}{\sum_v f_C(v)^2}.2 with cardinality p2(V):=fC(V)2vfC(v)2.p_2(V) := \frac{f_C(V)^2}{\sum_v f_C(v)^2}.3, and defines an augmented circuit p2(V):=fC(V)2vfC(v)2.p_2(V) := \frac{f_C(V)^2}{\sum_v f_C(v)^2}.4. The resulting distribution is

p2(V):=fC(V)2vfC(v)2.p_2(V) := \frac{f_C(V)^2}{\sum_v f_C(v)^2}.5

Given a smooth and structured decomposable circuit p2(V):=fC(V)2vfC(v)2.p_2(V) := \frac{f_C(V)^2}{\sum_v f_C(v)^2}.6, one can compute a smooth and structured decomposable circuit p2(V):=fC(V)2vfC(v)2.p_2(V) := \frac{f_C(V)^2}{\sum_v f_C(v)^2}.7 such that

p2(V):=fC(V)2vfC(v)2.p_2(V) := \frac{f_C(V)^2}{\sum_v f_C(v)^2}.8

in size and time p2(V):=fC(V)2vfC(v)2.p_2(V) := \frac{f_C(V)^2}{\sum_v f_C(v)^2}.9. If \odot0, the model reduces to a monotone-PC-like form; if \odot1, 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

\odot2

where each \odot3 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 \odot4, while any monotonic structured PC computing such a function requires size \odot5, and any single squared PC \odot6 obtained by squaring a structured-decomposable circuit requires \odot7. An alternative construction yields SOCS size \odot8, while monotonic PCs and squared PCs both need size \odot9 (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 \otimes0 over a finite domain can be represented as

\otimes1

in time and space \otimes2 (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,

\otimes3

and each sum-layer matrix is semi-unitary,

\otimes4

If \otimes5 is structured-decomposable and orthonormal, then \otimes6. 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

\otimes7

because \otimes8 for \otimes9. 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 p(x)=Z1c(x)2p(\mathbf{x}) = Z^{-1}|c(\mathbf{x})|^200 and p(x)=Z1c(x)2p(\mathbf{x}) = Z^{-1}|c(\mathbf{x})|^201 are layers depending on both kept and marginalized variables (Loconte et al., 2024). A later formulation writes the same principle as

p(x)=Z1c(x)2p(\mathbf{x}) = Z^{-1}|c(\mathbf{x})|^202

with the best case

p(x)=Z1c(x)2p(\mathbf{x}) = Z^{-1}|c(\mathbf{x})|^203

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 p(x)=Z1c(x)2p(\mathbf{x}) = Z^{-1}|c(\mathbf{x})|^204-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 p(x)=Z1c(x)2p(\mathbf{x}) = Z^{-1}|c(\mathbf{x})|^205, SquaredPC (real) p(x)=Z1c(x)2p(\mathbf{x}) = Z^{-1}|c(\mathbf{x})|^206, SquaredPC (complex) p(x)=Z1c(x)2p(\mathbf{x}) = Z^{-1}|c(\mathbf{x})|^207, InceptionPC p(x)=Z1c(x)2p(\mathbf{x}) = Z^{-1}|c(\mathbf{x})|^208 p(x)=Z1c(x)2p(\mathbf{x}) = Z^{-1}|c(\mathbf{x})|^209, and InceptionPC p(x)=Z1c(x)2p(\mathbf{x}) = Z^{-1}|c(\mathbf{x})|^210 p(x)=Z1c(x)2p(\mathbf{x}) = Z^{-1}|c(\mathbf{x})|^211; 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 p(x)=Z1c(x)2p(\mathbf{x}) = Z^{-1}|c(\mathbf{x})|^212 beyond p(x)=Z1c(x)2p(\mathbf{x}) = Z^{-1}|c(\mathbf{x})|^213 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

p(x)=Z1c(x)2p(\mathbf{x}) = Z^{-1}|c(\mathbf{x})|^214

where p(x)=Z1c(x)2p(\mathbf{x}) = Z^{-1}|c(\mathbf{x})|^215 is an p(x)=Z1c(x)2p(\mathbf{x}) = Z^{-1}|c(\mathbf{x})|^216-bit unsigned integer. A 2024 design in the Clifford+T model is optimized for T-count, CNOT-count, T-depth, CNOT-depth, and p(x)=Z1c(x)2p(\mathbf{x}) = Z^{-1}|c(\mathbf{x})|^217, produces no garbage outputs, uses a novel arrangement of the generated partial products, and reduces the number of adders by p(x)=Z1c(x)2p(\mathbf{x}) = Z^{-1}|c(\mathbf{x})|^218. For even p(x)=Z1c(x)2p(\mathbf{x}) = Z^{-1}|c(\mathbf{x})|^219, the reported T-count is p(x)=Z1c(x)2p(\mathbf{x}) = Z^{-1}|c(\mathbf{x})|^220; for odd p(x)=Z1c(x)2p(\mathbf{x}) = Z^{-1}|c(\mathbf{x})|^221, it is p(x)=Z1c(x)2p(\mathbf{x}) = Z^{-1}|c(\mathbf{x})|^222. The paper states asymptotic reductions of p(x)=Z1c(x)2p(\mathbf{x}) = Z^{-1}|c(\mathbf{x})|^223 in T-count, p(x)=Z1c(x)2p(\mathbf{x}) = Z^{-1}|c(\mathbf{x})|^224 in T-depth, p(x)=Z1c(x)2p(\mathbf{x}) = Z^{-1}|c(\mathbf{x})|^225 in CNOT-count, p(x)=Z1c(x)2p(\mathbf{x}) = Z^{-1}|c(\mathbf{x})|^226 in CNOT-depth, and p(x)=Z1c(x)2p(\mathbf{x}) = Z^{-1}|c(\mathbf{x})|^227 in p(x)=Z1c(x)2p(\mathbf{x}) = Z^{-1}|c(\mathbf{x})|^228 relative to Thapliyal et al., and p(x)=Z1c(x)2p(\mathbf{x}) = Z^{-1}|c(\mathbf{x})|^229, p(x)=Z1c(x)2p(\mathbf{x}) = Z^{-1}|c(\mathbf{x})|^230, p(x)=Z1c(x)2p(\mathbf{x}) = Z^{-1}|c(\mathbf{x})|^231, p(x)=Z1c(x)2p(\mathbf{x}) = Z^{-1}|c(\mathbf{x})|^232, and p(x)=Z1c(x)2p(\mathbf{x}) = Z^{-1}|c(\mathbf{x})|^233, 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 p(x)=Z1c(x)2p(\mathbf{x}) = Z^{-1}|c(\mathbf{x})|^234, with ongoing work on expressiveness, orthogonality, and efficient marginalization. In arithmetic and quantum-circuit design it denotes reversible hardware for computing p(x)=Z1c(x)2p(\mathbf{x}) = Z^{-1}|c(\mathbf{x})|^235. 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.

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to Squared Circuits.