-
Notifications
You must be signed in to change notification settings - Fork 206
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Lattice QED Hamiltonian for Quantum Computing #1263
base: main
Are you sure you want to change the base?
Lattice QED Hamiltonian for Quantum Computing #1263
Conversation
|
Thank you for opening this PR and for considering open-sourcing your work! I did not dive into the code yet, but read your description above. This triggered the following thoughts which I will write down in no particular order:
These are some implementation-specific thoughts which come to mind reading your description. These may or may not require a significant development effort as I did not inspect your code itself as of yet. Overall, I think this would be a great addition to Qiskit Nature! See also ElePT#2 for a possibly related prior work in this direction. Seeing that this PR adds more than 3000 lines of code in its current form and given my comments above, do you think we can split this implementation into multiple smaller (and thereby easier-to-review) additions to Qiskit Nature? Please let me know what you think 🙂 |
Hi, thanks for the quick reply. Here are my comments:
-I also did not consider the Jordan Wigner mapper on qiskit because there is no phase in the code in qiskit and also the JW choice influences the definition and thus the value of the dynamical charges in the Hamiltonian. -Concerning the last comment, I did not really understand what the idea behind is. I understand that the code is quite long, so I agree that maybe it is better to split the additions, in case. Of course, any comment/observation is more than welcome, so let me know what you think. |
Sorry for the late response. There really is a lot of pieces in this PR and in the current form of adding a "dangling" class (in the sense that it is not tied to any other parts of Qiskit Nature) combined with a number of Jupyter notebook inside of a builtin module, this is simply not possible/compatible with Qiskit Nature as such. That said, I think there are some valuable pieces which would need to be analyzed one-by-one with more appropriately sized PRs to add the functionality that they provide into the corresponding parts of Qiskit Nature. I think that ElePT#2 is possibly related and it set out quite a good start in what is aligned with Qiskit Nature (at the time; it would need some updates to be integrated today; but that requires #1188 to be finalized and merged, first). Let me try to break down a few parts that I see here:
To summarize: since this PR cannot be merged in its current form, why don't we switch over to #556 to try and identify the key features that would be required inside of Qiskit Nature for your application. I will not be able to work on this much myself, but I am happy to discuss how/where things could fit and point you in the right direction with additional explanation of how things fit together. |
I am sorry to not come back to you. It seems that considering adding the entire Hamiltonian code is quite costly. Maybe I can consider to add a small part of it or work on the existing versions on qiskit and apply changes there. What do you think? |
#Summary
In my doctorate, I have been interested in studying Lattice Gauge Theories (LGT), especially Quantum Electrodynamics, or QED, with quantum computing. That is the reason why I have developed a Python code that can define the Hamiltonian up to 3-dimensional systems. The idea of this code is to start from a lattice, define the electric, magnetic and, in the case of matter fields, mass and kinetic Hamiltonians. The output can be used for further studies of lattice systems and computing observables, like the spectrum, static potential or other observables. The user should provide only the input values of the parameters in the Hamiltonian (like mass, or coupling values), and which size of the lattice wants to compute. I have also considered two bases: electric and magnetic (NB:the magnetic basis that I have considered was developed in this paper: https://arxiv.org/pdf/2006.14160.pdf )
#Details
The code is compatible with exact diagonalisation libraries and Qiskit library.
In the directory, there are the following files:
'HC_Lattice.py' A python code that builds a lattice in generic N dimensions, with periodic or open boundary conditions. It finds the set of links and sites, build plaquettes and chain for Jordan_Wigner definition (version up to 3D).
'Hamiltonian_QED_sym.py' A python code that builds a symbolic expression of QED Hamiltonian N-dimensional lattice, both with open and periodic boundary conditions. The formulation is from Kogut and Susskind (staggered fermions) and the Gauss’ law is applied. By doing so, we will get a gauge invariant system, reduce the number of dynamical links needed for the computation, and have a more resource-efficient Hamiltonian suitable for a wide range of quantum hardware.
'Hamiltonian_QED_oprt.py' A python code that imports the Hamiltonian from symbolic expression and build the operator form (sparse matrices or PauliOp, suitable for qiskit quantum circuits). It considers two types of encoding: 'ed' returns sparse matrix, 'gray' (also called logarithm encoding) with option sparse=False it returns PauliOp expression, otherwise a sparse matrix.
'class_H_QED_test_sym_oprt.ipynb' notebook with two examples.
In this notebook one can also visualize the Hamiltonian expression (printed also in latex format, useful for external documents) and then decide which encoding to use and if the final expression must be written in terms of Qiskit's Pauli operators. It is also possible to put static charges on the sites and study the static potential.
I need to mention that I have tested the 1d and 2d cases with external works,however, I have not tested 3d case yet, since I don't know anyone that is working on that at the moment.
I wanted also to mention that this is the first draft of the code, in order to explain the idea behind it. In case it is considered useful for qiskit-nature, I will provide more details and tests for external users and, of course, any external help/contribution is more than welcome!(e.g. consider Wilson and not staggered fermions)
In conclusion, I think being able to have the expression of the QED Hamiltonian in qiskit, can be useful for a lot of researchers that are interested in LGT and in studying them with quantum technologies.