logo

Theorem _psi_t_formula of type Forall

from the theory of proveit.physics.quantum.QPE

see dependencies

In [1]:
import proveit
# Automation is not needed when only building an expression:
proveit.defaults.automation = False # This will speed things up.
proveit.defaults.inline_pngs = False # Makes files smaller.
%load_theorem_expr # Load the stored theorem expression as 'stored_expr'
# import the special expression
from proveit.physics.quantum.QPE import _psi_t_formula
In [2]:
# check that the built expression is the same as the stored expression
assert _psi_t_formula.expr == stored_expr
assert _psi_t_formula.expr._style_id == stored_expr._style_id
print("Passed sanity check: _psi_t_formula matches stored_expr")
Passed sanity check: _psi_t_formula matches stored_expr
In [3]:
# Show the LaTeX representation of the expression for convenience if you need it.
print(stored_expr.latex())
\forall_{t \in \mathbb{N}^+}~\left(\lvert \psi_{t} \rangle = \left(\frac{1}{2^{\frac{t}{2}}} \cdot \left(\sum_{k=0}^{2^{t} - 1} \left(\mathsf{e}^{2 \cdot \pi \cdot \mathsf{i} \cdot \varphi \cdot k} \cdot \lvert k \rangle_{t}\right)\right)\right)\right)
In [4]:
stored_expr.style_options()
namedescriptiondefaultcurrent valuerelated methods
with_wrappingIf 'True', wrap the Expression after the parametersNoneNone/False('with_wrapping',)
condition_wrappingWrap 'before' or 'after' the condition (or None).NoneNone/False('with_wrap_after_condition', 'with_wrap_before_condition')
wrap_paramsIf 'True', wraps every two parameters AND wraps the Expression after the parametersNoneNone/False('with_params',)
justificationjustify to the 'left', 'center', or 'right' in the array cellscentercenter('with_justification',)
In [5]:
# display the expression information
stored_expr.expr_info()
 core typesub-expressionsexpression
0Operationoperator: 1
operand: 3
1Literal
2ExprTuple3
3Lambdaparameter: 62
body: 4
4Conditionalvalue: 5
condition: 6
5Operationoperator: 7
operands: 8
6Operationoperator: 33
operands: 9
7Literal
8ExprTuple10, 11
9ExprTuple62, 12
10Operationoperator: 13
operand: 62
11Operationoperator: 31
operands: 15
12Literal
13Literal
14ExprTuple62
15ExprTuple16, 17
16Operationoperator: 29
operands: 18
17Operationoperator: 19
operand: 22
18ExprTuple63, 21
19Literal
20ExprTuple22
21Operationoperator: 57
operands: 23
22Lambdaparameter: 54
body: 25
23ExprTuple61, 26
24ExprTuple54
25Conditionalvalue: 27
condition: 28
26Operationoperator: 29
operands: 30
27Operationoperator: 31
operands: 32
28Operationoperator: 33
operands: 34
29Literal
30ExprTuple62, 61
31Literal
32ExprTuple35, 36
33Literal
34ExprTuple54, 37
35Operationoperator: 57
operands: 38
36Operationoperator: 39
operands: 40
37Operationoperator: 41
operands: 42
38ExprTuple43, 44
39Literal
40ExprTuple54, 62
41Literal
42ExprTuple45, 46
43Literal
44Operationoperator: 47
operands: 48
45Literal
46Operationoperator: 49
operands: 50
47Literal
48ExprTuple61, 51, 52, 53, 54
49Literal
50ExprTuple55, 56
51Literal
52Literal
53Literal
54Variable
55Operationoperator: 57
operands: 58
56Operationoperator: 59
operand: 63
57Literal
58ExprTuple61, 62
59Literal
60ExprTuple63
61Literal
62Variable
63Literal