Skip to main content

Quantum chemistry module for quantum computing with Qibo

Project description

Qibochem

Tests codecov DOI

Qibochem is a plugin to Qibo for quantum chemistry simulations.

Some of the features of Qibochem are:

  • General purpose Molecule class
    • PySCF for calculating the molecular 1- and 2-electron integrals
    • User defined orbital active space
  • Unitary Coupled Cluster Ansatz
  • Various Qibo backends (numpy, JIT, TN) for efficient simulation

Documentation

The Qibochem documentation can be found here

Minimum working example:

An example of building the UCCD ansatz with a H2 molecule

import numpy as np
from qibo.models import VQE

from qibochem.driver.molecule import Molecule
from qibochem.ansatz.hf_reference import hf_circuit
from qibochem.ansatz.ucc import ucc_circuit

# Define the H2 molecule and obtain its 1-/2- electron integrals with PySCF
h2 = Molecule([('H', (0.0, 0.0, 0.0)), ('H', (0.0, 0.0, 0.7))])
h2.run_pyscf()
# Generate the molecular Hamiltonian
hamiltonian = h2.hamiltonian()

# Build a UCC circuit ansatz for running VQE
circuit = hf_circuit(h2.nso, sum(h2.nelec))
circuit += ucc_circuit(h2.nso, [0, 1, 2, 3])

# Create and run the VQE, starting with random initial parameters
vqe = VQE(circuit, hamiltonian)

initial_parameters = np.random.uniform(0.0, 2*np.pi, 8)
best, params, extra = vqe.minimize(initial_parameters)

Citation policy

If you use the Qibochem plugin please refer to the documentation for citation instructions.

Contact

For questions, comments and suggestions please contact us at https://matrix.to/#/#qibo:matrix.org

Contributing

Contributions, issues and feature requests are welcome.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

qibochem-0.0.3.tar.gz (25.9 kB view details)

Uploaded Source

Built Distribution

qibochem-0.0.3-py3-none-any.whl (29.5 kB view details)

Uploaded Python 3

File details

Details for the file qibochem-0.0.3.tar.gz.

File metadata

  • Download URL: qibochem-0.0.3.tar.gz
  • Upload date:
  • Size: 25.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.3

File hashes

Hashes for qibochem-0.0.3.tar.gz
Algorithm Hash digest
SHA256 8782ae2198ad9e0a68913d10f51a6bb6ade1a3523d1a1d542cd02843dd57afc6
MD5 7570d46f836f100516b85a1dc75f63ca
BLAKE2b-256 cac85281fc8fad845256c827a6a20fccd31f2352edfad7c2fcc9e18ccecc6251

See more details on using hashes here.

File details

Details for the file qibochem-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: qibochem-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 29.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.3

File hashes

Hashes for qibochem-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 f0ee701cbf48813ed526602537dbfa919650489fd8845d3515babf47813382a3
MD5 16883df21e1424cf24efe74d658d2fbb
BLAKE2b-256 2a68cfe6b8ba26185a4b99ee85322ed0f9ace3a73f6b6c9cff7b5d321b818dca

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page