Skip to content

Commit

Permalink
update qiskit_experiments/library/characterization/half_angle.py (Qis…
Browse files Browse the repository at this point in the history
…kit-Extensions#1238)
  • Loading branch information
Naohnakazawa committed May 2, 2024
1 parent 087d631 commit 3e30fb7
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 26 deletions.
8 changes: 3 additions & 5 deletions qiskit_experiments/library/characterization/half_angle.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,13 +101,11 @@ class HalfAngle(BaseExperiment):
from qiskit_experiments.library.characterization import HalfAngle
qubit=0
exp = HalfAngle([qubit], backend=backend)
exp.set_run_options(shots=1000, seed_simulator=178)
exp = HalfAngle((0,), backend=backend)
exp_data = exp.run().block_for_results()
result = exp_data.analysis_results()
exp_data.figure(0)
display(exp_data.figure(0))
exp_data.analysis_results(dataframe=True)
# section: reference
.. ref_arxiv:: 1 1504.06597
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,14 +65,11 @@ class MultiStateDiscrimination(BaseExperiment):
from qiskit_experiments.library.characterization import MultiStateDiscrimination
qubit=0
exp=MultiStateDiscrimination([qubit], backend=backend)
print(exp.circuits()[0])
print(exp.circuits()[1])
exp=MultiStateDiscrimination((0,), backend=backend)
exp_data=exp.run().block_for_results()
result=exp_data.analysis_results()
exp_data.figure(0)
display(exp_data.figure(0))
exp_data.analysis_results(dataframe=True)
# section: reference
`Qiskit Textbook\
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,18 +62,15 @@ class QubitSpectroscopy(Spectroscopy):
freq01_estimate = backend.defaults().qubit_freq_est[qubit]
frequencies = np.linspace(freq01_estimate-15e6, freq01_estimate+15e6, 51)
exp = QubitSpectroscopy(physical_qubits = (0,),
exp = QubitSpectroscopy(physical_qubits = (qubit,),
frequencies = frequencies,
backend = backend,
absolute = True,
analysis = None,
)
exp.set_experiment_options(amp=0.005)
.. jupyter-execute::
exp_data = exp.run().block_for_results()
exp_data.figure(0)
display(exp_data.figure(0))
exp_data.analysis_results(dataframe=True)
"""

__spec_gate_name__ = "Spec"
Expand Down
8 changes: 4 additions & 4 deletions qiskit_experiments/library/characterization/rabi.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@ class Rabi(BaseExperiment, RestlessMixin):
backend=backend,)
exp_data = exp.run().block_for_results()
result = exp_data.analysis_results()
exp_data.figure(0)
display(exp_data.figure(0))
exp_data.analysis_results(dataframe=True)
"""

__gate_name__ = "Rabi"
Expand Down Expand Up @@ -250,8 +250,8 @@ class EFRabi(Rabi):
amplitudes=np.linspace(-0.1, 0.1, 21),)
exp_data = exp.run().block_for_results()
result = exp_data.analysis_results()
exp_data.figure(0)
display(exp_data.figure(0))
exp_data.analysis_results(dataframe=True)
"""

__outcome__ = "rabi_rate_12"
Expand Down
8 changes: 3 additions & 5 deletions qiskit_experiments/library/characterization/ramsey_xy.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,14 +96,12 @@ class RamseyXY(BaseExperiment, RestlessMixin):
import numpy as np
from qiskit_experiments.library.characterization import RamseyXY
qubit=0
delays = np.linspace(0, 10.e-7, 101)
exp = RamseyXY([qubit], backend=backend, delays=delays, osc_freq=2.0e6)
exp.set_run_options(shots=1000, seed_simulator=201)
exp = RamseyXY((0,), backend=backend, delays=delays, osc_freq=2.0e6)
exp_data = exp.run().block_for_results()
result=exp_data.analysis_results()
exp_data.figure(0)
display(exp_data.figure(0))
exp_data.analysis_results(dataframe=True)
"""

@classmethod
Expand Down

0 comments on commit 3e30fb7

Please sign in to comment.