Skip to content

Commit

Permalink
Fix minor bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
chmwzc committed Dec 12, 2023
1 parent 6b45d25 commit 865a0ba
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/qibochem/measurement/expectation.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from functools import reduce

import numpy as np
import qibo
from qibo import gates
from qibo.hamiltonians import SymbolicHamiltonian
Expand Down Expand Up @@ -73,6 +74,7 @@ def expectation(
if n_shots_per_pauli_term:
total = sum(pauli_term_sample_expectation(circuit, term, n_shots) for term in hamiltonian.terms)
else:
n_terms = len(hamiltonian.terms)
# Determine how to allocate n_shots first
if shot_distribution == "uniform":
# Split evenly amongst all the terms in the Hamiltonian
Expand Down

0 comments on commit 865a0ba

Please sign in to comment.