  Schr\"odinger's equation serves as a fundamental component in characterizing
quantum systems, wherein both quantum state tomography and Hamiltonian learning
are instrumental in comprehending and interpreting quantum systems. While
numerous techniques exist for carrying out state tomography and learning
Hamiltonians individually, no method has been developed to combine these two
aspects. In this study, we introduce a new approach that employs the attention
mechanism in transformer models to effectively merge quantum state tomography
and Hamiltonian learning. By carefully choosing and preparing the training
data, our method integrates both tasks without altering the model's
architecture, allowing the model to effectively learn the intricate
relationships between quantum states and Hamiltonian. We also demonstrate the
effectiveness of our approach across various quantum systems, ranging from
simple 2-qubit cases to more involved 2D antiferromagnetic Heisenberg
structures. The data collection process is streamlined, as it only necessitates
a one-way generation process beginning with state tomography. Furthermore, the
scalability and few-shot learning capabilities of our method could potentially
minimize the resources required for characterizing and optimizing quantum
systems. Our research provides valuable insights into the relationship between
Hamiltonian structure and quantum system behavior, fostering opportunities for
additional studies on quantum systems and the advancement of quantum
computation and associated technologies.
