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

[ITensors] [ENHANCEMENT] Faster Computing Gradients of Variational Circuits with Hardware-Efficient Ansatz #1138

Open
danielalcalde opened this issue Jun 30, 2023 · 0 comments
Labels
enhancement New feature or request ITensorMPS Issues related to the ITensorMPS submodule mps Issues related to MPS/MPO functionality

Comments

@danielalcalde
Copy link
Contributor

I've developed an optimized version of apply specifically for variational circuits based on hardware-efficient ansatz. This approach leverages the one-qubit gates and non-parametrized entangling gates, offering a more efficient, albeit less general, solution. I'm interested in contributing this to the ITensors library and would like to gauge if there's interest in this addition.

In essence, I've written two separate functions:

  1. An optimized apply version that does not computes the $\frac{\partial \text{apply}(\ket{\psi}, gates)}{\partial gates}$ pullback but only the $\frac{\partial \text{apply}(\ket{\psi}, gates)}{\partial \psi}$ pullback when dealing with non-parametrized gates.

  2. A specialized apply version that computes the pullback for single-qubit gates more efficiently by taking advantage of their simpler structure. Note that as long as the gates input into apply are acting on different sites, we should be able to compute the pullback more efficiently. However, in this current implementation, only the single-qubit version has been developed.

These enhancements significantly reduced the computational cost of computing gradients in a system of $L=20$ with a depth of 6 and maxdim=60 from 290ms to approximately 180ms.

@danielalcalde danielalcalde added enhancement New feature or request ITensors Issues or pull requests related to the `ITensors` package. labels Jun 30, 2023
@mtfishman mtfishman added mps Issues related to MPS/MPO functionality ITensorMPS Issues related to the ITensorMPS submodule and removed ITensors Issues or pull requests related to the `ITensors` package. labels May 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request ITensorMPS Issues related to the ITensorMPS submodule mps Issues related to MPS/MPO functionality
Projects
None yet
Development

No branches or pull requests

2 participants