You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is a discrepancy in the Pauli string coefficients between OpenFermion and CUDA-QX.
The Pauli strings themselves match in both OpenFermion and CUDA-QX for all molecules.
The coefficients match for H_2 but not for other molecules. For example, mismatches are observed for H_4.
Some coefficients differ only by sign, suggesting a possible parity flip or phase shift issue.
Steps to Reproduce
Setup & Imports
Import necessary libraries: CUDA-Q, CUDA-QX, SciPy, PySCF, and NumPy.
Define the molecular structure for H_4 using Cartesian coordinates.
Compute Molecular Energies
FCI Energy (PySCF): Compute exact energy using Full Configuration Interaction (FCI).
OpenFermion Energy (CUDA-Q): Generate Hamiltonian, compute lowest eigenvalue.
CUDA-QX Energy: Generate Hamiltonian using CASCI, compute lowest eigenvalue.
Extract & Compare Pauli Terms
Convert Hamiltonians into Pauli string representations with coefficients.
Compare OpenFermion and CUDA-QX coefficients.
Print mismatches where coefficients differ beyond a tolerance (1e-15).
Purpose: Identify discrepancies between OpenFermion and CUDA-QX Hamiltonians, specifically in Pauli string coefficients.
Expected Behavior
Pauli string coefficients should match between OpenFermion and CUDA-QX for all molecules.
Actual Behavior
For molecules other than H_2, some coefficients do not match. Even when using PySCF-verified integrals, CUDA-QX produces incorrect eigenvalue energies, suggesting the issue lies in the Jordan-Wigner implementation in CUDA-QX.
The text was updated successfully, but these errors were encountered:
kvmto
changed the title
Incorrect coefficients in Jordan-Wigner Encoding
Incorrect coefficients in Jordan-Wigner Transform
Feb 4, 2025
Description
There is a discrepancy in the Pauli string coefficients between OpenFermion and CUDA-QX.
Steps to Reproduce
Setup & Imports
Compute Molecular Energies
Extract & Compare Pauli Terms
1e-15
).Purpose: Identify discrepancies between OpenFermion and CUDA-QX Hamiltonians, specifically in Pauli string coefficients.
Expected Behavior
Pauli string coefficients should match between OpenFermion and CUDA-QX for all molecules.
Actual Behavior
For molecules other than H_2, some coefficients do not match. Even when using PySCF-verified integrals, CUDA-QX produces incorrect eigenvalue energies, suggesting the issue lies in the Jordan-Wigner implementation in CUDA-QX.
The text was updated successfully, but these errors were encountered: