-
Notifications
You must be signed in to change notification settings - Fork 51
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
Add a summary of QEC algorithms class #378
Conversation
please address comments from the previous pr and then ping me when ready for review |
qualtran/surface_code/quantum_error_correction_scheme_summary.py
Outdated
Show resolved
Hide resolved
qualtran/surface_code/quantum_error_correction_scheme_summary.py
Outdated
Show resolved
Hide resolved
qualtran/surface_code/quantum_error_correction_scheme_summary.py
Outdated
Show resolved
Hide resolved
@mpharrigan I changed the API of the class to hide the low level hardware related aspecs (e.g. |
Attributes: | ||
error_rate_scaler: Logical error rate coefficient. | ||
error_rate_threshold: Logical error rate threshold. | ||
reference: source of the estimates. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you be more specific about what this is supposed to be. Comma separated list of urls?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for now I see it as just a human readable string
|
||
error_rate_scaler: float = field(repr=lambda x: f'{x:g}') | ||
error_rate_threshold: float = field(repr=lambda x: f'{x:g}') | ||
reference: str | None |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should have default value of None
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if I do then any attribute in any class that inherets this class must have a default value
qualtran/surface_code/quantum_error_correction_scheme_summary_test.py:17: in <module>
from qualtran.surface_code import quantum_error_correction_scheme_summary as qecs
qualtran/surface_code/quantum_error_correction_scheme_summary.py:72: in <module>
class SimpliedSurfaceCode(SurfaceCode):
../../../anaconda3/envs/qualtran-env/lib/python3.10/site-packages/attr/_next_gen.py:147: in define
return wrap(maybe_cls)
../../../anaconda3/envs/qualtran-env/lib/python3.10/site-packages/attr/_next_gen.py:138: in wrap
return do_it(cls, True)
../../../anaconda3/envs/qualtran-env/lib/python3.10/site-packages/attr/_next_gen.py:83: in do_it
return attrs(
../../../anaconda3/envs/qualtran-env/lib/python3.10/site-packages/attr/_make.py:1629: in attrs
return wrap(maybe_cls)
../../../anaconda3/envs/qualtran-env/lib/python3.10/site-packages/attr/_make.py:1525: in wrap
builder = _ClassBuilder(
../../../anaconda3/envs/qualtran-env/lib/python3.10/site-packages/attr/_make.py:694: in __init__
attrs, base_attrs, base_map = _transform_attrs(
../../../anaconda3/envs/qualtran-env/lib/python3.10/site-packages/attr/_make.py:602: in _transform_attrs
raise ValueError(
E ValueError: No mandatory attributes allowed after an attribute with a default value or factory. Attribute in question: Attribute(name='error_detection_cycle_time_slope_us',
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bump
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
qualtran/surface_code/quantum_error_correction_scheme_summary.py
Outdated
Show resolved
Hide resolved
qualtran/surface_code/quantum_error_correction_scheme_summary.py
Outdated
Show resolved
Hide resolved
qualtran/surface_code/quantum_error_correction_scheme_summary.py
Outdated
Show resolved
Hide resolved
qualtran/surface_code/quantum_error_correction_scheme_summary.py
Outdated
Show resolved
Hide resolved
qualtran/surface_code/quantum_error_correction_scheme_summary.py
Outdated
Show resolved
Hide resolved
qualtran/surface_code/quantum_error_correction_scheme_summary.py
Outdated
Show resolved
Hide resolved
error_rate_threshold: float = field(repr=lambda x: f'{x:g}') | ||
reference: str | None | ||
|
||
def logical_error_rate( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is a general form of formulae.error_at
. Please refactor to remove the duplicate code
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed the formulae.py
file. the two methods there correspond to calling the appropiate methods of a SimpeSurfaceCode with the correct parameters
@NoureldinYosri what's the status of this? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please address the minor comments, but then lgtm
child of #356
fixes #535