I am trying to calculate the ground state energy of some simple molecules using 'MolecularGroundStateEnergy' tools in qiskit. When I run the calculations for very small molecules (e.g. H2, HeH+) the jobs appear in the queue very quickly and the calculations work independent of which backend I select. However, running the same code with slightly larger molecules (e.g. LiH, BeH2 and water) the jupyter notebook runs indefinitely and the jobs do not show in the IMBQ queue.
Note: I have run successful calculations for all these molecules using the state-vector simulator with no issues.
Here is the function i use to calculate energy via VQE given a molecule (created from PySCF driver):
def calc_vqe_energy(molecule):
driver = molecule
energy = MolecularGroundStateEnergy(driver = driver,
transformation=TransformationType('full'),
qubit_mapping=QubitMappingType('parity'),
two_qubit_reduction=True,
freeze_core=False,
z2symmetry_reduction='auto')
solver = energy.get_default_solver(quantum_instance)
#calculate energy using the above solver
calc = energy.compute_energy(solver)
return calc
this is set up to run using the quantum instance:
IBMQ.save_account(token)
IBMQ.load_account()
provider = IBMQ.get_provider(hub='ibm-q')
backend = provider.get_backend("ibmq_qasm_simulator")
coupling_map = backend.configuration().coupling_map
quantum_instance = QuantumInstance(backend=backend, shots=1000,
coupling_map=coupling_map,
measurement_error_mitigation_cls=CompleteMeasFitter,
cals_matrix_refresh_period=30, skip_qobj_validation=False)
Thanks for the help!