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

Add a summary of QEC algorithms class #378

Merged
merged 25 commits into from
Dec 1, 2023
Merged

Add a summary of QEC algorithms class #378

merged 25 commits into from
Dec 1, 2023

Conversation

NoureldinYosri
Copy link
Contributor

@NoureldinYosri NoureldinYosri commented Oct 5, 2023

child of #356
fixes #535

@mpharrigan
Copy link
Collaborator

please address comments from the previous pr and then ping me when ready for review

@NoureldinYosri NoureldinYosri marked this pull request as draft October 11, 2023 18:04
@NoureldinYosri
Copy link
Contributor Author

@mpharrigan I changed the API of the class to hide the low level hardware related aspecs (e.g. $t_\textit{gate}$ and $t_\textit{meas}$)

@NoureldinYosri NoureldinYosri marked this pull request as ready for review October 25, 2023 23:29
Attributes:
error_rate_scaler: Logical error rate coefficient.
error_rate_threshold: Logical error rate threshold.
reference: source of the estimates.
Copy link
Collaborator

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?

Copy link
Contributor Author

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
Copy link
Collaborator

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

Copy link
Contributor Author

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',

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bump

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@NoureldinYosri NoureldinYosri marked this pull request as draft October 26, 2023 00:27
@NoureldinYosri NoureldinYosri marked this pull request as ready for review November 17, 2023 00:53
error_rate_threshold: float = field(repr=lambda x: f'{x:g}')
reference: str | None

def logical_error_rate(
Copy link
Collaborator

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

Copy link
Contributor Author

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

@mpharrigan
Copy link
Collaborator

@NoureldinYosri what's the status of this?

Copy link
Collaborator

@mpharrigan mpharrigan left a 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

@NoureldinYosri NoureldinYosri enabled auto-merge (squash) December 1, 2023 22:56
@NoureldinYosri NoureldinYosri merged commit 6bdc752 into main Dec 1, 2023
9 checks passed
@NoureldinYosri NoureldinYosri mentioned this pull request Dec 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ccz2t_cost_model fails opaquely when the error budget is too low
2 participants