Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
swernli committed Sep 16, 2024
1 parent c759348 commit 10cf9f1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions compiler/qsc/src/codegen/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ mod base_profile {
operation Main() : (Result, Result) {
use (q0, q1) = (Qubit(), Qubit());
X(q0);
SwapLabels(q0, q1);
Relabel([q0, q1], [q1, q0]);
X(q1);
(MResetZ(q0), MResetZ(q1))
}
Expand Down Expand Up @@ -322,7 +322,7 @@ mod base_profile {
{
use (q0, q1) = (Qubit(), Qubit());
X(q0);
SwapLabels(q0, q1);
Relabel([q0, q1], [q1, q0]);
X(q1);
Reset(q0);
Reset(q1);
Expand Down Expand Up @@ -824,7 +824,7 @@ mod adaptive_ri_profile {
operation Main() : (Result, Result) {
use (q0, q1) = (Qubit(), Qubit());
X(q0);
SwapLabels(q0, q1);
Relabel([q0, q1], [q1, q0]);
X(q1);
(MResetZ(q0), MResetZ(q1))
}
Expand Down Expand Up @@ -897,7 +897,7 @@ mod adaptive_ri_profile {
{
use (q0, q1) = (Qubit(), Qubit());
X(q0);
SwapLabels(q0, q1);
Relabel([q0, q1], [q1, q0]);
X(q1);
Reset(q0);
Reset(q1);
Expand Down Expand Up @@ -981,7 +981,7 @@ mod adaptive_ri_profile {
X(q0);
X(q1);
X(q2);
SwapLabels(q0, q1);
Relabel([q0, q1], [q1, q0]);
QIR.Runtime.__quantum__rt__qubit_release(q0);
let q3 = QIR.Runtime.__quantum__rt__qubit_allocate();
X(q3);
Expand Down
2 changes: 1 addition & 1 deletion pip/tests/test_interpreter.py
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ def test_entry_expr_circuit() -> None:
def test_swap_label_circuit() -> None:
e = Interpreter(TargetProfile.Unrestricted)
e.interpret(
"operation Foo() : Unit { use q1 = Qubit(); use q2 = Qubit(); X(q1); SwapLabels(q1, q2); X(q2); }"
"operation Foo() : Unit { use q1 = Qubit(); use q2 = Qubit(); X(q1); Relabel([q1, q2], [q2, q1]); X(q2); }"
)
circuit = e.circuit("Foo()")
assert str(circuit) == dedent(
Expand Down

0 comments on commit 10cf9f1

Please sign in to comment.