• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

Qiskit-Extensions / qiskit-experiments / 5634793061
88%
main: 88%

Build:
Build:
LAST BUILD BRANCH: gh-readonly-queue/main/pr-1267-60655bb7aa78fd8f27a3a0be3c19f1e89e483305
DEFAULT BRANCH: main
Ran 23 Jul 2023 06:39AM UTC
Jobs 4
Files 166
Run time 4s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

23 Jul 2023 05:48AM UTC coverage: 88.333% (-0.01%) from 88.346%
5634793061

push

github

web-flow
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 doe... (continued)

154 of 154 new or added lines in 6 files covered. (100.0%)

12182 of 13791 relevant lines covered (88.33%)

3.53 hits per line

Jobs
ID Job ID Ran Files Coverage
1 unit-tests_python3.10-macOS-latest - 5634793061.1 23 Jul 2023 06:39AM UTC 0
88.33
GitHub Action Run
2 unit-tests_python3.8-macOS-latest - 5634793061.2 23 Jul 2023 06:41AM UTC 0
88.3
GitHub Action Run
3 unit-tests_python3.11-macOS-latest - 5634793061.3 23 Jul 2023 06:47AM UTC 0
88.32
GitHub Action Run
4 unit-tests_python3.9-macOS-latest - 5634793061.4 23 Jul 2023 07:15AM UTC 0
88.3
GitHub Action Run
Source Files on build 5634793061
Detailed source file information is not available for this build.
  • Back to Repo
  • Github Actions Build #5634793061
  • 29aeaa48 on github
  • Prev Build on gh-readonly-queue/main/pr-1229-2e7bd6eb356d0f17a9896e823fe3b642f5b989ef (#5615209423)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc