Skip to content

Commit 5626f06

Browse files
idk3babbush
authored andcommitted
Updated docs/examples (#79)
1 parent 2c12c1c commit 5626f06

File tree

2 files changed

+64
-63
lines changed

2 files changed

+64
-63
lines changed

docs/examples.rst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -276,12 +276,13 @@ Below, we load MolecularData from a saved calculation of LiH. We then obtain an
276276
active_space_stop = 3
277277
278278
# Generate and populate instance of MolecularData.
279-
molecule = MolecularData(geometry, basis, multiplicity)
279+
molecule = MolecularData(geometry, basis, multiplicity, description=\"1.45\")
280280
molecule.load()
281281
282282
# Get the Hamiltonian in an active space.
283283
molecular_hamiltonian = molecule.get_molecular_hamiltonian(
284-
active_space_start, active_space_stop)
284+
occupied_indices=range(active_space_start),
285+
active_indices=range(active_space_start, active_space_stop))
285286
286287
# Map operator to fermions and qubits.
287288
fermion_hamiltonian = get_fermion_operator(molecular_hamiltonian)
@@ -347,7 +348,7 @@ Here we load :math:`H_2` from a precomputed molecule file found in the test data
347348
348349
# Load the molecule.
349350
import os
350-
filename = os.path.join(DATA_DIRECTORY, 'H2_sto-3g_singlet')
351+
filename = os.path.join(DATA_DIRECTORY, 'H2_sto-3g_singlet_0.7414')
351352
molecule = MolecularData(filename=filename)
352353
353354
# Use a Jordan-Wigner encoding, and compress to remove 0 imaginary components

0 commit comments

Comments
 (0)