logo

Axiom QPE_def 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_axiom_expr # Load the stored axiom expression as 'stored_expr'
# import the special expression
from proveit.physics.quantum.QPE import QPE_def
In [2]:
# check that the built expression is the same as the stored expression
assert QPE_def.expr == stored_expr
assert QPE_def.expr._style_id == stored_expr._style_id
print("Passed sanity check: QPE_def matches stored_expr")
Passed sanity check: QPE_def matches stored_expr
In [3]:
# Show the LaTeX representation of the expression for convenience if you need it.
print(stored_expr.latex())
\forall_{s, t \in \mathbb{N}^+}~\left[\forall_{U \in \textrm{U}\left(2^{s}\right)}~\left(\left(\begin{array}{c} \Qcircuit@C=1em @R=.7em{
& \multigate{1}{\textrm{QPE}\left(U, t\right)} & { /^{t} } \qw \\
& \ghost{\textrm{QPE}\left(U, t\right)} & { /^{s} } \qw
} \end{array}\right) \cong \left(\begin{array}{c} \Qcircuit@C=1em @R=.7em{
& \multigate{1}{\textrm{QPE}_1\left(U, t\right)} & \gate{{\mathrm {FT}}^{\dag}_{t}} & { /^{t} } \qw \\
& \ghost{\textrm{QPE}_1\left(U, t\right)} & { /^{s} } \qw & { /^{s} } \qw
} \end{array}\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: 7
operand: 2
1ExprTuple2
2Lambdaparameters: 3
body: 4
3ExprTuple89, 90
4Conditionalvalue: 5
condition: 6
5Operationoperator: 7
operand: 11
6Operationoperator: 9
operands: 10
7Literal
8ExprTuple11
9Literal
10ExprTuple12, 13
11Lambdaparameter: 88
body: 15
12Operationoperator: 23
operands: 16
13Operationoperator: 23
operands: 17
14ExprTuple88
15Conditionalvalue: 18
condition: 19
16ExprTuple89, 20
17ExprTuple90, 20
18Operationoperator: 21
operands: 22
19Operationoperator: 23
operands: 24
20Literal
21Literal
22ExprTuple25, 26
23Literal
24ExprTuple88, 27
25Operationoperator: 29
operand: 33
26Operationoperator: 29
operands: 30
27Operationoperator: 31
operand: 36
28ExprTuple33
29Literal
30ExprTuple34, 35
31Literal
32ExprTuple36
33ExprTuple37, 38
34ExprTuple39, 40
35ExprTuple41, 42
36Operationoperator: 43
operands: 44
37ExprRangelambda_map: 45
start_index: 80
end_index: 90
38ExprRangelambda_map: 45
start_index: 47
end_index: 77
39ExprRangelambda_map: 46
start_index: 80
end_index: 90
40ExprRangelambda_map: 46
start_index: 47
end_index: 77
41ExprRangelambda_map: 48
start_index: 80
end_index: 90
42ExprRangelambda_map: 49
start_index: 80
end_index: 89
43Literal
44ExprTuple50, 89
45Lambdaparameter: 79
body: 51
46Lambdaparameter: 79
body: 52
47Operationoperator: 84
operands: 53
48Lambdaparameter: 79
body: 54
49Lambdaparameter: 79
body: 56
50Literal
51Operationoperator: 59
operands: 57
52Operationoperator: 59
operands: 58
53ExprTuple90, 80
54Operationoperator: 59
operands: 60
55ExprTuple79
56Operationoperator: 71
operands: 61
57NamedExprselement: 62
targets: 64
58NamedExprselement: 63
targets: 64
59Literal
60NamedExprselement: 65
targets: 66
61NamedExprsoperation: 67
62Operationoperator: 71
operands: 68
63Operationoperator: 71
operands: 69
64Operationoperator: 73
operands: 70
65Operationoperator: 71
operands: 72
66Operationoperator: 73
operands: 74
67Literal
68NamedExprsoperation: 75
part: 79
69NamedExprsoperation: 76
part: 79
70ExprTuple80, 77
71Literal
72NamedExprsoperation: 78
part: 79
73Literal
74ExprTuple80, 90
75Operationoperator: 81
operands: 83
76Operationoperator: 82
operands: 83
77Operationoperator: 84
operands: 85
78Operationoperator: 86
operand: 90
79Variable
80Literal
81Literal
82Literal
83ExprTuple88, 90
84Literal
85ExprTuple90, 89
86Literal
87ExprTuple90
88Variable
89Variable
90Variable