Skip to content
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

TEBD feature for QuimbBackend #56

Open
NithyasriVS opened this issue Mar 28, 2024 · 6 comments
Open

TEBD feature for QuimbBackend #56

NithyasriVS opened this issue Mar 28, 2024 · 6 comments

Comments

@NithyasriVS
Copy link
Member

NithyasriVS commented Mar 28, 2024

The new TEBD feature under QuimbBackend to calculate entropy, schmidt gap, and z-magnetization values, given a qibo circuit containing hamiltonian, is a Work-in-Progress.

Files changed: quimb.py and eval_qu.py

quimb.py
Added support for the new computation setting for TEBD_enabled runcard option

eval_qu.py
Implemented 3 functions corresponding to calculation of entropy, schmidt gap, z-magnetization values using quimb

(PR from forked repo is able to merge but feature is WIP)

@NithyasriVS
Copy link
Member Author

NithyasriVS commented Apr 9, 2024

It was found that quimb's APIs for TEBD and it's calculations of such above mentioned physical quantities cannot be directly used as there is incompatibility with Qibo. A new design strategy using Trotter decomposition in Qibo is now a WIP which will be updated soon.

@NithyasriVS NithyasriVS changed the title TEBD TEBD feature for QuimbBackend Apr 9, 2024
@alecandido
Copy link
Member

Would you explain what the incompatibility consists of?

Moreover, it would be easier to follow the evolution of the PR, would you open a draft PR? Even from the forked repo, there is no problem with that.

@NithyasriVS
Copy link
Member Author

The incompatibility was due to the physical quantities like entropy not being mappable to a result.state(). Since qibotn's usage is based on execution of circuit using result.state() in qibo to find the final state, a value like entropy could not be directly returned. There is no PR for this as we have now taken a different approach to this feature as discussed with Dr @liweintu, vinitha, and nitin. But the old approach is available in my forked repo.

I'd like to take this opportunity to share the new approach and also share a 2 page feature document I created to better the understanding of the input layer, main layer, and output layer of the feature as well as to highlight a few challenges.

Briefly, Trotter decomposition in qibo lets users write a circuit with a hamiltonian where the hamiltonian gets stored as qibo.gates.Unitary. It works only with symbolic or built-in hamiltonians with dense=False. This means that qibotn’s current structure that is able to only deal with circuits and not directly hamiltonians, can further be extended to do TEBD by using this method for input.

Usage:

ham = hamiltonian.XXZ(nqubits=5)
            circuit = ham.circuit(dt=1e-2)

TEBD Feature document.docx

@alecandido
Copy link
Member

Please, share documents in portable formats.

TEBD.Feature.document.pdf

Even better, you can write them directly in GitHub. If too long for a comment, consider opening an issue on its own, using a discussion, or the wiki.

@NithyasriVS
Copy link
Member Author

Sure and thank you!

@NithyasriVS
Copy link
Member Author

PR raised #63

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants