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

Base.convert(::Type{Operator}, ::Operator) #107

Merged
merged 3 commits into from
Jun 19, 2023

Conversation

Krastanov
Copy link
Collaborator

Fixes #106

@codecov
Copy link

codecov bot commented Jun 17, 2023

Codecov Report

Merging #107 (71956a0) into master (f98ec89) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master     #107   +/-   ##
=======================================
  Coverage   93.33%   93.34%           
=======================================
  Files          24       24           
  Lines        2881     2885    +4     
=======================================
+ Hits         2689     2693    +4     
  Misses        192      192           
Impacted Files Coverage Δ
src/operators_dense.jl 93.02% <100.00%> (+0.10%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@Krastanov
Copy link
Collaborator Author

The breakage in QuantumOptics (in the steady state submodule) is not spurious, it is actually there, and it is actually caused by this change... But I have no idea why... Suggestions would be welcomed.

@Krastanov Krastanov marked this pull request as ready for review June 19, 2023 00:35
This is expected by the convert api, e.g.

```
julia> a = [1]
1-element Vector{Int64}:
 1

julia> b = convert(Vector{Int},a)
1-element Vector{Int64}:
 1

julia> a[1] = 2; b
1-element Vector{Int64}:
 2
```
@Krastanov
Copy link
Collaborator Author

The breakage was because this new convert method was creating copies even when no conversion is necessary (as described in the commit message).

I am merging this as it is strictly a bugfix not affecting the rest of the system and follows Julia base conventions.

@Krastanov Krastanov merged commit 0599959 into qojulia:master Jun 19, 2023
11 checks passed
@Krastanov Krastanov deleted the powadjsparse branch June 19, 2023 22:12
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.

dagger(operator)^2 does not work
1 participant