Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fixed URL bug in setup..py * Add dev branch to test.yml * Fixed a typo on custom rqaoa (#21) Co-authored-by: Eze <[email protected]> * updated the structure of device creation, including removing qpu_auth… (#19) * updated the structure of device creation, including removing qpu_auth and entire access_object structure; updated notebooks and tests * some changes missing from the previous commit * updated pytest.ini to exclude credentials based test_qpu_devices.py * commented credentials requiring part of notebooks * fixed: pyquil wavefunction simulator * update the readme * fix typos in the readme * addressed the comments on PR Co-authored-by: Leonardo Disilvestro <[email protected]> * fix: spelling issue in README and URL in setup.py * Dev logger unittests (#20) * Added Logger Class and partial result return feature * Minor changes to error messages * Updated to fit new results output structure * Changed workflow defaults and attribute names in optimizer_dict. Updated relevant tests * Logger histories are now empty if user does not request for logs * Bugfix: Updating the Number of Evaluations works * fixed test_sample_from_wavefunction * fixed URL bug in setup.py * Added Logger unittests * Fixed conflict * Removed Commented Print Statements * Bugfix: Removed Old Import Co-authored-by: Vishal Sharma <[email protected]> * updated README with badges * corrected location of OpenQAOA logo * Bugfix workflow backend properties and added templates (#26) * bugfix to set_backend_properties.asdict converting qiskit circuit to dictionary object * added issue and pull request templates, and new Code of conduct * Update README.md * Update README.md * Update README.md * fixed the cell that prints qiskit circuit using pylatexeenv leading to test failure * changes to README -- new badge, updated logo * updated image size in README * tagged python code in REDME, removed redundant checklist item from bug report template * addressed latest comments and updated new logo HD Co-authored-by: Leonardo Disilvestro <[email protected]> * Updated Logger Class with new inner representation of variables (#25) * BugFix: Number of evals now includes evaluations used for jacobian * Updated tests for new changes with derivatives_function * Updated Logger Class with Networkx relational structure * Updated unittests for changes to Logger Class * Bugfix: Changed the types for some of the entries in results_dict * Bugfix: Added defaults possible empty outputs in results_dictionary * Dev derivatives fix + training_vqa documentation (#18) * Parameter shift gradient computation fix + method to convert std to ext arguments in QAOAVariationalStandardParams * Fixed stochastic parameter shift derivative computation, and documentation of derivative_functions.py * Updated derivative_functions unit test for SPS gradient method * Updated documentation of training_vqa.py * Updated documentation of qaoa_optimizer.py * docstring fix to func: optimize_this in training_vqa.py * Update derivative_functions.py - Small docstring fix. - Added assertions for `param_shift` and `stoch_param_shift` to only allow Standard Parametrisation params, until support for Fourier and Extended is added later. * added parameter converter methods * fixed errors on derivative functions failing tests * fix to grad_sps method Co-authored-by: shaohen <[email protected]> Co-authored-by: Vishal Sharma <[email protected]> * moved issue templates * Update issue templates (#28) * Update issue templates * removed older issue templates * Bugfix in `qaoa_vectorized.py`, apply_gate methods - Fixed a few erroneous lines in`apply_ryy` and `apply_ryz` methods. * Dev rqaoa (#31) * Added features to RQAOA and added functions to utilities, updated tests accordingly * Fixed bugs on fetching QAOA parameters in expectation_values() * Removed qaoa_cost_backend from RQAOA and updated workflows to latest version of RQAOA * Removed unnecessary imports from utilities.py * Fixed bug in final_solution() inside rqaoa * Changed names of functions computing expectation values and fixed typos * Fixed new names in test_utilities Co-authored-by: Eze <[email protected]> * Update README.md * Dev derivatives migration (#30) * BugFix: Number of evals now includes evaluations used for jacobian * Updated tests for new changes with derivatives_function * Updated Logger Class with Networkx relational structure * Updated unittests for changes to Logger Class * Bugfix: Changed the types for some of the entries in results_dict * Moved derivative_function in QAOABaseBackend to derivative_functions.py * Updated unittests for new derivative location * Updated unittests in test_derivative * removed duplicate import statement * Added deepcopy of params in derivative * Moved qfim into its own python file * Update test_optimisers for qfim change * Added qfim_func_evals and Updated unittests * Raise NotImplemented if Shot-Based Backend * Bugfix: Missing import Co-authored-by: Vishal Sharma <[email protected]> * Updated CI to support codecov (#37) * Updated CI to support codecov * Update setup.py * Add codecov token to github action * Update test.yml * Add codecov badge to readme * Update codecoverage icon * Update qaoa_vectorized.py - Fixed bug in vectorised backend due to indexing/big endian <> little endian error for all rotation gates with X and Y components. * Update qaoa_vectorized.py - Fix phase difference between qiskit and vectorised. - Added definitions of RX, RY, RZ, RXX, RYY, RZZ gates in docstrings. * Update test_sim_qiskit.py - Fixed some errors in unit tests : (1) changed expectation of random real operator to expectation of complex Hermitian operator, (2) fixed indexing errors on expectation value comparison in `test_qaoa_circuit_wavefunction_expectation_equivalence` tests (3) changed the value of beta from 0 in some tests to other angles. - Added 2 tests : (1) nonuniform X mixer coefficients (2) Mixer Hamiltonian containing XX, YY, Y terms. * Update test_vectorised.py - Changed some tests to be consistent with change of global phase from recent RZZ, RZ and RX gate fixes. * Dev rqaoa (#40) * Modified RQAOA to handle isolated nodes, and corrected tests accordingly * Modified RQAOA to handle corner cases, modified Hamiltonian class function for consistency and modified unit tests to increase coverage * Modified docstrings in test_rqaoa and eliminated commented lines in rqaoa Co-authored-by: Eze <[email protected]> * Update qaoa_vectorized.py - Added check for shape of `prepend_state` : automatically reshapes to (2,2,...,2) form if the input is `(2**self.n_qubits,)`. * Update qaoa_vectorized.py - Copied wavefunction initialization from the `qaoa_circuit` method to the `init` of `QAOAvectorizedBackendSimulator`, so that `self.wavefn` is populated. * qaoa_vectorized.py documentation fix - Added missing factor of (1/2) in documentation of `apply_gate` methods. * - lowlevelgate.py bugfix - bugfix for RZX object : pauli gate is RXZ, but lowlevelgate is RZX. Fixed by changing name and interchanging indices appropriately. * update test_lowlevelgate.py - Fixed error arising from RZX <> RXZ change from previous commit. * Added unit tests for all apply_gate methods for vectorised in test_vectorised.py + bugfix for RXY gate + RXZ gate test inclusion in test_sim_qiskit.py * Moved hamiltonian creation outside of expectation and expectation_w_uncertainty methods, to init. * Improve problem classes (#43) * from problem classes -- removed ENCODING, renamed PUBO to QUBO and added unittests for problem classes * updates to problem.py * updated PUBO to QUBO in notebooks to pass tests * updated PUBO to QUBO in test_rqaoa.py * removed stale comments * updated PUBO to QUBO in README * added constant checking test * updates to vectorized wavefunction init * updates to vectorized backend * removed workflow and vectorized notebooks to fix conflicts with result object PR #34 * Result object (#34) * Obtain the optimisation soution and degeneracy in training vqa * Bugfix to Logger and Updates to Backends for new logger variable (#39) * Dev rqaoa (#31) * Added features to RQAOA and added functions to utilities, updated tests accordingly * Fixed bugs on fetching QAOA parameters in expectation_values() * Removed qaoa_cost_backend from RQAOA and updated workflows to latest version of RQAOA * Removed unnecessary imports from utilities.py * Fixed bug in final_solution() inside rqaoa * Changed names of functions computing expectation values and fixed typos * Fixed new names in test_utilities Co-authored-by: Eze <[email protected]> * Update README.md * Updated Logger with new naming scheme and removed dated comments * Dev derivatives migration (#30) * BugFix: Number of evals now includes evaluations used for jacobian * Updated tests for new changes with derivatives_function * Updated Logger Class with Networkx relational structure * Updated unittests for changes to Logger Class * Bugfix: Changed the types for some of the entries in results_dict * Moved derivative_function in QAOABaseBackend to derivative_functions.py * Updated unittests for new derivative location * Updated unittests in test_derivative * removed duplicate import statement * Added deepcopy of params in derivative * Moved qfim into its own python file * Update test_optimisers for qfim change * Added qfim_func_evals and Updated unittests * Raise NotImplemented if Shot-Based Backend * Bugfix: Missing import Co-authored-by: Vishal Sharma <[email protected]> * Added measurement outcomes to all available backends * Bugfix qaoa_wavefunction and Updated unittests * Added Results unittests * Changed entropica.vectorized to vectorized and Updated missing measurement_outcomes vectorized backend Co-authored-by: Ezequiel Rodríguez Chiacchio <[email protected]> Co-authored-by: Eze <[email protected]> Co-authored-by: Leonardo Disilvestro <[email protected]> Co-authored-by: Vishal Sharma <[email protected]> * Update workfloww notebook * Create the result class and add a basic test and a notebook showing its usage * Removed unncessary numpy casting * Statevectors will be returned as numpy arrays * update the result object and fix all subsequent bugs * update result object tests * Add documentation and more unit tests * add get counts method and fix the tests * fixed PUBO -> QUBO bug in notebook Co-authored-by: shahidee44 <[email protected]> Co-authored-by: Ezequiel Rodríguez Chiacchio <[email protected]> Co-authored-by: Eze <[email protected]> Co-authored-by: Vishal Sharma <[email protected]> Co-authored-by: shahidee <[email protected]> * update the qpu tests (#38) * update the qpu tests * Update pytest.ini * Update test.yml * Update unittests, credentials and test.yml * Updated test.yml * Bugfix Variable naming error in Device tests * Missing os import Co-authored-by: shahidee <[email protected]> * Create .coveragerc (#44) * Create .coveragerc * Update .coveragerc * changes to exp_val_hamiltonian_termwise and other subsequent changes (#45) * changes to exp_val_hamiltonian_termwise and other subsequent changes * added analytical in docstring and added test for Result.get_counts() * Added ShortestPath problem class * Added binary to ising conversion * Added tests for ShortestPath * pyQuil SWAP decomposition + minor modifications to pyQuil backend (#33) * Testing + update docstrings * Added active reset and rewiring (NAIVE/PARTIAL) support, and unit tests for them * Added check_edge_connectivity method to pyquil backend * Modified check_edge_connectivity to check on Program instead of Hamiltonian * Removed get_qaoa_backend from pyquil and vectorised unit test * For pyquil backend, added check for prepend state size at init * Added unit test for prepend state size * Update qaoa_pyquil_qpu.py Add cvar_alpha to the docstring and fixed the order of active reset and rewiring * Small change to qaoa_pyquil_qpu.py Changed default of `rewiring` to the blank string to be consistent with type hint, and added the blank string to the set of acceptable strings (pyQuil treats the blank string as None) * Cosmetic change to qaoa_pyquil_qpu.py changed if self.rewiring == 'PRAGMA INITIAL_REWIRING "NAIVE"' or self.rewiring == 'PRAGMA INITIAL_REWIRING "PARTIAL"' or self.rewiring == '': to if self.rewiring in ['PRAGMA INITIAL_REWIRING "NAIVE"', 'PRAGMA INITIAL_REWIRING "PARTIAL"', '']: * Update pauligate.py - Corrected decomposition of SWAP gate using native quil gates (RZ(theta), RX(+- pi/2), CZ, XY) * Update qaoa_pyquil_qpu.py - Modification to Hadamard gate creation : create in terms of native RX(+- pi/2) and RZ gates directly, instead of passing through the non-native H gate. * Update test_pyquil_qvm.py - Updated unit test to account for hadamard gate decomposition. * Update test_pyquil_qvm.py - Fixed `test_qaoa_pyquil_gate_names` to be consistent with change in H gate decomposition. Co-authored-by: shaohen <[email protected]> Co-authored-by: Leonardo Disilvestro <[email protected]> * Documentation RQAOA (#53) * Modified RQAOA examples notebook * Finalized RQAOA example notebook Co-authored-by: Eze <[email protected]> * Dev doc structure (#50) * improve doc structure and workflows documentation and testing * improve index structure * updates to the doc structure to include notebooks * add avanced parametrization example * add nb extension to setup * add pandoc * fix pandoc test * Fix pandoc github action * Fix verbose flags in the workflows * SH - documentation clean-ups (#51) * Documentation clean-ups * Change param-shift typo in workflows to param_shift * Update qaoa_parameters.py Co-authored-by: Leonardo Disilvestro <[email protected]> * Read the docs integration (#54) * Update conf.py * Update conf.py * add mock modules * add readthedocs yml * Add the readthedocs yml * add read the docs yml * update docs requirements * Update requirements.txt * Update .readthedocs.yml * Update .readthedocs.yml * Update requirements.txt * Update requirements.txt * Update requirements.txt * Update requirements.txt * Update requirements.txt * update readthedocs.yml * update readthedocs yml * Update requirements.txt * Update .readthedocs.yml * Update .readthedocs.yml * Added Jupyter Notebook Example related to the Parameter Classes and bugfix to QAOAVariationalBaseParams (#52) * Add Parameter Class Explainor Notebook * Bugfix: return __repr__ for __str__ in QAOAVariationalBaseParams * Added Parameter Class notebook example * Update unittest for identical output from __str__ and __repr__ * Renamed notebook and minor updates * Update .readthedocs.yml (#55) * Update .readthedocs.yml * Update .readthedocs.yml * Update .readthedocs.yml * Update README.md * Corrected typo in ShortestPath + fixed tests * Dev update notebooks (#56) * polishing notebooks for proper release and bgufixes on the way * updated advanced parameters notebook * dev_update_notebooks * added noise_model argument to backend_properties and added new notebook * Update qaoa_parameters.py Add qubit_layout argument to workflows * example notebooks updated, fixed workflow initialization bug * fixed notebook naming * fixed failing script tests * fixed docstring * fix tests and docs to compile with nw examples * Update test_notebooks.py * Fix noise tutorial * fix readthedocs tutorials * fix read the docs notebooks * fix read the docs notebooks * fix doc index Co-authored-by: Shao-Hen Chiew <[email protected]> Co-authored-by: Leonardo Disilvestro <[email protected]> * Updated docstring * Fixed small spelling errors * vectorised backend documentation fixes * Added error-raising when non-classical Hamiltonian is used in vectorised backend * Small change to avoid casting error when using -= * Update workflows unittest * Minor fixes to tests * Updated setup.py * try remove import sympy exception * renamed some variables and fixed spelling issues (#57) * renamed some variables and fixed spelling issues * bugfix workflow: create cost hamiltonian and then create mixer hamiltonian with appropriate n_qubits * notebook will all cells excuted * Update README.md * Update basebackend.py * fix typos * fixed trailing naming updates, renamed test_gates.py, fixed an issue with cvar * fixed trailing naming updates, fixed an issue with cvar * cost_function fix Co-authored-by: Shao-Hen Chiew <[email protected]> Co-authored-by: Leonardo Disilvestro <[email protected]> * direct fix to notebook 7, bug in mixer_creation * Commented out unused code * Modified setup.py * Updated unittests * Moved sympy import location * Commented out sympy import exception check * Removed unused code * Added test for Exception raising for non-classical Hamiltonians * Switched to using random graphs for each test * Add check for source and destination nodes * Add test for error assertion * Fixed test_set_circuit_properties_fourier_q * Fixed bug on FourierParams and added error message in utilities (#63) * Fixed bug on FourierParams and added error message in ground_state_hamiltonian * Fixed bug on QAOAVariationalFourierwithBiasParam and QAOAVariationalFourierExtendedParam classes Co-authored-by: Eze <[email protected]> * Bugfix vishal o qtesting session (#65) * few bugfixes from the OQ testing session * fixed plot_graph method formatting * fixed problem type assertion in compile function * some documentation fixes suggested during the OQ testing session * fixed linear_ramp_time issue and plot_graph colormap * plot_graph conditional bugfix * fixes to annealingparams and plot_graph suggestion * Added type-checking for Problem Classes and Changed Error Catching in Optimization Loop (#64) * Catch only ConnectionError in optimize * Updated type-checking for problem class creation * Bugfix: TSP and Knapsack Problem Creation * Bugfix: ShortestPath tab indentation error * Updated unittests for problem classes * Bugfix: TSP no error raised * Bugfix: plot_cost method * Fixes for optimizer options and corresponding unit test + docs (#66) * Fixes for optimizer options and corresponding unit test + documentation changes * minor workflow test fix * Remove top_k_solutions * Remove ExtraResults and top_k_solutions references everywhere * removed redundant conditional from trainng_vqa.py * Revert "Remove ExtraResults and top_k_solutions references everywhere" This reverts commit 05ead73. reverting to previous commit because the change broke since maxfev does not work with all optimizers * fixed failing issues * adding conditionals back * added conditionals for `maxfev` Co-authored-by: Vishal Sharma <[email protected]> Co-authored-by: Leonardo Disilvestro <[email protected]> Co-authored-by: Ezequiel Rodríguez Chiacchio <[email protected]> Co-authored-by: Eze <[email protected]> Co-authored-by: shahidee44 <[email protected]> Co-authored-by: Shao-Hen Chiew <[email protected]> Co-authored-by: shaohen <[email protected]> Co-authored-by: shaohenc <[email protected]> Co-authored-by: shahidee <[email protected]> Co-authored-by: Kilian <[email protected]> Co-authored-by: Shao Hen <[email protected]>
- Loading branch information