Skip to content

Commit

Permalink
Update to release/v0.3.1 (#167)
Browse files Browse the repository at this point in the history
* 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]>
  • Loading branch information
9 people authored Jun 16, 2022
1 parent 5ef8b11 commit 745f5ab
Show file tree
Hide file tree
Showing 142 changed files with 7,345 additions and 1,033 deletions.
26 changes: 22 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,28 @@

This file documents the main changes between versions of the code.


## [0.3.1] - 2022-06-15

### Added

- Depth method for circuits, gate cancellation methods for simple optimisations
- QCC-ILC and iQCC solver
- Support for MI-FNO fragments coming from QEMIST Cloud
- ONIOM notebook
- Quantum deflation
- SA-VQE solver, SA-OO-VQE solver
- HybridOperator for speedup for QubitOperator on certain operations in stabilizer notation
- Support for symmetry in pyscf computations

### Changed

- DMET recomputes mean-field when working with atom indices, to fix bug.
- Documentation, README, CONTRIBUTIONS

### Deprecated


## [0.3.0] - 2022-02-15

### Added
Expand All @@ -18,7 +40,3 @@ This file documents the main changes between versions of the code.
- Naming (Good Chemistry, Tangelo, linq)

### Deprecated

[Unreleased]: https://github.com/goodchemistryco/Tangelo/compare/0.3.0...HEAD

[0.3.0]: https://github.com/goodchemistryco/Tangelo/compare/32d64fe9c59441f3158942c61beac031d18f3120...0.3.0
15 changes: 10 additions & 5 deletions CONTRIBUTIONS.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Contributions guidelines
========================

Thank you very much for considering contributing to this project; we’d love to have you on board !
Thank you very much for considering contributing to this project !

Do not feel intimidated by the guidelines and processes we describe in this document: we are here to assist you and help you take things to the finish line. We do not expect you to be an expert in software development or to get everything right on the first attempt: don’t hesitate to open an issue or a pull request, or simply contact us.

Expand All @@ -12,13 +12,18 @@ By joining the Tangelo community and sharing your ideas and developments, you ar
Tangelo is under licence `Apache 2.0 <http://www.apache.org/licenses/LICENSE-2.0>`_.


Code of conduct
---------------

Tangelo currently does not have its own code of conduct, but values such as respect and inclusiveness are very important to us. The following `covenant <https://www.contributor-covenant.org/version/1/4/code-of-conduct/>`_ is a good reflection of the kind of environment we want to foster. Please have a quick look.


Feature requests, bug reports
-----------------------------

Have a look at the issue tab, and complete the adequate issue template if needed: there's one for feature request, bug reports, and more. If it turns out the issue ticket you wanted to bring up already exists, please consider leaving a thumbs up or participate in the conversation to help us prioritize or move things forward. It's important to know what matters to users, to take our collaborative project in the right direction: all of this is very useful !



Pull request and code review process
------------------------------------

Expand Down Expand Up @@ -71,16 +76,16 @@ Now when you go to https://github.com/goodchemistryco/Tangelo, you should be abl
Several Tangelo users will receive a notification, and will review your code and leave comments in the PR. You can reply to these comments, or simply apply the recommended changes locally, and then commit and push them like above: it automatically updates your PR.
If there are conflicts, you can solve them locally and push, or directly through Github.

Getting your code reviewed can feel intimidating, but remember it's just part of a standard process: everyone has to go through it (even the main developers) and it is actually uncommon for PRs to be approved without changes or questions first. We suggest you have a look at how other files of this project (source code, tests, docs...) are written, and follow the same format fom the start to avoid having to make a lot of changes to your code later on.
Getting your code reviewed can feel intimidating, but remember it's just part of a standard process: everyone has to go through it (even the main developers) and it is actually uncommon for PRs to be approved without changes or questions first. We suggest you have a look at how other files of this project (source code, tests, docs...) are written, and follow the same format from the start to avoid having to make a lot of changes to your code later on.

We require that you write tests for your code, as well as the docstrings for it. Don't worry: we're here to help and there are plenty examples in the repo.
We require that you write tests for your code, as well as the docstrings for it. Don't worry: there are plenty examples in the repo.
We usually follow the `PEP8 guidelines <https://www.python.org/dev/peps/pep-0008/>`_ for our code. If you're using an IDE (Pycharm, etc), it may automatically highlight the part of your code that is not following PEP8, and should be able to automatically reformat your code too.

Every time you open a PR or push more code into an open one, several automated processes are launched and can be monitored on Github: we need them to be successful. We elaborate on them in the section below.


Continuous integration
=======================
======================

When a pull request is created or updated, several automated processes are launched. You will find most of them in the "checks" tab of your pull request, and can look into the details. These processes check for a few things:

Expand Down
118 changes: 94 additions & 24 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,25 +1,57 @@
Tangelo overview
================
|tangelo_logo|

|maintainer|
|licence|
|build|
|dev_branch|
.. |tangelo_logo| image:: ./docs/source/_static/img/tangelo_logo_gradient.png
:width: 600
:alt: tangelo_logo

|maintainer| |licence| |systems| |dev_branch|

..
|build|
.. |maintainer| image:: https://img.shields.io/badge/Maintainer-GoodChemistry-blue
:target: https://goodchemistry.com
.. |licence| image:: https://img.shields.io/badge/License-Apache_2.0-green
:target: https://github.com/goodchemistryco/Tangelo/blob/main/LICENSE
.. |systems| image:: https://img.shields.io/badge/OS-Linux%20MacOS%20Windows-7373e3
.. |dev_branch| image:: https://img.shields.io/badge/DevBranch-develop-yellow
.. |build| image:: https://github.com/goodchemistryco/Tangelo/actions/workflows/continuous_integration.yml/badge.svg
:target: https://github.com/goodchemistryco/Tangelo/actions/workflows/continuous_integration.yml
.. |dev_branch| image:: https://img.shields.io/badge/DevBranch-staging_0.3.0-yellow

Welcome !

Tangelo is an open-source python package developed by `Good Chemistry Company <https://goodchemistry.com>`_, focusing on the development of end-to-end material simulation workflows on quantum computers.
Tangelo is an open-source and free Python package maintained by `Good Chemistry Company <https://goodchemistry.com>`_, focusing on the development of end-to-end material simulation workflows on quantum computers.

Tackling chemical systems with quantum computing is not easy. Leveraging pre- and post-processing techniques as well as insights from classical calculations remain necessary, in order to make a
non-trivial use cases computationally tractable and develop efficient approaches returning accurate results on simulators or quantum devices.
Assembling the different building blocks to form and explore workflows that meet these constraints is where Tangelo strives to be of
help.

|workflow|

.. |workflow| image:: ./docs/source/_static/img/quantum_workflow.png
:width: 700
:alt: tangelo_workflow

This package provides a growing collection of algorithms and toolboxes, including problem decomposition, to support the development of and the design of successful experiments on quantum devices. Tangelo is backend-agnostic,
so that users can write code once and experiment with current and future platforms with minimal changes.

Tangelo was used to perform quantum experiments that led to `peer-reviewed work <https://www.nature.com/articles/s42005-021-00751-9>`_
published in scientific journals,
co-authored by professionals from the chemical industry and quantum hardware manufacturers.

|curve|

Its modular design and ease-of-use enables users to easily assemble custom workflows, tinker and define their own building blocks, while keeping track of quantum resource requirements, such as number of qubits, gates or measurements. Through problem decomposition techniques, users can scale up beyond toy models and study the impact of quantum computing on more industrially-relevant use cases. Tangelo is backend-agnostic and compatible with many existing open-source frameworks, making the integration of third-party tools such as state-of-the-art simulators, circuit compilers or quantum cloud services straightforward. It is our wish to develop a community around Tangelo, collaborate, and together leverage the best of what the field has to offer.
.. |curve| image:: ./docs/source/_static/img/curve_dmet_qcc.png
:width: 400
:alt: curve

We hope to grow a healthy community around Tangelo, collaborate, and together leverage the best of what the field has to offer.

- Our paper on arXiv (link updated as soon as available)
- Our `Sphinx documentation <http://tangelo-docs.goodchemistry.com>`_.

What will you do with Tangelo ?

Install
-------
Expand All @@ -33,13 +65,18 @@ This package requires a Python 3 environment. We recommend:
Using pip
^^^^^^^^^

TODO: once this package is available on pypi, give the command.
The easiest way to install Tangelo in your environment. We recommend upgrading pip first:

.. code-block::
python -m pip install -–upgrade pip.
pip install tangelo-gc
From source, using setuptools
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

This package can be installed by downloading or cloning the contents of this repository, and typing the following command in the
root directory:
This package can be installed locally by copying the contents of this repository to any machine.
Type the following command in the root directory:

.. code-block::
Expand All @@ -52,7 +89,7 @@ separately with ``pip``\ , before trying again.
Optional dependencies
^^^^^^^^^^^^^^^^^^^^^

Tangelo enables users to target various backends. In particular, it integrates quantum circuit simulators such as
Tangelo enables users to target various backends. In particular, it integrates quantum circuit simulators such as
``qulacs``\ , ``qiskit``\ , ``cirq`` or ``qdk``. We leave it to you to install the packages of your choice.
Most packages can be installed through pip in a straightforward way:

Expand All @@ -63,9 +100,28 @@ Most packages can be installed through pip in a straightforward way:
pip install cirq
...
Depending on your OS and environment, some of these packages may be more challenging to install. For installing Microsoft's QDK
Depending on your OS and environment, some of these packages may be more challenging to install. For installing Microsoft's QDK
or any issue regarding the above packages, please check their respective documentation.


Quick note for Windows users
^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Our installation instructions will work on Linux and MacOS systems. If you are using Windows, we recommend
you install the `Windows Linux Subsystem <https://docs.microsoft.com/en-us/windows/wsl/install>`_, which allows you
to run Ubuntu as an application. Once it has been installed, you can type ``explorer.exe`` in your Ubuntu terminal to
drag and drop files between your Windows and Linux environment.

Here are a few essentials to install inside a brand new Ubuntu environment, before trying to install Tangelo:

.. code-block::
sudo apt update && sudo apt upgrade
sudo apt-get install python3-dev
sudo apt-get install python3-venv
sudo apt-get install cmake unzip
Optional: environment variables
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Expand All @@ -77,15 +133,23 @@ the desired values in your environment, you can run this shell script in Linux w
``source env_var.sh`` (you may need to set execution permissions with ``chmod +x set_env_var.sh`` first), or you can set
them in whatever way your OS supports it, or even inside your python script using the ``os`` package.

Docs
----

TODO: insert sentence and link to sphinx documentation when its online.

Tutorials
---------

Please check the ``examples`` folder for jupyter notebook tutorials and other examples.
The ``examples`` folder of this repository contains various Jupyter notebook tutorials, and other examples.
We wrote a number of them, but nothing prevents users from contributing more notebook content !
You can visualize a number of pre-run notebooks directly on Github or in our Sphinx documentation. If you'd like to be able to run
them locally, we suggest you use `Jupyter notebooks inside a virtual environment <https://janakiev.com/blog/jupyter-virtual-envs/>`_.

- Install Jupyter and ipykernel in your environment:
.. code-block::
pip install jupyter ipykernel
- To make sure the notebooks allow you to set the kernel corresponding to your virtual environment:
.. code-block::
python -m ipykernel install --user --name=myenv
Tests
-----
Expand All @@ -101,13 +165,19 @@ find and run all tests (assuming you are in the ``tangelo`` subfolder that conta
Contributions
-------------

Please have a look at the `contributions <./CONTRIBUTIONS.rst>`_ file.
Thank you very much for considering contributing to this project; we’d love to have you on board !
You do not need to be a seasoned software developer or expert in your field to make contributions to this project: it will take various kinds of people and backgrounds to tackle the challenges that await us.

However we need some guidelines and processes to ensure that we build something of quality for the community. We describe them in the `contributions <./CONTRIBUTIONS.rst>`_ file.
There are many ways you can contribute, but in case you're considering contributing to the codebase: don't be scared of the infamous pull request process ! It can feel intimidating, but we've had a few researchers or high-schoolers go through their first one and... they came back for more ! Mostly.

By joining the Tangelo community and sharing your ideas and developments, you are creating an opportunity for us to learn and grow together, and take ideas to the finish line and beyond.

Citations
---------

If you use Tangelo in your research, please cite
If you use Tangelo in your research, please cite:

[TODO: this is a placeholder for our Tangelo paper, to be written and put on arxiv in October]
[TODO: Placeholder Tangelo for arXiv paper]

© Good Chemistry Company 2021. This software is released under the Apache Software License version 2.0.
© Good Chemistry Company 2022. This software is released under the Apache Software License version 2.0.
4 changes: 0 additions & 4 deletions dev_tools/build_sphinx_docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@
# or mock the desired packages in docs/source/conf.py
pip install sphinx sphinx_rtd_theme nbsphinx

# This environment seems to work for building the docs.
# Something fishy otherwise.
pip install -r requirements.txt

# Support for LaTeX
sudo apt-get install -y latexmk texlive-latex-recommended texlive-latex-extra texlive-fonts-recommended pandoc dvipng

Expand Down
Loading

0 comments on commit 745f5ab

Please sign in to comment.