Skip to content
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

refactor: move code to new structure #746

Merged
merged 4 commits into from
Jul 18, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ __pycache__/
#Allow
!qiskit_nature/drivers/second_quantization/gaussiand/gauopen/*.so
!qiskit_nature/drivers/second_quantization/gaussiand/gauopen/*.pyd
!qiskit_nature/second_q/drivers/gaussiand/gauopen/*.so
!qiskit_nature/second_q/drivers/gaussiand/gauopen/*.pyd


# Distribution / packaging
Expand Down
1 change: 1 addition & 0 deletions .pylintdict
Original file line number Diff line number Diff line change
Expand Up @@ -511,6 +511,7 @@ verbatim
versa
vibrational
vibrationalop
vibrationalops
vibro
vmax
vmin
Expand Down
28 changes: 14 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,17 +42,17 @@ Several, as listed below, are supported, and while logic to interface these prog
Qiskit Nature via the above pip installation, the dependent programs/libraries themselves need
to be installed separately.

1. [Gaussian 16™](https://qiskit.org/documentation/nature/apidocs/qiskit_nature.drivers.second_quantization.gaussiand.html), a commercial chemistry program
2. [PSI4](https://qiskit.org/documentation/nature/apidocs/qiskit_nature.drivers.second_quantization.psi4d.html), a chemistry program that exposes a Python interface allowing for accessing internal objects
3. [PyQuante](https://qiskit.org/documentation/nature/apidocs/qiskit_nature.drivers.second_quantization.pyquanted.html), a pure cross-platform open-source Python chemistry program
4. [PySCF](https://qiskit.org/documentation/nature/apidocs/qiskit_nature.drivers.second_quantization.pyscfd.html), an open-source Python chemistry program
1. [Gaussian 16™](https://qiskit.org/documentation/nature/apidocs/qiskit_nature.second_q.drivers.gaussiand.html), a commercial chemistry program
2. [PSI4](https://qiskit.org/documentation/nature/apidocs/qiskit_nature.second_q.drivers.psi4d.html), a chemistry program that exposes a Python interface allowing for accessing internal objects
3. [PyQuante](https://qiskit.org/documentation/nature/apidocs/qiskit_nature.second_q.drivers.pyquanted.html), a pure cross-platform open-source Python chemistry program
4. [PySCF](https://qiskit.org/documentation/nature/apidocs/qiskit_nature.second_q.drivers.pyscfd.html), an open-source Python chemistry program

### HDF5 Driver

A useful functionality integrated into Qiskit Nature is its ability to serialize a file
in hierarchical Data Format 5 (HDF5) format representing all the output data from a chemistry driver.

The [HDF5 driver](https://qiskit.org/documentation/nature/stubs/qiskit_nature.drivers.second_quantization.HDF5Driver.html#qiskit_nature.drivers.second_quantization.HDF5Driver)
The [HDF5 driver](https://qiskit.org/documentation/nature/stubs/qiskit_nature.second_q.drivers.HDF5Driver.html#qiskit_nature.second_q.drivers.HDF5Driver)
accepts such HDF5 files as input so molecular experiments can be run, albeit on the fixed data
as stored in the file. As such, if you have some pre-created HDF5 files created from Qiskit
Nature, you can use these with the HDF5 driver even if you do not install one of the classical
Expand All @@ -66,9 +66,9 @@ the ground-state (minimum) energy of a molecule.

```python
from qiskit_nature.settings import settings
from qiskit_nature.drivers import UnitsType
from qiskit_nature.drivers.second_quantization import PySCFDriver
from qiskit_nature.problems.second_quantization.electronic import ElectronicStructureProblem
from qiskit_nature.second_q.drivers import UnitsType
from qiskit_nature.second_q.drivers import PySCFDriver
from qiskit_nature.second_q.problems import ElectronicStructureProblem

settings.dict_aux_operators = True

Expand All @@ -95,8 +95,8 @@ from qiskit.algorithms.optimizers import L_BFGS_B
optimizer = L_BFGS_B()

# setup the mapper and qubit converter
from qiskit_nature.mappers.second_quantization import ParityMapper
from qiskit_nature.converters.second_quantization import QubitConverter
from qiskit_nature.second_q.mappers import ParityMapper
from qiskit_nature.second_q.mappers import QubitConverter

mapper = ParityMapper()
converter = QubitConverter(mapper=mapper, two_qubit_reduction=True)
Expand All @@ -105,7 +105,7 @@ converter = QubitConverter(mapper=mapper, two_qubit_reduction=True)
qubit_op = converter.convert(main_op, num_particles=num_particles)

# setup the initial state for the ansatz
from qiskit_nature.circuit.library import HartreeFock
from qiskit_nature.second_q.circuit.library import HartreeFock

init_state = HartreeFock(num_spin_orbitals, num_particles, converter)

Expand Down Expand Up @@ -203,6 +203,6 @@ This project uses the [Apache License 2.0](https://github.com/Qiskit/qiskit-natu

However there is some code that is included under other licensing as follows:

* The [Gaussian 16 driver](https://github.com/Qiskit/qiskit-nature/tree/main/qiskit_nature/drivers/second_quantization/gaussiand) in `qiskit-nature`
contains [work](https://github.com/Qiskit/qiskit-nature/tree/main/qiskit_nature/drivers/second_quantization/gaussiand/gauopen) licensed under the
[Gaussian Open-Source Public License](https://github.com/Qiskit/qiskit-nature/blob/main/qiskit_nature/drivers/second_quantization/gaussiand/gauopen/LICENSE.txt).
* The [Gaussian 16 driver](https://github.com/Qiskit/qiskit-nature/tree/main/qiskit_nature/second_q/drivers/gaussiand) in `qiskit-nature`
contains [work](https://github.com/Qiskit/qiskit-nature/tree/main/qiskit_nature/second_q/drivers/gaussiand/gauopen) licensed under the
[Gaussian Open-Source Public License](https://github.com/Qiskit/qiskit-nature/blob/main/qiskit_nature/second_q/drivers/gaussiand/gauopen/LICENSE.txt).
4 changes: 2 additions & 2 deletions constraints.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
astroid==2.6.1
pylint==2.9.0
astroid==2.6.4
pylint==2.9.4
numpy>=1.20.0

6 changes: 0 additions & 6 deletions docs/apidocs/qiskit_nature.algorithms.initial_points.rst

This file was deleted.

6 changes: 0 additions & 6 deletions docs/apidocs/qiskit_nature.algorithms.pes_samplers.rst

This file was deleted.

6 changes: 0 additions & 6 deletions docs/apidocs/qiskit_nature.algorithms.rst

This file was deleted.

6 changes: 0 additions & 6 deletions docs/apidocs/qiskit_nature.circuit.library.ansatzes.utils.rst

This file was deleted.

6 changes: 0 additions & 6 deletions docs/apidocs/qiskit_nature.circuit.library.rst

This file was deleted.

6 changes: 0 additions & 6 deletions docs/apidocs/qiskit_nature.circuit.rst

This file was deleted.

6 changes: 0 additions & 6 deletions docs/apidocs/qiskit_nature.converters.rst

This file was deleted.

6 changes: 0 additions & 6 deletions docs/apidocs/qiskit_nature.converters.second_quantization.rst

This file was deleted.

6 changes: 0 additions & 6 deletions docs/apidocs/qiskit_nature.drivers.rst

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

6 changes: 0 additions & 6 deletions docs/apidocs/qiskit_nature.drivers.second_quantization.rst

This file was deleted.

6 changes: 6 additions & 0 deletions docs/apidocs/qiskit_nature.hdf5.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,9 @@

.. autosummary::
HDF5Storable






6 changes: 0 additions & 6 deletions docs/apidocs/qiskit_nature.mappers.rst

This file was deleted.

6 changes: 0 additions & 6 deletions docs/apidocs/qiskit_nature.mappers.second_quantization.rst

This file was deleted.

6 changes: 0 additions & 6 deletions docs/apidocs/qiskit_nature.operators.rst

This file was deleted.

7 changes: 0 additions & 7 deletions docs/apidocs/qiskit_nature.operators.second_quantization.rst

This file was deleted.

6 changes: 0 additions & 6 deletions docs/apidocs/qiskit_nature.problems.rst

This file was deleted.

This file was deleted.

6 changes: 0 additions & 6 deletions docs/apidocs/qiskit_nature.problems.sampling.rst

This file was deleted.

6 changes: 0 additions & 6 deletions docs/apidocs/qiskit_nature.problems.second_quantization.rst

This file was deleted.

6 changes: 0 additions & 6 deletions docs/apidocs/qiskit_nature.properties.rst

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

6 changes: 0 additions & 6 deletions docs/apidocs/qiskit_nature.properties.second_quantization.rst

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

6 changes: 0 additions & 6 deletions docs/apidocs/qiskit_nature.results.rst

This file was deleted.

6 changes: 0 additions & 6 deletions docs/apidocs/qiskit_nature.results.utils.rst

This file was deleted.

6 changes: 0 additions & 6 deletions docs/apidocs/qiskit_nature.runtime.rst

This file was deleted.

21 changes: 21 additions & 0 deletions docs/apidocs/qiskit_nature.second_q.algorithms.initial_points.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@


initial_points
================================================

.. automodule:: qiskit_nature.second_q.algorithms.initial_points
:no-members:
:no-inherited-members:
:no-special-members:












20 changes: 20 additions & 0 deletions docs/apidocs/qiskit_nature.second_q.algorithms.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@


qiskit_nature.second_q.algorithms
=================================

.. automodule:: qiskit_nature.second_q.algorithms
:no-members:
:no-inherited-members:
:no-special-members:











Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@


utils
=====================================================

.. automodule:: qiskit_nature.second_q.circuit.library.ansatzes.utils












Loading