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

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

Build:
Build:
LAST BUILD BRANCH: gh-readonly-queue/main/pr-1267-60655bb7aa78fd8f27a3a0be3c19f1e89e483305
DEFAULT BRANCH: main
Ran 23 Jul 2023 06:47AM UTC
Files 166
Run time 2s
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.318% (-0.03%) from 88.346%
5634793061.3

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)

12180 of 13791 relevant lines covered (88.32%)

0.88 hits per line

Source Files on job unit-tests_python3.11-macOS-latest - 5634793061.3
  • Tree
  • List 0
  • Changed 8
  • Source Changed 7
  • Coverage Changed 8
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 5634793061
  • 29aeaa48 on github
  • Prev Job for on gh-readonly-queue/main/pr-1010-970b376fee8a92fea4fb4562e8de987782df83f9 (#5615209423.4)
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