Skip to content

Commit 49bbc5c

Browse files
committed
Fixed SWAP-test
1 parent 8d97805 commit 49bbc5c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

qbraid_algorithms/qaoa/qaoa.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ def generate_algorithm(self, cost_ham : str, depth : int, layer : str = "", epsi
288288
std.h(self.builder.qubits - 1)
289289
for q in range(num_qubits):
290290
std.cswap(control=f"qb[{self.builder.qubits - 1}]", targ1=f"qb[{q}]", targ2=f"qb[{q+num_qubits}]")
291-
291+
std.h(self.builder.qubits - 1)
292292
std.measure([self.builder.qubits - 1], [0])
293293

294294
std.begin_if("cb[0] == 0")

0 commit comments

Comments
 (0)