netket_fidelity
Projected time-dependent Variational Monte Carlo (p-tVMC) method based on infidelity optimization for variational simulation of quantum dynamics.
Science Score: 67.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
✓DOI references
Found 6 DOI reference(s) in README -
✓Academic publication links
Links to: zenodo.org -
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (14.5%) to scientific vocabulary
Keywords
Repository
Projected time-dependent Variational Monte Carlo (p-tVMC) method based on infidelity optimization for variational simulation of quantum dynamics.
Basic Info
Statistics
- Stars: 13
- Watchers: 2
- Forks: 6
- Open Issues: 0
- Releases: 2
Topics
Metadata Files
README.md
projected time-dependent Variational Monte Carlo (p-tVMC)
This is a package for the projected time-dependent Variational Monte Carlo (p-tVMC) method based on infidelity optimization for variational simulation of quantum dynamics. See the paper "Unbiasing time-dependent Variational Monte Carlo by projected quantum evolution" (https://doi.org/10.22331/q-2023-10-10-1131) for reference.
The p-tVMC can be used to simulate the evolution generated by an arbitrary transformation U, by iteratively minimizing the infidelity among the variational ansatz with free parameters |ψ⟩ and the state U|ϕ⟩ where U is an arbitrary transformation and |ϕ⟩ is a known state (such as an ansatz with known parameters).
There are no restrictions on U from the moment a function that computes its connected elements is implemented.
The package supports the possibility to sample from the states |ψ⟩ and U|ϕ⟩, which can be used for any transformation U (unitary and non-unitary), and to sample from the states |ψ⟩ and |ϕ⟩, which is possible only for a unitary U (exploiting the norm conservation).
To sample from U|ϕ⟩ a jax compatible operator for U must be used, and the package exports few examples of them (the Ising Transverse Field Ising Hamiltonian, Rx and Ry single qubit rotations and the Hadamard gate).
In addition, the code includes the possibility to use the Control Variates (CV) correction on the infidelity stochastic estimator to improve its signal to noise ratio and reduce the sampling overhead by orders of magnitudes.
Content of the repository
- netket_fidelity : folder containing the following several subfolders:
- infidelity: contains the infidelity operator.
- operator: contains the
jax-compatible operators for U. - driver: contains the driver for infidelity optimization.
- examples: folder containing some examples of application.
- test: folder containing tests for the infidelity stochastic estimation and for the
jax-compatible rotation operators.
Installation
This package is not registered on PyPi, so you must install it directly from GitHub. You can install either:
- The latest version of the code available on GitHub, which might or might not work at the moment (in case it does not work, do open an issue with us). To do so, run the following line in your commandline:
bash
pip install git+https://github.com/netket/netket_fidelity
- The version corresponding to the revised version of the manuscript we submitted on the ArXiV/Quantum Journal (September 2023).
bash
pip install "git+https://github.com/netket/netket_fidelity@v0.0.2"
- You can download this repository and install it manually in editable mode
bash
git clone https://github.com/netket/netket_fidelity
pip install -e ./netket_fidelity
Example of usage
```python import netket as nk import netket_fidelity as nkf
Create the Hilbert space and the variational states |ψ⟩ and |ϕ⟩
hi = nk.hilbert.Spin(0.5, 4) sampler = nk.sampler.MetropolisLocal(hilbert=hi, nchainsperrank=16) model = nk.models.RBM(alpha=1, paramdtype=complex, usevisiblebias=False) phi = nk.vqs.MCState(sampler=sampler, model=model, nsamples=100) psi = nk.vqs.MCState(sampler=sampler, model=model, nsamples=100)
Transformation U
U = nkf.operator.Hadamard(hi, 0)
Create the driver
optimizer = nk.optimizer.Adam(learningrate=0.01) te = nkf.driver.InfidelityOptimizer(phi, optimizer, U=U, Udagger=U, variationalstate=psi, isunitary=True, cv_coeff=-1/2)
Run the driver
te.run(n_iter=100) ```
How to cite
If you use netket_fidelity in your work, please consider citing it as:
@software{netket_fidelity,
author = {Sinibaldi, Alessandro and Vicentini, Filippo},
title = {netket\_fidelity package},
url = {https://github.com/netket/netket_fidelity},
doi = {10.5281/zenodo.8344170},
version = {0.0.2},
year = {2023}
}
Owner
- Name: NetKet
- Login: netket
- Kind: organization
- Website: https://www.netket.org
- Twitter: NetKetOrg
- Repositories: 4
- Profile: https://github.com/netket
Open-source project for the development of machine intelligence for many-body quantum systems.
Citation (CITATION.cff)
authors:
- family-names: Sinibaldi
given-names: Alessandro
- family-names: Vicentini
given-names: Filippo
cff-version: 0.0.2
message: "If you use this software, please cite the article from preferred-citation."
title: netket_fidelity
url: "https://github.com/netket/netket_fidelity"
preferred-citation:
type: software
title: "netket_fidelity package"
authors:
- family-names: Sinibaldi
given-names: Alessandro
- family-names: Vicentini
given-names: Filippo
year: 2023
doi: "10.5281/zenodo.8344170"
url: "https://doi.org/10.5281/zenodo.8344170"
GitHub Events
Total
- Issues event: 1
- Watch event: 4
- Issue comment event: 11
- Push event: 2
- Fork event: 2
Last Year
- Issues event: 1
- Watch event: 4
- Issue comment event: 11
- Push event: 2
- Fork event: 2
Dependencies
- actions/checkout v2 composite
- actions/setup-python v2 composite
- codecov/codecov-action v3 composite
- mpi4py/setup-mpi v1 composite
- netket ~=3.6