Skip to content

[WIP] Spectroscopy and calibrations integration V2#79

Closed
eggerdj wants to merge 1 commit into
qiskit-community:mainfrom
eggerdj:calibrations_spec_integration_v2
Closed

[WIP] Spectroscopy and calibrations integration V2#79
eggerdj wants to merge 1 commit into
qiskit-community:mainfrom
eggerdj:calibrations_spec_integration_v2

Conversation

@eggerdj
Copy link
Copy Markdown
Contributor

@eggerdj eggerdj commented Jun 4, 2021

Summary

This is a WIP PR designed to show and discuss how calibrations and experiments could be integrated through the analysis class. An alternative option is shown in #80.

Details and comments

The user would run the calibration experiment as follows:

calibrations = BackendCalibrations(backend)
...
qubit = 5
qubit_freq = calibrations.get_qubit_frequencies()[qubit]
frequences = np.linspace(qubit_freq - 10e6, qubit_freq + 10e6)
spec = QubitSpectroscopy(qubit, frequencies)
spec.set_analysis_options(calibrations=calibrations, force_update=True, calibration_group="my_group")
spec.run(backend)

The pros of this integration are:

  • The BackendCalibrations class will remain lightweight.

The cons of this integration are:

  • The analysis class may not be reusable for other types of peak fits unless extra logic will be needed to support other peak-fit experiments such as spectroscopy on 1<->2.
  • The user needs to write a lot of code.

@yaelbh
Copy link
Copy Markdown
Collaborator

yaelbh commented Jun 6, 2021

When you compare the number of lines that the user has to write in #79 and #80, note that there is something "unfair" for #79: #79 contains two lines for calculating frequencies, while frequencies is just None in #80. So in the code snippet above, these two lines should be removed, for a fair comparison.

By the way, In both #79 and #80, if we want to calculate the frequencies from the calibrations, we can do it internally for the user.

@eggerdj
Copy link
Copy Markdown
Contributor Author

eggerdj commented Jun 23, 2021

Closed by #88

@eggerdj eggerdj closed this Jun 23, 2021
@coruscating coruscating added this to the Release 0.1 milestone Jun 24, 2021
@eggerdj eggerdj deleted the calibrations_spec_integration_v2 branch July 16, 2021 13:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants