Skip to content

Commit e85f654

Browse files
mtreinishraynelfss
authored andcommitted
Upgrade faer to the latest version (Qiskit#15059)
* Upgrade faer to the latest version This commit updates faer to the latest version 0.23.1. This also requires an update to faer-ext as the two crates are tightly coupled. The faer-ext version bump does depend on the latest nalgebra release when the nalgebra conversion feature is enabled. However, the latest nalgebra release requires a newer rust version than our MSRV and we can't upgrade to it. To workaround this issue, this commit adds conversion functions to convert between the types by reference with no copies. For the faer->nalgebra this is basically just an inlining of what faer-ext does, but for nalgebra->faer it goes through ndarray (since we already have that). * Bump to newer bugfix * Bump private-gemm-x86 * Bump private-gemm-x86 again * Update crates/synthesis/src/linalg/mod.rs * Add explicit lifetime parameters to function signature * Update safety comment for nalgebra_to_faer * Update stride type conversion panic message * Run cargo fmt * Fix clippy failures too * Add tests and docs for faer conversion function There are some caveats around using the faer conversion function around how nalgebra expects the memory layout to be setup. This documents them to make it clear there is some care needed with the function. Additionally, this commit adds some test coverage to the function so that we are directly covering it and potentially running it under miri (I'm not actually sure if this will work under miri, so we'll find out in CI and go from there). * Test something besides an identity matrix * Skip miri on test_transpose_faer_to_nalgebra_conversion This commit adds a skip on the test_transpose_faer_to_nalgebra_conversion test when running under miri. Miri is flagging undefined behavior in the nalgebra code which is triggered by advancing the iterator's pointer outside the allocation. This is because the nalgebra code is using the wrong pointer api for doing the pointer addition. A PR has been proposed in dimforge/nalgebra#1562 to fix this, but until that is merged and in a release Qiskit is using we will need to skip miri on this test.
1 parent d6987fd commit e85f654

File tree

3 files changed

+558
-72
lines changed

3 files changed

+558
-72
lines changed

0 commit comments

Comments
 (0)