Skip to content

Commit

Permalink
fix: Restore Abe's suggestion
Browse files Browse the repository at this point in the history
  • Loading branch information
kshyatt-aws committed May 31, 2024
1 parent 3520d3a commit 4596abd
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/braket/simulator_v2/base_simulator_v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,11 +163,7 @@ def _result_value_to_ndarray(
with the pydantic specification for ResultTypeValues.
"""
for result_ind, result_type in enumerate(task_result.resultTypes):
if (
isinstance(result_type.type, StateVector)
or isinstance(result_type.type, DensityMatrix)
or isinstance(result_type.type, Probability)
):
if isinstance(result_type.type, (StateVector, DensityMatrix, Probability)):
task_result.resultTypes[result_ind].value = np.asarray(
task_result.resultTypes[result_ind].value
)
Expand Down

0 comments on commit 4596abd

Please sign in to comment.