-
Notifications
You must be signed in to change notification settings - Fork 30
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
UHF reference #240
Merged
ValentinS4t1qbit
merged 12 commits into
sandbox-quantum:develop
from
JamesB-1qbit:uhf_reference
Nov 28, 2022
Merged
UHF reference #240
ValentinS4t1qbit
merged 12 commits into
sandbox-quantum:develop
from
JamesB-1qbit:uhf_reference
Nov 28, 2022
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
JamesB-1qbit
force-pushed
the
uhf_reference
branch
from
November 1, 2022 16:08
2dfcba9
to
2935680
Compare
JamesB-1qbit
force-pushed
the
uhf_reference
branch
from
November 22, 2022 21:07
2935680
to
eac48c0
Compare
JamesB-1qbit
force-pushed
the
uhf_reference
branch
from
November 23, 2022 17:14
764c79b
to
8f65938
Compare
JamesB-1qbit
requested review from
ValentinS4t1qbit and
alexfleury-sb
as code owners
November 23, 2022 18:53
alexfleury-sb
requested changes
Nov 24, 2022
Also, just for the comment, I saw that it is the |
ValentinS4t1qbit
requested changes
Nov 25, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor changes, looks good so far.
ValentinS4t1qbit
requested changes
Nov 28, 2022
ValentinS4t1qbit
approved these changes
Nov 28, 2022
alexfleury-sb
approved these changes
Nov 28, 2022
ValentinS4t1qbit
added a commit
that referenced
this pull request
Jan 11, 2023
* Update develop to catch up with main version 0.3.3 (#249) * Fix link of fig in qchem & excited states notebook (#250) * allow single flip index dis for qcc / JKMN (#247) * Richardson extrapolation: bug fix + error estimation (#252) * Bugfix: DMET with QCC (#253) * iQCC using only Clifford circuits notebook (#254) * pUCCD ansatz (#251) * UHF reference (#240) * uhf implementation with VQESolver functionality * support for all types of orbital freezing * add active_spin and uhf attributes to SecondQuantizedDMETFragment * add spin to adapt_ansatz arguments * added multi-product, grid_circuits and discrete_clock (#257) * translation to pennylane (#260) * bump testing version to 3.8 (#262) * Auto threshold cutoff for small coefficients in LCU (#261) * Openshell DMET (#208) * Fix for get_rdm CCSD. * Added NAO localization. * Added UHF MF for DMET. New get_rdm for VQESolver. * Save mid-circuit measurement (#256) Co-authored-by: Valentin Senicourt <valentin.senicourt@1qbit.com> Co-authored-by: AlexandreF-1qbit <76115575+AlexandreF-1qbit@users.noreply.github.com> Co-authored-by: James Brown <84878946+JamesB-1qbit@users.noreply.github.com> Co-authored-by: KrzysztofB-1qbit <86750444+KrzysztofB-1qbit@users.noreply.github.com>
ValentinS4t1qbit
added a commit
that referenced
this pull request
Feb 9, 2023
* Update develop to catch up with main version 0.3.3 (#249) * Fix link of fig in qchem & excited states notebook (#250) * allow single flip index dis for qcc (#247) * allow single flip index dis for jkmn * Richardson extrapolation: bug fix + error estimation (#252) * Bugfix: DMET with QCC (#253) * iQCC using only Clifford circuits notebook (#254) * pUCCD ansatz (#251) * UHF reference (#240) * uhf implementation with VQESolver functionality * support for all types of orbital freezing * add active_spin and uhf attributes to SecondQuantizedDMETFragment * add spin to adapt_ansatz arguments * added multi-product, grid_circuits and discrete_clock (#257) * added multi-product, grid_circuits and discrete_clock * translation to pennylane (#260) * tangelo to pennylane format translation Co-authored-by: Valentin Senicourt <41597680+ValentinS4t1qbit@users.noreply.github.com> * bump testing version to 3.8 (#262) Updating python version to 3.8 in automated tests, as 3.7 is no longer maintained by the Python dev team * Auto threshold cutoff for small coefficients in LCU (#261) * check for small value lcu * changed to keep same vector length but apply no operations * Openshell DMET (#208) * Open-shell DMET. * Fix for get_rdm CCSD. * Added NAO localization. * Added LiO2 spin=1 DMET test. * Added UHF MF for DMET. New get_rdm for VQESolver. * Save mid-circuit measurement (#256) * A flag now allows users to save mid-circuit measurements for each shot run. Co-authored-by: Valentin Senicourt <valentin.senicourt@1qbit.com> * Fix for IBMQConnection (#264) * Updated copyright year to 2023 (#267) * added draw method to circuit (#266) * added draw method to circuit (warning about font comes up in linux env) * Cirq, qulacs, pennylane and projectq operator translation functions (#268) * Support to bidirectional translation of operators for cirq, qulacs, PennyLane, projectq. * Fixed a bug in QulacsSimulator.expectation_value_from_prepared_state. * Important bug in qiskit -> tangelo op translation fixed * Fixed identity operator evaluation and extended the accepted input types in compute_rdms (#269) * Compute RDMs function can now hangle both term formats (string and openfermion tuple). * Unhashable list for of -> conversion to tuples. * Handling all the inputs in compute_rdms. * Temporarily disabling OS-DMET (#271) * Temporarily disabling for code verification purpose, as the implementation seems to return very odd and incorrect results for simple systems. * Link to new example repo * Update README.rst * Revert changes that broke tests (#275) * reverted changes that broke tests --------- Co-authored-by: AlexandreF-1qbit <76115575+AlexandreF-1qbit@users.noreply.github.com> Co-authored-by: James Brown <84878946+JamesB-1qbit@users.noreply.github.com> Co-authored-by: KrzysztofB-1qbit <86750444+KrzysztofB-1qbit@users.noreply.github.com>
ValentinS4t1qbit
added a commit
that referenced
this pull request
Feb 16, 2023
* Update develop to catch up with main version 0.3.3 (#249) * Fix link of fig in qchem & excited states notebook (#250) * allow single flip index dis for qcc (#247) * allow single flip index dis for jkmn * Richardson extrapolation: bug fix + error estimation (#252) * Bugfix: DMET with QCC (#253) * iQCC using only Clifford circuits notebook (#254) * pUCCD ansatz (#251) * UHF reference (#240) * uhf implementation with VQESolver functionality * support for all types of orbital freezing * add active_spin and uhf attributes to SecondQuantizedDMETFragment * add spin to adapt_ansatz arguments * added multi-product, grid_circuits and discrete_clock (#257) * added multi-product, grid_circuits and discrete_clock * translation to pennylane (#260) * tangelo to pennylane format translation Co-authored-by: Valentin Senicourt <41597680+ValentinS4t1qbit@users.noreply.github.com> * bump testing version to 3.8 (#262) Updating python version to 3.8 in automated tests, as 3.7 is no longer maintained by the Python dev team * Auto threshold cutoff for small coefficients in LCU (#261) * check for small value lcu * changed to keep same vector length but apply no operations * Openshell DMET (#208) * Open-shell DMET. * Fix for get_rdm CCSD. * Added NAO localization. * Added LiO2 spin=1 DMET test. * Added UHF MF for DMET. New get_rdm for VQESolver. * Save mid-circuit measurement (#256) * A flag now allows users to save mid-circuit measurements for each shot run. Co-authored-by: Valentin Senicourt <valentin.senicourt@1qbit.com> * Fix for IBMQConnection (#264) * Updated copyright year to 2023 (#267) * added draw method to circuit (#266) * added draw method to circuit (warning about font comes up in linux env) * Cirq, qulacs, pennylane and projectq operator translation functions (#268) * Support to bidirectional translation of operators for cirq, qulacs, PennyLane, projectq. * Fixed a bug in QulacsSimulator.expectation_value_from_prepared_state. * Important bug in qiskit -> tangelo op translation fixed * Fixed identity operator evaluation and extended the accepted input types in compute_rdms (#269) * Compute RDMs function can now hangle both term formats (string and openfermion tuple). * Unhashable list for of -> conversion to tuples. * Handling all the inputs in compute_rdms. * Temporarily disabling OS-DMET (#271) * Temporarily disabling for code verification purpose, as the implementation seems to return very odd and incorrect results for simple systems. * Link to new example repo * Update README.rst * Revert changes that broke tests (#275) * reverted changes that broke tests * DMET + frozen orbitals for each fragment (#276) * DMET + frozen orbitals, added DMET/frozen tests. * Example folder relocated to new repo Tangelo-Examples (#274) * removed examples folder, removed notebooks from automated tests, added link higher in README.rst * Docs update (#272) * Updated conf.py, tested building docs and fixed comments/docs. * Removed tutorials.rst with the notebooks. * Desired measurement result (#263) * New feature: return frequencies matching desired mid-circuit measurement values. --------- Co-authored-by: James Brown <james.brown@1qbit.com> * Bumping Tangelo version number in _version.py * Update Changelog (v0.3.4) --------- Co-authored-by: Valentin Senicourt <41597680+ValentinS4t1qbit@users.noreply.github.com> Co-authored-by: AlexandreF-1qbit <76115575+AlexandreF-1qbit@users.noreply.github.com> Co-authored-by: James Brown <84878946+JamesB-1qbit@users.noreply.github.com> Co-authored-by: KrzysztofB-1qbit <86750444+KrzysztofB-1qbit@users.noreply.github.com> Co-authored-by: Valentin Senicourt <valentin.senicourt@1qbit.com> Co-authored-by: James Brown <james.brown@1qbit.com> Co-authored-by: GitHub Actions <noreply@github.com>
ValentinS4t1qbit
added a commit
that referenced
this pull request
Jun 29, 2023
* Update develop to catch up with main version 0.3.3 (#249) * Fix link of fig in qchem & excited states notebook (#250) * allow single flip index dis for qcc (#247) * allow single flip index dis for jkmn * Richardson extrapolation: bug fix + error estimation (#252) * Bugfix: DMET with QCC (#253) * iQCC using only Clifford circuits notebook (#254) * pUCCD ansatz (#251) * UHF reference (#240) * uhf implementation with VQESolver functionality * support for all types of orbital freezing * add active_spin and uhf attributes to SecondQuantizedDMETFragment * add spin to adapt_ansatz arguments * added multi-product, grid_circuits and discrete_clock (#257) * added multi-product, grid_circuits and discrete_clock * translation to pennylane (#260) * tangelo to pennylane format translation Co-authored-by: Valentin Senicourt <41597680+ValentinS4t1qbit@users.noreply.github.com> * bump testing version to 3.8 (#262) Updating python version to 3.8 in automated tests, as 3.7 is no longer maintained by the Python dev team * Auto threshold cutoff for small coefficients in LCU (#261) * check for small value lcu * changed to keep same vector length but apply no operations * Openshell DMET (#208) * Open-shell DMET. * Fix for get_rdm CCSD. * Added NAO localization. * Added LiO2 spin=1 DMET test. * Added UHF MF for DMET. New get_rdm for VQESolver. * Save mid-circuit measurement (#256) * A flag now allows users to save mid-circuit measurements for each shot run. Co-authored-by: Valentin Senicourt <valentin.senicourt@1qbit.com> * Fix for IBMQConnection (#264) * Updated copyright year to 2023 (#267) * added draw method to circuit (#266) * added draw method to circuit (warning about font comes up in linux env) * Cirq, qulacs, pennylane and projectq operator translation functions (#268) * Support to bidirectional translation of operators for cirq, qulacs, PennyLane, projectq. * Fixed a bug in QulacsSimulator.expectation_value_from_prepared_state. * Important bug in qiskit -> tangelo op translation fixed * Fixed identity operator evaluation and extended the accepted input types in compute_rdms (#269) * Compute RDMs function can now hangle both term formats (string and openfermion tuple). * Unhashable list for of -> conversion to tuples. * Handling all the inputs in compute_rdms. * Temporarily disabling OS-DMET (#271) * Temporarily disabling for code verification purpose, as the implementation seems to return very odd and incorrect results for simple systems. * Link to new example repo * Update README.rst * Revert changes that broke tests (#275) * reverted changes that broke tests * DMET + frozen orbitals for each fragment (#276) * DMET + frozen orbitals, added DMET/frozen tests. * Example folder relocated to new repo Tangelo-Examples (#274) * removed examples folder, removed notebooks from automated tests, added link higher in README.rst * Docs update (#272) * Updated conf.py, tested building docs and fixed comments/docs. * Removed tutorials.rst with the notebooks. * Desired measurement result (#263) * New feature: return frequencies matching desired mid-circuit measurement values. --------- Co-authored-by: James Brown <james.brown@1qbit.com> * fix error for imaginary qubit_op with desired meas result (#278) * Integrate bug fix into main before release (#278) (#279) (#280) Co-authored-by: James Brown <james.brown@1qbit.com> * fix error for imaginary qubit_op with desired meas result (#278) * Depth function performance increase (#285) * Depth function takes now less than half a second to compute it from scratch for ~120K depth circuit. * Fix for (inverse of S and T gate) #287. (#288) * Translation perf tests (operator, circuit) (#289) * Performance test for translation layer of linq, for most formats --------- Co-authored-by: Valentin Senicourt <valentin.senicourt@1qbit.com> Co-authored-by: ValentinS4t1qbit <valentin@goodchemistry.gmail> * deterministic desired_meas_result (#290) * deterministic desired_meas_result * Mifnohelper print: remove problem handle (#293) * Removed problem handle from print. It now only focuses on chemistry information Co-authored-by: Valentin Senicourt <valentin.senicourt@1qbit.com> Co-authored-by: ValentinS4t1qbit <valentin@goodchemistry.gmail> * Combinatorial mapping of fermionic Hamiltonians (#286) * Initial implementation. Known performance scaling issues, may attempt to introduce a different QubitOperator in the future. * Re-enabling open-shell DMET (#291) * Re-enabling OS-DMET. * Support for symbolic simulator (simpy) (#292) Support for symbolic backend based on sympy, to provide algebraic expressions for states / circuits with less than 10 qubits. Notebook / examples to follow later on. * Arg simulate_options and projective_circuit to VQESolver (#298) * It is now possible to request desired measurements and other options for the "simulate" method called by the backend * Projective circuits can be used with VQE algorithm(s). Either passed by the user explicitly or integrated through the ansatz. --------- Co-authored-by: Valentin Senicourt <41597680+ValentinS4t1qbit@users.noreply.github.com> * Supporting symbols as parameters and add nsimplify to results (#300) * Symbolic expression simplified. * Simplification of exp. value and fixed a bug in translate op. * Add ability to get inverse with Symbol parameters. * Switch nsimplify to evalf. * Trim trivial qubits from circuit and Hamiltonian (#302) Remove qubits that are in a deterministic state in quantum circuits, and simplify qubit Hamiltonian accordingly, in order to reduce resource requirements while computing expectation values. --------- Co-authored-by: Valentin Senicourt <41597680+ValentinS4t1qbit@users.noreply.github.com> * Push contributors towards develop and not to main for PRs (#303) * Update to CONTRIB (main -> develop) and added workflow to help avoid PR to main that are not from develop * Set the DMET virtual orbital truncation threshold at the user level (#304) * Add option to turn off virt. orb. truncation. * Changed the threshold instead of a flag. Occ. set to their abs values. * Trim bug (#305) * minor bug fixes + test * Added typing for option dictionaries in quantum agorithms (#307) * added typing for option dictionaries, which improves user experience (autocomplete, auto-loading of docstrings for different GUIs) and handle options better overall * IntegralSolver class: base + support for Psi4 (#297) * Tests for pyscf, test for psi4, tests for custom IntegralSolver * temporary: install NO_PYSCF available to users * new: MP2Solver This PR will be followed by 1-2 other PRs to decouple pyscf from almost all algorithms and streamline the use of classical chem backends (support for all classical solvers, turning pyscf as an optional dependency for Tangelo, fixing docs and README etc as a result) * Change multi-controlled CNOT to multi-controlled CX (#308) * change multi-controlled CNOT to multi-controlled CX --------- Co-authored-by: Valentin Senicourt <41597680+ValentinS4t1qbit@users.noreply.github.com> * Braket connection (#312) Support for Braket connection, including batch submission of jobs. Tests, docs, refresh of env_var.sh A PR for the QPU notebook will follow --------- Co-authored-by: Valentin Senicourt <valentin.senicourt@1qbit.com> Co-authored-by: ValentinS4t1qbit <valentin@goodchemistry.gmail> * Support for UMP2 initial parameters (#310) * Support for UMP2 initial parameters. * Checkfile for IntegralSolverPySCF (#311) * chkfile for IntegralSolverPySCF. * QubitOperator import from Tangelo, for better encapsulation (#299) * Use Tangelo's `QubitOperator` instead of OpenFermion when possible. * Constructor method `from_openfermion` and export method `to_openfermion` available in `QubitOperator` class. Remaining usage of Openfermion is tied to qubit mappings mostly, and code relying on other Openfermion features. --------- Co-authored-by: Valentin Senicourt <valentin.senicourt@1qbit.com> Co-authored-by: ValentinS4t1qbit <valentin@goodchemistry.gmail> * FCISolverPsi4 (#309) * moved chem tests to molecular_computation tests * Changed FCISolver to class with solver attribute --------- Co-authored-by: Valentin Senicourt <41597680+ValentinS4t1qbit@users.noreply.github.com> * Removed deprecated Linq functions (#316) * Removed deprecated versions of trasnlation functions and Simulator. --------- Co-authored-by: Valentin Senicourt <valentin.senicourt@1qbit.com> Co-authored-by: ValentinS4t1qbit <valentin@goodchemistry.gmail> * CCSD solver psi4 (#313) * add ccsd_solver test to psi4 testing * get_rdm currently not supported, suggestions added in comments * ADAPT: add spin to available options (#317) * add spin to available options and docstring * MP2 psi4 (#315) * Support for MP2 with psi4 backend. * get_rdm and get_mp2_parameters currently unsupported, suggestions left in docstrings. * skip performance tests (Linq) in pytest (#319) Perrformance tests take time and should not be run systematically * Typos in docs (#321) * Added spaces in messages. * Typos and code format. * Add period. * DMET Effective Core Potential fix(related to #306) (#318) * potential fix for #306, test added * Change installation (#320) * remove no_pyscf, attempt windows test * updated psi4 test --------- Co-authored-by: Valentin Senicourt <41597680+ValentinS4t1qbit@users.noreply.github.com> * DMET-ecp test fix: change optimizer to minimize square (#323) * improved Error message for MP2 initialization in UCCSD (pySCf currently required) (#322) * improved Error message for MP2 initialization if pyscf is not found * Qiskit-related: deprecation update to SparsePauliOp and bug workaround (#325) * Stim clifford simulator integration (#314) * direct tableau * noise and circuit sampler * decomposition into clifford gates * clifford decomp tests, and SDAG in cirq * is_clifford in gate class * expand clifford decomp to integer values * small comments, add pip install stim to workflow Co-authored-by: Valentin Senicourt <41597680+ValentinS4t1qbit@users.noreply.github.com> * Bumping Tangelo version number in _version.py * Update CHANGELOG.md --------- Co-authored-by: Valentin Senicourt <41597680+ValentinS4t1qbit@users.noreply.github.com> Co-authored-by: AlexandreF-1qbit <76115575+AlexandreF-1qbit@users.noreply.github.com> Co-authored-by: James Brown <84878946+JamesB-1qbit@users.noreply.github.com> Co-authored-by: KrzysztofB-1qbit <86750444+KrzysztofB-1qbit@users.noreply.github.com> Co-authored-by: Valentin Senicourt <valentin.senicourt@1qbit.com> Co-authored-by: James Brown <james.brown@1qbit.com> Co-authored-by: ValentinS4t1qbit <valentin@goodchemistry.gmail> Co-authored-by: elloyd-1qbit <58313607+elloyd-1qbit@users.noreply.github.com> Co-authored-by: GitHub Actions <noreply@github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Support for UHF reference in SecondQuantizedMolecule.
Works for VQESolver, all ansatz except VSQS and CCSDSolver.