Skip to content

Commit

Permalink
Update usage of Qiskit Estimator (#92)
Browse files Browse the repository at this point in the history
  • Loading branch information
caleb-johnson committed Apr 8, 2023
1 parent 44d9b48 commit 1c84c56
Showing 1 changed file with 1 addition and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -672,9 +672,6 @@ def _estimate_expvals(
- (Tuple[List[NDArray], List[NDArray], Optional[str]]): the expectation values for the
tensor circuits and superposition circuits
"""
all_circuits = tensor_ansatze + superposition_ansatze
all_observables = tensor_paulis + superposition_paulis

ansatz_t: List[QuantumCircuit] = []
observables_t: List[Pauli] = []
for i, circuit in enumerate(tensor_ansatze):
Expand Down Expand Up @@ -728,10 +725,7 @@ def _estimate_expvals(
job_id = job.job_id

else:
estimator = TestEstimator(
circuits=all_circuits,
observables=all_observables,
)
estimator = TestEstimator()
results = (
estimator.run(
circuits=all_ansatze_for_estimator,
Expand Down

0 comments on commit 1c84c56

Please sign in to comment.