File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed
Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -64,7 +64,7 @@ def _exec_quasi_dist(self, circuit: QuantumCircuit) -> Results:
6464 shots = self ._get_shots ()
6565 result = sampler .run ([circuit ], shots = shots ).result ()
6666
67- return result .quasi_dists [0 ] # type: ignore[no-any-return]
67+ return dict ( result .quasi_dists [0 ]) # type: ignore[no-any-return]
6868
6969 def run_circuit (self ) -> Results :
7070 """
Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ def test_correct_counts(self):
1616 )
1717
1818 assert result .get ("0" ) == 1000
19+ assert isinstance (result , dict )
1920
2021 def test_correct_counts_custom_shots (self ):
2122 """
@@ -27,6 +28,7 @@ def test_correct_counts_custom_shots(self):
2728 )
2829
2930 assert result .get ("0" ) == 120
31+ assert isinstance (result , dict )
3032
3133 def test_incorrect_counts (self ):
3234 """
@@ -45,6 +47,7 @@ def test_correct_quasi_dist(self):
4547 )
4648
4749 assert result .get (0 ) == 1.0
50+ assert isinstance (result , dict )
4851
4952 def test_correct_quasi_dist_custom_shots (self ):
5053 """
@@ -55,6 +58,7 @@ def test_correct_quasi_dist_custom_shots(self):
5558 )
5659
5760 assert result .get (0 ) == 1.0
61+ assert isinstance (result , dict )
5862
5963 def test_incorrect_quasi_dist (self ):
6064 """
You can’t perform that action at this time.
0 commit comments