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 CrosstalkParams to API docs and docs cleanup #219

Merged
merged 14 commits into from
Dec 11, 2023
Merged

Conversation

CalMacCQ
Copy link
Contributor

@CalMacCQ CalMacCQ commented Dec 6, 2023

Closes #210

  • Added the CrossTalkParams, FractionalUnitary and NoisyCircuitBuilder classes to the API documentation.
    (Update: Only CrosstalkParams is user facing)
  • updated some depreacated intersphinx syntax in conf.py to allow sphinx > 6.2.0
  • used sphinx-autodoc-typehints extension to infer types from type annotations. This means that we don't have to declare types separately in the docstrings.
  • Fixed some build warnings with IBMQBackend.process_circuit.

@CalMacCQ CalMacCQ requested a review from cqc-melf as a code owner December 6, 2023 14:15
pytketdoc_base: None,
"https://qiskit.org/documentation/": None,
"http://docs.qulacs.org/en/latest/": None,
"python": ("https://docs.python.org/3/", 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.

This updates some deprecated syntax to allow the use of sphinx > 6.2.0

:members:
:special-members: __init__

.. automodule:: pytket.extensions.qiskit.backends.crosstalk_model
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've added the three classes CrosstalkParams, NoisyCircuitBuilder and FractionalUnitary.

These are the only three classes which have tests so I assumed they were the only user facing classes. Is that correct?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Update: Only CrosstalkParams is user facing

@CalMacCQ CalMacCQ requested a review from yao-cqc December 6, 2023 15:11
:members:
:special-members: __init__

.. automodule:: pytket.extensions.qiskit.backends.crosstalk_model
:members: CrosstalkParams, NoisyCircuitBuilder, FractionalUnitary

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Is there a simplier import path for these classes? They do look a bit squashed in the API docs.

@@ -74,28 +75,20 @@ class CrosstalkParams:
Stores various parameters for modelling crosstalk noise

Copy link
Contributor Author

Choose a reason for hiding this comment

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

These types will be automatically inferred by the sphinx-autodoc-typehints extension. We won't have to write them down in multiple places.

:param non_markovian_noise: List storing the non-Markovian noise parameters.
Each tuple in the list contains the qubit index and the zx, zz noise parameters.
:type non_markovian_noise: `List[Tuple[Qubit, float, float]]`
:param virtual_z: If True, then don't break any single qubit Z gate into
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The sphinx_autodoc_typehints extension allows these types to be inferred from the source code so we no longer need to put these types in two different places.

@CalMacCQ CalMacCQ changed the title Add classes for crosstalk simulation to API docs Add classes for crosstalk simulation to API docs and cleanup docs Dec 11, 2023
@CalMacCQ CalMacCQ changed the title Add classes for crosstalk simulation to API docs and cleanup docs Add classes for crosstalk simulation to API docs and docs cleanup Dec 11, 2023
Copy link
Contributor

@yao-cqc yao-cqc left a comment

Choose a reason for hiding this comment

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

Looks good!

@CalMacCQ CalMacCQ merged commit 34e9605 into develop Dec 11, 2023
8 checks passed
@CalMacCQ CalMacCQ changed the title Add classes for crosstalk simulation to API docs and docs cleanup Add CrosstalParams to API docs and docs cleanup Dec 11, 2023
@CalMacCQ CalMacCQ changed the title Add CrosstalParams to API docs and docs cleanup Add CrosstalkParams to API docs and docs cleanup Dec 12, 2023
@CalMacCQ CalMacCQ deleted the docs/crosstalk branch February 23, 2024 14:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add "crosstalk" feature to API docs
2 participants