# Filter Functions

Mathematical introduction to the filter function formalism.

The filter function is a computational heuristic employed to simply calculate the sensitivity of a control solution to a time-dependent noise channel expressed in the Fourier domain. See Understanding Filter Functions for a plain-English description of its role and use. This mathematical object is defined as

where the subscript refers to the $k$th noise channel, captured by the toggling frame noise axis operator $\tilde{N}_{k}(t)$ (see noise-axis operator ), and the Fourier transform of the matrix $\tilde{N}_{k}(t)$ is defined element-wise as

The filter function may be calculated in this framework for arbitrary single and multi-qubit controls in order to capture the effect of time-varying noise on the target operation.

This formalism is efficient and effective for performance evaluation as the average infidelity is approximated, to first order as the overlap integral of a noise power spectrum and an appropriate filter function is related to the average infidelity as follows

Therefore small values of the filter function lead to a net reduction in noise-induced error for a given quantum operation.

This is derived as follows. Let $\mathcal{H}$ be a $D$-dimensional Hilbert space for some quantum system. We write the total hamiltonian

as the sum of control $(c)$ and noise $(n)$ components

The control Hamiltonian, $H_{c}(t)$, captures target evolution associated with the control dynamics generated by $n$ participating control operators, $C_{j}\in\mathcal{H}$. The noise Hamiltonian, $H_{n}(t)$, captures interactions with $p$ independent noise channels. Distortions in the target evolution due to uncontrolled noisy dynamics are captured by the noise operators, $N_{k} \in\mathcal{H}$, where the noise fields $\beta_{k}(t)$ are assumed to be a classical zero-mean wide-sense stationary processes with associated noise power spectral densities, $S_{k}(\omega)$.

The fidelity of target operations generated by $H_{c}(t)$ is therefore reduced by interactions captured by $H_{n}(t)$. To compute the resulting average infidelity we move to a frame rotating with the control Hamiltonian, the so-called toggling frame. In this frame noise Hamiltonian responsible for the errors takes the form

where the noise-axis operators in the toggling-frame are defined by

$\tilde{H}_{n}(t)$ then satisfies the Schrödinger equation

and the average infidelity takes the form

This is generally challenging to compute, requiring approximation methods. To achieve this we generalize the framework developed by Green et al. and focus on computational simplicity and extensibility to higher dimensions. In this framework the error contributed by the noise channels over the duration of the control is approximated, to first order, via a truncated Magnus expansion. Each noise channel then contributes a term to the average infidelity in the spectral domain, expressed as an overlap integral between the noise power spectrum and an appropriate filter function, $F_{k}(\omega)$. Explicitly, the average infidelity is approximated to first order, as

To compute the filter function, take the Fourier transform of each matrix element of the time-dependent operator $\tilde{N}_{k}(t),$ sum the complex modulus square of every element, and divide through by the dimension $D$ of the quantum system. This computational algorithm is protected by Provisional Patent Application #2018902650.
Filter functions as defined above are used throughout the Q-CTRL package to evaluate the performance of controlled quantum systems. Mølmer-Sørensen control drives are an exception. In this case filter functions are computed by performing Fourier analysis on the displacement operator \begin{aligned} U_\text{spin-mode}(t) \equiv \exp \Bigg( \sum_{\mu=1}^{N} \hat{S}^{(\mu)}_{x} \otimes \sum_{k=1}^{M} \left( \alpha^{(\mu)}_{k}(t) \hat{a}^\dagger_{k} - \left( \alpha^{(\mu)}_{k}(t)\right)^{*} \hat{a}_{k} \right) \Bigg) \end{aligned}. describing spin-mode coupling. In this context, the filter function captures the robustness of the given control in achieving the ideal decoupling condition \begin{aligned} &\text{spin-mode decoupling:} && && U_\text{spin-mode}(\tau) &&=&& \mathbb{I} \end{aligned} in the presence of amplitude or detuning noise.