logo

Theorem _psi_t_output 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_output
In [2]:
# check that the built expression is the same as the stored expression
assert _psi_t_output.expr == stored_expr
assert _psi_t_output.expr._style_id == stored_expr._style_id
print("Passed sanity check: _psi_t_output matches stored_expr")
Passed sanity check: _psi_t_output 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(\textrm{Pr}\left(\begin{array}{c} \Qcircuit@C=1em @R=.7em{
\qin{\lvert + \rangle} & \multigate{4}{\textrm{QPE}_1\left(U, t\right)} & \multiqout{3}{\lvert \psi_{t} \rangle} \\
\qin{\lvert + \rangle} & \ghost{\textrm{QPE}_1\left(U, t\right)} & \ghostqout{\lvert \psi_{t} \rangle} \\
\qin{\begin{array}{c}:\\ \left(t - 3\right) \times \\:\end{array}} & \ghost{\textrm{QPE}_1\left(U, t\right)} & \ghostqout{\lvert \psi_{t} \rangle} \\
\qin{\lvert + \rangle} & \ghost{\textrm{QPE}_1\left(U, t\right)} & \ghostqout{\lvert \psi_{t} \rangle} \\
\qin{\lvert u \rangle} & \ghost{\textrm{QPE}_1\left(U, t\right)} & \qout{\lvert u \rangle}
} \end{array}\right) = 1\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: 80
body: 4
4Conditionalvalue: 5
condition: 6
5Operationoperator: 7
operands: 8
6Operationoperator: 9
operands: 10
7Literal
8ExprTuple11, 79
9Literal
10ExprTuple80, 12
11Operationoperator: 13
operand: 15
12Literal
13Literal
14ExprTuple15
15Operationoperator: 16
operands: 17
16Literal
17ExprTuple18, 19, 20
18ExprTuple21, 22
19ExprTuple23, 24
20ExprTuple25, 26
21ExprRangelambda_map: 27
start_index: 79
end_index: 80
22ExprRangelambda_map: 28
start_index: 79
end_index: 81
23ExprRangelambda_map: 29
start_index: 79
end_index: 80
24ExprRangelambda_map: 29
start_index: 69
end_index: 70
25ExprRangelambda_map: 30
start_index: 79
end_index: 80
26ExprRangelambda_map: 31
start_index: 79
end_index: 81
27Lambdaparameter: 68
body: 32
28Lambdaparameter: 68
body: 33
29Lambdaparameter: 68
body: 34
30Lambdaparameter: 68
body: 35
31Lambdaparameter: 68
body: 37
32Operationoperator: 54
operands: 38
33Operationoperator: 42
operands: 39
34Operationoperator: 42
operands: 40
35Operationoperator: 42
operands: 41
36ExprTuple68
37Operationoperator: 42
operands: 43
38NamedExprsstate: 44
39NamedExprselement: 45
targets: 51
40NamedExprselement: 46
targets: 47
41NamedExprselement: 48
targets: 49
42Literal
43NamedExprselement: 50
targets: 51
44Operationoperator: 52
operand: 64
45Operationoperator: 54
operands: 61
46Operationoperator: 55
operands: 56
47Operationoperator: 62
operands: 57
48Operationoperator: 60
operands: 58
49Operationoperator: 62
operands: 59
50Operationoperator: 60
operands: 61
51Operationoperator: 62
operands: 63
52Literal
53ExprTuple64
54Literal
55Literal
56NamedExprsoperation: 65
part: 68
57ExprTuple79, 70
58NamedExprsstate: 66
part: 68
59ExprTuple79, 80
60Literal
61NamedExprsstate: 67
part: 68
62Literal
63ExprTuple69, 70
64Literal
65Operationoperator: 71
operands: 72
66Operationoperator: 73
operand: 80
67Literal
68Variable
69Operationoperator: 76
operands: 75
70Operationoperator: 76
operands: 77
71Literal
72ExprTuple78, 80
73Literal
74ExprTuple80
75ExprTuple80, 79
76Literal
77ExprTuple80, 81
78Literal
79Literal
80Variable
81Literal