# minor typos in demo #80

Merged
merged 1 commit into from Oct 22, 2017
Commits
Failed to load files and symbols.
+38 −38

#### Just for now

 @@ -1,6 +1,8 @@ # Docker setup for OpenFermion and select plugins This Docker image will help users to install [OpenFermion](https://github.com/quantumlib/OpenFermion) and its available plugins for [ProjectQ](https://github.com/ProjectQ-Framework/ProjectQ), [Psi4](https://github.com/quantumlib/OpenFermion-Psi4), and [PySCF](https://github.com/quantumlib/OpenFermion-PySCF). This Docker image will help users to install [OpenFermion](https://github.com/quantumlib/OpenFermion) and its available plugins for [ProjectQ](https://github.com/ProjectQ-Framework/ProjectQ), [Psi4](https://github.com/quantumlib/OpenFermion-Psi4), and [PySCF](https://github.com/quantumlib/OpenFermion-PySCF). Check out Docker's [website](https://www.docker.com/what-container) that describes what a container image is and why it can be so useful. The Docker based installation is extremely robust and runs on any operating system and so is an ideal solution for anyone having difficulty installing @@ -60,7 +62,7 @@ docker build -t openfermion_docker . where "openfermion_docker" is just an arbitrary name for our docker image. What the Dockerfile does is to start from a base image of Ubuntu and install OpenFermion, its plugins, and the necessary applications needed for running these programs. This is a fairly involved installation and will take some time programs. This is a fairly involved setup and will take some time (perhaps up to thiry minutes depending on the computer). Once installation has completed, run the image with
 @@ -253,7 +253,7 @@ InteractionOperator and InteractionRDM for efficient numerical representations Fermion Hamiltonians can be expressed as :math:H=h_0+\sum_{pq} h_{pq} a^\dagger_p a_q + \frac12 \sum_{pqrs} h_{pqrs} a^\dagger_p a^\dagger_q a_r a_s, where :math:h_0 is a constant shift due to the nuclear repulsion and :math:h_{pq} and :math:h_{pqrs} are the famous molecular integrals. Since fermions interact pairwise, their energy is thus a unique function of the one-particle and two-particle reduced density matrices which are expressed in second quantization as :math:\rho_{pq} = \langle p | a^\dagger_p a_q | q\rangle and :math:\rho_{pqrs} = \langle pq | a^\dagger_p a^\dagger_q a_r a_s | rs \rangle, respectively. Because the RDMs and molecular Hamiltonians are both compactly represented and manipulated as 2- and 4- index tensors, we can represent them in a particularly efficient form using similar data structures. The InteractionOperator data structure can be initialized for a Hamiltonian by passing the constant h0h0 (or 0), as well as numpy arrays representing :math:h_{pq} (or :math:\rho_{pq}) and :math:h_{pqrs} (or :math:\rho_{pqrs}). Importantly, InteractionOperators can also be obtained by calling MolecularData.get_molecular_hamiltonian() or by calling the function get_interaction_operator() (found in openfermion.utils) on a FermionOperator. The InteractionRDM data structure is similar but represents RDMs. For instance, one can get a molecular RDM by calling MolecularData.get_molecular_rdm(). When generating Hamiltonians from the MolecularData class, one can choose to restrict the system to an active space. Because the RDMs and molecular Hamiltonians are both compactly represented and manipulated as 2- and 4- index tensors, we can represent them in a particularly efficient form using similar data structures. The InteractionOperator data structure can be initialized for a Hamiltonian by passing the constant h0h0 (or 0), as well as numpy arrays representing :math:h_{pq} (or :math:\rho_{pq}) and :math:h_{pqrs} (or :math:\rho_{pqrs}). Importantly, InteractionOperators can also be obtained by calling MolecularData.get_molecular_hamiltonian() or by calling the function get_interaction_operator() (found in openfermion.transforms) on a FermionOperator. The InteractionRDM data structure is similar but represents RDMs. For instance, one can get a molecular RDM by calling MolecularData.get_molecular_rdm(). When generating Hamiltonians from the MolecularData class, one can choose to restrict the system to an active space. These classes inherit from the same base class, InteractionTensor. This data structure overloads the slice operator [] so that one can get or set the key attributes of the InteractionOperator: .constant, .one_body_coefficients and .two_body_coefficients. For instance, InteractionOperator[p,q,r,s] would return :math:h_{pqrs} and InteractionRDM would return :math:\rho_{pqrs}. Importantly, the class supports fast basis transformations using the method InteractionTensor.rotate_basis(rotation_matrix). But perhaps most importantly, one can map the InteractionOperator to any of the other data structures we've described here.
 @@ -14,6 +14,7 @@ from setuptools import setup, find_packages # This reads the __version__ variable from openfermion/_version.py exec(open('src/openfermion/_version.py').read()) @@ -24,15 +25,13 @@ requirements = open('requirements.txt').readlines() requirements = [r.strip() for r in requirements] setup( name='openfermion', version=__version__, author='The OpenFermion Developers', author_email='help@openfermion.org', url='http://www.openfermion.org', description=('Open source package for analyzing, compiling and ' 'emulating quantum algorithms for simulation of fermions.'), description=('The electronic structure package for quantum computers.'), long_description=long_description, install_requires=requirements, license='Apache 2', @@ -42,5 +41,4 @@ package_data={ '': [os.path.join('src', 'openfermion', 'data', '*.hdf5'), os.path.join('src', 'openfermion', 'data', '*.npy')] } ) })
ProTip! Use n and p to navigate between commits in a pull request.