Skip to content

Commit 134920c

Browse files
authored
Update qco_programs.cpp
Signed-off-by: Lukas Burgholzer <burgholzer@me.com>
1 parent e79773f commit 134920c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mlir/unittests/programs/qco_programs.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1969,11 +1969,11 @@ void ifTwoQubits(QCOProgramBuilder& b) {
19691969
}
19701970

19711971
void ifElse(QCOProgramBuilder& b) {
1972-
auto q = b.allocQubitRegister(2);
1972+
auto q = b.allocQubitRegister(1);
19731973
auto q0 = b.h(q[0]);
19741974
auto [measuredQubit, measureResult] = b.measure(q0);
19751975
b.qcoIf(
1976-
measureResult, {q[1]},
1976+
measureResult, {measuredQubit},
19771977
[&](mlir::ValueRange qubits) {
19781978
auto innerQubit = b.x(qubits[0]);
19791979
return llvm::SmallVector<mlir::Value>{innerQubit};

0 commit comments

Comments
 (0)