You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Embed C API into Python extension
This commit adds the C extension crate into the Python extension build.
This is done by adding the qiskit-cext crate as a dependency for
qiskit-pyext. Then the contents of cext are re-exported from pyext. This
enables linking against the _accelerate shared library object using the
C API. This facilitates writing compiled Python extensions that
interface with Qiskit directly via C. For example, building a
SparseObservable object in a compiled language via the C API and then
returning that to Python for use with the rest of Qiskit.
Co-authored-by: Matthew Treinish <[email protected]>
* Remove python space function
The path is trivial to get if you need it and we shouldn't commit to
this in the public api yet.
* Add feature gate for python function
* Add optional python header and and fix rename overrides prefixing
* Correct dependencies in Makefile
* Fix cbindgen config
* Add cfg feature guard for python dependent functionality
* Adjust python gil usage and document it
* Update crates/pyext/src/lib.rs
* Update crates/cext/src/sparse_observable.rs
Co-authored-by: Jake Lishman <[email protected]>
* Manual object rename
We should find a better solution,
maybe the Rust interface of cbindgen
allows for more options here.
* pyo3 as optional dependency in cext
but implicitly it still depends on it via qiskit-accelerate
---------
Co-authored-by: Julien Gacon <[email protected]>
Co-authored-by: Jake Lishman <[email protected]>
Co-authored-by: Jake Lishman <[email protected]>
0 commit comments