Hi @CatalinaAlbornoz, thank you for your prompt response and warm welcome!
I was working with the Pennylane version 0.22.2 and with that version for the Adaptive circuits tutorial I was getting an error that “output seems to be independent of input” while calculating gradients of circuits. The update to the latest version has solved the issue.
However, I think some problem still exists. Right now I am running bravyi_kitaev transformation in the openfermion library and then I am importing the observable to pennylane. In that case I am still getting an error that output seems to be independent of the input. The following lines are the details how I create my Hamiltonian, then I run the code from Adaptive circuits tutorial for the optimization.
system = 'system.xyz
basis = 'sto-3g'
multiplicity = 1
charge = 0
active_indices = [1, 2, 3, 4, 5]
occupied_indices = 
active_orbitals = 2 * len(active_indices)
active_electrons = 2
geometry = openfermion.chem.geometry_from_file('system.xyz')
molecule = MolecularData(geometry=geometry,
fermionic_H = get_fermion_operator(
Hamiltonian = bravyi_kitaev(fermionic_H)
Hamiltonian = qchem.import_operator(Hamiltonian, format="openfermion")