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

Optimize QuantumObjectType handling #131

Merged
merged 1 commit into from
May 26, 2024
Merged

Conversation

ytdHuang
Copy link
Member

@ytdHuang ytdHuang commented May 26, 2024

I find out that we have many codes like:

function f(A::QuantumObject{<:AbstractArray{T},OpType}) where {T,OpType<:QuantumObjectType} ... end 

where the funtion f basically supports all types of QuantumObject.

But this can be abbreviated as

function f(A::QuantumObject{<:AbstractArray{T}}) where {T} ... end

This can make the code more clear.

Copy link

codecov bot commented May 26, 2024

Codecov Report

Attention: Patch coverage is 80.64516% with 6 lines in your changes are missing coverage. Please review.

Project coverage is 91.12%. Comparing base (27ab026) to head (a78f9a5).

Files Patch % Lines
src/quantum_object.jl 80.64% 6 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #131      +/-   ##
==========================================
+ Coverage   91.04%   91.12%   +0.07%     
==========================================
  Files          21       21              
  Lines        1765     1757       -8     
==========================================
- Hits         1607     1601       -6     
+ Misses        158      156       -2     

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

@albertomercurio albertomercurio merged commit 6c0f46d into qutip:main May 26, 2024
13 of 14 checks passed
@ytdHuang ytdHuang deleted the opt/QOType branch May 26, 2024 11:34
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.

2 participants