Skip to content
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

T2 experiment with Hahn echoes #365

Merged
merged 118 commits into from
Jan 31, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
118 commits
Select commit Hold shift + click to select a range
a4fa8ef
Add template for T2 exp, still need to check results
ItamarGoldman Aug 22, 2021
e638dca
Made the code cleaner
ItamarGoldman Aug 22, 2021
28271b9
cleared RB documantation
ItamarGoldman Aug 22, 2021
2838973
Merge branch 'main' into T2_Hahn_Echo
ItamarGoldman Aug 23, 2021
fbd95b3
Merge remote-tracking branch 'upstream/main' into T2_Hahn_Echo
ItamarGoldman Aug 30, 2021
1f8c4ca
Fixed errors and for 1 echo the circuit is generated (need to work on…
ItamarGoldman Aug 30, 2021
d3af495
Changed the Echo pulse to pi instead of pi/2
ItamarGoldman Aug 30, 2021
94d0afc
Merge remote-tracking branch 'upstream/main' into T2_Hahn_Echo
ItamarGoldman Sep 9, 2021
0a3935d
Changed the class to support only single qubit
ItamarGoldman Sep 9, 2021
cb84b37
added options instead of fields
ItamarGoldman Sep 13, 2021
d0f47c4
Merge remote-tracking branch 'upstream/main' into T2_Hahn_Echo
ItamarGoldman Sep 13, 2021
a2be5f8
Pylint and Black
ItamarGoldman Sep 13, 2021
2d95f33
used base class attribute for qubit
ItamarGoldman Sep 13, 2021
91d63d9
Merge remote-tracking branch 'upstream/main' into T2_Hahn_Echo
ItamarGoldman Sep 22, 2021
be3d352
Updated code to be as in other experiments
ItamarGoldman Sep 22, 2021
0dc3777
Added the Analysis class
ItamarGoldman Sep 22, 2021
600173b
Base analysis class draft + fixes
ItamarGoldman Sep 23, 2021
36854cc
Update T2Hahn.py
ItamarGoldman Sep 23, 2021
44befa8
Merge remote-tracking branch 'upstream/main' into T2_Hahn_Echo
ItamarGoldman Sep 26, 2021
e23ee47
Update t2hahn.py
ItamarGoldman Sep 26, 2021
a269079
Merge remote-tracking branch 'upstream/main' into T2_Hahn_Echo
ItamarGoldman Sep 29, 2021
231203f
Update t2hahn.py
ItamarGoldman Sep 29, 2021
b7dceae
Added Backend template from t2ramsey
ItamarGoldman Sep 29, 2021
bfa67e2
Update t2hahn_backend.py
ItamarGoldman Sep 29, 2021
3d8a1c7
fixed doc string and input check function
ItamarGoldman Oct 3, 2021
1db4e9e
the circuit is now working on qubit '0' exclusively
ItamarGoldman Oct 3, 2021
f2e4799
Update t2hahn.py
ItamarGoldman Oct 3, 2021
ae4ce88
Added operation for 'RX' gate
ItamarGoldman Oct 4, 2021
42d9f82
Merge remote-tracking branch 'upstream/main' into T2_Hahn_Echo
ItamarGoldman Oct 21, 2021
f20a344
Merge remote-tracking branch 'upstream/main' into T2_Hahn_Echo
ItamarGoldman Oct 24, 2021
1cf5e90
Removed duplicate length from verify parameters
ItamarGoldman Oct 24, 2021
047a430
changed documentation suggestions
ItamarGoldman Oct 24, 2021
8c9ca60
changed documanttion
ItamarGoldman Oct 24, 2021
95a28b2
Removed * from T_2
ItamarGoldman Oct 24, 2021
3ab1b85
changed basis gate 'h', 'p' to 'ry', 'rx'
ItamarGoldman Oct 24, 2021
17178d3
Update t2hahn_backend.py
ItamarGoldman Oct 24, 2021
6b8bc58
Merge remote-tracking branch 'upstream/main' into T2_Hahn_Echo
ItamarGoldman Oct 25, 2021
bcaf380
Added Ry, Rx and measure gates
ItamarGoldman Oct 25, 2021
e9a0e3e
Changed every t2ramsy to t2hahn (WIP)
ItamarGoldman Oct 25, 2021
9c9548b
changed "T2Hahn" to "T2"
ItamarGoldman Oct 25, 2021
1f89a4d
added tests (still not working)
ItamarGoldman Oct 25, 2021
cfc6bdc
Delay now applied once
ItamarGoldman Nov 7, 2021
8818a34
added tests for T2hahn Echo
ItamarGoldman Nov 8, 2021
57bc001
Applied black
ItamarGoldman Nov 8, 2021
a91ed7d
Update t2hahn_backend.py
ItamarGoldman Nov 10, 2021
3039f1b
Update t2hahn_backend.py
ItamarGoldman Nov 10, 2021
75cbbae
Changed the gate op to be a function and added time evolution of the …
ItamarGoldman Nov 10, 2021
ea0068d
Added output types
ItamarGoldman Nov 10, 2021
96da63c
Added measurement on "ZY" plane in Z basis
ItamarGoldman Nov 14, 2021
29683f9
Added angle parameter for rotation and fixed bugs
ItamarGoldman Nov 15, 2021
5e14b8a
changed "==" to "np.isclose()"
ItamarGoldman Nov 15, 2021
8afaade
Pass pylint
ItamarGoldman Nov 15, 2021
3cfff22
Pylint + black
ItamarGoldman Nov 15, 2021
39ce1f4
cleaned code
ItamarGoldman Nov 15, 2021
f120136
Merge remote-tracking branch 'upstream/main' into T2_Hahn_Echo
ItamarGoldman Nov 15, 2021
5564384
incomplete change to backend
ItamarGoldman Nov 17, 2021
a8ccda9
Merge remote-tracking branch 'upstream/main' into T2_Hahn_Echo
ItamarGoldman Nov 17, 2021
4012463
deleted unnecessary fit parameters and changed input for backend
ItamarGoldman Nov 17, 2021
3512a29
changes to use only Rx without Ry
ItamarGoldman Nov 21, 2021
8419ab0
Merge remote-tracking branch 'upstream/main' into T2_Hahn_Echo
ItamarGoldman Nov 22, 2021
cada640
Experiment Working Up to tau that is not correct
ItamarGoldman Nov 22, 2021
5f989d0
Update comment Y90 to X90
ItamarGoldman Nov 24, 2021
99fd9d5
Deleted extra space from measurement function in the backend
ItamarGoldman Nov 24, 2021
73f734c
changed the backend as Yael review comments
ItamarGoldman Nov 24, 2021
d53454e
Merge remote-tracking branch 'upstream/main' into T2_Hahn_Echo
ItamarGoldman Nov 24, 2021
5addf45
Merge branch 'T2_Hahn_Echo' of github.com:ItamarGoldman/qiskit-experi…
ItamarGoldman Nov 24, 2021
010face
Merge remote-tracking branch 'upstream/main' into T2_Hahn_Echo
ItamarGoldman Nov 28, 2021
588c6c2
Test are working
ItamarGoldman Nov 29, 2021
d85fdf2
Passed Black and Lint
ItamarGoldman Nov 29, 2021
6f1f04d
Update t2hahn_backend.py
ItamarGoldman Nov 29, 2021
643f7e7
deleted the abs as the projection is a real number
ItamarGoldman Nov 29, 2021
62b8163
Black and pylint
ItamarGoldman Nov 29, 2021
fce7229
Merge remote-tracking branch 'upstream/main' into T2_Hahn_Echo
ItamarGoldman Dec 5, 2021
961a9dd
Added comments
ItamarGoldman Dec 5, 2021
7bd81d1
Added tutorial
ItamarGoldman Dec 5, 2021
d5aea87
Added tutorial and fix bug for echoes
ItamarGoldman Dec 6, 2021
7ddf41d
Merge remote-tracking branch 'upstream/main' into T2_Hahn_Echo
ItamarGoldman Dec 8, 2021
48bc87c
Added Parallel experiment to the test and backend
ItamarGoldman Dec 8, 2021
2b87ab5
Changed that the analysis class will be passed to constructor
ItamarGoldman Dec 8, 2021
3c7627e
Added release notes
ItamarGoldman Dec 8, 2021
a8c48c2
Merge remote-tracking branch 'upstream/main' into T2_Hahn_Echo
ItamarGoldman Dec 12, 2021
25a09c0
Changed the code dor recent changes (added config, removed unit, etc)
ItamarGoldman Dec 12, 2021
c567fb2
Passed black and pylint
ItamarGoldman Dec 12, 2021
ad8be9b
passed pylint and black
ItamarGoldman Dec 12, 2021
d55e950
fixed bug
ItamarGoldman Dec 12, 2021
c20d857
fixed docs
ItamarGoldman Dec 12, 2021
933d98c
Update t2hahn.py
ItamarGoldman Dec 12, 2021
a8028e2
Raising error when delay applied and the qubit isn't in the XY plain …
ItamarGoldman Dec 12, 2021
038be8a
Update test_t2hahn.py
ItamarGoldman Dec 12, 2021
7fb2b6e
Merge remote-tracking branch 'upstream/main' into T2_Hahn_Echo
ItamarGoldman Dec 15, 2021
f74ef7c
edited comment and change 'plain' to 'plane'
ItamarGoldman Dec 15, 2021
b398466
added tests for number of echoes
ItamarGoldman Dec 26, 2021
a90bc26
Fixed Black
ItamarGoldman Dec 27, 2021
6184579
rerun pylint
ItamarGoldman Dec 27, 2021
06cf69c
Added to tutorial both experiments
ItamarGoldman Dec 27, 2021
0730710
updated code + tutorial per instructions
ItamarGoldman Jan 2, 2022
35527b6
fixed a bug for 0 echoes case.
ItamarGoldman Jan 3, 2022
ddef180
fixed issue
ItamarGoldman Jan 9, 2022
54d5ad4
Merge remote-tracking branch 'upstream/main' into T2_Hahn_Echo
ItamarGoldman Jan 9, 2022
907ae9d
In the test excluded quality check for num_echoes=0
ItamarGoldman Jan 9, 2022
a0aa2ac
Changed tutorial text and a bit of code
ItamarGoldman Jan 12, 2022
6e334b8
Added bounds and removed p0 from analysis, finished tutorial
ItamarGoldman Jan 13, 2022
9b34c01
Edited tutorial as reviewed
ItamarGoldman Jan 16, 2022
787801f
Merge remote-tracking branch 'upstream/main' into T2_Hahn_Echo
ItamarGoldman Jan 16, 2022
eba1bff
Merge remote-tracking branch 'upstream/main' into T2_Hahn_Echo
ItamarGoldman Jan 24, 2022
92c6602
Merge remote-tracking branch 'upstream/main' into T2_Hahn_Echo
ItamarGoldman Jan 24, 2022
16c04da
Update t2hahn_characterization.ipynb
ItamarGoldman Jan 24, 2022
8eb4f51
fixed test to be with "self.json_equiv" and fixed lint
ItamarGoldman Jan 24, 2022
377af03
added cosmetic fixes to the tutorial
ItamarGoldman Jan 24, 2022
978c0b3
Merge remote-tracking branch 'upstream/main' into T2_Hahn_Echo
ItamarGoldman Jan 30, 2022
a48b536
Added text and changed functions
ItamarGoldman Jan 30, 2022
3e9fd41
updated feature text.
ItamarGoldman Jan 30, 2022
968a2f1
black version 22.1.0 pass
ItamarGoldman Jan 30, 2022
29c67e6
fixed angles to be of absolute value and not previous ones.
ItamarGoldman Jan 30, 2022
1597f1e
updated text in the tutorial.
ItamarGoldman Jan 31, 2022
b12831b
changed doc string year to 2022
ItamarGoldman Jan 31, 2022
d95b3f9
updated tutorial text
ItamarGoldman Jan 31, 2022
8fc4849
fixed text
ItamarGoldman Jan 31, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions docs/_ext/autodoc_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,12 @@ class AnalysisDocumenter(ClassDocumenter):
"""Sphinx extension for the custom documentation of the standard analysis class."""

objtype = "analysis"
directivetype = 'class'
directivetype = "class"
priority = 10 + ClassDocumenter.priority
option_spec = dict(ClassDocumenter.option_spec)

@classmethod
def can_document_member(
cls, member: Any, membername: str, isattr: bool, parent: Any
) -> bool:
def can_document_member(cls, member: Any, membername: str, isattr: bool, parent: Any) -> bool:
return isinstance(member, BaseAnalysis)

def add_content(self, more_content: Any, no_docstring: bool = False) -> None:
Expand Down
3 changes: 2 additions & 1 deletion docs/_ext/custom_styles/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ def _generate_analysis_ref(
raise Exception(f"Option docstring for analysis_ref is missing.")

analysis_ref_lines = []
for line in lines[analysis_ref_start + 1:]:
for line in lines[analysis_ref_start + 1 :]:
# add lines until hitting to next section
if line.startswith("# section:"):
break
Expand Down Expand Up @@ -202,6 +202,7 @@ def _format_default_options(defaults: Dict[str, Any], indent: str = "") -> List[

def _check_no_indent(method: Callable) -> Callable:
"""Check indent of lines and return if this block is correctly indented."""

def wraps(self, lines: List[str], *args, **kwargs):
if all(l.startswith(" ") for l in lines):
text_block = "\n".join(lines)
Expand Down
95 changes: 48 additions & 47 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,35 +25,39 @@
#
import os
import sys
sys.path.insert(0, os.path.abspath('.'))

sys.path.insert(0, os.path.abspath("."))
sys.path.append(os.path.abspath("./_ext"))

"""
Sphinx documentation builder
"""

import os

# Set env flag so that we can doc functions that may otherwise not be loaded
# see for example interactive visualizations in qiskit.visualization.
os.environ['QISKIT_DOCS'] = 'TRUE'
os.environ["QISKIT_DOCS"] = "TRUE"

# -- Project information -----------------------------------------------------
project = 'Qiskit Experiments'
copyright = '2021, Qiskit Development Team' # pylint: disable=redefined-builtin
author = 'Qiskit Development Team'
project = "Qiskit Experiments"
copyright = "2021, Qiskit Development Team" # pylint: disable=redefined-builtin
author = "Qiskit Development Team"

# The short X.Y version
version = '0.3'
version = "0.3"
# The full version, including alpha/beta/rc tags
release = '0.3.0'
release = "0.3.0"

rst_prolog = """
.. raw:: html

<br><br><br>

.. |version| replace:: {0}
""".format(release)
""".format(
release
)

nbsphinx_prolog = """
{% set docname = env.doc2path(env.docname, base=None) %}
Expand Down Expand Up @@ -81,32 +85,31 @@
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
'sphinx.ext.napoleon',
'sphinx.ext.autodoc',
'sphinx.ext.autosummary',
'sphinx.ext.mathjax',
'sphinx.ext.viewcode',
'sphinx.ext.extlinks',
'jupyter_sphinx',
'sphinx_autodoc_typehints',
'reno.sphinxext',
'sphinx_panels',
'sphinx.ext.intersphinx',
'nbsphinx',
'autoref',
'autodoc_experiment',
'autodoc_analysis',
"sphinx.ext.napoleon",
"sphinx.ext.autodoc",
"sphinx.ext.autosummary",
"sphinx.ext.mathjax",
"sphinx.ext.viewcode",
"sphinx.ext.extlinks",
"jupyter_sphinx",
"sphinx_autodoc_typehints",
"reno.sphinxext",
"sphinx_panels",
"sphinx.ext.intersphinx",
"nbsphinx",
"autoref",
"autodoc_experiment",
"autodoc_analysis",
]
html_static_path = ['_static']
templates_path = ['_templates']
html_css_files = ['style.css', 'custom.css', 'gallery.css']
html_static_path = ["_static"]
templates_path = ["_templates"]
html_css_files = ["style.css", "custom.css", "gallery.css"]

nbsphinx_timeout = 360
nbsphinx_execute = os.getenv('QISKIT_DOCS_BUILD_TUTORIALS', 'never')
nbsphinx_widgets_path = ''
exclude_patterns = ['_build', '**.ipynb_checkpoints']
nbsphinx_thumbnails = {
}
nbsphinx_execute = os.getenv("QISKIT_DOCS_BUILD_TUTORIALS", "never")
nbsphinx_widgets_path = ""
exclude_patterns = ["_build", "**.ipynb_checkpoints"]
nbsphinx_thumbnails = {}


# -----------------------------------------------------------------------------
Expand All @@ -120,7 +123,7 @@
# -----------------------------------------------------------------------------

autodoc_default_options = {
'inherited-members': None,
"inherited-members": None,
}


Expand All @@ -131,9 +134,7 @@
# A dictionary mapping 'figure', 'table', 'code-block' and 'section' to
# strings that are used for format of figure numbers. As a special character,
# %s will be replaced to figure number.
numfig_format = {
'table': 'Table %s'
}
numfig_format = {"table": "Table %s"}
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#
Expand All @@ -144,10 +145,10 @@
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = ['_build', '**.ipynb_checkpoints']
exclude_patterns = ["_build", "**.ipynb_checkpoints"]

# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'colorful'
pygments_style = "colorful"

# A boolean that decides whether module names are prepended to all object names
# (for object types where a “module” of some kind is defined), e.g. for
Expand All @@ -158,7 +159,7 @@
# (e.g., if this is set to ['foo.'], then foo.bar is shown under B, not F).
# This can be handy if you document a project that consists of a single
# package. Works only for the HTML builder currently.
modindex_common_prefix = ['qiskit_experiments.']
modindex_common_prefix = ["qiskit_experiments."]

# -- Configuration for extlinks extension ------------------------------------
# Refer to https://www.sphinx-doc.org/en/master/usage/extensions/extlinks.html
Expand All @@ -169,20 +170,20 @@
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = 'qiskit_sphinx_theme' # use the theme in subdir 'theme'
html_theme = "qiskit_sphinx_theme" # use the theme in subdir 'theme'

#html_sidebars = {'**': ['globaltoc.html']}
html_last_updated_fmt = '%Y/%m/%d'
# html_sidebars = {'**': ['globaltoc.html']}
html_last_updated_fmt = "%Y/%m/%d"

html_theme_options = {
'logo_only': True,
'display_version': True,
'prev_next_buttons_location': 'bottom',
'style_external_links': True,
"logo_only": True,
"display_version": True,
"prev_next_buttons_location": "bottom",
"style_external_links": True,
}

autoclass_content = 'both'
intersphinx_mapping = {'matplotlib': ('https://matplotlib.org/stable/', None)}
autoclass_content = "both"
intersphinx_mapping = {"matplotlib": ("https://matplotlib.org/stable/", None)}
# Current scipy hosted docs are missing the object.inv file so leaving this
# commented out until the missing file is added back.
# 'scipy': ('https://docs.scipy.org/doc/scipy/reference/', None)}
456 changes: 456 additions & 0 deletions docs/tutorials/t2hahn_characterization.ipynb

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion qiskit_experiments/curve_analysis/curve_fit.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ def fit_func(x, *params):
yfits = fit_func(xdata, *popt)
residues = (yfits - ydata) ** 2
if sigma is not None:
residues = residues / (sigma ** 2)
residues = residues / (sigma**2)
reduced_chisq = np.sum(residues) / dof

# Compute data range for fit
Expand Down
2 changes: 1 addition & 1 deletion qiskit_experiments/curve_analysis/data_processing.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ def mean_xy_data(

# Compute sample mean and sum of variance with weights based on shots
y_means[i] = np.sum(weights * ys)
y_sigmas[i] = np.sqrt(np.sum(weights ** 2 * ss ** 2))
y_sigmas[i] = np.sqrt(np.sum(weights**2 * ss**2))
y_shots[i] = np.sum(ns)

return x_means, y_means, y_sigmas, y_shots
Expand Down
14 changes: 7 additions & 7 deletions qiskit_experiments/curve_analysis/fit_function.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def gaussian(
.. math::
y = {\rm amp} \cdot \exp \left( - (x - x0)^2 / 2 \sigma^2 \right) + {\rm baseline}
"""
return amp * np.exp(-((x - x0) ** 2) / (2 * sigma ** 2)) + baseline
return amp * np.exp(-((x - x0) ** 2) / (2 * sigma**2)) + baseline


def cos_decay(
Expand Down Expand Up @@ -123,9 +123,9 @@ def bloch_oscillation_x(
where :math:`\omega = \sqrt{p_x^2 + p_y^2 + p_z^2}`. The `p_i` stands for the
measured probability in :math:`i \in \left\{ X, Y, Z \right\}` basis.
"""
w = np.sqrt(px ** 2 + py ** 2 + pz ** 2)
w = np.sqrt(px**2 + py**2 + pz**2)

return (-pz * px + pz * px * np.cos(w * x) + w * py * np.sin(w * x)) / (w ** 2) + baseline
return (-pz * px + pz * px * np.cos(w * x) + w * py * np.sin(w * x)) / (w**2) + baseline


def bloch_oscillation_y(
Expand All @@ -140,9 +140,9 @@ def bloch_oscillation_y(
where :math:`\omega = \sqrt{p_x^2 + p_y^2 + p_z^2}`. The `p_i` stands for the
measured probability in :math:`i \in \left\{ X, Y, Z \right\}` basis.
"""
w = np.sqrt(px ** 2 + py ** 2 + pz ** 2)
w = np.sqrt(px**2 + py**2 + pz**2)

return (pz * py - pz * py * np.cos(w * x) - w * px * np.sin(w * x)) / (w ** 2) + baseline
return (pz * py - pz * py * np.cos(w * x) - w * px * np.sin(w * x)) / (w**2) + baseline


def bloch_oscillation_z(
Expand All @@ -157,6 +157,6 @@ def bloch_oscillation_z(
where :math:`\omega = \sqrt{p_x^2 + p_y^2 + p_z^2}`. The `p_i` stands for the
measured probability in :math:`i \in \left\{ X, Y, Z \right\}` basis.
"""
w = np.sqrt(px ** 2 + py ** 2 + pz ** 2)
w = np.sqrt(px**2 + py**2 + pz**2)

return (pz ** 2 + (px ** 2 + py ** 2) * np.cos(w * x)) / (w ** 2) + baseline
return (pz**2 + (px**2 + py**2) * np.cos(w * x)) / (w**2) + baseline
2 changes: 1 addition & 1 deletion qiskit_experiments/database_service/db_analysis_result.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ def save(self) -> None:
if db_value is not None:
result_data["value"] = db_value
if isinstance(value.stderr, (int, float)):
result_data["variance"] = self._display_format(value.stderr ** 2)
result_data["variance"] = self._display_format(value.stderr**2)
if isinstance(value.unit, str):
result_data["unit"] = value.unit
else:
Expand Down
2 changes: 1 addition & 1 deletion qiskit_experiments/library/calibration/fine_drag_cal.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ def update_calibrations(self, experiment_data: ExperimentData):
d_theta = BaseUpdater.get_value(experiment_data, "d_theta", result_index)

# See the documentation in fine_drag.py for the derivation of this rule.
d_beta = -np.sqrt(np.pi) * d_theta * sigmas[0] / target_angle ** 2
d_beta = -np.sqrt(np.pi) * d_theta * sigmas[0] / target_angle**2
old_beta = experiment_data.metadata["cal_param_value"]
new_beta = old_beta + d_beta

Expand Down
4 changes: 4 additions & 0 deletions qiskit_experiments/library/characterization/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@

T1
T2Ramsey
T2Hahn
QubitSpectroscopy
CrossResonanceHamiltonian
EchoedCrossResonanceHamiltonian
Expand Down Expand Up @@ -52,6 +53,7 @@

T1Analysis
T2RamseyAnalysis
T2HahnAnalysis
CrossResonanceHamiltonianAnalysis
DragCalAnalysis
FineHalfAngleAnalysis
Expand All @@ -69,6 +71,7 @@
RamseyXYAnalysis,
T2RamseyAnalysis,
T1Analysis,
T2HahnAnalysis,
CrossResonanceHamiltonianAnalysis,
ReadoutAngleAnalysis,
)
Expand All @@ -77,6 +80,7 @@
from .qubit_spectroscopy import QubitSpectroscopy
from .ef_spectroscopy import EFSpectroscopy
from .t2ramsey import T2Ramsey
from .t2hahn import T2Hahn
from .cr_hamiltonian import CrossResonanceHamiltonian, EchoedCrossResonanceHamiltonian
from .rabi import Rabi, EFRabi
from .half_angle import HalfAngle
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
from .fine_frequency_analysis import FineFrequencyAnalysis
from .ramsey_xy_analysis import RamseyXYAnalysis
from .t2ramsey_analysis import T2RamseyAnalysis
from .t2hahn_analysis import T2HahnAnalysis
from .t1_analysis import T1Analysis
from .cr_hamiltonian_analysis import CrossResonanceHamiltonianAnalysis
from .readout_angle_analysis import ReadoutAngleAnalysis
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ def _extra_database_entry(self, fit_data: curve.FitData) -> List[AnalysisResultD
else:
coef_val = 0.5 * (p0_val.value + p1_val.value) / (2 * np.pi)

coef_err = 0.5 * np.sqrt(p0_val.stderr ** 2 + p1_val.stderr ** 2) / (2 * np.pi)
coef_err = 0.5 * np.sqrt(p0_val.stderr**2 + p1_val.stderr**2) / (2 * np.pi)

extra_entries.append(
AnalysisResultData(
Expand Down
Loading