nbed

Python package to reduce the qubit requirements of quantum simulation by embedding into DFT.

https://github.com/ucl-ccs/nbed

Science Score: 62.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
    Links to: zenodo.org
  • Academic email domains
  • Institutional organization owner
    Organization ucl-ccs has institutional domain (ccs.chem.ucl.ac.uk)
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (14.7%) to scientific vocabulary

Keywords

chemistry embedding quantum quantum-chemistry quantum-computing
Last synced: 6 months ago · JSON representation ·

Repository

Python package to reduce the qubit requirements of quantum simulation by embedding into DFT.

Basic Info
  • Host: GitHub
  • Owner: UCL-CCS
  • License: other
  • Language: Python
  • Default Branch: master
  • Homepage: https://nbed.readthedocs.io
  • Size: 133 MB
Statistics
  • Stars: 8
  • Watchers: 2
  • Forks: 2
  • Open Issues: 18
  • Releases: 9
Topics
chemistry embedding quantum quantum-chemistry quantum-computing
Created almost 5 years ago · Last pushed 6 months ago
Metadata Files
Readme Changelog License Citation

README.md

Master CICD Documentation Status DOI

Nbed

This package implements projection-based embedding methods to reduce the size of a molecular Hamiltonain via embedding in DFT.

Nbed uses PySCF as a backend for chemistry caluculations, which is not supported on Windows. Alternative chemistry backends are planned, however in the mean time this package will work only for Linux and MacOS.

Documentation

Full documentation is available at https://nbed.readthedocs.io.

Installation

Pip

The package is available on PyPI and can be installed with pip:

pip install nbed

Dependencies

Development of Nbed uses the packaging and dependency manager uv, to install it from the command line run:: shell pip install uv with this installed, you can start working on the package by running: shell uv venv .venv/ uv pip install .

Use

The package has three main interfaces, each to the same function embed/nbed.

Importing the package

This function is accessable by importing the package into a python file.

``` from nbed import nbed ...

nbed(...) ```

This function will output a qubit Hamiltonian suitable for the backend specified by the output argument.

Command Line Interface

Installing this package also exposes a command line tool nbed, which can be used in two ways. Firstly, you can provide a JSON config file.

nbed --config <path to .json>

Your JSON config file should look something like this (which is taken from the tests folder):

JSON { "geometry":"3\n\nO 0.0000 0.000 0.115\nH 0.0000 0.754 -0.459\nH 0.0000 -0.754 -0.459", "n_active_atoms":2, "basis":"STO-3G", "xc_functional":"b3lyp", "projector":"mu", "localization":"spade", "convergence":1e-6, "charge":0, "spin":0, "unit":"angstrom", "symmetry":false, "mu_level_shift":1000000.0, "run_ccsd_emb":false, "run_fci_emb":false, "run_dft_in_dft":false, "run_virtual_localization":true, "n_mo_overwrite":[null,null], "max_ram_memory":4000, "occupied_threshold":0.95, "virtual_threshold":0.95, "max_shells":4, "init_huzinaga_rhf_with_mu":false, "max_hf_cycles":50, "max_dft_cycles":50, "force_unrestricted":false, "mm_coords":null, "mm_charges":null, "mm_radii":null, }

Reference Values

Save Output

By including the savefile item in your config file or giving a savefile argument to the function, you can specify the path to a location where you'd like to save a JSON file containing the output of Nbed.

Overview

  • embed.py - main functionality
  • config.py - Data validation model of configuration needed to run Nbed.
  • driver.py - Class which carries out the algorithm. Main point of access for functionality.
  • ham_builder.py - class to build Hamiltonians from quantum chemistry calculations.
  • localizers/ - Classes which perform localization.
  • utils.py - log settings and cli parsing.

Examples and Explainers

This folder contains jupyter notebooks which explain the embedding procedure in detail, including relevant theory. Notebooks to replicate results presented in publications can also be found here.

Development

If you would like to contribute to this codebase please first create an issue describing your feature request or bug. We'll be happy to help.

If you have made changes yourself, make sure to fork the repo and open your PR from there.

Owner

  • Name: Centre for Computational Science (UCL)
  • Login: UCL-CCS
  • Kind: organization
  • Location: London

Citation (CITATION.cff)

cff-version: 1.2.0
message: "Nbed enables the application of quauntum simulation algorithms to molecules of arbitrary size. If you use Nbed in your research please cite it."
authors:
  - family-names: Williams de la Bastida
    given-names: Michael Ifor
    orcid:  https://orcid.org/0000-0002-1179-8121
  - family-names: Ralli
    given-names: Alexis
    orcid: https://orcid.org/0000-0001-8953-1235
title: "Nbed"
version: 0.0.9
date-released: 2022-03-07
doi: 10.5281/zenodo.6323338

GitHub Events

Total
  • Create event: 36
  • Release event: 5
  • Issues event: 26
  • Watch event: 2
  • Delete event: 28
  • Issue comment event: 31
  • Push event: 146
  • Pull request review comment event: 6
  • Pull request review event: 7
  • Pull request event: 52
  • Fork event: 1
Last Year
  • Create event: 36
  • Release event: 5
  • Issues event: 26
  • Watch event: 2
  • Delete event: 28
  • Issue comment event: 31
  • Push event: 146
  • Pull request review comment event: 6
  • Pull request review event: 7
  • Pull request event: 52
  • Fork event: 1

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 14
  • Total pull requests: 19
  • Average time to close issues: 10 months
  • Average time to close pull requests: about 1 month
  • Total issue authors: 2
  • Total pull request authors: 2
  • Average comments per issue: 0.86
  • Average comments per pull request: 0.68
  • Merged pull requests: 14
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 11
  • Pull requests: 18
  • Average time to close issues: 13 days
  • Average time to close pull requests: 6 days
  • Issue authors: 2
  • Pull request authors: 2
  • Average comments per issue: 0.91
  • Average comments per pull request: 0.72
  • Merged pull requests: 14
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • MIWdlB (14)
  • TimWeaving (1)
  • tryoptimum (1)
  • tom-bickley (1)
Pull Request Authors
  • MIWdlB (26)
  • tom-bickley (3)
  • TimWeaving (1)
Top Labels
Issue Labels
enhancement (6) good first issue (2) CICD (1) tools (1) bug (1) documentation (1)
Pull Request Labels
enhancement (6) documentation (1) bug (1)

Dependencies

poetry.lock pypi
  • 170 dependencies
pyproject.toml pypi
  • Sphinx ^4.4.0 develop
  • black ^21.6b0 develop
  • bpython ^0.21 develop
  • coverage ^6.3.1 develop
  • flake8 ^3.9.2 develop
  • isort ^5.9.3 develop
  • mypy ^0.902 develop
  • pydocstyle ^6.1.1 develop
  • pytest ^6.2.4 develop
  • sphinx-rtd-theme ^1.0.0 develop
  • PennyLane ^0.17.0
  • PennyLane-Qchem ^0.17.0
  • PyYAML ^5.4.1
  • cached-property ^1.5.2
  • h5py 3.1
  • jupyter ^1.0.0
  • nbsphinx ^0.8.8
  • openfermion <1.1.0
  • pandoc ^2.1
  • py3Dmol ^1.7.0
  • pyscf 1.7.6
  • python ^3.7
  • qiskit-nature ^0.2.2
  • types-PyYAML ^5.4.11
.github/workflows/pull_request.yaml actions
  • actions/checkout v2 composite
  • actions/setup-python v2 composite
.github/workflows/push_to_master.yaml actions
  • actions/checkout v2 composite
  • actions/setup-python v2 composite
.github/workflows/release.yaml actions
  • actions/checkout v2 composite
  • actions/setup-python v2 composite