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

Define interfaces by tests #312

Merged
merged 25 commits into from
Feb 3, 2025
Merged

Define interfaces by tests #312

merged 25 commits into from
Feb 3, 2025

Conversation

mofeing
Copy link
Member

@mofeing mofeing commented Feb 1, 2025

This PR defines a series of functions for testing whether a type fulfills some interface. This is the first step on replacing our current Quantum & Ansatz classes, that act as concrete mixins for other classes, for Pluggable and Ansatz abstract interfaces. By adding these tests, we test for API breakage while we refactor internals.

This should allow us to fix the type hierarchy serialization problems we suffer from Julia's single-inheritance enforcement, while also avoiding the diamond problem and schizofrenia-like problems of multiple-inheritance OOP.

Copy link

codecov bot commented Feb 2, 2025

Codecov Report

Attention: Patch coverage is 94.11765% with 1 line in your changes missing coverage. Please review.

Project coverage is 86.24%. Comparing base (9f298ae) to head (ee82904).
Report is 2 commits behind head on master.

Files with missing lines Patch % Lines
src/Circuit.jl 93.75% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           master     #312       +/-   ##
===========================================
+ Coverage   64.76%   86.24%   +21.47%     
===========================================
  Files          36       34        -2     
  Lines        2401     2428       +27     
===========================================
+ Hits         1555     2094      +539     
+ Misses        846      334      -512     

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

@mofeing mofeing merged commit 23baffd into master Feb 3, 2025
9 checks passed
@mofeing mofeing deleted the refactor/interface-tests branch February 3, 2025 09:20
@mofeing mofeing mentioned this pull request Feb 4, 2025
3 tasks
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.

1 participant