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

Resolve type instabilities when generating QuantumObjects #178

Closed
wants to merge 5 commits into from

Conversation

albertomercurio
Copy link
Member

This PR fixes #177.

here I used the multiple dispatch to manage the different types, instead of using several if conditions inside a single function. The only “dowside” (if we want to call it like that), is that the generation of BraQuantumObject and OperatorBraQuantumObject needs a vector instead of a transposed vector (actually a matrix). It is then conjugate-transposed inside the function.

I added a test of the type @inferred code…, just to test that there are no type instabilities.

Copy link

codecov bot commented Jun 26, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.38%. Comparing base (4f94f9b) to head (bb99b86).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #178      +/-   ##
==========================================
+ Coverage   93.35%   93.38%   +0.02%     
==========================================
  Files          28       28              
  Lines        2093     2102       +9     
==========================================
+ Hits         1954     1963       +9     
  Misses        139      139              

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

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.

Type instabilities when generating a QuantumObject
2 participants