Skip to content

Commit bf194a0

Browse files
committed
regenerate notebook
1 parent 492f2b1 commit bf194a0

File tree

2 files changed

+22
-18
lines changed

2 files changed

+22
-18
lines changed

qualtran/bloqs/basic_gates/su2_rotation.ipynb

+21-15
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"cells": [
33
{
44
"cell_type": "markdown",
5-
"id": "59d7c148",
5+
"id": "d6d914da",
66
"metadata": {
77
"cq.autogen": "title_cell"
88
},
@@ -13,7 +13,7 @@
1313
{
1414
"cell_type": "code",
1515
"execution_count": null,
16-
"id": "2f8f58e2",
16+
"id": "ded96bc8",
1717
"metadata": {
1818
"cq.autogen": "top_imports"
1919
},
@@ -30,7 +30,7 @@
3030
},
3131
{
3232
"cell_type": "markdown",
33-
"id": "5343b6ee",
33+
"id": "4b2a9c14",
3434
"metadata": {
3535
"cq.autogen": "SU2RotationGate.bloq_doc.md"
3636
},
@@ -41,21 +41,27 @@
4141
"The rotation is represented by the matrix:\n",
4242
"\n",
4343
"$$\n",
44+
" e^{i \\alpha}\n",
4445
" \\begin{pmatrix}\n",
4546
" e^{i(\\lambda + \\phi)} \\cos(\\theta) & e^{i\\phi} \\sin(\\theta) \\\\\n",
4647
" e^{i\\lambda} \\sin(\\theta) & - \\cos(\\theta)\n",
4748
" \\end{pmatrix}\n",
4849
"$$\n",
4950
"\n",
51+
"#### Parameters\n",
52+
" - `theta`: rotation angle $\\theta$ in the above matrix.\n",
53+
" - `phi`: phase angle $\\phi$ in the above matrix.\n",
54+
" - `lambd`: phase angle $\\lambda$ in the above matrix.\n",
55+
" - `global_shift`: phase angle $\\alpha$, i.e. apply a global phase shift of $e^{i \\alpha}$. \n",
56+
"\n",
5057
"#### References\n",
51-
"[Generalized Quantum Signal Processing](https://arxiv.org/abs/2308.01501)\n",
52-
" Motlagh and Wiebe. (2023). Equation 7.\n"
58+
" - [Generalized Quantum Signal Processing](https://arxiv.org/abs/2308.01501). Motlagh and Wiebe. (2023). Equation 7.\n"
5359
]
5460
},
5561
{
5662
"cell_type": "code",
5763
"execution_count": null,
58-
"id": "427b3db0",
64+
"id": "950a1fe9",
5965
"metadata": {
6066
"cq.autogen": "SU2RotationGate.bloq_doc.py"
6167
},
@@ -66,7 +72,7 @@
6672
},
6773
{
6874
"cell_type": "markdown",
69-
"id": "1a494a05",
75+
"id": "26277091",
7076
"metadata": {
7177
"cq.autogen": "SU2RotationGate.example_instances.md"
7278
},
@@ -77,7 +83,7 @@
7783
{
7884
"cell_type": "code",
7985
"execution_count": null,
80-
"id": "a65a3d09",
86+
"id": "5d165eae",
8187
"metadata": {
8288
"cq.autogen": "SU2RotationGate.su2_rotation_gate"
8389
},
@@ -89,7 +95,7 @@
8995
{
9096
"cell_type": "code",
9197
"execution_count": null,
92-
"id": "7233599d",
98+
"id": "6b034a9b",
9399
"metadata": {
94100
"cq.autogen": "SU2RotationGate.hadamard"
95101
},
@@ -101,18 +107,18 @@
101107
{
102108
"cell_type": "code",
103109
"execution_count": null,
104-
"id": "9f659e0d",
110+
"id": "baa38dac",
105111
"metadata": {
106112
"cq.autogen": "SU2RotationGate.t_gate"
107113
},
108114
"outputs": [],
109115
"source": [
110-
"t_gate = SU2RotationGate(0, 3 * np.pi / 4, 0)"
116+
"t_gate = SU2RotationGate(0, 3 * np.pi / 4, 0, -3 * np.pi / 4)"
111117
]
112118
},
113119
{
114120
"cell_type": "markdown",
115-
"id": "9a2820b5",
121+
"id": "e85d6f3f",
116122
"metadata": {
117123
"cq.autogen": "SU2RotationGate.graphical_signature.md"
118124
},
@@ -123,7 +129,7 @@
123129
{
124130
"cell_type": "code",
125131
"execution_count": null,
126-
"id": "d8795bb6",
132+
"id": "1469a240",
127133
"metadata": {
128134
"cq.autogen": "SU2RotationGate.graphical_signature.py"
129135
},
@@ -136,7 +142,7 @@
136142
},
137143
{
138144
"cell_type": "markdown",
139-
"id": "6a41a8b3",
145+
"id": "eb5742c2",
140146
"metadata": {
141147
"cq.autogen": "SU2RotationGate.call_graph.md"
142148
},
@@ -147,7 +153,7 @@
147153
{
148154
"cell_type": "code",
149155
"execution_count": null,
150-
"id": "b310a9d1",
156+
"id": "1198abe9",
151157
"metadata": {
152158
"cq.autogen": "SU2RotationGate.call_graph.py"
153159
},

qualtran/bloqs/basic_gates/su2_rotation.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,9 @@ class SU2RotationGate(GateWithRegisters):
4646
\end{pmatrix}
4747
$$
4848
49-
where $s$ is the global phase shift.
50-
5149
Args:
5250
theta: rotation angle $\theta$ in the above matrix.
53-
phi: phase angle $\theta$ in the above matrix.
51+
phi: phase angle $\phi$ in the above matrix.
5452
lambd: phase angle $\lambda$ in the above matrix.
5553
global_shift: phase angle $\alpha$, i.e. apply a global phase shift of $e^{i \alpha}$.
5654

0 commit comments

Comments
 (0)