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

[BUG] ADAPTSolver does not update the optimal_* attributes when max_cycles>1 #224

Closed
alexfleury-sb opened this issue Oct 5, 2022 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@alexfleury-sb
Copy link
Collaborator

alexfleury-sb commented Oct 5, 2022

Issue: Bug Report

Expected Behavior
ADAPTSolver should update the optimal_* attributes after simulate has been called.

Current Behavior
When max_cycles>1 and the energy converges in less than max_cycles steps, the optimal attributes are not updated (var_params, circuit, etc.). They stay as None.

Steps to Reproduce (minimal example)

  1. Perform ADAPT-VQE
from tangelo.algorithms import ADAPTSolver
from tangelo.molecule_library import mol_H2_sto3g

solver = ADAPTSolver({
    "molecule": mol_H2_sto3g,
    "max_cycles": 2,
    "verbose": True
})
solver.build()
solver.simulate()

circuit = solver.optimal_circuit
print(circuit)
  1. Call optimal_circuit. In the previous example, circuit is None.

Environment
Ubuntu - python 3.10, latest commit of the develop branch

@alexfleury-sb alexfleury-sb added the bug Something isn't working label Oct 5, 2022
alexfleury-sb added a commit to alexfleury-sb/Tangelo that referenced this issue Oct 26, 2022
@alexfleury-sb
Copy link
Collaborator Author

Is fixed with #241 (only the optimal_circuit was not updated).

ValentinS4t1qbit pushed a commit that referenced this issue Oct 31, 2022
* TETRISADAPTSolver implementation + #224 fix
ValentinS4t1qbit added a commit that referenced this issue Nov 9, 2022
* Formula for estimating n_measurements for exp value to given accuracy updated with simpler form. (#192)
* Fix operator_expectation bug qith qubit operator / hamiltonian. (#191)
* iqcc ilc solver fork (#179)
* Make circuit iterable (#194)
* copy method for circuits + get_resources adjusted for some variations of VQE + invertible swap gate fix (#193)
* Release guide for project maintainers + version string (#195)
* Notebook: Important aspects of QChem modelling for QComputing (#199)
* Notebooks enabled for Google colab ("No local install" needed) (#198)
* Docker fix (#200)
* Excited states (#197)
* Translation function for qubit operators (#196)
* c2v axis definition changed (#205)
* Bidirectional conversion for Qiskit quantum circuits (#203)
* QEMISTClientConnection class (#207)
* Add n_qubits option to MultiformOperator compress function (#209)
* Quantum Signal Processing time-evolution (#204)
* added even trotter order > 2 (#210)
* Fixed number of qubits with scBK in ADAPT. (#214)
* Export coverage output file in github actions (#158)
* JKMN vector prep should return np array of int. (#215)
* Support for additional IonQ gates (#212)
* Remove unused n_min_orbitals attribute. (#218)
* Change JKMN Majorana definition so mapped Hamiltonian is real (#219)
* Relaxing condition fot iQCC-ILC test. (#221)
* Histogram class (#217)
* Compute energy from RDMs with FermionOperator (#220)
* IonQConnection: control update prints / verbosity. (#225)
* Refactor simulator (#213)
* added __repr__ method to Gate (#229)
* New bidirectional circuit translation functions and interface (#223)
* Add circuit.depth() in get_resources methods (#235)
* Variance and standard error of an expectation value (#238)
* VQESolver cleanup (#230)
* TETRIS-ADAPT-VQE (#241)
* TETRISADAPTSolver implementation + #224 fix
* Trotter order and active electrons for (i)QCC (#234)
* Symmetry post-selection (#232)
* Qiskit runtime integration (IBM quantum only) (#222)
* Add multi-control support for trotterization (#244)
* Compatibility with new QCloud outputs. (#246)
* Deprecate Simulator, introduce get_backend as replacement (#245)
* compute_rdms function (#228)
* Expanded FermionOperator attributes, defined logical and mathematical operations on it (add, mul, eq, etc)
* Bumping Tangelo version number in _version.py
* Update CHANGELOG.md

Co-authored-by: Valentin Senicourt <[email protected]>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: AlexandreF-1qbit <[email protected]>
Co-authored-by: James Brown <[email protected]>
Co-authored-by: JamesB-1qbit <[email protected]>
Co-authored-by: MPCoons <[email protected]>
Co-authored-by: elloyd-1qbit <[email protected]>
Co-authored-by: KrzysztofB-1qbit <[email protected]>
Co-authored-by: Rudi Plesch <[email protected]>
Co-authored-by: GitHub Actions <[email protected]>
Co-authored-by: Valentin Senicourt <[email protected]>
Co-authored-by: Joshua Goings <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants