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

Add single-term multiplication for AbstractQ on v1.10 and above #52342

Merged
merged 2 commits into from
Dec 5, 2023

Conversation

jishnub
Copy link
Contributor

@jishnub jishnub commented Nov 29, 2023

The following works on Julia v1.9 but not on 1.10 and above, as Q is not an AbstractMatrix anymore, and doesn't have access to the fallback method:

julia> Q = qr(rand(4,4)).Q;

julia> *(Q)
4×4 LinearAlgebra.QRCompactWYQ{Float64, Matrix{Float64}, Matrix{Float64}}:
 -0.80458    -0.0760911   0.57709   -0.117597
 -0.0134158  -0.952934   -0.192074  -0.23419
 -0.492601    0.251727   -0.733911  -0.394147
 -0.331385   -0.150867   -0.302406   0.880894

This PR adds a trivial method to reinstate this behavior. A similar method exists for Givens, so something like this may be conceptualized for linear operators. Moreover, this may be pragmatic to avoid breakages. Currently, the tests for LazyArrays are broken on v1.10 as this method is missing.

@jishnub jishnub added domain:linear algebra Linear algebra backport 1.10 Change should be backported to the 1.10 release labels Nov 29, 2023
@jishnub jishnub changed the title Single-term multiplication for AbstractQ Add single-term multiplication for AbstractQ on v1.10 and above Nov 29, 2023
@dkarrasch
Copy link
Member

It seems that the array analogue has an eltype restriction <:Number, though I'm not sure why that is. But if we only want to restore previous behaviour, perhaps we should add it?

@dkarrasch dkarrasch merged commit 150c1ad into master Dec 5, 2023
7 checks passed
@dkarrasch dkarrasch deleted the jishnub/AbstractQmul branch December 5, 2023 10:05
KristofferC pushed a commit that referenced this pull request Dec 12, 2023
@KristofferC KristofferC mentioned this pull request Dec 12, 2023
17 tasks
KristofferC added a commit that referenced this pull request Dec 17, 2023
Backported PRs:
- [x] #51234 <!-- Fix getfield codegen for tuple inputs and unknown
symbol fields. -->
- [x] #52170 <!-- fix invalidations related to `ismutable` -->
- [x] #52342 <!-- Add single-term multiplication for `AbstractQ` on
v1.10 and above -->
- [x] #52333 <!-- bugfix for dot of Hermitian{noncommutative} -->
- [x] #52407 <!-- channels: fix memory ordering violation in iterate -->
- [x] #52405 <!-- Bump LLVM to 15.0.7+10 to fix GC issue -->
- [x] #52441 <!-- Remove `Pkg` dependency from `SuiteSparse_jll` -->
- [x] #52367 <!-- docs: add notes about scratchspaces in depot -->
- [x] #52456 <!-- Make `jl_write_coverage_data` dllexported again -->
- [x] #52294 <!-- GC scheduler refinements -->
- [x] #52359 <!-- make custom log macros work -->
- [x] #52548
@KristofferC KristofferC removed the backport 1.10 Change should be backported to the 1.10 release label Dec 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants