SaashaJoshi / piQture

piQture: A quantum machine learning library for image processing.
https://saashajoshi.github.io/piQture/
Apache License 2.0
20 stars 10 forks source link

Correct programming logic and add unittests for MERA class. #21

Closed SaashaJoshi closed 9 months ago

SaashaJoshi commented 9 months ago

Corrects the too-many-branches (pylint error) programming logic and adds unit tests for the MERA class.

This PR will also Close #17. It partially addresses #11

SaashaJoshi commented 9 months ago

The test_mera coverage is still not 100%. This is because the D-block implementation in subsequent layers after the first layer is not implemented until the number of qubits is more than 4 (verify if some other number is the minimum). This requires an additional test case and mera circuit in the fixture for num_qubits > 4.

SaashaJoshi commented 9 months ago

Okay, so the D-block is implemented again when the num_qubits are more than 4 with the minimum requirement being 5 qubits. Implementation included with the latest commit which brings the coverage to 100%