| Title: | Quantum Time Series Analysis: Drift, Noise Spectroscopy and Calibration Forecasting |
|---|---|
| Description: | Tools for exploratory statistical analysis of quantum-hardware calibration time series. The package provides simulators for random telegraph noise (RTN), power-law noise, and Ornstein-Uhlenbeck dephasing; Welch and sine-multitaper power spectral density estimators; a lightweight two-state hidden Markov model for switching signals; cumulative sum (CUSUM) and binary-segmentation diagnostics for calibration drift; residual-quantile interval forecasts; and filter-function calculations for illustrative coherence curves. The package includes a reproducible generator of simulated superconducting-qubit calibration records; it does not retrieve authenticated live provider data. Methodological background is provided by Welch (1967) <doi:10.1109/TAU.1967.1161901>, Thomson (1982) <doi:10.1109/PROC.1982.12433>, Rabiner (1989) <doi:10.1109/5.18626>, Page (1954) <doi:10.1093/biomet/41.1-2.100>, Paladino et al. (2014) <doi:10.1103/RevModPhys.86.361>, and Cywinski et al. (2008) <doi:10.1103/PhysRevB.77.174509>. |
| Authors: | Leila Marvian Mashhad [aut, cre] |
| Maintainer: | Leila Marvian Mashhad <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.1.1 |
| Built: | 2026-10-06 10:48:00 UTC |
| Source: | https://github.com/cran/qtsa |
Part of the qtsa toolkit for exploratory analysis of quantum-hardware calibration time series.
compute_Wt(psd, filter)compute_Wt(psd, filter)
psd |
data frame with f and S columns |
filter |
output from filter_function_q |
This function is intended for exploratory analysis. Interpret physically meaningful results only after checking sampling frequency, units, and model assumptions.
A list with chi, W, interpolated spectrum, filter values, and frequency.
Leila Marvian Mashhad
x <- rnorm(100) # See the package vignette or help pages for a complete workflow.x <- rnorm(100) # See the package vignette or help pages for a complete workflow.
Part of the qtsa toolkit for exploratory analysis of quantum-hardware calibration time series.
cp_qdrift(x, pen = NULL, min_seg = 20)cp_qdrift(x, pen = NULL, min_seg = 20)
x |
numeric time series |
pen |
penalty for adding a changepoint |
min_seg |
minimum segment length |
This function is intended for exploratory analysis. Interpret physically meaningful results only after checking sampling frequency, units, and model assumptions.
A list with changepoints, segment means, and the number of segments.
Leila Marvian Mashhad
x <- rnorm(100) # See the package vignette or help pages for a complete workflow.x <- rnorm(100) # See the package vignette or help pages for a complete workflow.
Part of the qtsa toolkit for exploratory analysis of quantum-hardware calibration time series.
cusum_q(x, target = NULL, k = NULL, h = NULL, sigma = NULL)cusum_q(x, target = NULL, k = NULL, h = NULL, sigma = NULL)
x |
numeric time series |
target |
in-control target mean; default uses early observations |
k |
reference value |
h |
decision interval |
sigma |
in-control standard deviation |
This function is intended for exploratory analysis. Interpret physically meaningful results only after checking sampling frequency, units, and model assumptions.
A list containing CUSUM paths, parameter values, and alarm indices.
Leila Marvian Mashhad
x <- rnorm(100) # See the package vignette or help pages for a complete workflow.x <- rnorm(100) # See the package vignette or help pages for a complete workflow.
Part of the qtsa toolkit for exploratory analysis of quantum-hardware calibration time series.
decoherence_curve(psd, t_grid = seq(0.1, 10, length.out = 100), n_pulses = 1)decoherence_curve(psd, t_grid = seq(0.1, 10, length.out = 100), n_pulses = 1)
psd |
data frame with f and S columns |
t_grid |
times at which to evaluate coherence |
n_pulses |
number of idealized pi pulses |
This function is intended for exploratory analysis. Interpret physically meaningful results only after checking sampling frequency, units, and model assumptions.
A data frame with t, W, and chi.
Leila Marvian Mashhad
x <- rnorm(100) # See the package vignette or help pages for a complete workflow.x <- rnorm(100) # See the package vignette or help pages for a complete workflow.
Part of the qtsa toolkit for exploratory analysis of quantum-hardware calibration time series.
estimate_rtn_hmm(x, n_states = 2, max_iter = 50, seed = NULL)estimate_rtn_hmm(x, n_states = 2, max_iter = 50, seed = NULL)
x |
numeric time series |
n_states |
number of states; the implementation is intended for two states |
max_iter |
maximum number of hard-EM refinement iterations |
seed |
optional random-number seed for k-means initialization; |
This function is intended for exploratory analysis. Interpret physically meaningful results only after checking sampling frequency, units, and model assumptions.
A list containing state means, standard deviations, transition matrix, decoded states, dwell summaries, and amplitude.
Leila Marvian Mashhad
x <- rnorm(100) # See the package vignette or help pages for a complete workflow.x <- rnorm(100) # See the package vignette or help pages for a complete workflow.
Part of the qtsa toolkit for exploratory analysis of quantum-hardware calibration time series.
fetch_ibm_calib(n = 500, backend = "ibmq_manila_sim", seed = NULL, simulate = TRUE)fetch_ibm_calib(n = 500, backend = "ibmq_manila_sim", seed = NULL, simulate = TRUE)
n |
number of time points |
backend |
label included in the output; no network request is made |
seed |
optional random-number seed; |
simulate |
retained for backward compatibility; only simulated data are produced |
This function is intended for exploratory analysis. Interpret physically meaningful results only after checking sampling frequency, units, and model assumptions.
A data frame with time, backend, T1, T2, freq_GHz, and readout_err columns.
Leila Marvian Mashhad
x <- rnorm(100) # See the package vignette or help pages for a complete workflow.x <- rnorm(100) # See the package vignette or help pages for a complete workflow.
Part of the qtsa toolkit for exploratory analysis of quantum-hardware calibration time series.
fidelity_ts(T1, T2, gate_time = 0.05)fidelity_ts(T1, T2, gate_time = 0.05)
T1 |
numeric relaxation-time series |
T2 |
numeric dephasing-time series |
gate_time |
gate duration in the same time units as T1 and T2 |
This function is intended for exploratory analysis. Interpret physically meaningful results only after checking sampling frequency, units, and model assumptions.
A numeric vector of bounded fidelity-proxy values.
Leila Marvian Mashhad
x <- rnorm(100) # See the package vignette or help pages for a complete workflow.x <- rnorm(100) # See the package vignette or help pages for a complete workflow.
Part of the qtsa toolkit for exploratory analysis of quantum-hardware calibration time series.
filter_function_q(t, n_pulses = 1, f, dt = NULL)filter_function_q(t, n_pulses = 1, f, dt = NULL)
t |
total evolution time |
n_pulses |
number of idealized pi pulses |
f |
numeric frequency vector |
dt |
reserved time-resolution argument |
This function is intended for exploratory analysis. Interpret physically meaningful results only after checking sampling frequency, units, and model assumptions.
A list with frequency, angular frequency, filter values, time, and pulse count.
Leila Marvian Mashhad
x <- rnorm(100) # See the package vignette or help pages for a complete workflow.x <- rnorm(100) # See the package vignette or help pages for a complete workflow.
Part of the qtsa toolkit for exploratory analysis of quantum-hardware calibration time series.
forecast_calib(x, h = 20, window = 100, alpha = 0.1, method = "ets")forecast_calib(x, h = 20, window = 100, alpha = 0.1, method = "ets")
x |
numeric time series |
h |
forecast horizon |
window |
length of the rolling training window |
alpha |
nominal miscoverage level used for the residual quantile |
method |
one of "mean", "ets", or "arima"; the current implementation uses lightweight baseline forecasts |
This function is intended for exploratory analysis. Interpret physically meaningful results only after checking sampling frequency, units, and model assumptions.
A list with point forecast, lower and upper interval limits, residuals, and residual quantile.
Leila Marvian Mashhad
x <- rnorm(100) # See the package vignette or help pages for a complete workflow.x <- rnorm(100) # See the package vignette or help pages for a complete workflow.
Part of the qtsa toolkit for exploratory analysis of quantum-hardware calibration time series.
forecast_T1(x, h = 20, window = 100, alpha = 0.1, method = "ets")forecast_T1(x, h = 20, window = 100, alpha = 0.1, method = "ets")
x |
numeric T1 series |
h |
forecast horizon |
window |
rolling window length |
alpha |
nominal miscoverage level |
method |
forecast method |
This function is intended for exploratory analysis. Interpret physically meaningful results only after checking sampling frequency, units, and model assumptions.
A list returned by forecast_calib.
Leila Marvian Mashhad
x <- rnorm(100) # See the package vignette or help pages for a complete workflow.x <- rnorm(100) # See the package vignette or help pages for a complete workflow.
Part of the qtsa toolkit for exploratory analysis of quantum-hardware calibration time series.
hmm_rtn_fit(x, n_states = 2, max_iter = 50, seed = NULL)hmm_rtn_fit(x, n_states = 2, max_iter = 50, seed = NULL)
x |
numeric time series |
n_states |
number of states |
max_iter |
maximum number of iterations |
seed |
optional random-number seed for k-means initialization; |
This function is intended for exploratory analysis. Interpret physically meaningful results only after checking sampling frequency, units, and model assumptions.
A list returned by estimate_rtn_hmm.
Leila Marvian Mashhad
x <- rnorm(100) # See the package vignette or help pages for a complete workflow.x <- rnorm(100) # See the package vignette or help pages for a complete workflow.
Part of the qtsa toolkit for exploratory analysis of quantum-hardware calibration time series.
plot_drift(x, metric = "T1", ...)plot_drift(x, metric = "T1", ...)
x |
data frame returned by fetch_ibm_calib or a numeric series |
metric |
column to plot when x is a data frame |
... |
additional arguments reserved for future use |
This function is intended for exploratory analysis. Interpret physically meaningful results only after checking sampling frequency, units, and model assumptions.
Invisibly, a list containing CUSUM and changepoint diagnostics.
Leila Marvian Mashhad
x <- rnorm(100) # See the package vignette or help pages for a complete workflow.x <- rnorm(100) # See the package vignette or help pages for a complete workflow.
Part of the qtsa toolkit for exploratory analysis of quantum-hardware calibration time series.
psd_mtm_q(x, fs = 1, nw = 3, k = 5)psd_mtm_q(x, fs = 1, nw = 3, k = 5)
x |
numeric time series |
fs |
sampling frequency in Hz |
nw |
nominal time-bandwidth parameter |
k |
number of sine tapers |
This function is intended for exploratory analysis. Interpret physically meaningful results only after checking sampling frequency, units, and model assumptions.
A data frame with f, S, S_low, and S_high.
Leila Marvian Mashhad
x <- rnorm(100) # See the package vignette or help pages for a complete workflow.x <- rnorm(100) # See the package vignette or help pages for a complete workflow.
Part of the qtsa toolkit for exploratory analysis of quantum-hardware calibration time series.
psd_multitaper_q(x, fs = 1, nw = 3, k = 5)psd_multitaper_q(x, fs = 1, nw = 3, k = 5)
x |
numeric time series |
fs |
sampling frequency in Hz |
nw |
nominal time-bandwidth parameter used to choose a conventional taper count |
k |
number of sine tapers |
This function is intended for exploratory analysis. Interpret physically meaningful results only after checking sampling frequency, units, and model assumptions.
A data frame with f, S, S_low, and S_high.
Leila Marvian Mashhad
x <- rnorm(100) # See the package vignette or help pages for a complete workflow.x <- rnorm(100) # See the package vignette or help pages for a complete workflow.
Part of the qtsa toolkit for exploratory analysis of quantum-hardware calibration time series.
psd_welch(x, fs = 1, nperseg = 256, noverlap = NULL, window = "hann")psd_welch(x, fs = 1, nperseg = 256, noverlap = NULL, window = "hann")
x |
numeric time series |
fs |
sampling frequency in Hz |
nperseg |
segment length |
noverlap |
number of overlapping observations |
window |
window type; currently "hann" is supported |
This function is intended for exploratory analysis. Interpret physically meaningful results only after checking sampling frequency, units, and model assumptions.
A data frame with frequency f and one-sided spectral density S.
Leila Marvian Mashhad
x <- rnorm(100) # See the package vignette or help pages for a complete workflow.x <- rnorm(100) # See the package vignette or help pages for a complete workflow.
Part of the qtsa toolkit for exploratory analysis of quantum-hardware calibration time series.
r_oneoverf(n, alpha = 1, fs = 1, f_low = NULL)r_oneoverf(n, alpha = 1, fs = 1, f_low = NULL)
n |
positive number of samples |
alpha |
power-law exponent |
fs |
sampling frequency in Hz |
f_low |
optional low-frequency cutoff |
This function is intended for exploratory analysis. Interpret physically meaningful results only after checking sampling frequency, units, and model assumptions.
A list with time vector, simulated signal, sampling frequency, and exponent.
Leila Marvian Mashhad
x <- rnorm(100) # See the package vignette or help pages for a complete workflow.x <- rnorm(100) # See the package vignette or help pages for a complete workflow.
Part of the qtsa toolkit for exploratory analysis of quantum-hardware calibration time series.
r_ou_dephasing(n, tau_c = 10, sigma = 1, dt = 1)r_ou_dephasing(n, tau_c = 10, sigma = 1, dt = 1)
n |
positive number of samples |
tau_c |
correlation time |
sigma |
stationary standard deviation |
dt |
time increment |
This function is intended for exploratory analysis. Interpret physically meaningful results only after checking sampling frequency, units, and model assumptions.
A numeric vector containing a simulated process.
Leila Marvian Mashhad
x <- rnorm(100) # See the package vignette or help pages for a complete workflow.x <- rnorm(100) # See the package vignette or help pages for a complete workflow.
Part of the qtsa toolkit for exploratory analysis of quantum-hardware calibration time series.
r_rtn(n, fs = 1, amplitude = 1, tau_up = 50, tau_down = 50, p0 = 0.5)r_rtn(n, fs = 1, amplitude = 1, tau_up = 50, tau_down = 50, p0 = 0.5)
n |
positive number of samples |
fs |
sampling frequency in Hz |
amplitude |
difference between the two signal levels |
tau_up |
mean dwell time in the upper state, in samples |
tau_down |
mean dwell time in the lower state, in samples |
p0 |
probability of starting in the upper state |
This function is intended for exploratory analysis. Interpret physically meaningful results only after checking sampling frequency, units, and model assumptions.
A numeric vector containing the simulated RTN signal.
Leila Marvian Mashhad
set.seed(1) x <- r_rtn(100) head(x)set.seed(1) x <- r_rtn(100) head(x)
Part of the qtsa toolkit for exploratory analysis of quantum-hardware calibration time series.
viterbi_rtn(log_emission, log_trans)viterbi_rtn(log_emission, log_trans)
log_emission |
matrix of log emission probabilities with observations in rows |
log_trans |
matrix of log transition probabilities |
This function is intended for exploratory analysis. Interpret physically meaningful results only after checking sampling frequency, units, and model assumptions.
An integer vector giving the most likely state path.
Leila Marvian Mashhad
x <- rnorm(100) # See the package vignette or help pages for a complete workflow.x <- rnorm(100) # See the package vignette or help pages for a complete workflow.