-
Notifications
You must be signed in to change notification settings - Fork 131
Generalize spectroscopy #82
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
58ad219
* Added the option to give a preparation circuit to spectroscopy to e…
eggerdj 14ae438
* Added preparation circuit name to metadata.
eggerdj 3d8b6da
* Added e-f spectroscopy experiment.
eggerdj 16c6512
* Added e-f spectroscopy to the init.
eggerdj de9daf0
* Unit conversion.
eggerdj 6a8add8
* Fix unit conversion.
eggerdj 056ee9c
* Added the backend to _schedule in spectroscopy.
eggerdj 9243d82
* Removed unused docstring.
eggerdj 7419ac5
Merge branch 'main' into spec_12
eggerdj f7830c6
Update qiskit_experiments/characterization/qubit_spectroscopy.py
eggerdj 00d915f
* Refactored tests.
eggerdj 927b484
Merge branch 'main' into spec_12
eggerdj e24b480
Merge branch 'main' into spec_12
eggerdj 365ae84
Merge branch 'main' of github.com:Qiskit/qiskit-experiments into spec_12
eggerdj b89f94a
Merge branch 'main' of github.com:Qiskit/qiskit-experiments into spec_12
eggerdj abed690
Merge branch 'main' into spec_12
eggerdj 17b8435
* Updated test to the refactored MockBackend
eggerdj 6284f93
* removed pulse.drive_channel as it fails on some backends.
eggerdj 5f4ce10
Merge branch 'main' into spec_12
eggerdj 44e3d5e
* Added class variable to fix the name of the spec gate.
eggerdj File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| # This code is part of Qiskit. | ||
| # | ||
| # (C) Copyright IBM 2021. | ||
| # | ||
| # This code is licensed under the Apache License, Version 2.0. You may | ||
| # obtain a copy of this license in the LICENSE.txt file in the root directory | ||
| # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. | ||
| # | ||
| # Any modifications or derivative works of this code must retain this | ||
| # copyright notice, and modified files need to carry a notice indicating | ||
| # that they have been altered from the originals. | ||
|
|
||
| """Spectroscopy for the e-f transition.""" | ||
|
|
||
| from qiskit import QuantumCircuit | ||
| from qiskit.circuit import Gate | ||
|
|
||
| from qiskit_experiments.characterization.qubit_spectroscopy import QubitSpectroscopy | ||
|
|
||
|
|
||
| class EFSpectroscopy(QubitSpectroscopy): | ||
| """Class that runs spectroscopy on the e-f transition by scanning the frequency. | ||
|
|
||
| The circuits produced by spectroscopy, i.e. | ||
|
|
||
| .. parsed-literal:: | ||
|
|
||
| ┌───┐┌────────────┐ ░ ┌─┐ | ||
| q_0: ┤ X ├┤ Spec(freq) ├─░─┤M├ | ||
| └───┘└────────────┘ ░ └╥┘ | ||
| measure: 1/═══════════════════════╩═ | ||
| 0 | ||
|
|
||
| """ | ||
|
|
||
| def _template_circuit(self, freq_param) -> QuantumCircuit: | ||
| """Return the template quantum circuit.""" | ||
| circuit = QuantumCircuit(1) | ||
| circuit.x(0) | ||
| circuit.append(Gate(name=self.__spec_gate_name__, num_qubits=1, params=[freq_param]), (0,)) | ||
| circuit.measure_active() | ||
|
|
||
| return circuit | ||
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.