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
106 stars 60 forks source link

Initial DynamicsBackend class #139

Closed DanPuzzuoli closed 2 years ago

DanPuzzuoli commented 2 years ago

Summary

Closes #74 Closes #75

This PR implements an initial version of the PulseSimulator class, with a very minimal feature set. The main goal is to establish the structure of the class with a minimal level of usability, an then features can be iteratively added.

Currently a WIP, the minimal functionality goal is to allow a user to instantiate an instance with a custom model (defined in terms of a Dynamics Solver), and to submit schedules to PulseSimulator.run and get results objects back containing counts. The current functionality is shown in the file PulseSimulator_custom_demo.ipynb in the root folder (to be deleted prior to merge).

Details and comments

Establishes the PulseSimulator class, which is instantiate with:

The class assumes that, regardless of the rotating frame the Solver is configured in, the non-rotating frame version of the static Hamiltonian defines the dressed state structure (i.e. the lab frame static Hamiltonian). At instantiation, the lab frame static Hamiltonian is diagonalized, and eigenvalues/eigenvectors are sorted according to dressed-state ordering.

Calling run will:

For now, the DynamicsJob object is an _async=False subclass of Job.

I think the main things to discuss are: