smartyfy.mrindigi.com

Quantum Computing Master Course — 173. Quantum Signal Processing

Lesson 173: Quantum Signal Processing

Smartyfy Quantum Computing Master Course

Objectives and prerequisites

Calculate a short quantum signal-processing sequence, identify its polynomial structure, and explain why unitarity constrains the available transformations. Prerequisites are two-by-two unitaries, Pauli rotations, polynomials, and block encodings. This lesson fixes one explicit signal and phase convention; other conventions require translated phase angles and multiplication order.

Define the signal and phase matrices

For a real signal x in [−1,1], define W(x) = [[x, i√(1 − x²)], [i√(1 − x²), x]]. It is unitary and equals exp[i arccos(x) X]. Here x is a matrix or spectral parameter supplied through access to this signal unitary, not a number learned from one measurement.

Define R(φ) = exp(iφZ) = diag(exp(iφ), exp(−iφ)). With the usual circuit convention Rz(θ) = exp(−iθZ/2), our phase operation is Rz(−2φ). A sequence with d signal calls is UΦ(x) = R(φ0) W(x) R(φ1) … W(x) R(φd). Matrix products act on column states from right to left; the formula itself defines the ordering used below.

The chosen phases control interference between repeated signal uses. They are generally computed classically for a desired polynomial response and then used coherently. Quantum signal processing, or QSP, does not independently fit a polynomial to each measured value of x during the quantum circuit.

One signal call and its constraints

For d = 1, direct multiplication gives the upper-left entry P(x) = x exp[i(φ0 + φ1)]. The upper-right entry is i√(1 − x²) exp[i(φ0 − φ1)]. A single signal call can change these phases but cannot turn the magnitude of the upper-left entry into an arbitrary nonlinear function.

For example, φ0 = 0.2 and φ1 = −0.7 produce P(x) = x exp(−0.5i). The off-diagonal phase is exp(0.9i). The sum and difference of phases play different roles; interchanging them changes the sequence even though both combinations look natural.

After d calls, the upper-left entry is a polynomial P of degree at most d with parity matching d: even d gives an even polynomial, odd d an odd polynomial. The off-diagonal entry can be written i√(1 − x²)Q(x), where Q has degree at most d − 1 and opposite parity. These structures follow by multiplying the matrices inductively.

Unitarity requires |P(x)|² + (1 − x²)|Q(x)|² = 1 for real x in [−1,1]. Hence |P(x)| ≤ 1. At x = ±1, the off-diagonal part vanishes and |P(x)| = 1. Boundedness and parity are important, but they are not the complete conditions for prescribing an arbitrary complex upper-left polynomial in this exact convention.

Worked zero-phase Chebyshev sequence

If every phase is zero, UΦ(x) = W(x)^d. Write x = cosθ. Then W(x)^d = exp(idθX), whose upper-left entry is cos(dθ). This is the Chebyshev polynomial T_d(x). The derivation immediately shows why these polynomials stay bounded by one on the interval [−1,1].

For d = 2, T2(x) = 2x² − 1. The off-diagonal factor has Q(x) = 2x, and the identity (2x² − 1)² + (1 − x²)(2x)² = 1 verifies unitarity algebraically. For d = 3, the response is T3(x) = 4x³ − 3x.

At x = 0.3, the two-call upper-left amplitude is −0.82. Starting the signal qubit in zero and measuring zero after this sequence gives probability 0.82² = 0.6724. The negative amplitude is not a negative probability; its sign can affect interference if the sequence is used as a coherent subroutine.

Zero-phase QSP upper-left responses
Signal calls d Polynomial Parity
0 1 Even
1 x Odd
2 2x² − 1 Even
3 4x³ − 3x Odd

What polynomial design actually promises

Useful tasks approximate a target function over a relevant spectral interval: an oscillatory phase for simulation, a smooth threshold for filtering, or a scaled reciprocal away from zero. The polynomial degree depends on the function, interval, gap assumptions, and tolerated error. A discontinuity or singularity cannot simply be reproduced by a low-degree bounded polynomial everywhere.

There is a distinction between prescribing the full complex entry P and prescribing its real part or a block extracted with an additional ancilla construction. For instance, P(x) = x/2 cannot be the complete upper-left entry of this bare sequence because its magnitude at x = 1 is one half. Yet choosing P(x) = exp(iπ/3)x gives real part x/2. Accessing that real component as an encoded operation requires the appropriate coherent construction rather than just relabeling the matrix entry.

Likewise, a target containing both even and odd components may need separate parity-compatible pieces and their combination. Do not conclude from a polynomial approximation on paper that a single phase sequence with any chosen convention implements it automatically. Phase synthesis, complementary-polynomial conditions, numerical precision, and circuit conversion must all be checked.

Resource and numerical interpretation

A degree-d response uses d signal queries in this model plus phase rotations. The cost of constructing the signal unitary and implementing controlled or inverse operations in a larger framework is additional. QSP is powerful because it transforms encoded information coherently, but it does not remove input-loading costs or provide every spectral value as classical output.

The following local check imports matrix_checks161.py from the helper block in Lesson 163. It verifies signal unitarity, twenty zero-phase Chebyshev identities, and the one-call phase formulas. These are exact small-sequence mathematical checks using floating-point arithmetic. No general phase-synthesis routine, quantum SDK, or hardware execution is claimed.

from matrix_checks161 import *
def signal(x):return [[x,1j*math.sqrt(max(0,1-x*x))],[1j*math.sqrt(max(0,1-x*x)),x]]
def phase(phi):return [[cmath.exp(1j*phi),0],[0,cmath.exp(-1j*phi)]]
def qsp(x,phis):
    u=phase(phis[0])
    for phi in phis[1:]:u=mul(mul(u,signal(x)),phase(phi))
    return u
for x in (-1,-.6,0,.3,1):
    assert distance(mul(dagger(signal(x)),signal(x)),I)<1e-12
    for d in (1,2,3,4):
        u=qsp(x,[0]*(d+1))
        assert abs(u[0][0]-math.cos(d*math.acos(x)))<1e-12
    u=qsp(x,[.2,-.7])
    assert abs(u[0][0]-x*cmath.exp(-.5j))<1e-12
    assert abs(u[0][1]-1j*math.sqrt(max(0,1-x*x))*cmath.exp(.9j))<1e-12
print('Signal unitarity, 20 Chebyshev checks and one-query phase identities passed.')

Four worked exercises

  1. Compute the zero-phase two-call amplitude and zero-outcome probability at x = 0.5.

    Solution. T2(0.5) = 2 × 0.25 − 1 = −0.5, so the probability is 0.25. Preserve the amplitude sign when the result is used coherently.

  2. Translate R(φ) into the standard Rz convention for φ = π/6.

    Solution. R(φ) = Rz(−2φ), so the circuit angle is −π/3. The sign and factor of two follow from the two exponent definitions.

  3. Why cannot P(x) = 0.5x be the entire upper-left entry of the declared bare QSP sequence?

    Solution. At x = 1 the signal has no off-diagonal amplitude, forcing |P(1)| = 1 by unitarity. The proposed value has magnitude one half. Real-part or enlarged-block constructions are different specifications.

  4. Calculate T3(0.3).

    Solution. The value is 4 × 0.3³ − 3 × 0.3 = 0.108 − 0.9 = −0.792. Its magnitude is below one, as required on the signal interval.

Five explained multiple-choice questions

  1. What is the declared signal domain? A. Real x between −1 and 1. B. All complex numbers without restriction. C. Only real x between zero and one. D. Any real x if the square root is replaced by its absolute value.

    Answer: A. The square-root signal construction is unitary on the specified real interval.

  2. What response appears after two zero-phase signal calls? A. x² alone. B. 2x without a constant. C. 1 − x² as an amplitude. D. 2x² − 1.

    Answer: D. Repeated equal-axis rotations produce the second Chebyshev polynomial.

  3. Which condition follows directly from row normalization? A. P must be real for every phase sequence. B. |P|² + (1 − x²)|Q|² = 1. C. Q must vanish for every signal. D. P and Q can both have arbitrary magnitude.

    Answer: B. The two row-entry squared magnitudes must sum to one.

  4. What parity does the upper-left polynomial have for odd d? A. Even parity. B. No restriction from the sequence. C. Odd parity. D. Both parities independently without an extra construction.

    Answer: C. The matrix-product structure fixes parity to match the number of signal calls.

  5. What does a negative upper-left amplitude mean? A. A negative measurement probability. B. A coherent sign that becomes a nonnegative squared magnitude in measurement. C. A failed unitarity check by itself. D. An imaginary value of the input signal.

    Answer: B. Amplitude signs affect interference; probabilities remain squared magnitudes.

Pitfalls and summary

Fix signal, phase, ordering, and extraction conventions before quoting a polynomial response. Unitarity links the response to complementary amplitudes. QSP implements carefully constrained coherent transformations whose efficiency depends on degree and the cost of signal access.

Primary sources and further study

These sources support the definitions and context. The numerical examples, exercises, and explanations here were prepared for this lesson. Research papers are optional advanced reading.