qiskit-community / qiskit-dynamics

Tools for building and solving models of quantum systems in Qiskit
https://qiskit-community.github.io/qiskit-dynamics/
Apache License 2.0
105 stars 61 forks source link

Update models API docs #332

Closed DanPuzzuoli closed 8 months ago

DanPuzzuoli commented 8 months ago

Summary

Updates the models module API docs to reflect the change of evaluation_mode to array_library and vectorized.

Details and comments

In the interest of minimizing further documentation maintenance, I also slightly changed the BaseGeneratorModel abstract base class to implement the array_library property.

This enabled deleting the array_library property for GeneratorModel, HamiltonianModel, and LindbladModel. As a result, changes to documentation of this property only need to be made in one place.

DanPuzzuoli commented 8 months ago

It looks almost good. The below is a subtle suggestion.

https://github.com/Qiskit-Extensions/qiskit-dynamics/blob/2b91912c78693495f5dbb2f3edcd8cc906b032e0/qiskit_dynamics/models/operator_collections.py#L204

-> ArrayLike that acts on states y via multiplication.

Good find - this is actually the scipy sparse version of the class so I changed "Array" -> "scipy sparse matrix".