# Question about dataset

**URL:** <https://discuss.pennylane.ai/t/question-about-dataset/3559>\
**Category:** PennyLane Help\
**Created:** [October 17, 2023, 1:29pm UTC](https://discuss.pennylane.ai/t/question-about-dataset/3559 "2023-10-17T13:29:35Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jnorambu](https://yyz2.discourse-cdn.com/flex012/user_avatar/discuss.pennylane.ai/jnorambu/32/2176_2.png) [@jnorambu](https://discuss.pennylane.ai/u/jnorambu)\
**Post date:** [October 17, 2023, 1:29pm UTC](https://discuss.pennylane.ai/t/question-about-dataset/3559/1 "2023-10-17T13:29:35Z")

</div>

Hi, my question it’s pretty simple, I want to know if its possible to change the active space when we call one of the dataset hamiltonian’s or it have a fixed structure (complete active space)?  
Thanks in advance and have a nice day.

---

<div class="post-metadata">

**Author:** ![isaacdevlugt](https://yyz2.discourse-cdn.com/flex012/user_avatar/discuss.pennylane.ai/isaacdevlugt/32/1159_2.png) [@isaacdevlugt](https://discuss.pennylane.ai/u/isaacdevlugt)\
**Post date:** [October 17, 2023, 2:31pm UTC](https://discuss.pennylane.ai/t/question-about-dataset/3559/2 "2023-10-17T14:31:49Z")

</div>

Hey @jnorambu!

Great question. I think this is something we’d like to have on [https://pennylane.ai](https://pennylane.ai) in the future, but for now the active space of molecules is hard-coded. This is the bit in the [source code](https://github.com/PennyLaneAI/DatasetsSource/blob/main/quantum_datasets/qchem.py) that’s relevant:

```python
            if mol.n_orbitals <= 40:
                prog_bar.set_description("Hamiltonian Generation")
                hamiltonian, qubits = qml.qchem.molecular_hamiltonian(
                    symbols,
                    geometry,
                    charge=charge,
                    basis=basis_name,
                    method="pyscf",
                )
                active_electrons = mol.n_electrons
                active_orbitals = mol.n_orbitals
            else:
                # TODO: Add support for active orbitals in the Molecule class
                core_orbs = core_orbitals(mol)
                active_electrons = mol.n_electrons - 2 * len(core_orbs)
                active_orbitals = mol.n_orbitals - len(core_orbs)
                hamiltonian, qubits = qml.qchem.molecular_hamiltonian(
                    symbols,
                    geometry,
                    charge=charge,
                    method="pyscf",
                    active_electrons=active_electrons,
                    active_orbitals=active_orbitals,
                )

```

For now, you can modify this if you’d like by cloning the source code repository and setting the active space to your liking 🙂. Let me know if this helps!
