mirror of https://github.com/Qiskit/qiskit.git
373e8a68c8
This encapsulates a lot of the common logic around Python sequence-like indexers (`SliceOrInt`) into iterators that handle adapting negative indices and slices in `usize` for containers of a given size. These indexers now all implement `ExactSizeIterator` and `DoubleEndedIterator`, so they can be used with all `Iterator` methods, and can be used (with `Iterator::map` and friends) as inputs to `PyList::new_bound`, which makes code simpler at all points of use. The special-cased uses of this kind of thing from `CircuitData` are replaced with the new forms. This had no measurable impact on performance on my machine, and removes a lot noise from error-handling and highly specialised functions. |
||
---|---|---|
.. | ||
src | ||
Cargo.toml | ||
README.md |
README.md
qiskit-accelerate
This crate provides a bits-and-pieces Rust libary for small, self-contained functions that are used by the main Python-space components to accelerate certain tasks. If you're trying to speed up one particular Python function by replacing its innards with a Rust one, this is the best place to put the code. This is usually the right place to put new Rust/Python code.
The qiskit-pyext
crate is what actually builds the C extension modules. Modules in here should define
themselves has being submodules of qiskit._accelerate
, and then the qiskit-pyext
crate should bind them
into its fn _accelerate
when it's making the C extension.