ibm-quantum-challenge-fall-22
ibm-quantum-challenge-fall-22 copied to clipboard
Lab 4 `evaluate_expectation` function `results` bug
In Lab 4, Calculate the ground state of H3+ section
# Define evaluate_expectation function
def evaluate_expectation(x):
x = list(x)
# Define estimator run parameters
#### enter your code below ####
job = # ----------- Enter your code here
results = job.values[0]
job_list.append(job)
# Pass results back to callback function
return np.real(results)
results = job.values[0] should be results = job.result().values[0]
Relevant slack threads
- https://qiskit.slack.com/archives/C0466L7D5CG/p1668406205037179
- https://qiskit.slack.com/archives/C0466L7D5CG/p1668287417472589?thread_ts=1668285412.008629&cid=C0466L7D5CG