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

Qcnn docs #1275

Merged
merged 3 commits into from
Apr 5, 2024
Merged

Qcnn docs #1275

merged 3 commits into from
Apr 5, 2024

Conversation

jf-kong
Copy link
Contributor

@jf-kong jf-kong commented Mar 19, 2024

Updated some docstrings in the QCNN class.

Checklist:

  • Reviewers confirm new code works as expected.
  • Tests are passing.
  • Coverage does not decrease.
  • Documentation is updated.

Copy link

codecov bot commented Mar 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.94%. Comparing base (66252b6) to head (fd296e3).
Report is 3 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1275   +/-   ##
=======================================
  Coverage   99.94%   99.94%           
=======================================
  Files          73       73           
  Lines       10638    10638           
=======================================
  Hits        10632    10632           
  Misses          6        6           
Flag Coverage Δ
unittests 99.94% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@MatteoRobbiati MatteoRobbiati self-assigned this Mar 27, 2024
Copy link
Contributor

@MatteoRobbiati MatteoRobbiati left a comment

Choose a reason for hiding this comment

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

Thanks!

Comment on lines +68 to +71
nclasses (int, optional): The number of classes for the classification task. Defaults to 2.
params (np.ndarray, optional): The initial parameters for the QCNN. If None, random parameters are generated. Defaults to None.
twoqubitansatz (qibo.models.circuit.Circuit, optional): A two-qubit ansatz for the convolutional layers. If None, a default ansatz is used. Defaults to None.
copy_init_state (bool, optional): Whether to copy the initial state for each shot in the simulation. If None, the behavior depends on the backend. Defaults to None.
Copy link
Contributor

Choose a reason for hiding this comment

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

Fine also with this notation, but if you want you can use the [typing] python module:

from typing import Optional

def function(nqubits: int, ..., copy_init_state: Optional[bool] = None){
    ...
}

@scarrazza scarrazza merged commit d6209f4 into master Apr 5, 2024
21 checks passed
@scarrazza scarrazza deleted the qcnn-docs branch June 25, 2024 09:56
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.

3 participants