-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Doc fix ZZ_feature_maps #13231
Doc fix ZZ_feature_maps #13231
Conversation
Thank you for opening a new pull request. Before your PR can be merged it will first need to pass continuous integration tests and be reviewed. Sometimes the review process can be slow, so please be patient. While you're waiting, please feel free to review other open PRs. While only a subset of people are authorized to approve pull requests for merging, everyone is encouraged to review open pull requests. Doing reviews helps reduce the burden on the core team and helps make the project's code better for everyone. One or more of the following people are relevant to this code:
|
Pull Request Test Coverage Report for Build 11128933879Details
💛 - Coveralls |
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.
Thanks for the contribution @Shivansh20128 🙂 For the derived methods whose documentation don't show up correctly (data
, num_parameters
, etc.) could you just copy-paste the docstring from the parent class? It would be good if they are consistent.
@@ -19,7 +19,7 @@ | |||
|
|||
|
|||
class ZZFeatureMap(PauliFeatureMap): | |||
r"""Second-order Pauli-Z evolution circuit. | |||
r"""Second-order Pauli-Z evolution circuit: Using the Pauli-Z gate to create entanglement between pairs of qubits allowing them to evolve. |
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.
The first line is just a very brief summary, I would keep it as is 🙂
r"""Second-order Pauli-Z evolution circuit: Using the Pauli-Z gate to create entanglement between pairs of qubits allowing them to evolve. | |
r"""Second-order Pauli-Z evolution circuit. |
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.
Okay. I will revert it back. I modified it because it was unclear to me what it meant, so I thought it could be unclear to others as well.
Okay, I will do that. |
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.
Thanks for the fix!
Ah actually it seems the CI is complaining, could you run |
Thanks for the review. I ran the black command and it did some reformatting. I hope it should not give an error now. |
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.
Great, thanks for the fix!
@Mergifyio backport stable/1.2 |
🟠 Pending
|
* initial formatting changes * .compose used for concatination of two circuits * updated docstring data property * updated entanglement_blocks docstring * updated docstring of num_parameters * updates docstring of parameters * update _zz_feature_map.py documentation * update changes to ZZ_Feature_Map * update doc strings matched with parent class * _zz_feature_map.py reformatted (cherry picked from commit f1b2580) # Conflicts: # qiskit/circuit/library/data_preparation/zz_feature_map.py
* initial formatting changes * .compose used for concatination of two circuits * updated docstring data property * updated entanglement_blocks docstring * updated docstring of num_parameters * updates docstring of parameters * update _zz_feature_map.py documentation * update changes to ZZ_Feature_Map * update doc strings matched with parent class * _zz_feature_map.py reformatted
* Doc fix ZZ_feature_maps (#13231) * initial formatting changes * .compose used for concatination of two circuits * updated docstring data property * updated entanglement_blocks docstring * updated docstring of num_parameters * updates docstring of parameters * update _zz_feature_map.py documentation * update changes to ZZ_Feature_Map * update doc strings matched with parent class * _zz_feature_map.py reformatted (cherry picked from commit f1b2580) # Conflicts: # qiskit/circuit/library/data_preparation/zz_feature_map.py * merge conflicy & other typos --------- Co-authored-by: Shivansh Mittal <88429611+Shivansh20128@users.noreply.github.com> Co-authored-by: Julien Gacon <jules.gacon@googlemail.com>
* initial formatting changes * .compose used for concatination of two circuits * updated docstring data property * updated entanglement_blocks docstring * updated docstring of num_parameters * updates docstring of parameters * update _zz_feature_map.py documentation * update changes to ZZ_Feature_Map * update doc strings matched with parent class * _zz_feature_map.py reformatted
Summary
I have added docstrings for data, entanglement_blocks, num_parameters, and parameters properties in the ZZ_Feature_Map documentation. Also, I updated the code example where to concatenate two circuits, the "+" has been replaced with the "compose" operation.
#Closes #12431
Details and comments
Also updated some formatting in the code example as the "copy to clipboard" button also copied the arrows which needed to be removed explicitly.