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=1∑Nnoise∫dfFjk(f)Sk(f),where Sk(f) is the PSD for the noise channel k, Fjk(f) is the filter function corresponding to the control sequence j and the noise channel k, and Ij is the measured infidelity after the control j is applied to the system. Discretizing the integrals for all M measurements gives the following linear equation:
F′S=I,where F′=[F1′,…,Fj′,…,FNnoise′] is a M×K matrix and each element Fj′ is a M×Kj matrix representing the sampled filter functions weighted by discretized frequency step for the noise channel j and K≡∑j=1NnoiseKj; noise PSD S=[S1,…,Sj…,SK]⊤ is a K×1 vector and each element Sj is a Kj×1 vector for noise channel j; infidelity vector I=[I1,I2,…,IM]⊤ is a M×1 vector. Given sampled filter functions and infidelities, this function gives an estimation of the noise PSD Sest. 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.