@@ -148,15 +148,15 @@ def test_decompose_qpd_instructions(self):
148
148
with self .subTest ("Empty circuit" ):
149
149
circ = QuantumCircuit ()
150
150
new_circ = decompose_qpd_instructions (QuantumCircuit (), [])
151
- circ .add_register (ClassicalRegister (0 , name = "qpd_measurements" ))
151
+ circ .add_register (ClassicalRegister (1 , name = "qpd_measurements" ))
152
152
self .assertEqual (circ , new_circ )
153
153
with self .subTest ("No QPD circuit" ):
154
154
circ = QuantumCircuit (2 , 1 )
155
155
circ .h (0 )
156
156
circ .cx (0 , 1 )
157
157
circ .measure (1 , 0 )
158
158
new_circ = decompose_qpd_instructions (circ , [])
159
- circ .add_register (ClassicalRegister (0 , name = "qpd_measurements" ))
159
+ circ .add_register (ClassicalRegister (1 , name = "qpd_measurements" ))
160
160
self .assertEqual (circ , new_circ )
161
161
with self .subTest ("Single QPD gate" ):
162
162
circ = QuantumCircuit (2 )
@@ -165,7 +165,7 @@ def test_decompose_qpd_instructions(self):
165
165
qpd_gate = TwoQubitQPDGate (qpd_basis )
166
166
circ .data .append (CircuitInstruction (qpd_gate , qubits = [0 , 1 ]))
167
167
decomp_circ = decompose_qpd_instructions (circ , [[0 ]], map_ids = [0 ])
168
- circ_compare .add_register (ClassicalRegister (0 , name = "qpd_measurements" ))
168
+ circ_compare .add_register (ClassicalRegister (1 , name = "qpd_measurements" ))
169
169
self .assertEqual (decomp_circ , circ_compare )
170
170
with self .subTest ("Incorrect map index size" ):
171
171
with pytest .raises (ValueError ) as e_info :
0 commit comments