ctrlvqe.jl

Julia package to simulate pulse-level variational quantum algorithms for locating eigenstates of Hermitian observables.

https://github.com/kmsherbertvt/ctrlvqe.jl

Science Score: 31.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
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (17.2%) to scientific vocabulary
Last synced: 10 months ago · JSON representation ·

Repository

Julia package to simulate pulse-level variational quantum algorithms for locating eigenstates of Hermitian observables.

Basic Info
  • Host: GitHub
  • Owner: kmsherbertvt
  • License: mit
  • Language: Julia
  • Default Branch: main
  • Size: 2.02 MB
Statistics
  • Stars: 3
  • Watchers: 1
  • Forks: 4
  • Open Issues: 0
  • Releases: 3
Created over 3 years ago · Last pushed about 1 year ago
Metadata Files
Readme License Citation

README.md

CtrlVQE

Stable Dev Build Status Coverage

Code to simulate ctrl-VQE in Julia.

Installation

To use this code in your Julia environment, simply add this Github repo from the Julia REPL. Enter package mode by typing ], then:

pkg> add https://github.com/kmsherbertvt/CtrlVQE.jl

To use your own version of the code, first clone the repo into your Julia dev folder (mine is ~/.julia/dev; yours may be different):

```

cd ~/.julia/dev git clone https://github.com/kmsherbertvt/CtrlVQE.jl CtrlVQE ```

Then add the cloned directory to your Julia environment in development mode. Start the Julia REPL, enter package mode by typing ], then:

pkg> dev CtrlVQE

Note that this works from any working directory, since we've used Julia's dev directory.

Sub-Packages

The base package contains most functionality you'll need, but the repository itself includes a few extra sub-packages in the pkgs directory. Each one has its own README.md.

To use a sub-package in your Julia environment, simply add this Github repo from the Julia REPL. I haven't figured out how to do it from package mode, though, so you'll need to use the Pkg module:

julia> import Pkg julia> Pkg.add(url="https://github.com/kmsherbertvt/CtrlVQE.jl", subdir="pkgs/{thesubpackage}")

If you are using your own local version of the repository:

julia> import Pkg julia> Pkg.develop(url="$(ENV["HOME"])/.julia/dev/CtrlVQE", subdir="pkgs/{thesubpackage}")

Citing

See CITATION.bib for the relevant reference(s).

Things that must be done

  • A validate method defined for each core type, plus doctests in each basic struct.

    • Go ahead and add in Test, FiniteDifferences as dependencies...
    • Emulate hierarchical testsets as done in ADAPT.jl
    • Copy in (and touch up) standard tests from CtrlVQE.jl
    • Write doctests
  • A sub-package with convenient tools for plotting?

    • I think this only makes sense as an extension to the ModularFramework.
    • Maybe it can be included in ModularFramework itself, if we learn how to use the plot templates package.
  • Update citations:

    • Ayush's paper is published
    • My complex ctrl-VQE paper is almost published...

Examples to Write

  • FourierAnalysis
    • Demonstrate that, in the old device parameters, gradient signals tend to peak at the detuning.
    • This shows that, so long as you let the phase vary, the optimizer will be perfectly happy to stay on resonance.
    • I have some hints that cross-resonance frequencies will show up in the new device paraemters. We should try and show that with the same framework.
  • Adaptive Superposition/Subdivision/Concatentation
    • Mostly done but I'm not happy with how the code is organized. Too complicated for an Example!
    • I'm also not very happy with how concatenation is done. I think it wants a mutable IntegrationType.
    • These Examples may need to wait until after all three are done in a new
  • GlobalOptimization
    • Using a sub-eMET pulse duration (say, 18ns on old device)
    • Do a local optimization from zero pulse
    • Do a global optimization from zero pulse
    • Do a shotgun survey of local optimizations from random initial parameters
  • SPSAOptimizer
    • Demonstrate how to use my SPSAOptimizers.jl package
    • Compare trajectories for a few different hyperparameters, and compare against BFGS

EvolutionKit subpackage

The idea is to have a weightier package that gives you convenient access to all sorts of time evolutions. Well, mainly the idea is to have a separate package that gives you access to Julia's insanely weighty DifferentialEquations solver... - ODEEvolutions - LanczosEvolutions

SignalKit subpackage

The idea is to have a weightier package that gives you convenient access to every sort of signal we've ever thought of. - So many. :)

Other things to try out and maybe promote to basics

  • ConstrainedEnergyFunction
    • penalties do not merely artificially inflate the cost function, but instead add their own Lagrange multipliers as parameters.
    • The idea is that the optimization's zero-gradient convergence criterion enforces the penalties being identically zero (or at least, small enough to dodge the threshold).
    • I did try this once and found it really didn't behave any differently, so it wasn't worth the degree it complicated the code. Even so, it seems theoretically more "right", so if we can get a good interface to do it, let's do it...
    • I anticipate a problem where, realistically, I would want an L2 norm on the gradient of the energy parameters, but L∞ norm on the gradient for each Lagrange multiplier. Maybe it can be paritally accounted for by normalizing each Lagrange multiplier with the number of parameters in the energy function.

Owner

  • Name: Kyle Sherbert
  • Login: kmsherbertvt
  • Kind: user

Post-doctoral researcher at Virginia Tech, under Nick Mayhall, Sophia Economou, and Ed Barnes.

Citation (CITATION.bib)

@article{asthana_minimizing_2022,
	title = {Minimizing state preparation times in pulse-level variational molecular simulations},
	url = {https://arxiv.org/abs/2203.06818v1},
	doi = {10.48550/arxiv.2203.06818},
	abstract = {Quantum simulation on NISQ devices is severely limited by short coherence
times. A variational pulse-shaping algorithm known as ctrl-VQE was recently
proposed to address this issue by eliminating the need for parameterized
quantum circuits, which lead to long state preparation times. Here, we find the
shortest possible pulses for ctrl-VQE to prepare target molecular wavefunctions
for a given device Hamiltonian describing coupled transmon qubits. We find that
the time-optimal pulses that do this have a bang-bang form consistent with
Pontryagin's maximum principle. We further investigate how the minimal state
preparation time is impacted by truncating the transmons to two versus more
levels. We find that leakage outside the computational subspace (something that
is usually considered problematic) speeds up the state preparation, further
reducing device coherence-time demands. This speedup is due to an enlarged
solution space of target wavefunctions and to the appearance of additional
channels connecting initial and target states.},
	urldate = {2023-01-09},
	author = {Asthana, Ayush and Liu, Chenxu and Meitei, Oinam Romesh and Economou, Sophia E. and Barnes, Edwin and Mayhall, Nicholas J.},
	month = mar,
	year = {2022},
	note = {arXiv: 2203.06818},
	file = {PDF:/Users/kyles/Zotero/storage/UWERGBPQ/full-text.pdf:application/pdf},
}

@article{meitei_gate-free_2020,
	title = {Gate-free state preparation for fast variational quantum eigensolver simulations: ctrl-{VQE}},
	url = {https://arxiv.org/abs/2008.04302v3},
	doi = {10.48550/arxiv.2008.04302},
	abstract = {The variational quantum eigensolver (VQE) is currently the flagship algorithm
for solving electronic structure problems on near-term quantum computers. This
hybrid quantum/classical algorithm involves implementing a sequence of
parameterized gates on quantum hardware to generate a target quantum state, and
then measuring the expectation value of the molecular Hamiltonian. Due to
finite coherence times and frequent gate errors, the number of gates that can
be implemented remains limited on current quantum devices, preventing accurate
applications to systems with significant entanglement, such as strongly
correlated molecules. In this work, we propose an alternative algorithm (which
we refer to as ctrl-VQE) where the quantum circuit used for state preparation
is removed entirely and replaced by a quantum control routine which
variationally shapes a pulse to drive the initial Hartree-Fock state to the
full CI target state. As with VQE, the objective function optimized is the
expectation value of the qubit-mapped molecular Hamiltonian. However, by
removing the quantum circuit, the coherence times required for state
preparation can be drastically reduced by directly optimizing the pulses. We
demonstrate the potential of this method numerically by directly optimizing
pulse shapes which accurately model the dissociation curves of the hydrogen
molecule (covalent bond) and helium hydride ion (ionic bond), and we compute
the single point energy for LiH with four transmons.},
	urldate = {2023-01-09},
	author = {Meitei, Oinam Romesh and Gard, Bryan T. and Barron, George S. and Pappas, David P. and Economou, Sophia E. and Barnes, Edwin and Mayhall, Nicholas J.},
	month = aug,
	year = {2020},
	note = {arXiv: 2008.04302},
	file = {PDF:/Users/kyles/Zotero/storage/6DGW3DVX/full-text.pdf:application/pdf},
}

GitHub Events

Total
  • Release event: 2
  • Watch event: 1
  • Member event: 1
  • Push event: 17
  • Create event: 3
Last Year
  • Release event: 2
  • Watch event: 1
  • Member event: 1
  • Push event: 17
  • Create event: 3