calculate_quasi_static_scan
- static FunctionNamespace.calculate_quasi_static_scan(*, duration, drives=None, shifts=None, drifts=None, target, **kwargs)
Calculate the infidelity for a range of quasi-static noise values.
Use this function to model noise processes that are so slow in the time scale of the evolution that you can treat them as static values in a single realization, although they can change from run to run. Provide to the function the controls and static terms according to which the system evolves, adding a noise to at least one of the controls (drives or shifts) or one of the static terms (drifts). The infidelities that this function returns correspond to the static noise values that you provide. If you mark more than one control or static term as a noise, this function returns infidelities for all the possible combinations of values of those noises, up to a limit of 8192 combinations.
When using this function, you must provide at least one term in drives, shifts, or drifts. Also, the number of combinations of noise values that you provide must not exceed 8192.
- Parameters:
duration (float) – The duration of the simulation, \(\tau\), at the end of which you want the infidelities. Must be positive and match the duration of each control pulse in drives and shifts.
drives (List[qctrl.dynamic.types.quasi_static_scan.Drive], optional) – The list of complex control terms in the system’s Hamiltonian. Each term has the form \(\left(1 + \beta_{\gamma_{j}} \right) \left(\gamma_{j}(t) C_{j} + \mathrm{H.c.}\right)\), where \(C_{j}\) is a non-Hermitian operator, \(\gamma_{j}(t)\) is a complex piecewise-constant function between 0 and \(\tau\), and \(\beta_{\gamma_{j}}\) is the amplitude of its noise. Defaults to an empty list.
shifts (List[qctrl.dynamic.types.quasi_static_scan.Shift], optional) – The list of real control terms in the system’s Hamiltonian. Each term has the form \(\left(1 + \beta_{\alpha_{k}} \right) \alpha_{k}(t) A_{k}\), where \(A_{k}\) is a Hermitian operator, \(\alpha_{k}(t)\) is a real piecewise-constant function between 0 and \(\tau\), and \(\beta_{\alpha_{k}}\) is the amplitude of its noise. Defaults to an empty list.
drifts (List[qctrl.dynamic.types.quasi_static_scan.Drift], optional) – The list of static or pure noise terms in the system’s Hamiltonian. Each term has the form \(D_{l}\) or \(\beta_{D_{l}} D_{l}\), where \(D_{l}\) is a Hermitian operator and \(\beta_{D_{l}}\) is a noise amplitude. Defaults to an empty list.
target (qctrl.dynamic.types.TargetInput) – The target partial isometry, \(V\). The function calculates the infidelity with respect to it after the duration \(\tau\).
- Returns:
The result of the quasi-static scan. It includes the final infidelity \(\mathcal{I}(\tau)\) for every possible combination of the noise amplitudes \(\beta_{\mu}\).
- Return type:
Warning
This is a legacy function that will be removed in the future. The recommended way of running simulations is through the calculate_graph function. You can read about how to use the calculate_graph function for quasi-static scans in the How to evaluate control susceptibility to quasistastic noise user guide.
See also
calculate_graph
Evaluate generic functions.
Notes
This function integrates the time-dependent Schrödinger equation,
\[i \frac{d U(t)}{d t} = H(t) U(t),\]with the Hamiltonian
\[\begin{split}\begin{aligned} H(t) =& \sum_{j = 1}^{N_\mathrm{drives}} \left(1 + \beta_{\gamma_{j}} \right) \left(\gamma_{j}(t) C_{j} + \text{H.c.} \right) + \sum_{k = 1}^{N_\mathrm{shifts}} (1 + \beta_{\alpha_{k}}) \alpha_{k}(t) A_{k} \\ & + \sum_{l = 1}^{N_\mathrm{drifts}^{(\mathrm{noiseless})}} D_{l} + \sum_{l = 1}^{N_\mathrm{drifts}^{(\mathrm{noisy})}} \beta_{D_{l}} D_{l} . \end{aligned}\end{split}\]In each sample, the noise amplitudes \(\beta_\mu\) assume a constant value from the set of values that you provided for that noise, \(\beta_\mu \in \{\beta_{\mu,i}\}\). Here, \(\mu\) is any of the drives \(\gamma_j\), shifts \(\alpha_k\), and drifts \(D_l\). Noiseless controls have \(\beta_\mu=0\).
This function calculates the evolution of the system for all the possible combinations of noise amplitudes that you specified, and returns the final infidelities for each of these combinations. The infidelities after a time duration \(\tau\) with respect to the target are calculated as:
\[\mathcal{I}(\tau) = 1 - \left| \frac{\mathrm{Tr} \left(V^\dagger U(\tau)\right)}{\mathrm{Tr} \left(V^\dagger V\right)} \right|^2.\]