Skip to main content

SymQNet Molecular Optimization via Hamiltonian Estimation

Project description

SymQNet-MolOpt: Hamiltonian Parameter Estimation

SymQNet-MolOpt provides efficient, uncertainty-aware estimation of Hamiltonian parameters for 1D and 2D molecular models and ultimately much more efficient molecular optimization. It is designed for sample-efficient optimization and reports confidence intervals for each parameter.


Installation

pip install SymQNet-MolOpt

Usage

Core Command

SymQNet-MolOpt --hamiltonian input.json --output results.json

Arguments:

  • --hamiltonian: Path to a JSON Hamiltonian (OpenFermion-like format).
  • --output: File to save results (JSON).
  • --shots: Number of measurement shots (default auto-scales).
  • --n-rollouts: Number of independent rollouts (default: 5).
  • --max-steps: Max optimization steps per rollout (default: 50).

Examples

Water Molecule (H₂O, 10 qubits)

SymQNet-MolOpt --hamiltonian examples/H2O_10q.json --output h2o_results.json --shots 1024 --n-rollouts 5 --max-steps 50

Ising Chain (12 qubits)

SymQNet-MolOpt --hamiltonian examples/ising_12q.json --output ising_results.json --shots 1024

(You need to create your own JSON Hamiltonian.)


Input Format

Hamiltonians are specified in JSON:

{
  "format": "openfermion",
  "system": "H2O",
  "n_qubits": 10,
  "pauli_terms": [
    {"coefficient": -74.943, "pauli_string": "IIIIIIIIII"},
    {"coefficient": 0.342, "pauli_string": "IIIIIIIIIZ"}
  ]
}

Output Format

Results include estimated parameters with uncertainties:

{
  "symqnet_results": {
    "coupling_parameters": [
      {
        "index": 0,
        "mean": 0.2134,
        "confidence_interval": [0.2089, 0.2179],
        "uncertainty": 0.0045
      }
    ],
    "field_parameters": [...],
    "total_uncertainty": 0.0856
  },
  "hamiltonian_info": {
    "system": "H2O",
    "n_qubits": 10
  }
}

Requirements

  • Python 3.8+
  • PyTorch 1.12+
  • NumPy, SciPy, Click

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

symqnet_molopt-3.10.4.tar.gz (2.7 MB view details)

Uploaded Source

Built Distribution

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

symqnet_molopt-3.10.4-py3-none-any.whl (2.7 MB view details)

Uploaded Python 3

File details

Details for the file symqnet_molopt-3.10.4.tar.gz.

File metadata

  • Download URL: symqnet_molopt-3.10.4.tar.gz
  • Upload date:
  • Size: 2.7 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for symqnet_molopt-3.10.4.tar.gz
Algorithm Hash digest
SHA256 2c361d2aa7387753a2b6a1c9c5e405953444bcf5c52468230d1780d63fe16a79
MD5 ce87c26e9ec668a3a38665e254f15f19
BLAKE2b-256 376928bfafb721f96f6c293a997784d7b44f88d39e22485edfd019777844999f

See more details on using hashes here.

File details

Details for the file symqnet_molopt-3.10.4-py3-none-any.whl.

File metadata

File hashes

Hashes for symqnet_molopt-3.10.4-py3-none-any.whl
Algorithm Hash digest
SHA256 f3488f10cc6634dd8d64a6c0a6354a52f2aafdbf4b741da4db9e00ebc652e875
MD5 605a3c5eafa2378292d2f6badecd6882
BLAKE2b-256 c9a5a3e02b1dcc773a6b6f2c97d72d5208ff0a24e203bf3645ba2ceeafedf697

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