Note
This is the documentation for the current state of the development branch of Qiskit Experiments. The documentation or APIs here can change prior to being released.
StarkP1Spectroscopy¶
- class StarkP1Spectroscopy(physical_qubits, backend=None, **experiment_options)[source]¶
P1 spectroscopy experiment with Stark tone.
Overview
This experiment measures a probability of the excitation state of the qubit with a certain delay after excitation. A Stark tone is applied during this delay to move the qubit frequency to conduct a spectroscopy of qubit relaxation quantity.
┌───┐┌──────────────────┐┌─┐ q: ┤ X ├┤ Stark(stark_amp) ├┤M├ └───┘└──────────────────┘└╥┘ c: 1/══════════════════════════╩═ 0
Since the qubit relaxation rate may depend on the qubit frequency due to the coupling to nearby energy levels, this experiment is useful to find out lossy operation frequency that might be harmful to the gate fidelity [1].
References
[1] Malcolm Carroll, Sami Rosenblatt, Petar Jurcevic, Isaac Lauer, Abhinav Kandala, Dynamics of superconducting qubit relaxation times (open)
User manual
Analysis class reference
qiskit_experiments.library.driven_freq_tuning.StarkP1SpectAnalysis
Experiment options
These options can be set by the
set_experiment_options()
method.- Options
Defined in the class
StarkP1Spectroscopy
:t1_delay (float)
Default value:2e-05
The T1 delay time after excitation pulse. The delay must be sufficiently greater than the edge duration determined by the stark_sigma.stark_channel (PulseChannel)
Default value:None
Pulse channel to apply Stark tones. If not provided, the same channel with the qubit drive is used.stark_freq_offset (float)
Default value:80000000.0
Offset of Stark tone frequency from the qubit frequency. This must be greater than zero not to apply Rabi drive.stark_sigma (float)
Default value:1.5e-08
Gaussian sigma of the rising and falling edges of the Stark tone, in seconds.stark_risefall (float)
Default value:2
Ratio of sigma to the duration of the rising and falling edges of the Stark tone.min_xval (float)
Default value:-1.0
Minimum x value.max_xval (float)
Default value:1.0
Maximum x value.num_xvals (int)
Default value:201
Number of x-values to scan.xval_type (str)
Default value:"amplitude"
Type of x-value. Eitheramplitude
orfrequency
. Setting to frequency requires pre-calibration of Stark shift coefficients.spacing (str)
Default value:"quadratic"
A policy for the spacing to create an amplitude list frommin_stark_amp
tomax_stark_amp
. Eitherlinear
orquadratic
must be specified.xvals (list[float])
Default value:None
The list of x-values that will be scanned in the experiment. If not set, thennum_xvals
parameters spaced according to thespacing
policy betweenmin_xval
andmax_xval
are used. Ifxvals
is set, these parameters are ignored.stark_coefficients (StarkCoefficients)
Default value:None
Calibrated Stark shift coefficients. This value is necessary when xval_type is “frequency”. When this value is None, a search for the “stark_coefficients” in the result database is run. This requires having the experiment service available in the backend set for the experiment.
Defined in the class
BaseExperiment
:max_circuits (Optional[int])
Default value:None
The maximum number of circuits per job when running an experiment on a backend.
See also
qiskit_experiments.library.driven_freq_tuning.ramsey.StarkRamseyXY
qiskit_experiments.library.driven_freq_tuning.ramsey_amp_scan.StarkRamseyXYAmpScan
Initialization
Initialize new experiment class.
Deprecated since version 0.8: The class
qiskit_experiments.library.driven_freq_tuning.p1_spect.StarkP1Spectroscopy
is deprecated as of qiskit-experiments 0.8. It will be removed no earlier than 3 months after the release date. Due to the deprecation of Qiskit Pulse, experiments involving pulse gate calibrations like this one have been deprecated.- Parameters:
physical_qubits (Sequence[int]) – Sequence with the index of the physical qubit.
backend (Backend | None) – Optional, the backend to run the experiment on.
experiment_options – Experiment options. See the class documentation or
self._default_experiment_options
for descriptions.
Attributes
- analysis¶
Return the analysis instance for the experiment
- backend¶
Return the backend for the experiment
- experiment_options¶
Return the options for the experiment.
- experiment_type¶
Return experiment type.
- num_qubits¶
Return the number of qubits for the experiment.
- physical_qubits¶
Return the device qubits for the experiment.
Methods
- circuits()[source]¶
Create circuits.
- Returns:
A list of P1 circuits with a variable Stark tone amplitudes.
- Return type:
list[QuantumCircuit]
- config()¶
Return the config dataclass for this experiment
- Return type:
- copy()¶
Return a copy of the experiment
- Return type:
- classmethod from_config(config)¶
Initialize an experiment from experiment config
- Return type:
- job_info(backend=None)¶
Get information about job distribution for the experiment on a specific backend.
- Parameters:
backend (Backend) – Optional, the backend for which to get job distribution information. If not specified, the experiment must already have a set backend.
- Returns:
A dictionary containing information about job distribution.
”Total number of circuits in the experiment”: Total number of circuits in the experiment.
”Maximum number of circuits per job”: Maximum number of circuits in one job based on backend and experiment settings.
”Total number of jobs”: Number of jobs needed to run this experiment on the currently set backend.
- Return type:
dict
- Raises:
QiskitError – if backend is not specified.
- parameterized_circuits()[source]¶
Create circuits with parameters for P1 experiment with Stark shift.
- Returns:
Quantum template circuit for P1 experiment.
- Return type:
tuple[QuantumCircuit, …]
- parameters()[source]¶
Stark tone amplitudes to use in circuits.
- Returns:
The list of amplitudes to use for the different circuits based on the experiment options.
- Raises:
ValueError – When invalid xval spacing is specified.
- Return type:
ndarray
- run(backend=None, sampler=None, analysis='default', timeout=None, backend_run=None, **run_options)¶
Run an experiment and perform analysis.
- Parameters:
backend (Backend | None) – Optional, the backend to run on. Will override existing backend settings.
sampler (BaseSamplerV2 | None) – Optional, the sampler to run the experiment on. If None then a sampler will be invoked from previously set backend
analysis (BaseAnalysis | None) – Optional, a custom analysis instance to use for performing analysis. If None analysis will not be run. If
"default"
the experimentsanalysis()
instance will be used if it contains one.timeout (float | None) – Time to wait for experiment jobs to finish running before cancelling.
backend_run (bool | None) – Use backend run (temp option for testing)
run_options – backend runtime options used for circuit execution.
- Returns:
The experiment data object.
- Raises:
QiskitError – If experiment is run with an incompatible existing ExperimentData container.
- Return type:
- set_experiment_options(**fields)¶
Set the experiment options.
- Parameters:
fields – The fields to update the options
- Raises:
AttributeError – If the field passed in is not a supported options
- set_run_options(**fields)¶
Set options values for the experiment
run()
method.- Parameters:
fields – The fields to update the options
See also
The Setting options for your experiment guide for code example.
- set_transpile_options(**fields)¶
Set the transpiler options for
run()
method.- Parameters:
fields – The fields to update the options
- Raises:
QiskitError – If initial_layout is one of the fields.
See also
The Setting options for your experiment guide for code example.