-
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
Add QMF and QCC capabilities and tests; small fix to scbk transform in statvector_mapping.py when n_spinorbitals == 4. #91
Conversation
…s and tests; small fix to scbk in transform statvector_mapping.py when n_spinorbitals == 4.
Hey guys, I am struggling to resolve two failures during testing, both related to H4, and need some help. I thought I heard Alexandre say yesterday that H4 issues were resolved, but maybe I misunderstood. Here are some details:
Thanks |
Hi Marc, The Hamiltonian for H4 that is generated appears to be non-deterministic. I believe this is due to sign switches in the eigenvectors of the Fock-Matrix when generating the mean-field. Three choices.
You can skip the test by using @unittest.skip("non-deterministic Hamiltonian (or whatever message you think helps)")
def test_qmf_qcc_H4(self): |
…; various code review fixes
…; various code review fixes
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.
Most of the code structure and flow looks great!
There are multiple syntax issues that would be caught by a python linter. If you need help setting that up let me know.
Other comments:
- Spin should be included in state preparation and mapping transform
- You should try and include QMF and QCC into BuiltInAnsatz and VQESolver
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.
I like the separation of the code in many files like _qubit_cc.py
and _qubit_mf.py
, it is clean.
I only have small comments in my review. I would also suggest to add a test or two in tangelo.algorithms.variational.tests/test_vqe_solver.py
for letting the parameter optimization do its thing (after the addition in BuiltInAnsatze like James suggested). It would test the "all default" computation with QCC
and/or QMF
ansatze.
James and Alexandre, James, thanks for mentioning that I should use python linter. I ended up making significant changes (hopefully for the better) to the code as I was playing around with and learning the tool. Also, thanks for pointing out that I should be using spin for state preparation and mapping. I think I have that all squared away now. As I mentioned to Alexandre, QMF and QCC are in VQESolver and I added QMF and QCC tests for H2, H4, and H4+. They seem to be failing though, so I may have to revise that a bit. |
I think we are very close. Almost everything has been addressed. The only thing that has not been resolved is having only one empty line at the end of each file. Most of your files have 2. |
Great. That is strange. I am looking at the files now and they all have just one line at the end. Found a few typos and I simplified the Hamiltonian penalty stuff in qmf.py. I will push those changes in a few minutes. I set a delta to 1e-2 in one of the test_vqe_solver.py tests. Thought it was a bit high but wanted to see if you guys said anything. Is that fine? The QCC H4 energy fluctuates significantly. |
|
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.
Good work overall, most comments are me pointing out the same sort of situation several times. overall:
-
Avoid randomness in testing. Either remove the randomness from the algorithm if relevant, or run the random algorithm and "freeze" certain values in the test (e.g provide them as input) to be able to reproduce that thing everytime.
-
If we know exactly what statement may cause an error and can use a
if
statement to raise the error in the appropriate situation, lets use that instead oftry
andexcept
. -
types in docstrings need to be in parentheses, you're not always consistent. The type itself does not matter too much as what you write is read by a human in the docs.
-
Some little tips about list comprehension and
sum
.
2^nq - 1 generators, where nq is the number of qubits. By constructing the DIS, | ||
it is possible to identify O(N * 2^nq - 1) generators that are strong energy- | ||
lowering candidates for the QCC ansatz at a cost of O(N) gradient evaluations. | ||
In constrast, a brute force strategy requires O(4^nq) gradient evaluations. |
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.
contrast
brute-force
"""This module implements functions to create the direct interaction set (DIS) | ||
of generators for the qubit coupled cluster (QCC) ansatz and is based on Ref. 1 | ||
below. The DIS consists of generator groups that are characterized by the | ||
magnitude of the QCC energy gradient with respect to a variational paramter tau, |
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.
parameter
operators and with an odd number of Y operators. | ||
|
||
Args: | ||
qmf_var_params numpy array of float: The QMF variational parameter set {Omega}. |
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.
I think we need to specify the type in parentheses in the proper way here. We probably have examples online or somewhere else in the codebase.
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.
Yes this was a mistake on my part. I misunderstood a comment from a reviewer for things like list of list or tuple of list, etc. and removed them. I've added them all back in.
# Supported reference state initialization | ||
self.supported_reference_state = {"HF"} | ||
# Supported var param initialization | ||
self.supported_initial_var_params = {"zeros", "ones", "random"} |
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.
see comment below
with a user-specified Hamiltonian (e.g. a penalized mean field qubit Hamiltonian from | ||
a mean field simulation with the QMF ansatz class). If not None, then the fermionic | ||
Hamiltonian in molecule is ignored. Default, None. | ||
qmf_var_params list or numpy array of float: The QMF parameter variational set {Omega}. |
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.
type
If None, build the QCC operator with one generator from each DIS group characterized by | ||
|dEQCC/tau| >= qcc_deriv_thresh. If max_qcc_gens is an int, then use | ||
min(size(DIS), max_qcc_gens) generators to build the QCC operator. Default, None. | ||
qubit_op_list list of QubitOperator: A list of generators to use when building the QCC |
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.
type
""" | ||
|
||
import warnings | ||
from random import choice |
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.
may be removed depending on what you do with your code
…nd its test; a fix suggested suggested for qmf.py could be applied to nearly all other ansatz classes, so it was.
…ed instead of a list.
Hello everyone, I want to let you know that I've finished going through all of the remaining comments from each of your reviews and pushed the code. |
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.
Good work, a few more suggestions. Usually to clarify some code or propose a more concise alternatives. After this batch, we are probably good to merge !
for qham_items in qubit_ham.terms.items()) | ||
flip_idxs = list(filter(None, (get_idxs_deriv(q_gen[0], *q_gen[1]) for q_gen in qham_gen))) | ||
|
||
candidates = {} |
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.
Ambiguous: please initialize this with dict()
or set()
:)
It can be underneath your L112 comment too, neatly grouped with the lines saying what it contains
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.
I had that originally but I changed it based on the following output from pylint:
tangelo/toolboxes/ansatz_generator/_qubit_cc.py:108:17: R1735: Consider using {} instead of dict() (use-dict-literal)
No problem to use dict() so I'll change it. But out of curiosity, is this just a matter of style or is pylint making unsound suggestions?
# Create a list of Y operator indices. | ||
xy_idxs = list(combinations(group_idxs, n_y)) | ||
for xy_idx in xy_idxs: | ||
gen_list = [] |
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.
How do you feel about replacing L175-179 by the L177 comment and just:
gen_list = [(idx, "Y") if idx in xy_idx else (idx, "X") for idx in group_idxs]
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.
nice, i like it.
if verbose: | ||
print_msg = f"Purified QMF_{i} Bloch angles: (theta, phi) = ({pure_var_params[i]},"\ | ||
f" {pure_var_params[i + n_qubits]})\n" | ||
print(print_msg) |
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.
We could print it directly, too (L132), unless you feel readability or functionality is impaired
state to the current QMF state. | ||
""" | ||
|
||
pure_var_params, n_qubits = qmf_var_params.tolist(), qmf_var_params.size // 2 |
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.
Do we need pure_var_params
to be a list ? I see we cast it as a numpy array at L135, and we manipulate it using subscription ([ ]
)). I'm gonna assume that it's a trick to get a copy of qmf_var_params
, which could be done direcly with numpy.copy
instead or using a list as proxy: https://numpy.org/doc/stable/reference/generated/numpy.copy.html
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.
Indeed a trick from the legacy code that needed adjusted. thanks
# Adjust the theta Bloch angles | ||
for i, theta in enumerate(qmf_var_params[:n_qubits]): | ||
c_0, c_1 = np.cos(0.5 * theta), np.sin(0.5 * theta) | ||
if abs(c_0) >= abs(c_1): |
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.
Since statements at L127-129 are complementary (e.g they cover all possibilities and the code necessarily takes a branch or the other), the 4 lines L127-130 can be refactored as
pure_var_params[i] = 0. if abs(c_0) >= abs(c_1) else np.pi
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.
Originally, the equality was not here and abs(c_0) == abs(c_1) was implied by an else clause that triggered a random choice of either 0 or pi for the theta value. I eliminated this after our discussion about non-deterministic codes. I'm still thinking about what the best thing to do in this situation.
I think I will go with my current plan, which is to use the HF occupation vector and reset the theta value to its original value based on the initial QMF state.
I moved the call to purify the QMF wave function outside of _qubit_cc.py and into qcc.py right before construct_dis is called so the purified qmf_var_params can be passed directly.
initial_var_params = np.array(var_params) | ||
except AssertionError: | ||
raise ValueError(f"Expected {self.n_var_params} variational parameters but received {len(var_params)}.") | ||
elif np.array(var_params).size == self.n_var_params: |
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.
see comment about other ansatz
var_params = np.array(var_params) | ||
except AssertionError: | ||
raise ValueError(f"Expected {self.n_var_params} variational parameters but received {len(var_params)}.") | ||
elif np.array(var_params).size == self.n_var_params: |
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.
see other comments
""" | ||
|
||
def __init__(self, molecule, mapping="JW", up_then_down=False, qcc_guess=1.e-1,\ | ||
qcc_deriv_thresh=1.e-3, max_qcc_gens=None, qubit_op_list=None, qubit_mf_ham=None,\ |
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.
can we please align this with (
?
initial_var_params = np.zeros((self.n_var_params,), dtype=float) | ||
elif var_params == "qcc_guess": | ||
initial_var_params = self.qcc_guess * np.ones((self.n_var_params,)) | ||
elif np.array(var_params).size == self.n_var_params: |
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.
see comments about other ansatz
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.
Great work, Marc !
* Sphinx docs (#76) * Fixing CCSDSolver.get_rdm() with frozen orbitals and energy from RDMs (#81) * small fixes to allow initial density matrix for faster noisy sampling with cirq (#84) * Branding (Tangelo, Good Chemistry Company) (#87) * Name change: backendbuddy -> linq (#93) * added multi-controls multi-targets, extra gates (#88) * Add QMF and QCC capabilities and tests (#91) * JKMN mapping implementation (#95) * added inverse function to Circuit (#78) * added pycodestyle tests (#96) * Circuit methods (repetition operator, equality, trim and split methods) (#101) * Staged controlled time (#100) * Support for name attribute in Circuit class (#110) * Derandomized + Adaptive Classical Shadows (#111) * added vsqs ansatz (#109) * Staged richardson (#99) * Majorana pool for ADAPT (#114) * Copy gate data instead of referencing it when instantiation Circuit object (#118) * Fixed QEMIST Cloud QPU connection ctrl-c in job_result. (#121) * Estimate QPU cost with QEMIST Cloud API. (#120) * Improvements for handling exp data with ClassicalShadow (#124) * Qulacs operator build changed to fix memory leak (#122) Co-authored-by: ValentinS4t1qbit <[email protected]> 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]>
* v0.3.0 into main (#127) * Sphinx docs (#76) * Fixing CCSDSolver.get_rdm() with frozen orbitals and energy from RDMs (#81) * small fixes to allow initial density matrix for faster noisy sampling with cirq (#84) * Branding (Tangelo, Good Chemistry Company) (#87) * Name change: backendbuddy -> linq (#93) * added multi-controls multi-targets, extra gates (#88) * Add QMF and QCC capabilities and tests (#91) * JKMN mapping implementation (#95) * added inverse function to Circuit (#78) * added pycodestyle tests (#96) * Circuit methods (repetition operator, equality, trim and split methods) (#101) * Staged controlled time (#100) * Support for name attribute in Circuit class (#110) * Derandomized + Adaptive Classical Shadows (#111) * added vsqs ansatz (#109) * Staged richardson (#99) * Majorana pool for ADAPT (#114) * Copy gate data instead of referencing it when instantiation Circuit object (#118) * Fixed QEMIST Cloud QPU connection ctrl-c in job_result. (#121) * Estimate QPU cost with QEMIST Cloud API. (#120) * Improvements for handling exp data with ClassicalShadow (#124) * Qulacs operator build changed to fix memory leak (#122) Co-authored-by: ValentinS4t1qbit <[email protected]> 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]>
* Bump develop to v0.3.0 (#127) (#128) * v0.3.0 into main (#127) * Sphinx docs (#76) * Fixing CCSDSolver.get_rdm() with frozen orbitals and energy from RDMs (#81) * small fixes to allow initial density matrix for faster noisy sampling with cirq (#84) * Branding (Tangelo, Good Chemistry Company) (#87) * Name change: backendbuddy -> linq (#93) * added multi-controls multi-targets, extra gates (#88) * Add QMF and QCC capabilities and tests (#91) * JKMN mapping implementation (#95) * added inverse function to Circuit (#78) * added pycodestyle tests (#96) * Circuit methods (repetition operator, equality, trim and split methods) (#101) * Staged controlled time (#100) * Support for name attribute in Circuit class (#110) * Derandomized + Adaptive Classical Shadows (#111) * added vsqs ansatz (#109) * Staged richardson (#99) * Majorana pool for ADAPT (#114) * Copy gate data instead of referencing it when instantiation Circuit object (#118) * Fixed QEMIST Cloud QPU connection ctrl-c in job_result. (#121) * Estimate QPU cost with QEMIST Cloud API. (#120) * Improvements for handling exp data with ClassicalShadow (#124) * Qulacs operator build changed to fix memory leak (#122) Co-authored-by: ValentinS4t1qbit <[email protected]> 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]> * Recomputing MF when working with atom indices in DMET (#130) * Recomputing and testing MF when working with atom indexes. Change Localization import level. * More gates for openqasm translator (#129) * Added CZ, CY, CRz, CP, CSWAP and SWAP to openqasm translator * fixed return for return_phase=False in trotterize (#133) * fixed return for return_phase=False in trotterize * ONIOM problem reformulation (#119) * Updated ONIOM notebook use case * QubitHamiltonian get_operators bug (#131) * Fixed get_operators bug + added a test. * Measurement map (#134) * Measurement map + extending qwc partioning with repetition * Working state, cleaning is wip. * Givens gate (#135) * added givens gate decomposition Co-authored-by: ValentinS4t1qbit <[email protected]> * Notebook classical shadow (#123) Classical shadows notebook. It has been added to tests as well Co-authored-by: ValentinS4t1qbit <[email protected]> * added class to prepare or decompute an arbitrary statevector (#137) * Many small todos (#138) * Add an explanation how Circuit.reindex_qubits method is working. * ClassicalShadows.simulate only unique circuit (massive speedup). * Better management of backend options in VQESolver. * CS notebook update. * Comment fix for new return. * No need of n_electrons with ref_state==zero. * Change method for simulate (noisy?). * Diag coulomb (#136) * diagonalizing circuits implemented and tested * improvements to jkmn leaf->majorana selection (#139) * improvements to jkmn leaf->majorana selection * Use of get_vector function. * Change constructors -> classmethod. * Change interface + working state. * Stage where I have to write tests. * Test for HybridOperator and Z2 tapering. * Conformance tests + typos. * Moved file + typos. * Added tests for matrix manip. * Full path of load_operator in tests. * Permit all active orbitals partially occupied (#146) * ONIOM capping with chemical groups (#141) * Implementation for other chemical groups capping in ONIOM. Tests, docs. * uccgd ansatz (#144) * uccgd ansatz for use in SA-OO-VQE * First round + added spin=\=0 fix. * Support for symmetry, now call pyscf directly (#147) * call pyscf directly, symmetry now supported * Rotosolve implementation as an optimizer for parameterized circuits (#142) * rotosolve implementation and tests * ONIOM multisolvers (#143) * Multisolver support in ONIOM * Added others solvers to ONIOM, added tests and ROHF support (RHF->HF). * sa_vqe_solver from sa-oo-vqe branch * added import to __init__ * fixes for PR * clearer documentation * change statevector jkmn * replaced jkmn_prep_circuit with jkmn_prep_vector * Fixed error message. * Some reviews. * JKMN z2 tapering tests. * Docstrings in tests. * Speed improvement + bitwise operations + moved collapse function. * Passing conformance tests. * added state averaged orbital optimized files * merged molecule symmetry changes * Update test_hybridoperator.py aligning. * Hybrid -> Multiform. * Small fixes. * PR changes * support for reading in xyz files (#151) * support for reading in xyz files * Update z2_tapering.py * Update sa_oo_vqe_solver.py * Ilc ansatz (#132) * Add ILC ansatz class * updates to qmf, qcc, and ilc ansatz classes * enable QMF and ILC classes to read-in and process data from OpenFermion *.hdf5 files and other small fixes. Co-authored-by: ValentinS4t1qbit <[email protected]> * Updating information, and adding Windows install comment (#155) * Quantum deflation (#152) * added deflation * added ref_states as circuit and to VQESolver * added ref_state and deflation to adapt vqe Co-authored-by: ValentinS4t1qbit <[email protected]> * changed default basis to crenbl in pyscf, added ecp option (#156) * changed default basis to crenbl for pyscf to retrieve number of electrons & atoms, added ecp option * Cancel redundant gates (#153) * Functions / methods to remove small rotations, and remove gates that cancel each other * Circuit depth (#159) * Depth method for Circuit class * MI-FNO link (#157) * MI-FNO helper class. Added tests + reconstruction of MI energy, support for building sermonic operators for fragments * Iqcc solver (#154) * iQCC solver, frobenius norm compression method on QubitOperator Co-authored-by: ValentinS4t1qbit <[email protected]> * MIFNO notebook (#161) * MIFNO notebook. Added to tests and sphinx docs Co-authored-by: Valentin Senicourt <[email protected]> Co-authored-by: ValentinS4t1qbit <[email protected]> * Docs fix + tutorials removal from sphinx docs (#162) * Docs: requirements.txt no longer needed. Tutorials removed from generated docs (redundant with Github, issues with latex, looks better on github and will display images once repo is public Co-authored-by: AlexandreF-1qbit <[email protected]> * readme upgrade (#164) * readme upgrade and images, contributions.rst for code of conduct mention * Fixes for docs and readme, files for Pypi (#166) * Docs and readme fixed with feedback. Pypi file removed as it hinders the installation from source process: a guide will be provided to maintainer team for pypi update. Co-authored-by: AlexandreF-1qbit <[email protected]> * Version number and changelogs bumped 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]>
* v0.3.0 into main (#127) * Sphinx docs (#76) * Fixing CCSDSolver.get_rdm() with frozen orbitals and energy from RDMs (#81) * small fixes to allow initial density matrix for faster noisy sampling with cirq (#84) * Branding (Tangelo, Good Chemistry Company) (#87) * Name change: backendbuddy -> linq (#93) * added multi-controls multi-targets, extra gates (#88) * Add QMF and QCC capabilities and tests (#91) * JKMN mapping implementation (#95) * added inverse function to Circuit (#78) * added pycodestyle tests (#96) * Circuit methods (repetition operator, equality, trim and split methods) (#101) * Staged controlled time (#100) * Support for name attribute in Circuit class (#110) * Derandomized + Adaptive Classical Shadows (#111) * added vsqs ansatz (#109) * Staged richardson (#99) * Majorana pool for ADAPT (#114) * Copy gate data instead of referencing it when instantiation Circuit object (#118) * Fixed QEMIST Cloud QPU connection ctrl-c in job_result. (#121) * Estimate QPU cost with QEMIST Cloud API. (#120) * Improvements for handling exp data with ClassicalShadow (#124) * Qulacs operator build changed to fix memory leak (#122) Co-authored-by: ValentinS4t1qbit <[email protected]> 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]> * Update _version.py * Update to release/v0.3.1 (#167) * Bump develop to v0.3.0 (#127) (#128) * v0.3.0 into main (#127) * Sphinx docs (#76) * Fixing CCSDSolver.get_rdm() with frozen orbitals and energy from RDMs (#81) * small fixes to allow initial density matrix for faster noisy sampling with cirq (#84) * Branding (Tangelo, Good Chemistry Company) (#87) * Name change: backendbuddy -> linq (#93) * added multi-controls multi-targets, extra gates (#88) * Add QMF and QCC capabilities and tests (#91) * JKMN mapping implementation (#95) * added inverse function to Circuit (#78) * added pycodestyle tests (#96) * Circuit methods (repetition operator, equality, trim and split methods) (#101) * Staged controlled time (#100) * Support for name attribute in Circuit class (#110) * Derandomized + Adaptive Classical Shadows (#111) * added vsqs ansatz (#109) * Staged richardson (#99) * Majorana pool for ADAPT (#114) * Copy gate data instead of referencing it when instantiation Circuit object (#118) * Fixed QEMIST Cloud QPU connection ctrl-c in job_result. (#121) * Estimate QPU cost with QEMIST Cloud API. (#120) * Improvements for handling exp data with ClassicalShadow (#124) * Qulacs operator build changed to fix memory leak (#122) Co-authored-by: ValentinS4t1qbit <[email protected]> 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]> * Recomputing MF when working with atom indices in DMET (#130) * Recomputing and testing MF when working with atom indexes. Change Localization import level. * More gates for openqasm translator (#129) * Added CZ, CY, CRz, CP, CSWAP and SWAP to openqasm translator * fixed return for return_phase=False in trotterize (#133) * fixed return for return_phase=False in trotterize * ONIOM problem reformulation (#119) * Updated ONIOM notebook use case * QubitHamiltonian get_operators bug (#131) * Fixed get_operators bug + added a test. * Measurement map (#134) * Measurement map + extending qwc partioning with repetition * Working state, cleaning is wip. * Givens gate (#135) * added givens gate decomposition Co-authored-by: ValentinS4t1qbit <[email protected]> * Notebook classical shadow (#123) Classical shadows notebook. It has been added to tests as well Co-authored-by: ValentinS4t1qbit <[email protected]> * added class to prepare or decompute an arbitrary statevector (#137) * Many small todos (#138) * Add an explanation how Circuit.reindex_qubits method is working. * ClassicalShadows.simulate only unique circuit (massive speedup). * Better management of backend options in VQESolver. * CS notebook update. * Comment fix for new return. * No need of n_electrons with ref_state==zero. * Change method for simulate (noisy?). * Diag coulomb (#136) * diagonalizing circuits implemented and tested * improvements to jkmn leaf->majorana selection (#139) * improvements to jkmn leaf->majorana selection * Use of get_vector function. * Change constructors -> classmethod. * Change interface + working state. * Stage where I have to write tests. * Test for HybridOperator and Z2 tapering. * Conformance tests + typos. * Moved file + typos. * Added tests for matrix manip. * Full path of load_operator in tests. * Permit all active orbitals partially occupied (#146) * ONIOM capping with chemical groups (#141) * Implementation for other chemical groups capping in ONIOM. Tests, docs. * uccgd ansatz (#144) * uccgd ansatz for use in SA-OO-VQE * First round + added spin=\=0 fix. * Support for symmetry, now call pyscf directly (#147) * call pyscf directly, symmetry now supported * Rotosolve implementation as an optimizer for parameterized circuits (#142) * rotosolve implementation and tests * ONIOM multisolvers (#143) * Multisolver support in ONIOM * Added others solvers to ONIOM, added tests and ROHF support (RHF->HF). * sa_vqe_solver from sa-oo-vqe branch * added import to __init__ * fixes for PR * clearer documentation * change statevector jkmn * replaced jkmn_prep_circuit with jkmn_prep_vector * Fixed error message. * Some reviews. * JKMN z2 tapering tests. * Docstrings in tests. * Speed improvement + bitwise operations + moved collapse function. * Passing conformance tests. * added state averaged orbital optimized files * merged molecule symmetry changes * Update test_hybridoperator.py aligning. * Hybrid -> Multiform. * Small fixes. * PR changes * support for reading in xyz files (#151) * support for reading in xyz files * Update z2_tapering.py * Update sa_oo_vqe_solver.py * Ilc ansatz (#132) * Add ILC ansatz class * updates to qmf, qcc, and ilc ansatz classes * enable QMF and ILC classes to read-in and process data from OpenFermion *.hdf5 files and other small fixes. Co-authored-by: ValentinS4t1qbit <[email protected]> * Updating information, and adding Windows install comment (#155) * Quantum deflation (#152) * added deflation * added ref_states as circuit and to VQESolver * added ref_state and deflation to adapt vqe Co-authored-by: ValentinS4t1qbit <[email protected]> * changed default basis to crenbl in pyscf, added ecp option (#156) * changed default basis to crenbl for pyscf to retrieve number of electrons & atoms, added ecp option * Cancel redundant gates (#153) * Functions / methods to remove small rotations, and remove gates that cancel each other * Circuit depth (#159) * Depth method for Circuit class * MI-FNO link (#157) * MI-FNO helper class. Added tests + reconstruction of MI energy, support for building sermonic operators for fragments * Iqcc solver (#154) * iQCC solver, frobenius norm compression method on QubitOperator Co-authored-by: ValentinS4t1qbit <[email protected]> * MIFNO notebook (#161) * MIFNO notebook. Added to tests and sphinx docs Co-authored-by: Valentin Senicourt <[email protected]> Co-authored-by: ValentinS4t1qbit <[email protected]> * Docs fix + tutorials removal from sphinx docs (#162) * Docs: requirements.txt no longer needed. Tutorials removed from generated docs (redundant with Github, issues with latex, looks better on github and will display images once repo is public Co-authored-by: AlexandreF-1qbit <[email protected]> * readme upgrade (#164) * readme upgrade and images, contributions.rst for code of conduct mention * Fixes for docs and readme, files for Pypi (#166) * Docs and readme fixed with feedback. Pypi file removed as it hinders the installation from source process: a guide will be provided to maintainer team for pypi update. Co-authored-by: AlexandreF-1qbit <[email protected]> * Version number and changelogs bumped 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: 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]>
No description provided.