File tree Expand file tree Collapse file tree 1 file changed +17
-1
lines changed
Expand file tree Collapse file tree 1 file changed +17
-1
lines changed Original file line number Diff line number Diff line change 9898 .sample (observable = observables .Z (3 ))
9999)
100100
101+ # Circuit with basis rotations for `CIRCUIT` when using program sets
102+ CIRCUIT_WITH_BASIS_ROTATION = (
103+ Circuit ()
104+ .h (0 )
105+ .cnot (0 , 1 )
106+ .i (2 )
107+ .i (3 )
108+ .ry (1 , - np .pi / 2 ) # Basis rotation gate for PauliX(1)
109+ .rx (2 , np .pi / 2 ) # Basis rotation gate for PauliY(2)
110+ )
111+
101112CIRCUIT_BELL = Circuit ().h (0 ).cnot (0 , 1 )
102113PROGRAM_RESULT = {
103114 "braketSchemaHeader" : {
@@ -1204,8 +1215,13 @@ def test_local_sim_batch_execute_parallel(mock_run_batch):
12041215 RESULT .get_value_by_result_type (result_types .Sample (observable = observables .Z (3 ))),
12051216 )
12061217
1218+ if dev ._supports_program_sets :
1219+ expected_circuits = [CIRCUIT_WITH_BASIS_ROTATION , CIRCUIT_WITH_BASIS_ROTATION ]
1220+ else :
1221+ expected_circuits = [CIRCUIT , CIRCUIT ]
1222+
12071223 mock_run_batch .assert_called_with (
1208- [ CIRCUIT , CIRCUIT ] ,
1224+ expected_circuits ,
12091225 shots = SHOTS ,
12101226 max_parallel = None ,
12111227 inputs = [],
You can’t perform that action at this time.
0 commit comments