-
Notifications
You must be signed in to change notification settings - Fork 127
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Stark P1 spectroscopy experiment (#1010)
### Summary This PR adds `StarkP1Spectroscopy` experiment and a dedicated analysis. User can set amplitudes to scan to run this experiment, and the analysis class can convert the amplitudes into frequencies if Stark coefficients are provided. These coefficients can be calibrated with `StarkRamseyXYAmpScan` experiment introduced in #1009 . ### Details and comments The test experiment result is available in [6799e7ae-414f-4816-b887-b4c3ba498624](https://quantum-computing.ibm.com/experiments/6799e7ae-414f-4816-b887-b4c3ba498624). This experiment result was obtained with the following experiment code: ```python from qiskit_experiments.library import StarkP1Spectroscopy exp = StarkP1Spectroscopy((0, ), backend) exp_data = exp.run().block_for_results() ``` The Stark coefficients can be directly set in the analysis options. By the default setting, the analysis class searches for the coefficients in the experiment service. If analysis results for all coefficients are found (i.e. previously saved in the service), it automatically converts the amplitudes into frequencies for visualization. A public class method `StarkP1SpectAnalysis.retrieve_coefficients_from_service` is also offered so that a user can set a coefficients dictionary in advance. This is convenient when the experiment instance is run repeatedly, because retrieving analysis data from the service causes a communication overhead. For example, ```python from qiskit_experiments.library.characterization.analysis import StarkP1SpectAnalysis # overhead happens only once coeffs = StarkP1SpectAnalysis.retrieve_coefficients_from_service( service=service, qubit=0, backend=backend.name, ) exp.analysis.set_options(stark_coefficients=coeffs) for _ in range(10): exp_data = exp.run().block_for_result() exp_data.save() ``` User can make a subclass of this analysis class `StarkP1SpectAnalysis` to perform custom analysis. This built-in class doesn't perform any analysis except for visualization. Instead, this class provides a convenient hook `._run_spect_analysis` that takes (x, y, y_err) data and returns a list of `AnalysisResultData`. --------- Co-authored-by: Yael Ben-Haim <[email protected]>
- Loading branch information
1 parent
970b376
commit 29aeaa4
Showing
11 changed files
with
743 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.