qiboteam / qiboml

Quantum Machine Learning using Qibo
Apache License 2.0
10 stars 3 forks source link

Added activations in tests #55

Open BrunoLiegiBastonLiegi opened 4 days ago

BrunoLiegiBastonLiegi commented 4 days ago

Adds activations similar to the one used in the notebook #49. Various fixes to the tests are also introduced. Makes BinaryEncoding a layer of RX in practice and gets rid of the 1/0 check and branching.

codecov[bot] commented 3 days ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 78.85%. Comparing base (3e52004) to head (04632be).

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/qiboteam/qiboml/pull/55/graphs/tree.svg?width=650&height=150&src=pr&token=9HMBD3N3D6&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=qiboteam)](https://app.codecov.io/gh/qiboteam/qiboml/pull/55?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=qiboteam) ```diff @@ Coverage Diff @@ ## main #55 +/- ## =========================================== + Coverage 61.06% 78.85% +17.78% =========================================== Files 11 11 Lines 488 487 -1 =========================================== + Hits 298 384 +86 + Misses 190 103 -87 ``` | [Flag](https://app.codecov.io/gh/qiboteam/qiboml/pull/55/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=qiboteam) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/qiboteam/qiboml/pull/55/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=qiboteam) | `78.85% <100.00%> (+17.78%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=qiboteam#carryforward-flags-in-the-pull-request-comment) to find out more. | [Files with missing lines](https://app.codecov.io/gh/qiboteam/qiboml/pull/55?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=qiboteam) | Coverage Δ | | |---|---|---| | [src/qiboml/models/encoding.py](https://app.codecov.io/gh/qiboteam/qiboml/pull/55?src=pr&el=tree&filepath=src%2Fqiboml%2Fmodels%2Fencoding.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=qiboteam#diff-c3JjL3FpYm9tbC9tb2RlbHMvZW5jb2RpbmcucHk=) | `95.23% <100.00%> (-0.12%)` | :arrow_down: | | [src/qiboml/models/pytorch.py](https://app.codecov.io/gh/qiboteam/qiboml/pull/55?src=pr&el=tree&filepath=src%2Fqiboml%2Fmodels%2Fpytorch.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=qiboteam#diff-c3JjL3FpYm9tbC9tb2RlbHMvcHl0b3JjaC5weQ==) | `98.59% <ø> (+57.74%)` | :arrow_up: | ... and [3 files with indirect coverage changes](https://app.codecov.io/gh/qiboteam/qiboml/pull/55/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=qiboteam)

🚨 Try these New Features: