reconstruct

boulderopal.noise_reconstruction.reconstruct(filter_functions, infidelities, infidelity_uncertainties=None, method=None)

Estimate the power spectral density (PSD) of noise processes affecting a quantum system.

Use this function to obtain noise PSDs from measurements performed on your quantum system. You must provide the measurements as filter functions, which describe the controls applied to the system, and operational infidelities.

Parameters

  • filter_functions (list [ list [FilterFunction ] ]) – The filter functions associated with each control and noise. Each filter function represents the sensitivity of a set of controls to a certain noise. The placement in the outer list corresponds to the noise, while the inner list is organized by control. Note that at least one filter function must be present, and that the filter functions for each noise channel have to be sampled at the same frequencies.
  • infidelities (np.ndarray) – The infidelities associated with the application of each control. It must contain at least one element, and all its values must be greater than or equal to 0, and less than or equal to 1.
  • infidelity_uncertainties (np.ndarray or None , optional) – The uncertainty associated with each infidelity. The array must have the same length as the infidelities, and all values must be greater than or equal to 0, and less than or equal to 1. Defaults to None, in which case no uncertainty is associated to the infidelities.
  • method (NoiseReconstructionMethod or None , optional) – The method to be used in the noise reconstruction. Defaults to the singular value decomposition (SVD) method with entropy truncation at 0.5.

Returns

A dictionary containing the noise reconstruction result, with the following keys:

output : A list with the spectral distributions of the reconstructed noises. Each list entry is a dictionary containing the power spectral densities of a noise (and the frequencies at which they are defined), presented in the same sequence as provided in the filter_functions argument. It might contain the estimated uncertainties for the spectral densities, if you provide infidelity uncertainties.

metadata : Metadata associated with the calculation. No guarantees are made about the contents of this metadata dictionary; the contained information is intended purely to help interpret the results of the calculation on a one-off basis.

Return type

dict

Notes

From the filter function theory 1, the operational infidelity for a given control sequence applied on a weak-noise-perturbed quantum system is the overlap between the noise power spectral density (PSD) and the corresponding filter functions:

Ij=k=1NnoisedfFjk(f)Sk(f), {\mathcal I}_j = \sum_{k = 1}^{N_{\mathrm{noise}}} \int {\mathrm d}f \, F_{jk}(f) S_k(f) ,

where Sk(f)S_k(f) is the PSD for the noise channel kk, Fjk(f)F_{jk}(f) is the filter function corresponding to the control sequence jj and the noise channel kk, and Ij{\mathcal I}_j is the measured infidelity after the control jj is applied to the system. Discretizing the integrals for all MM measurements gives the following linear equation:

FS=I, F'{\mathbf S} = {\mathbf I} ,

where F=[F1,,Fj,,FNnoise]F' = [F'_1, \dots, F'_j, \dots, F'_{N_{\mathrm{noise}}}] is a M×KM \times K matrix and each element FjF'_j is a M×KjM \times K_j matrix representing the sampled filter functions weighted by discretized frequency step for the noise channel jj and Kj=1NnoiseKjK \equiv \sum_{j=1}^{N_\mathrm{noise}} K_j; noise PSD S=[S1,,Sj,SK]{\mathbf S} = [{\mathbf S}_1, \dots, {\mathbf S}_j \dots, {\mathbf S}_K]^\top is a K×1K \times 1 vector and each element Sj{\mathbf S}_j is a Kj×1K_j \times 1 vector for noise channel jj; infidelity vector I=[I1,I2,,IM]{\mathbf I} = [{\mathcal I}_1, {\mathcal I}_2, \dots, {\mathcal I}_M]^\top is a M×1M \times 1 vector. Given sampled filter functions and infidelities, this function gives an estimation of the noise PSD Sest{\mathbf S}_{\mathrm{est}}. If uncertainties are provided with infidelities, this function also returns the uncertainties in estimation.

References

Examples

Perform a simple noise reconstruction of one noise affecting frequency 2, using two pulses perfectly sensitive to frequencies 1 and 2:

>>> filter_functions = [
...    [
...        bo.noise_reconstruction.FilterFunction(
...            frequencies=np.array([1, 2]), inverse_powers=np.array([1, 0])
...        ),
...        bo.noise_reconstruction.FilterFunction(
...            frequencies=np.array([1, 2]), inverse_powers=np.array([0, 1])
...        )
...    ]
... ]
>>> result = bo.noise_reconstruction.reconstruct(
...    filter_functions=filter_functions, infidelities=np.array([0, 1])
... )
>>> result["output"]
    [{'frequencies': array([1., 2.]), 'psd': array([0., 1.])}]

See also the How to perform noise spectroscopy on arbitrary noise channels user guide.

Was this useful?