@@ -211,6 +211,111 @@ In Qiskit Experiments, the experiment option ``stark_amp`` usually refers to
211
211
the height of this GaussianSquare flat-top.
212
212
213
213
214
+ Workflow
215
+ --------
216
+
217
+ In this example, you'll learn how to measure a spectrum of qubit relaxation property
218
+ with fixed frequency transmons.
219
+ As you already know, we give an offset to the qubit frequency with a Stark tone,
220
+ and the workflow starts from characterizing the amount of the Stark shift against
221
+ the Stark amplitude :math: `\bar {\Omega }` that you can experimentally control.
222
+
223
+ .. jupyter-input ::
224
+
225
+ from qiskit_experiments.library.driven_freq_tuning import StarkRamseyXYAmpScan
226
+
227
+ exp = StarkRamseyXYAmpScan((0,), backend=backend)
228
+ exp_data = exp.run().block_for_results()
229
+ coefficients = exp_data.analysis_results("stark_coefficients").value
230
+
231
+ You first need to run the :class: `.StarkRamseyXYAmpScan ` experiment that scans :math: `\bar {\Omega }`
232
+ and estimates the amount of the resultant frequency shift.
233
+ This experiment fits the frequency shift to a polynomial model which is a function of :math: `\bar {\Omega }`.
234
+ You can obtain the :class: `.StarkCoefficients ` object that contains
235
+ all polynomial coefficients to map and reverse-map the :math: `\bar {\Omega }` to corresponding frequency value.
236
+
237
+
238
+ This object may be necessary for the following spectroscopy experiment.
239
+ Since Stark coefficients are stable for a relatively long time,
240
+ you may want to save the coefficient values and load them later when you run the experiment.
241
+ If you have an access to the Experiment service, you can just save the experiment result.
242
+
243
+ .. jupyter-input ::
244
+
245
+ exp_data.save()
246
+
247
+ .. jupyter-output ::
248
+
249
+ You can view the experiment online at https://quantum.ibm.com/experiments/23095777-be28-4036-9c98-89d3a915b820
250
+
251
+
252
+ Otherwise, you can dump the coefficient object into a file with JSON format.
253
+
254
+ .. jupyter-input ::
255
+
256
+ import json
257
+ from qiskit_experiments.framework import ExperimentEncoder
258
+
259
+ with open("coefficients.json", "w") as fp:
260
+ json.dump(ret_coeffs, fp, cls=ExperimentEncoder)
261
+
262
+ The saved object can be retrieved either from the service or file, as follows.
263
+
264
+ .. jupyter-input ::
265
+
266
+ # When you have access to Experiment service
267
+ from qiskit_experiments.library.driven_freq_tuning import retrieve_coefficients_from_backend
268
+
269
+ coefficients = retrieve_coefficients_from_backend(backend, (0,))
270
+
271
+ # Alternatively you can load from file
272
+ from qiskit_experiments.framework import ExperimentDecoder
273
+
274
+ with open("coefficients.json", "r") as fp:
275
+ coefficients = json.load(fp, cls=ExperimentDecoder)
276
+
277
+ Now you can measure the spectrum of qubit relaxation property.
278
+ The :class: `.StarkP1Spectroscopy ` experiment also scans :math: `\bar {\Omega }`,
279
+ but instead of measuring the frequency shift, it measures the excited state population P1
280
+ after certain delay, :code: `t1_delay ` in the experiment options, following the state population.
281
+ You can scan the :math: `\bar {\Omega }` values either in the "frequency" or "amplitude" domain,
282
+ but the :code: `stark_coefficients ` options must be set when you prefer the frequency sweep.
283
+
284
+ .. jupyter-input ::
285
+
286
+ from qiskit_experiments.library.driven_freq_tuning import StarkP1Spectroscopy
287
+
288
+ exp = StarkP1Spectroscopy((0,), backend=backend)
289
+
290
+ exp.set_experiment_options(
291
+ t1_delay=20e-6,
292
+ min_xval=-20e6,
293
+ max_xval=20e6,
294
+ xval_type="frequency",
295
+ spacing="linear",
296
+ stark_coefficients=coefficients,
297
+ )
298
+
299
+ exp_data = exp.run().block_for_results()
300
+
301
+ You may find notches in the P1 spectrum, which may indicate the existence of TLS
302
+ in the vicinity of your qubit drive frequency.
303
+
304
+ .. jupyter-input ::
305
+
306
+ exp_data.figure(0)
307
+
308
+ .. image :: ./stark_experiment_example.png
309
+
310
+ Note that this experiment doesn't yield any analysis result because a landscape of P1 spectrum
311
+ is hardly predicted due to random occurrence of the TLS or frequency collision.
312
+ If you have own protocol to extract meaningful quantities from the data,
313
+ you can write a custom analysis class and give it to the experiment instance before execution.
314
+ See :class: `.StarkP1SpectAnalysis ` for more details.
315
+
316
+ This protocol can be parallelized among many qubits unless crosstalk matters.
317
+
318
+
214
319
References
215
320
----------
216
321
0 commit comments