-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
module {
qwerty.func @sciff_iff_0[]() irrev-> !qwerty<bitbundle[1]> {
%0 = qwerty.qbprep Z<PLUS>[1] : () -> !qwerty<qbundle[1]>
%1 = qwerty.qbprep X<PLUS>[1] : () -> !qwerty<qbundle[1]>
%2 = qwerty.qbmeas %0 by {std: Z[1]} : !qwerty<qbundle[1]> -> !qwerty<bitbundle[1]>
%3 = qwerty.bitunpack %2 : (!qwerty<bitbundle[1]>) -> i1
%4 = scf.if %3 -> (!qwerty<qbundle[1]>) {
%7 = qwerty.qbtrans %1 by {std: X[1]} >> {std: Z[1]} : (!qwerty<qbundle[1]>) -> !qwerty<qbundle[1]>
scf.yield %7 : !qwerty<qbundle[1]>
} else {
%7 = qwerty.qbtrans %1 by {std: X[1]} >> {std: Y[1]} : (!qwerty<qbundle[1]>) -> !qwerty<qbundle[1]>
scf.yield %7 : !qwerty<qbundle[1]>
}
%5 = qwerty.qbmeas %4 by {std: Z[1]} : !qwerty<qbundle[1]> -> !qwerty<bitbundle[1]>
%6 = qwerty.qbmeas %4 by {std: Z[1]} : !qwerty<qbundle[1]> -> !qwerty<bitbundle[1]>
qwerty.return %5 : !qwerty<bitbundle[1]>
}
}This IR passes the verifier, even though we're using %4 (a qubit state) twice!
Metadata
Metadata
Assignees
Labels
No labels