Semantic embedding for quantum algorithms

The study of classical algorithms is supported by an immense understructure, founded in logic, type, and category theory, that allows an algorithmist to reason about the sequential manipulation of data irrespective of a computation's realizing dynamics. As quantum computing matures, a similar need has developed for an assurance of the correctness of high-level quantum algorithmic reasoning. Parallel to this need, many quantum algorithms have been unified and improved using quantum signal processing (QSP) and quantum singular value transformation (QSVT), which characterize the ability, by alternating circuit ans\"atze, to transform the singular values of sub-blocks of unitary matrices by polynomial functions. However, while the algebraic manipulation of polynomials is simple (e.g., compositions and products), the QSP/QSVT circuits realizing analogous manipulations of their embedded polynomials are non-obvious. This work constructs and characterizes the runtime and expressivity of QSP/QSVT protocols where circuit manipulation maps naturally to the algebraic manipulation of functional transforms (termed semantic embedding). In this way, QSP/QSVT can be treated and combined modularly, purely in terms of the functional transforms they embed, with key guarantees on the computability and modularity of the realizing circuits. We also identify existing quantum algorithms whose use of semantic embedding is implicit, spanning from distributed search to proofs of soundness in quantum cryptography. The methods used, based in category theory, establish a theory of semantically embeddable quantum algorithms, and provide a new role for QSP/QSVT in reducing sophisticated algorithmic problems to simpler algebraic ones.


I. Introduction
It is an understated but core tenet of computing that the semantic structure of an algorithm can be made independent of its representation.That is, while an algorithmist blithely concerns themselves with the sequential application of functions to meaningful data, said algorithm is in truth run on a computational system whose structure and initialization might bear little resemblance to the considered problem.That algorithms can be reasoned about so agnostically to the systems in which they are embedded is the product of enormous effort in the development of classical computer languages and methods for verifying program meaning and correctness [1][2][3][4].Analogously, as systems for quantum information processing become increasingly sophisticated, the need has grown for similar representation-agnosticism in quantum computing [5][6][7].
Building on methods from classical computation, this work takes steps toward specifying how quantum algorithms with semantic structure can, as subroutines, be put together while ensuring the preservation of this structure.Specifically, we focus on the combination of instances of quantum signal processing (QSP) and quantum singular value transformation (QSVT), which have recently had success in unifying, simplifying, and improving most known quantum algorithms [8,9].These algorithms perform polynomial transformations on the singular values of embedded linear operators, and consequently the semantic structure we endeavor to preserve in their combination relates strongly to these polynomial transforms.Beyond its value in the design of complex quantum algorithms, we are also able to show that combining QSVT subroutines in this way has application to distributed scheduling protocols [10], distributed linear systems problems [11], and proofs of security against quantum adversaries in cryptographic protocols [12,13].
Unsurprisingly, preserving the semantic structure of QSVT circuits as subroutines under combination imposes strict requirements on the form of this combination.It is known that a variety of ubiquitous concepts in classical control flow [14] and recursion [15] cannot be naïvely applied to quantum computations, and thus these results provide methods for clear, useful, and above all simply achievable manipulations at the algorithmic level for quantum information processing.To the extent that QSVT can achieve state-of-the-art performance for most known quantum algorithmic tasks, and under known restrictions on the functional transformations they embed, this work fully characterizes the rules under which such modules can be (algorithmically) meaningfully combined.The understructure of this theory is built from, as per its classical counterpart [16,17], basic but elegant techniques in category theory [18], suggesting an exciting prospect for the expanded applicability of this subfield to the theory of quantum computation.
While this paper is not solely for those familiar with QSP and QSVT, the specificity of its problem statement and methods requires some knowledge of how these quantum algorithms work.As such, in the following paragraphs we discuss high-level properties of QSP and QSVT, toward introducing a category-theoretic diagram, Fig. 1, summarizing our core contribution.We aim to keep this discussion simple, generic, and intuition-forward.As such, we want to dissuade a view of QSP and QSVT as monolithic or fixed algorithms, promoting them instead as concrete instances of a wider, modular approach to quantum information processing.
Quantum signal processing (QSP) [19][20][21][22] and quantum singular value transformation (QSVT) [9], quantum algorithms for obliviously transforming the singular values of linear operators encoded in unitary matrices by polynomial functions, have enjoyed recent success in unifying and improving most quantum algorithms [8,9,23].This unification is founded in the surprising expressivity of the QSVT circuit ansatz, which permits one to cleanly take algorithmic problems to questions about the existence of polynomial functions with desired properties.Despite this success, the applicability of QSP and QSVT in generating new quantum algorithms remains limited by the opaqueness of the map between quantum circuits and their embedded polynomial transformation.
The action of QSP is to take access to an oracle W (x) ∈ SU(2) parameterized by a scalar value x ∈ R (the signal) and output a unitary circuit that embeds a polynomial transformation P (x) ∈ C[x].Crucially, by 'embeds' we mean (with concrete definitions to follow) that this P (x) relates simply to the distribution assigned to a simple observable, allowing measurements to depend strongly on properties of the signal.
The abstraction of a QSP circuit to the polynomial it embeds is so useful in fact that it is tempting to think of QSP/QSVT protocols solely in terms of the functional transforms they embed.These transforms are imbued with, and interpretable according to, algorithmic tasks (they are semantic).E.g., for amplitude amplification, one desires a polynomial which is approximately constant over its domain [8].Moreover, the cost of the implementation of these polynomials, their action under noise, and the stability of their numerical computation, are well-understood, and grounded in longstanding functional analytic techniques.The business of this paper is to modify this temptation to view QSP/QSVT 'function-first' into a firm, mathematical statement.
A natural question is whether a larger class of quantum algorithmic tasks than QSP/QSVT can be viewed through a purely functional lens.Formalizing this question is a matter of understanding how algebraic manipulations in functional space (the space with semantic interpretation) correspond to their pre-image in the programmable space of parameterized circuit ansätze (a space with physical interpretation).If this question is resolvable for a given algebraic manipulation, and moreover if the required map is efficiently computable, then we can perform useful analysis of quantum algorithms while reasoning purely in functional space.This frees the algorithmist to consider higher-order manipulations of quantum information.To summarize the above, we provide the following remark, which reframes known properties of QSP to fit our problem statement.
Remark I.1 (QSP protocols in programmable space and functional space).A QSP protocol is an alternating quantum circuit ansatz defined by a list of real numbers Φ ∈ R n+1 (the QSP phases), and using a unitary oracle W (x) ∈ SU(2) parameterized by some unknown x ∈ R. The action of this circuit is to take as input Φ and prepare a unitary that calls W (x) n times and embeds an at most degree n polynomial P (x) (usually as a matrix element), where P (x) relates simply to an observed probability.In other words, QSP has the type signature where C n [x] are polynomials in x over C of degree at most n, and where we leave the relevant maps and projections unspecified for brevity.In other words, QSP returns an accessible function on an unknown parameter.We say here that Φ sits in programmable space (with physical interpretation), while P sits in functional space (with semantic interpretation).Before introducing a formal problem statement, we can play with the type signature of QSP in Eq. 1; it is easy to imagine maps between sets of real numbers, as well as polynomials.The intent of this work (and a core concept, as explained later, within category theory) is to have such maps remain non-trivial while also meshing with one another.That is, that a graph like the following: permits observations like h • f = f • g, or that one cares only about beginning-and end-points of valid paths according to arrows.In other words, that this diagram commutes.The algorithmist here desires mostly to think about h, while ensuring that a simple and corresponding g can be found, through an understanding of f (the QSP map from phases to polynomials).
Having provided a type signature of the action of QSP (which under slight modification suffices for QSVT, see Eq. 31), we now can more earnestly use basic ideas in category theory to precisely define what we intend by 'analogousness' between manipulations in functional and programmable space.The category-theoretic diagram in Fig. 1 will constitute our problem statement, together with Table I, which describes assignments of concrete objects (e.g., circuits and manipulations of circuit parameters) in QSP to the objects and arrows of Fig. 1.
We intend that the simple form of the problem statement for semantic embedding, given in Fig. 1 through Def.I.1, supports a more ambitious role for QSP and QSVT in understanding quantum algorithms.Further advancements could come in the form of realizing new assignments for functors Fig. 1, as well as in the analysis of modified QSP-like ansätze.Together, determining how constraints on circuit parameterizations correspond to algorithmic expressivity, and specifying rules for how to semantically combine subroutines while preserving this expressivity, enables and encourages higherorder reasoning about quantum computations in a formal way.
There are substantial barriers in the way of specifying such ansätze and combination rules.As is well known, the map between QSP phases and the achieved polynomial transform is opaque [24], and without modification not unique [25].Moreover, naïvely recursively nesting a QSP circuit within itself does not (as shown after Def.II.1) recursively compose the achieved polynomial transform.In other words, semantic actions on polynomials do not automatically correspond to simple manipulations of the QSP phases.Nevertheless, for simple cases, this correspondence seems to be possible (e.g., Chebyshev polynomials).This work answers positively that a far more expressive set of QSP protocols can be combined semantically as modules.The strength of this work rests in its preservation of the properties that make QSP pleasant: (1) an efficiently computable, numerically stable map from an embedded polynomial to QSP phases, and (2) that a fixed, contiguous QSP protocol can be said to achieve a fixed functional transform.Simply composing polynomials, and only then finding the resulting function's QSP phases, does not guarantee that said phases can be computed efficiently in the number of compositions, nor that the resulting program could be decomposed into contiguous QSP subroutines.This work careful preserves both (1) and (2), lifting said pleasant properties to a new setting.

A. Problem statement
The definition of semantically embedded QSP depends on common constructions in category theory, covered in Appendix C. It will turn out that the foundational category theoretic concept of natural transformations (and its accompanying diagram) will, when assigned proper objects in quantum computation, identify criteria under which a given scheme for embedding QSP protocols becomes semantic (i.e., algorithmically meaningful).
Toward our problem statement, we translate the diagram given in Fig. 1 (similar to Fig. 4 in the appendices) to the world of QSP by making a series of assignments to the objects and arrows.The basic objects, indexed by a, b, c in the original figure become ordered lists of QSP phases (possibly constrained), on which the natural morphisms are functions f, g, h taking two phase lists (one implicit) and embedding one inside the other to produce a new, flat list according to Φ 0 , where these functions will end up being defined to exactly correspond to the act of the outer QSP protocol (with phases Φ 1 ) calling the inner protocol (with phases Φ 0 ) whenever it would have called the standard QSP oracle (i.e., the QSP protocol with phases {0, 0}).This concept of physically 'nesting' one protocol inside the other is vital, as in general we seek to use QSP protocols (and their functional transforms) as resources whose action can not in general be subdivided.
We define the functors S, T as the unitary resulting from compiling a QSP protocol according to a set of phases, and the result of projecting out the top-left matrix element of this unitary respectively.The latter recovers an amplitude whose magnitude-squared is a probability whose Bernoulli distribution is easy to sample from.The full map from category theoretic notation to that of QSP in Table I.Definition I.1 (Semantic embedding for QSP).Taking the diagram in Fig. 1, we say that the morphisms f, g, h are semantically embedding for QSP protocols if S, T as translated by Table I are such that Sf, Sg, Sh correspond to circuit composition (respecting contiguity of the inner phase list), T f, T g, T h correspond to polynomial composition, the components of the natural transformation τ a, τ b, τ c are simple projection from a unitary operator to its top-left matrix element, and the diagram given commutes.Moreover, the functions f, g, h should be efficiently computable.
In other words, we say that a method of embedding QSP protocol is semantic if the pre-image of polynomial composition according to the functor T in the space of QSP phases (i.e., a, b, c) is efficiently computable.While we will refer specifically to the arrows f, g, h in the diagram for a natural transformation as semantic, we will sometimes overload our definitions and refer to the assignments made in Table I as semantic also.Note that the desirable action from a computational standpoint is to manipulate embedded polynomial transforms of an unknown scalar (which in turn relate simply to amplitudes assigned to quantum states).Computing the preimage of this composition in the programmable space of QSP phases makes this goal concretely satisfiable.This is equivalent to the statement of Def.I.1: that even fixing all of the natural transformation τ , the functors S, T , and the objects a, b, c, still permits a satisfying (efficiently computable) definition for f, g, h.

B. Prior work
The theory of QSP has its roots in the study of composite pulse techniques for NMR [19,20], and was first applied to improve methods for Hamiltonian simulation [21,22].While early works considered systems of multiple qubits, the method for lifting QSP to such settings was greatly expanded to consider the manipulation of general embedded linear operators and renamed QSVT [9].The core of this argument concerned the QSP-like manipulation of invariant SU(2) subspaces preserved by alternating projectors according to an old result: Jordan's lemma [26].Recent work has also simplified the application and interpretation of Jordan's lemma in QSVT, relying on the simpler but related cosine-sine decomposition [23].
Simultaneously, detailed work has been done to ensure that the classical algorithms for determining the parameterizations of QSP and QSVT circuits are truly efficient and numerically stable.These include initial work on using standard precision arithmetic [24,37,38], as well as methods for removing unnecessary degrees of freedom in the QSP circuit parameterization [25].Recent work has also further clarified the properties of the map between QSP phases and the achieved functional transform in terms of the norm of the former and the Fourier coefficients of the latter [39].
Research into the coherent composition and combination of quantum subroutines has been more limited, in part due to the difficulty of analyzing their behavior beyond those protocols simply using amplitude amplification.These simpler instances include quantum routines for scheduling [40] (which predates and thus does not use QSP explicitly), and distributed linear algebraic problems [11].Additionally and excitingly, the black-box use of quantum subroutines is prevalent in proofs of security for quantum cryptography, wherein quantum analogues for common classical cryptographic techniques for rewinding (e.g., witness extraction and simulation) [12,13] often require one to precisely understand the properties of such coherent circuit compositions.Even beyond the cryptographic setting, the study of quantum superchannels with black-box access is rich with applications to quantum channel discrimination and the communication of quantum information [41][42][43][44][45][46].
This work combines elements from all of the above-mentioned areas: (1) basic considerations on the theory of QSP/QSVT, (2) properties of QSP/QSVT protocols with restricted phases, and (3) the recent tools available for the analysis of distributed or multi-party quantum computations.Finally, we employ basic concepts and language from the world of category theory, which has had success, as inspired by its classical counterpart in programming language design and program verification [2][3][4], in undergirding a growing theory of quantum programming languages.A long line of work has considered such category-theoretical constructions of higher-level quantum programming concepts [5,7], including data-types capturing purity in quantum computations [47], interpretations for recursion and self-embedding [14,15], and methods for verifying program correctness based in Floyd-Hoare logic [48].Determining if QSVT can contribute meaningfully to such abstractions is one focus of this work.

C. Summary of results and open problems
This work is divided into four major parts: (1) a problem statement and definition for semantic embedding based on concepts in category theory, discussed in Sec.I A, (2) a series of theorems constructing a satisfying assignment for this definition using QSP in Sec.II, (3) a series of theorems discussing two different instances of a satisfying assignment for this definition using QSVT in Sec.III, and finally (4) a series of expanded examples of known quantum algorithms which implicitly make use of semantic embedding in Sec.IV, from a variety of disparate subfields.Where possible we discuss where our constructions are unique, and in what sense the exhaust the possible satisfying assignments to the diagram for semantic embedding.This work is targeted toward an audience familiar with the theory of QSP and QSVT, and as such basic results and properties of these algorithms are left, for the interested reader, to Appendix A.
The new components in this work exist on two levels.On the first, we provide a succinct explanation, rooted in category theory, for what a variety of nested QSP and QSVT circuits are achieving in terms of their underlying embedded transformations.We show that this diagrammatic interpretation leads to greater clarity for what is both desirable and possible to achieve by the coherent composition of QSP/QSVT as subroutines.Secondly, we work through the details of nested QSP and QSVT protocols to determine the concrete constraints on their circuit parameters that enable not merely nested protocols, but embedded functional transforms.Throughout this work, we try to use these two terms strictly: nesting is a process in the programmable space of the circuit ansatz (e.g., the QSP phases Φ) that respects blocks of quantum gates as subroutines, while embedding is a process in functional space (e.g., the polynomial transform P (x) induced by a QSP unitary).The goal for the embedding is for it to be semantic-logical and meaningful-while also being induced (in circuit space, and up to mild constraints) by nesting.Definitions and theorems in Sec.II and Sec.III are structured in parallel to this distinction.
Open problems include expanding the possible satisfying assignments for the functors in Fig. 1 in the setting of QSP, and more strongly characterizing possible manipulations in functional space.Moreover, as is true for QSVT generally, most applications basically perform amplitude amplification, which is often achievable nearly as efficiently through other means.Determining interactive protocols (perhaps like those in [11]) for which round and communication complexity are both non constant may help in this goal.Finally, this work applies only extremely basic category theoretic concepts; formalizing useful abstractions in quantum computing for the manipulation of quantum information using QSP/QSVT is still nascent, and may have great use in the development of higherlevel quantum programming languages as we attempt to move away from a gate-level understanding of quantum computations.

II. Semantically embedded QSP
Toward a satisfying assignment for semantic embedding (Def.I.1), we use this section to define and discuss the result of successively nesting QSP protocols (Def.II.1), or equivalently the action of QSP protocols which call, in place of their standard oracle, the result of another, consistent, perhaps unknown QSP computation.We are able to show that only mild restrictions on these protocols lead to a satisfying assignment for the f, g, h given in the diagram of Fig. 1, and prove a variety of key properties about the achievable functional transforms.
Definition II.1 (Nested QSP protocol).A nested QSP protocol is identical to a standard QSP protocol up to the substitution of the standard oracle by another QSP protocol.I.e., given U Φ0 (x), the unitary generated by a QSP protocol with QSP phases Φ 0 ∈ R n+1 , the (once) nested QSP protocol according to phase lists Φ 1 ∈ R m+1 , Φ 0 ∈ R n+1 has the defining quantum circuit: where φ 1,k is the k-th element of Φ 1 and analogously for Φ 0 .We use (Φ)(x) as shorthand for U Φ (x) in a way that makes composition of such protocols, e.g., (Φ 1 •Φ)(x) easy to express.Here Φ 0 specifies the inner protocol while Φ 1 specifies the outer protocol.This nesting can be continued recursively as many times as one wishes, e.g., A depiction of these protocols is given in Fig. 2. Note that the inner protocol's phases remain contiguous under nesting, implying that this protocol is really being used as a black box.
We can see clearly that nested QSP protocols are, by simple expansion, valid QSP protocols, but that the composition of two arbitrary protocols does not compose their functional transforms.A simple example of this follows taking Φ 0 = Φ 1 = {π/4, π/4, π/4}, whose inner and nested protocols embed the following respectively where the latter is clearly different than the composition of P with itself: One can also see that taking instead Φ 0 = Φ 1 = {0, 0, 0} does indeed induce the composition of embedded polynomial transforms T 2 (x) → (T 2 • T 2 )(x) = T 4 (x) where T n (x) is the n-th Chebyshev-T polynomial evaluated at x.The primary aim of a theory of semantically embedded QSP protocols is thus to formally specify the conditions under which some reasonable form of nesting for circuits (a manipulation in the programmable space preserving contiguousness of the inner protocol), corresponds neatly to polynomial composition (or a related manipulation in functional space).
While the counterexample given above for general composition of functional transforms in QSP seems to rely heavily on properties of SU(2), the same sorts of counterexamples can be made to appear in the theory of classical Boolean functions.We give a short exposition of one such counterexample, illustrating that the composition of general functions in even classical data processing ought to be treated carefully.
Example II.1 (Composing multivariable Boolean functions).Consider two multivariable Boolean functions f, g with the same domain and range: For purpose of example we define their action the following way: We note that if one wanted to compute the logical and (∧) or logical or (∨) of two variables, they could use one of the functions above, ignoring select bits from the input and output, i.e., where by this notation we mean that we care only about what we feed to the 0, 1 indices of f , and what is output in the 0 index.Now consider the following 'natural' composition rule (i.e., appending the outputs of two applications of k and feeding this into h) for functions h, k with type signature where we have condensed the four elements of the argument into the tuple x.If one is now to compute (h • k) 01 →0 , it is clearly not the 'natural' composition of the function h 01 →0 with that of k 01 →0 , each of which have type signatures {0, 1} 2 → {0, 1} 1 .For our functions f, g the composition according to this rule results in rather than the intended composition demonstrating our intended result.
FIG. 2. Symbolic representation for the nesting of QSP protocols (Def.II.1).Here (a) shows standard QSP, an interleaved series of control (white) and oracle (black) unitaries, (b) shows one instance of a QSP protocol nested in another, while (c) gives the same, with the nested protocol (diagonal hashes) in a suppressed notation (i.e., treated as an oracle).This supressed notation becomes more useful in the depiction of self-embedded QSVT in Fig. 3.Here Rz(φ) = exp (i φ σz) while W (x) = exp (i arccos x σx) per usual, and U (Φ) is the QSP protocol with phases Φ.
While the functions given in Example II.1 are somewhat contrived, the composition rule provided is not unnatural at first glance, and can in fact be simply repaired if the rule for composition is replaced with a permuted version of itself, namely where here π is some permutation swapping the second and third outputs of the function k.The key takeaway is that when the underlying accessible maps are situated in a larger natural domain and range than the one intended for evaluation (as is the case for the unitary U Φ and the physically accessible probability P (x) in QSP), then composition of these underlying desirable functions (e.g., f 01 →0 and g 01 →0 ) is not only not assured, but often not possible without access to additional manipulations.In this work we consider quantum protocols with black-box access to QSP/QSVT protocols, and consequently being able to flexibly make use of these subroutines in computations carries the caveat that the required manipulations to respect functional manipulations embedded in these protocols need to be physically possible to perform without explicit knowledge of the oracular protocol.This in turn means we have to explicitly consider the action of these functions in domains larger than those required for computation, as in the above example.Before discussing a satisfying assignment for the question posed in Def.I.1, we give a definition for QSP protocols with a property sufficient to avoid the problem discussed in the previous paragraph.I.e., we define protocols which, upon nesting (Def.II.1) induce functional composition of their topleft elements.Throughout this work will consider the top-left element for clarity, but we could have privileged other measurement bases as well with similar results.
Definition II.2 (Embeddable QSP protocol).Let U Φ (x) be the unitary for a QSP protocol with signal x and phases Φ.A QSP protocol is embeddable if for all x ∈ [−1, 1] the unitary U Φ (x) has the form where f, g Equivalently, embeddable QSP protocols are those for which the resulting unitary, for any signal x, rotates about an axis in the XY -plane of the Bloch sphere.
To see that QSP protocols satisfying Def.II.2 can be nested to compose their embedded polynomial transforms, it is enough to observe the following lemma.
Lemma II.1 (QSP with twisted oracles).Let W (x) = e i arccos x the standard QSP oracle.Then the twisted oracle W θ (x) = e iθσz W (x)e −iθσz can be used as the oracle for a standard QSP protocol obliviously, and produces a twisted unitary transform that relates to the untwisted unitary transform simply: where U Φ (θ, x) is U φ (x) using twisted oracles in place of untwisted ones.Proof is easily seen by expanding the definition of QSP protocols and cancelling adjacent opposite σ z rotations (save those at the beginning and end).
In other words, the form given in Def.II.2 is precisely that of a twisted oracle, meaning that fully characterizing the properties of QSP phase lists which produce embeddable protocols will in turn characterize the properties required for semantic embedding in QSP (Def.I.1).We start this by defining a sub-class of QSP protocols whose phases obey a discrete symmetry.The study of such restrictions on QSP phases has recently expanded in scope, and we give a view of these advances in Appendix A 3.
Definition II.3 ((Even) antisymmetric QSP protocols).Let Φ ∈ R 2d ; a length 2d antisymmetric QSP protocol is a QSP protocol with Φ = Φ ∪ (Φ ) RN for Φ ∈ R d arbitrary.Equivalently, Φ is antisymmetric under phase-order reversal: Note that this constrains P to be real, as discussed in Appendix A 3. We can also define odd antisymmetric protocols with Φ ∈ R 2d+1 : where the central phase is constrained to be zero.
Antisymmetric QSP protocols, by merit of the mild symmetry imposed on their defining phase lists, are still quite expressive.In what follows, we prove a variety of their most salient properties, before connecting them to embeddable QSP protocols discussed earlier.We express that studying the properties of QSP protocols whose phases obey constraints is an interesting direction in itself, with bearing on numerical properties of algorithms optimizing over such protocols [25], as well as their action under noise [49].
Theorem II.1 (Existence and uniqueness of antisymmetric QSP protocols).Take polynomials P ∈ R[x] (note real) and Q ∈ C[x] satisfying the following: 1.The degree of P is d and the degree of Q is d − 1.

∀x ∈
4. In the case that d is even, the leading coefficient of P is positive.

There exists a unique set of antisymmetric phase factors
Here D d , the antisymmetric QSP phase domain, following the notation of [25], and is defined in the even and odd cases (Def.II.3) separately: Note in our theorem statement both P, Q are specified; if only P is specified, then multiple satisfying Q , e.g., Q * can be chosen satisfying Additionally, we provide an analogue of the main matrix-completion theorem of QSP (see Appendix A) for antisymmetric QSP protocols.This constraint, as shown, adds a new condition on the roots of the embedded polynomials, which is easy to describe.In practice, one finds QSP phases for such protocols with numerical optimization, but it is an interesting question whether there exist simpler, alternative methods of describing polynomials with similar properties of their root sets.

∀x ∈
4. For the following expression: the multiset r i of roots of F must be closed under negation.
5. In the case that d is even, the leading coefficient of P is positive.
There exists a unique antisymmetric QSP protocol with Φ ∈ D d (Eqs.24, 25) whose unitary has the form Moreover, the phases Φ can be efficiently computed classically given the coefficients of P .
Proof.Proof follows by standard application of the single-variable Fejér-Riesz lemma [50].Take A(x) = 1 − P (x) 2 , evidently a non-negative polynomial with roots at x = ±1.The nonnegativity of A(x) implies that it is expressible as the modulus squared of a complex polynomial R(x) with a prefactor, i.e, where we have factored out the known roots at By the uniqueness of antisymmetric QSP protocols (Thm II.1), this completion is also unique.
Theorem II.4 (Nesting of antisymmetric/embeddable QSP protocols).Let Φ 0 , Φ 1 be the (unique) antisymmetric (equivalently embeddable) QSP phase lists embedding polynomial transforms P 0 , P 1 in their corresponding unitaries.Equivalently, The nesting of these QSP protocols results in the following unitary: where the off-diagonal elements are easily computed using Thm.II.3 if desired.In other words nesting of embeddable QSP protocols implies a corresponding composition of polynomial transforms.Moreover, as a corollary, we see that both the embeddable and asymmetric properties of QSP protocols are preserved under composition.
Proof.Proof follows easily from application of Lemma II.1, recognizing the inner QSP protocol, Φ 0 , as producing a twisted oracle encoding P 0 (as seen by Φ 1 .Consequently, up to an overall σ zrotation, P 1 and P 0 compose, and moreover the resulting protocol, by the fact that both P 0 , P 1 are real-valued, is also embeddable and thus antisymmetric. Corollary II.4.1 (Uniqueness of antisymmetric phase factors for nested QSP and polynomial composition).Given an assignment for the diagram given in Fig. 1 where the arrows f, g, h correspond to the outer QSP protocol calling the inner QSP protocol in place of its standard oracle, antisymmetry of the phase lists Φ as defined in Def.II.3 is the unique symmetry which for all x permits this diagram to commute.
Proof.Proof of this fact is relatively straightforward.Take a generic QSP protocol whose phases do not obey the antisymmetry constraint given in Def.II.3.By definition this protocol embeds in its corresponding unitary's top left corner a polynomial P which is not entirely real on its domain, as otherwise there would exist an equivalent set of phases which both achieved this polynomial transform and were antisymmetric.Consequently this oracle is not a rotation about an axis in the XY plane of the Bloch sphere for all x, and thus is not generated by an element of SU(2) which anticommutes with Z rotations for all arguments x.Therefore there exists a non-trivial (i.e., non-constant) component of the oracle QSP protocol which commutes with all applied Z rotations for x = ±1, and can therefore not be involved in the functional composition.But we know a general outer protocol can provide a P which is injective its domain, meaning that our intended functional composition has necessarily lost information about the action of the inner protocol (i.e., the commuting part of the oracle).
Returning to the original statement of semantic embedding (Def.I.1), and following the prescription of Table I, we see that restricting to antisymmetric QSP phase lists (objects a, b, c in Fig. 1), permits nesting of these phase lists (arrows f, g, h defined according to Def.II.1) to correspond directly (through the components of the natural transformation τ a, τ b, τ c) to functional composition in the picture provided by the functor T .Moreover, due to the intimate relation between the condition imposed by antisymmetry, and properties of the Lie group SU(2), we can make a strong statement for the uniqueness of this constraint for achieving functional composition (on all arguments and exactly) by composing circuits (Corollary II.4.1).Consequently, restriction to antisymmetric phase lists (which as shown above imposes only mild restrictions on the achievable embedded polynomial transformations), permits the diagram depicting the natural transformation (with assignments to the objects and arrows of QSP) to commute.In what follows, we will take this satisfying assignment and lift the resulting QSP protocols to QSVT.We note that it is an interesting and open question if such constraints can be relaxed if one imposes additional constraints on the magnitude of the involved signals, or if one desires composition to only be approximately achieved, but we leave this discussion to future work.

III. Semantically embedded QSVT
The aims of this section are twofold.The first is to follow the standard lifting argument from QSP to QSVT, covered in Appendix A 1, to give a theory of semantic embedding for QSVT.The second is to investigate additional freedoms in the structure of QSVT to devise new satisfying assignments for the diagram in Fig. 1 which have distinct interpretations in both the programmable and functional spaces of QSVT.In turn, we want to argue that these expanded satisfying assignments, together with those inherited directly from QSP, in some strong sense constitute all reasonable satisfying assignments; toward this, we consider the closure of quantum circuits (and their induced transforms) under such manipulations.
The first of these nesting procedures follows almost immediately from the QSP nesting procedure in Def.II.1, respecting the order of application of oracles in the QSP case, and consequently inducing an identical nesting transformation in each two-dimensional subspace preserved by the actions of the two projectors Π, Π constituting the relevant QSVT protocol.These projectors are in some sense the main distinguishing factor between QSP and QSVT, locating the sub-block of a unitary matrix to whose eigenvalues or singular values our QSP-like polynomial transformations are applied [9,23].
In this way we can, in analogy to the type signature for QSP in Eq. 1, we can give an analogous one for QSVT including the relevant projectors where the second and third arguments will be the orthogonal projectors Π and Π in QSVT.Here the implicit scalar argument x now stands for each singular value of the embedded operator A = ΠU Π ∈ C p×r induced by the choice of projectors and the block encoding unitary U ∈ C q×q .Both U and U † are assumed to be given to the computing party as oracles.In this case, the relevant polynomial is applied uniformly, just as it was in QSP, within subspaces defined by the left and right singular vectors of A; for further details on this map, see Appendix A.
Definition III.1 (Flatly nested QSVT).Let Φ 0 ∈ R n and Φ 1 ∈ R m define two QSVT protocols according to the definition in Appendix A, i.e., the two descriptions of superoperators where we have followed the condensed notation defined in Appendix A 2. Then the flat nesting of the protocol defined by Φ 0 into that defined by Φ 1 is the following description of a superoperator: where (Φ 1 • Φ 0 ) is the same nesting of Φ 0 into Φ 1 given in Def.II.1.In this case, the action in each two-dimensional invariant subspace preserved by Π, Π is the composition of F, G as achieved by Φ 0 , Φ 1 respectively.Note that both the inner protocol and outer protocol share identical subspaces for each of their basic QSVT components.
The more involved definition of QSVT permits us to modify the method of nesting two protocols from merely that which respects the QSP case under the standard lifting argument.In what follows we specify one of these nesting protocols (termed deep nesting), and in the following section (Sec.IV) show that it appears often in many, seemingly unrelated quantum algorithms.The primary difference between flat and deep nesting will be that while previously the two block-encoded operators were with respect to the same projectors, this need not in general be the case, and when the projectors are particularly simple, the interpretation of the resulting nested circuit can be made to satisfy the requirements of the diagram in Fig. 1 in a unique way: functional composition becomes a functional product.
Definition III.2 (Deeply nested QSVT).Recall that QSVT is usually presented as a product of interleaved iterates (here for n even): If we introduce, instead of the projector Π0 , a transformed projector for some additional QSVT protocol U Φ1 , then the circuit in Eq. 34 can be transformed according to We call (Φ 1 ∧ Φ 0 ) the QSVT circuit with that enacts a deep nesting by consistently conjugating of one of the inner protocol's projectors (here Π0 ) by another QSVT protocol defined by phases Φ 1 .In this case the transformation refers equivalently to the left-multiplication of U by U † Φ1 : and consequently the encoded linear operator Here phi j k refers to the k-th component in the j-th phase list.Where C is used, it refers to the circuit within the dashed box (or its conjugate transpose).
Note for deep nesting that if one chooses to look at the block-encoding with respect to a different set of projectors (of which there is now no longer a canonical choice), then interpretation of the induced transformation changes.Again in our condensed superoperator notation, we will always refer to deep nesting as the map between the following pair of QSVT circuit descriptions and the following QSVT circuit description where the two anonymous slots ( * ) and ( * * ) accept as inputs the first and second unknown unitary operations, as defined in Fig. 3.It is worth noting here that we have two input slots in the superoperator given in Eq. 39, as opposed to the case of flat embedding.We can always resolve this by considering the partially applied function which fills one of these slots with a fixed signal; moreover, this will help address the apparent causal ambiguity in the resulting functional product discussed later, where two different nesting orders in programmable space can lead to the same product in functional space.What remains is to identify the constraints under which the two concepts of QSVT nesting above can be made to satisfy properties allowing the diagram in Fig. 1 to commute.For flat nesting, this property will be almost identical to the QSP case, while for deep nesting, the required properties will be stronger, and the induced effect under the functor T in Fig. 1 distinct.
Theorem III.1 (Flat (semantic) embedding for QSVT).Let Φ 0 ∈ R n and Φ 1 ∈ R m be antisymmetric phase-lists, and have them define two QSVT protocols, with shared projectors Π, Π.Then the flat nesting of Φ 0 into Φ 1 is equivalent to the flat embedding of Φ 0 into Φ 1 , also denoted (Φ 1 • Φ 0 , Π, Π, U ), and achieves the following transformation of the block-encoded A = ΠU Π: where (G • F ) SV denotes the application of the composition of G (the polynomial transform encoded by Φ 1 ) with F (the polynomial transform encoded by Φ 0 ) to the singular values of the general finite-dimensional linear operator A. Moreover, the resulting unitary protocol is itself remains flat embeddable.Flat embedding satisfies the diagram given in Fig. 1 according to the assignments in Table II (polynomial composition).Proof is given in Appendix B.
The statement of flat embedding can succinctly described in terms of the diagram depicting natural transformations in Fig. 1.Namely, the same antisymmetric symmetry imposed on the phases of QSP protocols which were semantically embeddable is imposed here through the lifting argument from QSP to QSVT.Consequently, for functional composition acting on the singular values of the block encoded operator A, the condition in the programmable space for the diagram to commute is near identical to that of standard QSP.For the same reason, the inner protocol remains contiguous, and therefore the resulting circuit truly treats QSVT subroutines as black boxes.The modified table for this assignment, in analogy to Table I, is given in Table II.
Theorem III.2 (Deep (semantic) embedding for QSVT with scalar block-encodings).Let Φ 0 ∈ R n and Φ 1 ∈ R m define two QSVT protocols, where Π 0 , Π0 are projectors encoding the scalar F (|A 0 |) = Π0 U 0 Π 0 for the block-encoding unitary of the inner protocol.Here A 0 denotes the image of Π0 , and |A 0 | its dimension.Then if Π 1 , Π1 also block encode a scalar, the deep nesting of Φ 0 into Φ 1 is equivalent to the deep embedding of the two protocols, also denoted (Φ 1 ∧ Φ 0 ), and modifies the scalar block encoding in the following way: where F, G are the polynomial transforms achieved by the protocols with phases Φ 0 , Φ 1 respectively.Note that on the left-hand-side the block encoding is defined with respect to projectors Π 0 , Π0 , while on the right-hand-side it is defined with respect to the modified projector Π0 → U 1 ΠU † 1 .If F and G are indicator functions which take value 1 above 1/ |A 0 | and 1/ |A 1 | respectively, then the deep embedding block encodes |A 0 ∩ A 1 |, the (normalized) size of the intersection of the marked subsets of the two oracles.Moreover, the resulting unitary protocol itself remains deep embeddable.Deep embedding satisfies the diagram given in Fig. 1 according to the assignments in Table III (set intersection or functional product).Proof is given in Appendix B.
For deep embedding, we take advantage of the fact that all of Π 0 , Π 1 , Π0 , Π1 can be viewed as bifurcations on the relevant Hilbert space, inducing scalar block encodings.In this case their images and complements define two subspaces (marked and unmarked respectively), and the dimension of these subspaces (i.e., the images of Π 0 , Π 1 for the marked subspaces) are therefore well-defined, notated |A 0 |, |A 1 | respectively.As stated, the dimension of the intersection of these subspaces (the dimension of the image of the product of the marking projectors) can also be defined, and elements in these intersections prepared by the deeply nested protocol if F, G are close to indicator functions.It is worth noting that in this case the action of the second functor T in Fig. 1 is entirely different, as instead of polynomial composition, we take products, and that these products can often be interpreted as set operations.This is examined explicitly in the following section discussing distributed Grover search.In essence, by considering a different nesting operation and different restrictions on the projectors, we have found a distinct but algorithmically useful satisfying assignment for Fig. 1.Note also that, unlike flat embedding, we know have two open arguments for our superoperator (the two scalars corresponding to the sizes of the marked subsets); if we bake-in the marked subset of the outer protocol, however, as we are always allowed to do, in turn partially applying the induced function, the seemingly causal action of the circuit (the outer protocol takes a subroutine, runs it where desired, and outputs a result) is restored.
While flat and deep embedding of QSVT exhibit different character in their underlying nesting procedure, we see that nevertheless both induce a simple operation on their underlying functional transforms.These induces operations (functional composition and functional products/set intersection) are simply describable according to a natural transformation between two functors (one describing circuit manipulation and the other functional manipulation).Consequently the categorytheoretic abstraction introduced at the beginning of this work (Fig. 1) can be seen to encompass far larger algorithmic aims than just the composition of polynomials embedded in QSP protocols.Expanding the settings in which the requirements for this diagram to commute are satisfied is a major avenue for extension of this work, and opens the possibility for sophisticated, purely functional interpretations of a wide class of quantum computations and circuit ansätze.
Before moving on to a description of applications of semantic embedding in QSVT to known quantum algorithms, it is worthwhile to review the question of whether the functional manipulations discussed here constitute a 'complete set' of manipulations.Toward this end, we note that the We also use different notation for abstract composition of QSVT phase lists in deep embedding, (Φ1 ∧ Φ0), and note that this induces a different algebraic manipulation (product) of their respective polynomial transformations on embedded scalars.
polynomial transforms achieved by both QSP and QSVT are (considering only the real part of P for a moment, which is almost freely chooseable) those with (1) definite parity in x and (2) 1-bounded norm on the interval x ∈ [−1, 1].These constraints are due to fundamental symmetries of the QSP ansatz, as well as the unitarity of the overall evolution, with derivations of these properties implicit in [9].A useful way to characterize the set of possible manipulations is thus to determine which manipulations of two functions satisfying this property produce a third function also satisfying this property.Writing down such a conjectural list of such manipulations is simple enough: In each of these cases, the resulting function (when applied to the signal(s)) necessarily has definite parity and bounded norm.In the second case, where there are two possible arguments, fixing either one to be a constant results in the desired properties, and consequently we can say that in that case as well we remain within the permitted space of QSP/QSVT-achievable functions.Evidently flat and deep QSVT embedding correspond to the first two manipulations, while the third, due to its simpler, linear nature in the two functions, can be achieved via the simple combination of QSVT subroutines using linear combinations of unitary (LCU) methods [51] with constant additional space (it is worthwhile to note that this protocol cannot be a nested or intrinsically ordered one, as both functions are applied to the same argument).
To what extent do these constitute a generating set for all possible norm and parity preserving combinations of two functions (and their respective argument lists)?Evidently we have identified a desired set of (possibly multivariable) polynomials whose restriction to any one free variable satisfies two desired properties (parity and norm on an interval).It turns out that this question is almost trivial given how we have posed the problem: the underlying operations available to us in the monoid of polynomials are precisely composition (42) and multiplication (43), while viewing the polynomials as a module, also permit linear combinations according to properly normalized scalars (44).If we are given an arbitrary 'manipulation rule' as above, along with the promise that said result is 'constituted' from the two argument functions, then this 'constitution' procedure must necessarily arise from manipulations (i.e., binary operations) permitted in the underlying monoid/vector space.While it may be possible to assign additional structure to the relevant space of polynomials, for the purpose of most quantum computational problems, the monoids agreeing with (42)(43) and the module agreeing with (44), appear to exhaust the privileged structure of the underlying space of functions.

IV. Applications in known quantum algorithms
We identify previous cases where quantum circuits are self-embedded to solve concrete problems, and recast them as instances of semantic embedding.To showcase differing interpretations of this recasting, we focus on three instances: (1) distributed scheduling [40], (2) communication complexity separations for linear algebra problems [11], and (3) the soundness of certain succinct argument protocols against quantum adversaries [12,13].

A. Quantum scheduling and oblivious amplitude amplification
Unstructured search and its generalization, amplitude amplification (AA), are well-studied quantum algorithmic subroutines [10,52].In many ways, AA looks like a restricted instance of QSP/QSVT: two unitary operations are interleaved and produce, at a given circuit depth, a desired transition with high probability.For Grover search the interleaved operators depend on the following projectors: where |m is the equal superposition over marked states in the computational basis, where this marking is done by the standard Grover oracle |k → (−1) δ mk |k .Grover's algorithm is the application of the following product of unitaries to the state H ⊗n |0 , where k ranges over some set of size O( √ n).In other words one alternately reflects around the uniform superposition (the initial state) and the marked subspace.These reflections generate a rotation toward the marked subspace, and the size of this rotation determines the runtime.The required number of such alternating reflections is quadratically fewer than might be assumed; in general this improvement is known to be optimal for otherwise unstructured data, and strongly believed to exist for realistic problems such as CircuitSAT.
We briefly give definitions and theorems for fixed-point amplitude amplification and oblivious amplitude amplification, so that the discussion of their variants for multiple marking oracles later will make sense.These theorems are quite pared down, following a long line of simplifying work for amplitude amplification [9,10,19,20,53].In fixed-point amplitude amplification (Thm.IV.1), the computing party alternates reflections about a known initial state and a marked subspace, while in oblivious amplitude amplification (Thm.IV.2), the known initial state is replaced by a state prepared by a (possibly oracular) isometry.
Theorem IV.1 (Fixed point amplitude amplification).Theorem 27 in [9].Let U be a unitary and Π an orthogonal projector such that a|ψ G = ΠU |ψ 0 and a > δ > 0.Here we mean that U acting on |ψ 0 produces some small but non-zero overlap a with the good state |ψ G .Then there is a unitary circuit Ũ such that |ψ G − Ũ |ψ 0 ≤ , which uses a single auxiliary qubit and O(δ −1 log −1 ) uses of U , U † , C Π N OT , C |ψ0 ψ0| N OT and e iφσz gates.Proof follows by noting that is a scalar block encoding of the overlap a, where Π = |ψ G ψ G |, and choosing a minimal degree polynomial which is -close to 1 at arguments above δ.
Proof is almost identical to the non-oblivious setting (Thm.IV.1), where aW = ΠU Π is the block encoded operator, and the desired polynomial sends all arguments above δ to within of 1.
Having established the basic map between QSVT and standard Grover search (through AA), we now discuss a distributed variant of the same process.In Grover's scheduling paper [40] he considers a setting in which two parties each have their own marking oracle, privileging two sets of indices m, m .Their goal is, with minimal resources, to prepare a state in the intersection m ∩ m (here overloading the variables m, m ).To do this Grover constructs a nested protocol consisting of an inner protocol, call it U m and an outer protocol, call it U m which uses U m as a subroutine, defined as follows: where the entire protocol, summarized in the outer protocol, is applied to the state U m H ⊗n |0 .Here Π is as before the projector onto the uniform superposition on log n qubits for both parties, while Π m , Π m are projectors for the marked subspaces.
For the inner protocol this is just AA using QSVT with a block-encoded scalar On the other hand, the outer protocol represents a more sophisticated process.In this case, the block-encoded operator is now dependent on that of the inner protocol, namely where A = a is a scalar whose value is (m ∩ m )/n, clearly dependent on the size of the intersection of the marked sets (as is to be expected for a scheduling problem interested in probing and preparing elements in this intersection).In other words, we see that unitary conjugation of another party's projectors, as used in the projection-controlled-NOTs ubiquitous in QSP, can have the effect of computing joint functions on block-encoded data with respect to two (or more) local oracles.This is precisely an instance of deep embedding of QSVT protocols as given in Thm.III.2.Moreover, as is discussed in [40] the round and communication complexities of this protocol are easily computed.

B. Communication complexity for distributed quantum algorithms
We now place semantic embedding in the context of a recent result [11] concerning communication complexity separations between quantum and classical algorithms for linear algebraic problems.This in turn bolsters the following idea: distributed quantum computation problems where the parties can make use of quantum channels for communication are a natural setting in which to understand the utility of semantic embedding.
Communication complexity is a well studied field in both classical and quantum computer science.Take, for instance, a setting where two separated parties, one holding some data x and another holding some data y, seek to compute some joint function of their data f (x, y), and moreover wish to do this using as little communication as possible.Communication complexity often refers to the minimal required communication (usually in bits, or qubits) to perform a particular algorithmic task (say, to compute f (x, y) to some specified accuracy, with some specified probability).Studying this complexity is reasonable when the cost of the computing done by each party is far cheaper relative to the cost of communication between parties.
While the detailed work of [11] discusses multi-party protocols and a diverse set of communication models, we restrict our discussion to one and two-way communication protocols between two parties attempting to produce an approximation to the solution to a set of linear equations with high probability.We reproduce a simplified version of their problem statement below, before describing their solution in terms of self-embedded QSVT, and then giving comments on extensions to their setting.
Problem IV.1 (Distributed matrix inversion).Let two parties with quantum computers, Alice and Bob, be such that Alice holds some A ∈ R m×n and Bob holds some b ∈ R m .The goal of the parties is to output the state |A + b using as little communication (in qubits) as possible.Additionally, we will often refer to the condition number (minimal singular value) of A by κ, and the cosine of the angle between b and the column space of A by γ ≡ AA + b / b .For the classical analogue of the problem, the goal is to output samples from the proper state.Here A + is the pseudoinverse of the matrix A. Moreover, for the task of two classical parties attempting to sample from A + b, the following lower bounds are known 1. One-way communication (Alice → Bob).Bounded below by Ω(min [m, n] log [min [m, n]]).

Two-way communication. Bounded below by Ω(min [m, n]).
Proofs of these complexities are contained in the referenced work.
We briefly describe the quantum protocols which achieve the communication complexity provided in the statement of Thm.IV.3.Given that Alice holds a description of a matrix and Bob holds a description of the quantum state, the simplest setting is that of one way communication from Bob to Alice.In this case there is only one round of communication wherein Bob sends |b (a total of log [m] qubits) to Alice, who applies the QSVT protocol which block-encodes the pseudoinverse A + to the state |b (following Theorem 41 of [9]) and measures.The probability of obtaining |A + b is γ 2 /κ 2 , and thus repetition by the inverse of this probability yields the desired bound.For one-way communication from Alice to Bob, Alice makes use of the Choi-Jamio lkowski isomorphism to send a state to Bob encoding the matrix A, which requires a rescaling by the Frobenius norm, in addition to which post-selection requires the stated O(log [mn] min [m, n] κ 2 /γ 2 ) communication complexity.Finally, for the two-way communication case, the parties use oblivious amplitude amplification according to the reflection about the target state where U is the unitary which block-encodes A + , and additional registers beyond |b have been initialized to |0 .Consequently, by simple application of Grover amplification, this technique permits a quadratic improvement in terms of the original success probability γ 2 /κ 2 as indicated in Theorem IV.3.
It is now relatively clear how to interpret the protocols in [11] (in the two-way communication setting) in terms of semantic embedding.Important to note, however, is that the action applied by Bob in this setting is just a reflection about his supplied state, summarized by 2|b |0 b| 0| − I.This is, in our language, a trivial QSVT protocol of length one, with phase list Φ 0 = {0, 0}, where the unitary applied by Bob simply block-encodes itself.Consequently the resulting deep embedding (Thm.III.2), defined according to the functional map has Φ 0 effectively trivial, and Φ 1 the same set of phases as for fixed-point amplitude amplification.
Here the projectors Π1 , Π 1 are onto the target state |b and the uniform superposition respectively, while Π1 , Π 1 are onto the state |0 and the uniform superposition respectively.Additionally, the argument unitary taken by ( * * ) is the unitary U which block-encodes A + , while the argument unitary taken by ( * ) is the identity.While this is not a particularly sophisticated use of semantic embedding, the flexibility of its application suggests a variety of related questions in the study of communication complexity.An intriguing prospect is whether there exist substantively more complex interactive protocols in the model considered in [11], namely those which rely on QSVT phase lists other than that for amplitude amplification.In the language of QSVT, amplitude amplification corresponds to an embedded polynomial function which is approximately constant over nearly all arguments.There is no reason, however, that interactive protocols be restricted to computing such functions (which are approximately the product of two single-variable functions) [50,54].QSVT seems to offer the only current method for well-approximating such 'non-factorable' transforms, though as stated for amplitude amplification many sufficiently efficient alternative techniques already exist.

C. Quantum succinct arguments
While quantum computing is perhaps better known for posing a threat to common cryptographic constructions, quantum algorithmic techniques have also had success in investigating cryptographic constructions with supposed security against even quantum adversaries.This section gives a light introduction to settings in quantum cryptography that make implicit use of semantic embedding to prove the quantum security of certain cryptographic constructions.There is also indication that such constructions are merely the first in a larger, imminent class of results.
Recent work [12] considers the post-quantum security of a succinct argument system in the standard model when instantiated with various classical cryptographic objects known to exist under the assumed post-quantum hardness of learning with errors (LWE) [55].A key topic of investigation in this work is the quantum analogue of a common classical method for proving the security of cryptographic schemes: rewinding.
The work of [12] considers a specific succinct argument system, Killian's protocol [56], by which a collision-resistant hash function is used to transform a probabilistically checkable proof (PCP) into an interactive protocol with exponential savings in communication complexity, compared to simply querying the PCP.This improvement comes at the cost of a computational assumption for the soundness (i.e., the ability for the proving party to fool the verifier is reduced to the assumed difficulty of a computational problem).The classical security of this protocol is proven via a common technique, rewinding, whereby a verifer's or prover's state is saved midway through a hypothetical protocol and rerun until many accepting transcripts are collected (and from which the long PCP string is extracted).The genericness of this definition follows from that rewinding is a somewhat vague term, and can refer to multiple independent settings; a common feature is oracle access to the actions of one party in an interactive protocol.For reasons specific to quantum mechanics, these methods fail when attempting to prove security in the quantum setting.Casually, this is because of the inability to clone arbitrary states, as well as the often destructive nature of quantum measurements (forbidding a quantum party from rerunning an adversary from a consistent saved state).
The major contribution of [12] is a construction showing, under the assumed existence of so-called collapsing hash functions [57], that Killian's protocol is post-quantum secure.The key subroutines relating to QSVT in the proofs of security in [12] are state recovery and state repair, which together circumvent the apparent impossibility of rewinding a quantum adversary.We informally summarize these techniques below, and discuss their connection to semantic embedding.
Definition IV.1 (State recovery in [12] (Informal)).A key desire in quantum rewinding protocols is the ability to recover a state which has been disturbed by an intervening destructive measurement.The paper first posits the ability to perform a projective measurement Equals |ψ , for |ψ the intermediate state of the prover, and shows that alternating this projective measurement with some B, an intervening projective measurement querying the desired information for the transcript, can be used to recover |ψ with high probability quickly through consequences of Jordan's lemma (Lemma IV.1).Unfortunately Equals |ψ is impossible (by no-cloning) to efficiently implement.Their solution is to thus to relax state recovery to state repair (Def.IV.2) in which only those aspects of the state necessary for the relevant proof of security are corrected.
Lemma IV.1 (Jordan's lemma [26]).Variously discussed in [9,12,13,23,[58][59][60].For any two Hermitian projectors Π A , Π B on a Hilbert space H, there exists an orthogonal decomposition for this space H = k S j into one-and two-dimensional subspaces, S j (the Jordan subspaces), where each is invariant under both Π A and Π B .Moreover: (1) in each one-dimensional subspace Π A and Π B act as the identity or a rank-zero projector and (2) in each two-dimensional subspace, Π A and Π B are rank-one projectors, and there exist distinct orthogonal bases for each S j , here denoted {|v j,0 , |v j1 } and {|w j,0 , |w j1 } such that Π A and Π B project onto |v j,0 and |w j,0 respectively.These are the left and right singular vectors of Π A Π B respectively, with singular value s j = | v j,0 |w j,0 |.A proof of this lemma can be found in [60], and more accessibly in [23].
Definition IV.2 (State repair in [12] (Informal)).While the implementation of Equals |ψ in Def.IV.1 is not efficient, the requirement asked of the rewinding procedure in [12] is only that the success probability for extraction does not decay with repeated rewinding attempts.Thus [12] defines a new projective measurement Test , whose image is the subspace whose elements which have a success probability at least .Repeatedly interleaving this test with the randomized measurement A r eventually, upon Test returning 1, restores the state's success probability.
Unfortunately Test is not efficiently implementable either, leading the work to introduce ApproxTest ,t .This itself is implemented by a series of alternating projective measurements (as well as a post-selective aspect, as it can be shown that ApproxTest ,t is not by itself perfectly projective).The parameter t here represents a number of trials which are used to estimate whether the success probability on which the Test projective measurement thresholds is being exceeded or not.It is shown that, even relaxing projective to almost projective measurements, and relaxing Test to ApproxTest ,t (the former itself relaxing what was desired from Equals |ψ ), the required properties of the rewinding protocol are preserved.
To summarize [12], we define the projectors given in their state repair and recovery procedures, and highlight the deep embedding of QSVT.At a skeletal level the paper considers two alternating projector sequences.The second interleaved sequence (approximately projecting onto the goodsuccess-probability subspace) is used as a subroutine by the first (which with high probability returns a state to that good subspace after extracting a valid transcript).
Here the originally desired Equals |ψ , which would have tested for the desired mid-protocol state of the adversary has been replaced by Test , which only projects onto states with high enough success probability in the task given to the adversary.This has in turn been replaced by ApproxTest ,t , which approximates the behavior of Test .Here A r is the challenge to the adversary on randomness r through whose measurement one is perhaps both obtaining an accepting transcript but also damaging the adversary's state.As given, to generate ApproxTest ,t a separate amplification procedure is necessary, alternating CProj and M |+R .Here CProj (a controlled-projector) measures {Π r , I − Π r } coherently depending on r, while M |+R measures according to the projectors where | + R is the uniform superposition over the possible random r.
Remark IV.1 (Caveat on the differences between alternating projective measurements (i.e., Watrous technique [58]) and amplitude amplification [9]).Going back to the original statements of unstructured search and amplitude amplification [10,53], the algorithm has been posed as either (1) a series of interleaved reflections about relevant subspaces (some oracularly provided), and (2) a series of projective measurements onto these subspaces, inducing a random walk.For our purposes, the runtimes of algorithms attempting to prepare oraculalry marked states in both of these ways are effectively the same, as remarked in the improvements to [12] given in [13].Wherever the Watrous technique is applied, QSVT can be inserted almost seamlessly.
To summarize, the nested protocol has allowed the rewinding party to generate many accepting transcripts on different inputs, using ApproxTest to suitably approximate Test, which itself projects onto a subspace with properties that are good enough (i.e., high enough success probability over random challenges r) to avoid having to have used Equals.In turn, the way in which these protocols were nested was precisely the deep embedding construction given in Thm.III.2.Even in this involved instance, semantic embedding allows one to identify that the key insight is simply being able to prepare a quantum state according to the intersection of two marking oracles (which were themselves based on only approximate projectors).We finally note that, unlike in the communication examples given previous, the division between inner and outer protocols in this application of semantic embedding is used to outline a hierarchy of computational tasks, rather than to accommodate a physical separation between computing parties.

V. Discussion and conclusion
In this work we have introduced the concept of semantic embedding for quantum algorithms using QSP/QSVT.That is, observing that QSP and QSVT as quantum algorithms can be described in terms of the polynomial transforms they apply, we provide methods for manipulating and combining QSP/QSVT quantum circuit ansätze to induce analogous algebraic manipulations of their embedded polynomial transforms.In category theoretic terms, we identify a natural transformation between two functors (one depicting manipulations of quantum circuits, and the other depicting polynomial transformations), and determine properties of arrows between objects representing QSP/QSVT phase lists such that this diagram commutes.Alternatively, we provide a series of simple conditions under which the pre-image of functional operations under this natural transformation is efficiently computable and respects the contiguity of subroutines.
Returning to the original motivation for this work, these are a set of non-trivial rules for the construction of highly expressive quantum circuits such that the algorithmist, who is concerned only with the efficient serial application of functions to meaningful data, can rest assured that their semantic intentions are naturally preserved and accessible within a representing quantum circuit.
For standard QSP, the property required on the category of phase lists is that they obey a special symmetry under reversal and negation.For QSVT, we show there are multiple choices of constraint (corresponding to flat and deep embedding) depending on the desired polynomial manipulation.We leave open the possibility of further functional manipulations using these circuit ansätze as basic units, but give argument that those presented are exhaustive up to reasonable definition (I.e., as per Eqs.[42][43][44].Parallel to this work, we advocate the general study of how choice of parameterized circuit ansätze relates to achievable functional transforms.Understanding simple (but still verifiably expressive) circuit ansatz holds great promise [25], and represents a path by which QSP/QSVT can be made more helpful in the near term.
Finally, we discuss known quantum algorithms where semantic embedding already occurs (albeit implicitly).In two of these three cases (distributed search and distributed linear algebraic problems) two computing parties exist, separated in space, with one party submitting a quantum state repeatedly to the other to perform a quantum computational subroutine.In the third instance (proofs of security for succinct arguments) a party is afforded black-box access to a unitary operation, and embeds subroutines successively for semantic aims, breaking down a complex computation into a series of simpler steps.Consequently we give two regimes in which semantic embedding has utility: (1) when there physically exist two (or more) separated computing parties, each of whom possesses some computational responsibility, and (2) when there exists only one party, but the computing task is more easily analyzed when broken into hierarchical (or nested) stages.A key observation is that the pre-image of functional composition and products as given in this work preserve the separation of subroutines in circuit space necessary to give well-founded circuits for (1) and ( 2).
Foremost we intend that the clarity of statements like that of semantic embedding, i.e., simple conditions under which manipulations in the programmable space of quantum circuits automatically induce analogous manipulations in the functional space, can foster more ambitious quantum algorithm design rooted in higher-order reasoning about functional transforms.Likewise, better understanding how constraints on circuit parameterizations interact with algorithmic expressivity, and developing more diverse families of QSP/QSVT-like parameterized ansätze [25,39,50], can provide modules directly compatible with this work.In turn, we offer that the celebrated unifying aspect of QSVT could be re-positioned as a branching point for the development of simple and practical families of quantum algorithms bound by simple, category-theoretically described rules.
In this section we give the common presentations of the main theorems of quantum signal processing (QSP) and quantum singular value transformation (QSVT), citing relevant major works in their development.These algorithms take as input repeatable unitary processes and produce as output unitary processes whose dependence on the input unitary process (and its possibly unknown underlying parameters) is both complex and precisely controllable.The notation used here is standard unless otherwise noted, though competing conventions are discussed in the appendix of [8] for those interested.

The theory of QSP and lifting to QSVT
We give simplified statements of the major theorems of QSP, focusing on how they are often applied to useful algorithmic problems.We then sketch the lifting argument used to derive QSVT from QSP, which is referred to in the main text.
Definition A.1 (QSP protocol [9,[20][21][22]24]).Let Φ ∈ R d+1 .A QSP protocol is a product of rotations in SU(2), where φ k is the k-th element of Φ. Often e i arccos xσx is denoted W (x), where the signal x is such that x ∈ [−1, 1].The unitary W (X) is often assumed unknown but query-accessible, while the φ k are chosen by the computing party.Note here and elsewhere σ x , σ z are the usual single-qubit Pauli Theorem A.3 (QSVT and qubitization).Theorem 17 in [9].Let U Φ a QSVT sequence with orthogonal projectors Π, Π such that A = ΠU Π is a linear operator.Then the following relation holds: Here P (SV ) ( ΠU Π) = P (SV ) (A) is the following transformation: where P is a polynomial function as in standard QSP according to Φ, and the ξ k are the singular values of A, whose left and right singular vectors are | ψ , |ψ respectively, up to the minimum dimension of the left and right singular vector spaces.
Remark A.1 (An intuitive understanding of QSVT).As hinted in the previous Theorem A. 3, the key insight to make QSVT possible is the key observation in [26] that products of two reflections or rotations preserve one and two dimensional subspaces.Consequently the action of the circuit in Def.A.2 is expressible in the subspaces mapping the right singular vectors to the left singular vectors.Careful work in [9] shows that the action of U with respect to this basis acts as where the block's superscript H j and subscript Hj indicate that it maps from the space spanned by the |ψ j to that spanned by the | ψj .Further, the two projection-dependent rotation operators, shown in [9] to be easily constructable, have the block-diagonal form which together with the action of U allow us to recognize interleaved products of these operators as performing effectively (up to substitutions of rotations for reflections) QSP in each of the singular vector subspaces defined by these projectors.For an expedited version of this argument, based on the more concrete, albeit less general cosine-sine decomposition, we also refer readers to the excellent review in [23].

Condensed notation for QSP and QSVT
Throughout the discussion of flat nesting (Def.III.1) and deep nesting (Def.III.2) of QSVT, we make use of an abridged notation for QSVT protocols, specifically devised for the aims of this paper.The intent was to more clearly manipulate the basic elements of these protocols, which are defined in terms of their phase angles Φ, their pair of orthogonal projectors Π, Π, and their oracle unitary U .When we reference a tuple of the following form: (Φ, Π, Π, U ), (A12) we will always mean the QSVT protocol which has phases Φ, left and right projectors Π, Π respectively, and has oracle unitary U , following the original notation of [9].When one of the elements of It is not so difficult to see that N, R, A, S form a group action of (Z 2 ) ×4 on the set {±P, ±P * } × {±Q, ±Q * }, and that this action is transitive on the set (by their identical size).We will make use of these symmetries when discussing specific QSP protocols in the following definitions.Note that all group elements preserve the required |P | In this appendix we provide proofs of the theorems given in Sec.II and Sec.III.We again assume basic familiar with the methods of proof for standard QSP, which are covered carefully in [9], and more loosely in Appendix A.
1. Semantic embedding for QSP Remark B.1 (Proof of Theorem II.1).We break this proof into its two major components, the existence of a set of antisymmetric phase factors provided a unitary satisfies the stated conditions, and the uniqueness of these phase factors up to a natural restriction of their domain.
(Existence.)Take U Φ with P, Q satisfying the conditions of Theorem II.1.To show the existence of a Φ satisfying the desired antisymmetric properties we consider attempting to lower the degree of the polynomials embedded in U Φ according to the application of the inverse of an antisymmetric QSP iterate.In other words the existence of a φ such that encodes some P , Q also satisfying the hypotheses of the theorem statement, in addition to having strictly lower degree.The application of this iterate transforms P, Q into the new P , Q with the forms This shows that evidently P is real, as required, as well as that the parity constraints are respected.The determinantal constraint is also assured by the unitarity of the overall transformation.To show the non-trivial result, namely that there exists a choice of φ, and specifically the φ with such that the overall degree of the embedded polynomials is lowered, we need to show that this ratio both has unit modulus, as well as satisfies that its insertion into Eqs.B2 and B3 leads to both P d+2 and P d being zero (as well as the corresponding leading coefficients of Q ).The first part of this is easy, as P d = |Q d−1 | again by the unitarity of the transformation.The second set of conditions breaks down into individual constraints on the leading coefficients, which we give here The first equation is evidently satisfied by our choice of φ in Eq.B4, and so what remains is to show that the second is also satisfied through properties of the determinant of a unitary embedding polynomials of definite degree and parity.We can use the first equation to simplify the second, recovering which is shown to be true for unitary matrices satisfying the parity and degree constraints given in the theorem statement by the following short Lemma B.1.
For the reverse mapping we perform a similar operation, Note that parity constraints, norm constraints, and f (±1) = g(±1) = 0 are also preserved by properties of P, Q, f, g as given.This choice is unambiguous by the uniqueness of P, Q given Φ (up to domain restriction) as per Def.II.3 and proven in Theorem II.1, and thus the protocols are in bijection.
Remark B.3 (Proof of Theorem II.3).The proof of this statement is related to similar results on matrix completions in [9,[19][20][21][22]24] and so on.The modification we provide hinges on the assumed realness of P (following in turn from the antisymmetry of the QSP phases).
Concretely, we require that the partially specified unitary transform can be completed (i.e., the dots filled in) such that these additional elements satisfy properties (1)(2)(3)(4)(5) in the theorem statement as well as that the overall matrix remains unitary.If this is the case then Theorem II.1 can be invoked, and basic classical algorithms can be used to efficiently determine the required antisymmetric QSP phases from the coefficients of P .In this case, the only new condition is (4), as condition (5) will follow directly from invoking Lemma 10 of [25] as well as the uniqueness property of Theorem II.1.However, condition (4) has evident meaning.Note that the definite parity of P as well as its realness for x ∈ [−1, 1] requires that its roots come in pairs (α, −α) and (α, α * ), or equivalently that they are closed under both negation and complex conjugation.In order that Q has the properties required by Theorem 5 in [9], we need that 1 − P (x) 2 = |Q(x)| 2 induces Q(x) to be of definite parity.As this is a product of a polynomial with its complex conjugate, it helps to transform to the Laurent picture x → (z + z −1 ).Evidently 1 − P ([z + z −1 ]/2) 2 is a polynomial which is real and non-negative for all z ∈ T (the complex numbers of modulus one).
Note that condition (4) is strictly stronger than what is implied by the Fejér-Riesz theorem as quoted in [50]; this theorem only guarantees the existence of a Q(x) such that 1 − P (x) 2 = |Q(x)| 2 .Namely, while 1 − P (x) 2 is positive and thus can always be factored into some |Q(x)| 2 , the parity of Q(x) is not definite unless the roots of Q(x) after transforming to the Laurent picture, i.e.,

|Q(x)|
are such that the multiset of r i is closed under negation.This property is necessary and sufficient for a polynomial to have definite parity in both the Laurent and x picture, as sending z → −z or x → −x necessarily adds only a sign to Eq. B20 under the assumption of closure.
Remark B.4 (Proof of Theorem II.4).The proof of this theorem follows mostly directly from the properties of twisted oracles discussed in Lemma II.1.That is, the realness of P for antisymmetric QSP protocols corresponds to the fact that, for any individual x, the oracle provides a rotation about some axis on the equator of the Bloch sphere.This is, as noted, equivalent to the definition of embeddable QSP protocols in Def.II.2.More importantly, as conjugation of the signal oracle by σ z -rotations does not modify the QSP phases save on the extreme ends of the QSP phase list, the functional transform applied by the outer protocol Φ 1 is necessarily applied to the result of the inner protocol Φ 0 .In other words, the inner protocol provides an oracle which looks like U Φ0 = e iG(x)σz W (P 0 (x))e −iG(x)σz , (B21) where W (x) = e i arccos xσx as before, and the rotation G(x) can be written explicitly in the following x-dependent form (among many equivalents) As discussed in Lemma II.1, this conjugation does not affect the ability for ab outer QSP protocol to apply a desired functional transform to the on-diagonal elements of U Φ0 in the computational basis for any x, and thus the composite protocol U Φ1•Φ0 = (Φ 1 • Φ 0 )(x) enacts (P 1 • P 0 ) as intended.
their instantiation; the utility of category theory is often attributed to the ability of diagrams to vividly represent the action of their arrows.We hold off on formally defining categories (which is somewhat technical, and involves first defining metacategories, their axioms, and then restricting such axioms to within set theory).For our purposes we can instead define graphs as a set of objects O and arrows A, as well as functions from A to O A O.
cod dom (C1) These graphs can have composable pairs of arrows, namely those arrows g, f which are both in A and are such that the domain of g is the codomain of f , permitting g • f to make sense.For categories, we thus start with graphs and add two additional functions called identity and composition.
These functions are defined over a (directed) graph whose nodes are objects and whose arrows are arrows, such that dom(id a) = a = cod(id a), dom(g Normally we will not refer to the underlying graphs or sets of arrows and objects individually, writing c ∈ C and f in C for objects and arrows respectively.From only this basic definition, common mathematical objects, e.g., monoids, groups, matrices, and sets, can be defined simply in terms of the commutative diagrams they satisfy.

Functors
A functor is a morphism of categories.We can list a few common properties and types sometimes attributed to functors.We say a functor is forgetful if its action is to simply forget some or all of the structure of the underlying algebraic object (for instance, the group structure assigned to the set of elements of a group).A functor which is a bijection on both arrows and objects is an isomorphism of categories.Functors can also be composed, and this composition is associative; moreover a functor T : C → B is an isomorphism of categories if and only if there exists a functor S : B → C such that both composites S • T and T • S are the identity functors.Weaker than isomorphisms are full functors, for which for every pair c, c of objects and arrows g : T c → T c of B there exists an arrow f : c → c of C with g = T f (in other words, arrows in B have preimages).Finally, a functor T : C → B is faithful when every pair of objects c, c of C and every pair f 1 , f 2 : c → c is such that T f 1 = T f 2 : T c → T c implies that f 1 = f 2 .In other words, identity of arrows in the image of the functor imply identity of arrows in the preimage.
It is worthwhile to discuss the properties of the functors defined in the assignments for the diagram in Fig. 1, i.e., in Tables (I-III).In the theorem below we quickly show that, under a suitable and reasonable restriction on the permitted phase lists, these functors are all both full and faithful.Before this, we give a quick definition.

FIG. 1 .
FIG.1.A diagram presenting a natural transformation between morphisms S and T .Special assignments from quantum algorithms to the objects depicted here provide a concrete definition for semantic embedding in Def.I.1.

FIG. 3 .
FIG. 3. Symbolic representation for the composition of QSVT protocols (Defs.III.1 and III.2).Here (a) indicates standard QSVT, while (b) shows flat embedding (Def.III.1) and (c) shows deep embedding (Def.III.2).In deep embedding, there are two implicit unitary oracles, while the same is not true of flat embedding, which resembles the self-embedding of QSP (Def.II.1).Diagonally-hashed boxes are used as in Fig.2to suppress notation for an oracular QSVT protocol.Here U is the unitary containing a block encoding, while Π(φ) (and its tilde version) are exp i(I − 2Π)φ (and tilde version) projection-based rotations.Here phi j k refers to the k-th component in the j-th phase list.Where C is used, it refers to the circuit within the dashed box (or its conjugate transpose).
For categories C and B, a functor, denoted T : C → B with domain C and codomain B consists of two related functions.There is the object function T that assigns each object c of C an object T c of B, and an arrow function (also called T ) that assigns arrows f : c → c of C arrows T f : T c → T c of B such that the following hold:T (1 c ) = 1 T c T (g • f ) = T g • T f. (C4)In other words, the functor respects the identity function in C, as well as valid compositions of arrows in C. A functor can also be defined purely in terms of arrows: T is a function between arrows f of C to arrows T f of B respecting the identity and composition properties of arrows in C.In casual terms, a functor translates a diagram (respecting its structure) from C to B.

TABLE I
. A table relating the definition of natural transformations, and the instantiation of this diagram with objects and arrows (functions) in QSP.We suppress multi-labelling of QSP objects in the second column for brevity.
Theorem II.2 (Antisymmetric and embeddable QSP protocols.).Antisymmetric QSP protocols are in bijection with embeddable QSP protocols under phase domain restriction to D d , and under the assumption that f, g as in Def.II.1 are polynomial functions of x.For proof see Appendix B.
[24,50] which may yield different (antisymmetric) phases.However, if one restricts the roots of Q(z + 1/z) in z to lie either entirely inside or entirely outside the unit circle in C, then this choice can be made unique for a given P[24,50].For proof see Appendix B.

TABLE II .
Flat embedding for QSVT.As flat embedding (Thm.III.1) is essentially the lifted version of semantic embedding for QSP, assignments to the diagram in Fig.1are similar, save with additional requirements on the orthogonal projectors, and how the composed functions are applied.
(Φ, Π, Π, * ) → F (|A0|) Projection to block-encoded scalarTABLE III.Deep embedding for QSVT.Note that for deep embedding (Thm.III.2), there are now two relevant sets of projectors, with the inner protocol conjugating the left projector of the outer protocol.
B. Proofs for semantic embedding for QSP and QSVT