Skip to content

Commit

Permalink
update qiskit_experiments/library/characterization/readout_angle.py (…
Browse files Browse the repository at this point in the history
…Qiskit-Extensions#1238)
  • Loading branch information
Naohnakazawa committed May 2, 2024
1 parent 3e30fb7 commit 41dc16c
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 39 deletions.
13 changes: 3 additions & 10 deletions qiskit_experiments/library/characterization/readout_angle.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,18 +60,11 @@ class ReadoutAngle(BaseExperiment):
.. jupyter-execute::
from qiskit_experiments.library.characterization import ReadoutAngle
qubit=0
exp = ReadoutAngle([qubit], backend=backend)
exp.set_run_options(shots=1000, seed_simulator=106)
exp = ReadoutAngle((0,), backend=backend)
exp_data = exp.run().block_for_results()
result = exp_data.analysis_results()
for _ in result:
print(_)
.. jupyter-execute::
exp_data.figure(0)
display(exp_data.figure(0))
exp_data.analysis_results(dataframe=True)
"""

@classmethod
Expand Down
1 change: 1 addition & 0 deletions qiskit_experiments/library/characterization/t1.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ class T1(BaseExperiment):
exp = T1(physical_qubits=(0, ), delays=delays, backend=backend)
exp_data = exp.run().block_for_results()
display(exp_data.figure(0))
exp_data.analysis_results(dataframe=True)
# section: manual
:doc:`/manuals/characterization/t1`
Expand Down
16 changes: 4 additions & 12 deletions qiskit_experiments/library/characterization/t2hahn.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,27 +77,19 @@ class T2Hahn(BaseExperiment):
.. jupyter-execute::
import qiskit
import numpy as np
from qiskit_experiments.library.characterization.t2hahn import T2Hahn
conversion_factor = 1e-6
delays = list(range(0, 50, 1))
delays = [float(_)*conversion_factor for _ in delays]
number_of_echoes = 1
delays = np.linspace(0, 50, 51)*1e-6
exp = T2Hahn(physical_qubits=(0, ),
delays=delays,
num_echoes=number_of_echoes,
backend=backend)
print(exp.circuits()[0])
.. jupyter-execute::
exp.analysis.set_options(p0=None, plot=True)
exp.set_run_options(shots=1000, seed_simulator=121)
expdata = exp.run().block_for_results()
expdata = exp.run().block_for_results()
display(expdata.figure(0))
exp_data.analysis_results(dataframe=True)
# section: reference
.. ref_arxiv:: 1 1904.06560
Expand Down
6 changes: 1 addition & 5 deletions qiskit_experiments/library/characterization/t2ramsey.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,14 +84,10 @@ class T2Ramsey(BaseExperiment):
delays = list(np.arange(1.00e-6, 50.0e-6, 2.00e-6))
exp = T2Ramsey(physical_qubits=(0, ), delays=delays, backend=backend, osc_freq=1.0e5)
print(exp.circuits()[0])
.. jupyter-execute::
exp.set_run_options(shots=1000, seed_simulator=101)
expdata = exp.run().block_for_results()
display(expdata.figure(0))
exp_data.analysis_results(dataframe=True)
# section: reference
.. ref_arxiv:: 1 1904.06560
Expand Down
10 changes: 1 addition & 9 deletions qiskit_experiments/library/characterization/tphi.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,21 +76,13 @@ class Tphi(BatchExperiment):
delays_t1 = np.arange(1e-6, 300e-6, 10e-6)
delays_t2 = np.arange(1e-6, 50e-6, 2e-6)
.. jupyter-execute::
exp = Tphi(physical_qubits=(0, ),
delays_t1=delays_t1,
delays_t2=delays_t2,
t2type="hahn",
osc_freq = 5.e-6,
num_echoes=1,
backend=backend
)
exp.set_run_options(seed_simulator=100)
exp_data = exp.run().block_for_results()
result = exp_data.analysis_results("T_phi")
print(result)
exp_data.analysis_results(dataframe=True)
# section: reference
.. ref_arxiv:: 1 1904.06560
Expand Down
5 changes: 2 additions & 3 deletions qiskit_experiments/library/characterization/zz_ramsey.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,11 +148,10 @@ class ZZRamsey(BaseExperiment):
qubits = (0, 1)
exp = ZZRamsey(physical_qubits=qubits, backend=backend)
exp.set_run_options(shots=1000, seed_simulator=101)
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)
"""

def __init__(
Expand Down

0 comments on commit 41dc16c

Please sign in to comment.