In [1]:

```
import proveit
# Automation is not needed when building an expression:
proveit.defaults.automation = False # This will speed things up.
proveit.defaults.inline_pngs = False # Makes files smaller.
%load_expr # Load the stored expression as 'stored_expr'
# import Expression classes needed to build the expression
from proveit import ExprTuple, k, m
from proveit.numbers import Exp, Mult, Neg, Sum, e, frac, i, one, pi, two
from proveit.physics.quantum.QPE import _m_domain, _phase, _t, _two_pow_t
```

In [2]:

```
# build up the expression from sub-expressions
expr = ExprTuple(frac(one, Exp(two, frac(_t, two))), Sum(index_or_indices = [k], summand = Mult(Exp(e, Mult(two, pi, i, _phase, k)), Exp(e, Neg(frac(Mult(two, pi, i, k, m), _two_pow_t)))), domain = _m_domain))
```

In [3]:

```
# check that the built expression is the same as the stored expression
assert expr == stored_expr
assert expr._style_id == stored_expr._style_id
print("Passed sanity check: expr matches stored_expr")
```

In [4]:

```
# Show the LaTeX representation of the expression for convenience if you need it.
print(stored_expr.latex())
```

In [5]:

```
stored_expr.style_options()
```

In [6]:

```
# display the expression information
stored_expr.expr_info()
```

These web pages were generated on 2023-08-24 by Prove-It Beta Version 0.3, licensed under the GNU Public License by Sandia Corporation.

Presented proofs are not absolutely guaranteed. For assurance, it is important to check the structure of the statement being proven, independently verify the derivation steps, track dependencies, and ensure that employed axioms are valid and properly structured. Inconsistencies may exist, unknowingly, in this system.

This material is based upon work supported by the U.S. Department of Energy, Office of Science, Office of Advanced Scientific Computing Research, under the Quantum Computing Application Teams program. Sandia National Labs is managed and operated by National Technology and Engineering Solutions of Sandia, LLC, a subsidiary of Honeywell International, Inc., for the U.S. Dept. of Energy's NNSA under contract DE-NA0003525. The views expressed above do not necessarily represent the views of the DOE or the U.S. Government.

Please send questions/comments to: wwitzel@sandia.gov.