Exposing CompositeHamiltonian strutcure to outside?
I am trying to build a sort of parser that sets up the system structure automatically from a Model object. This is needed to make qiskit usage work for systems >1 Qubits/Transmons and could be used for system visualisation.
The way it currently is, a Model always gets one Hamiltonian class and therefore is oblivious to structure. The CompositeHamiltonian is implemented as CompositeHamiltonian(Hamiltonian), adding another abstraction layer to the hierarchy.
Do you (@a.simm, @a.mishra, @n.wittler) think we could add one of the following:
- An interface to get the structure and dimension information of the
CompositeHamiltonianfrom theModellayer. - Move the handling of multiple
Hamiltonian's to theModelbase class/layer by takingModel(list[Hamiltonmian], list[Coupling])by default instead ofModel(Hamiltonian).
Otherwise, I would have to do very hacky accesses to private variables and many if statements in the parsing. Which would work, but is less elegant and harder to maintain.