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 import Molecule
from qibochem.ansatz import hf_circuit, 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, 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)
print(f"VQE result: {best:.10f}")

Citation policy

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

Contact

To get in touch with the community and the developers, consider joining the Qibo workspace on Matrix:

Matrix

If you have a question about the project, contact us at 📫.

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.4.tar.gz (27.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

qibochem-0.0.4-py3-none-any.whl (34.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: qibochem-0.0.4.tar.gz
  • Upload date:
  • Size: 27.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for qibochem-0.0.4.tar.gz
Algorithm Hash digest
SHA256 1da9b8d69b760eaae29b4e72b5bbbca068799faa600319180176dd82bd117dfd
MD5 66f52e4c9aae5f3074408b1ad451a6dd
BLAKE2b-256 c79946c86aabea3c46be4b62e6fbde8ac4a7d316a0f4d939eb56da58d46892f0

See more details on using hashes here.

File details

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

File metadata

  • Download URL: qibochem-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 34.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for qibochem-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 3ad829616ef57c62ea6079918274cf9c289ad5e6e50e82ded353a84e0e5adec0
MD5 2ab49063974ebfe0fb358492f1d10a3d
BLAKE2b-256 5b9ec94c86483747ac950d488bfa9d9a8f378b67250b6123d2c71e1fcd40c0d5

See more details on using hashes here.

Supported by

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