# build up the expression from sub-expressions
sub_expr1 = Variable("_a", latex_format = r"{_{-}a}")
sub_expr2 = Exp(two, Literal("t", theory = "proveit.physics.quantum.QPE"))
expr = ExprTuple(ExprRange(sub_expr1, MultiQubitElem(element = Output(state = NumKet(Mod(Round(Mult(sub_expr2, Literal("phase", latex_format = r"\varphi", theory = "proveit.physics.quantum.QPE"))), sub_expr2), Literal("t", theory = "proveit.physics.quantum.QPE")), part = sub_expr1), targets = Interval(one, Literal("t", theory = "proveit.physics.quantum.QPE"))), one, Literal("t", theory = "proveit.physics.quantum.QPE")), ExprRange(sub_expr1, MultiQubitElem(element = Output(state = Literal("|u>", latex_format = r"\lvert u \rangle", theory = "proveit.physics.quantum.QPE"), part = sub_expr1), targets = Interval(Add(Literal("t", theory = "proveit.physics.quantum.QPE"), one), Add(Literal("t", theory = "proveit.physics.quantum.QPE"), Literal("s", theory = "proveit.physics.quantum.QPE")))), one, Literal("s", theory = "proveit.physics.quantum.QPE")))