Пример #1
0
def test_hamiltonian_consistency(geom: str, basis: str, trafo: str):
    parameters_qc = qc.ParametersQC(geometry=geom,
                                    basis_set=basis,
                                    outfile="asd")
    hqc1 = qc.QuantumChemistryPsi4(parameters=parameters_qc).make_hamiltonian(
        transformation=trafo)
    hqc2 = qc.QuantumChemistryPySCF(parameters=parameters_qc).make_hamiltonian(
        transformation=trafo)
    assert (hqc1.qubit_operator == hqc2.qubit_operator)
Пример #2
0
def test_energies_psi4(method):
    parameters_qc = qc.ParametersQC(geometry="data/h2.xyz", basis_set="6-31g")
    psi4_interface = qc.QuantumChemistryPsi4(parameters=parameters_qc)
    result = psi4_interface.compute_energy(method=method)
    assert result is not None