Skip to content

Commit 38eb1b5

Browse files
committed
update
1 parent f716ea2 commit 38eb1b5

File tree

9 files changed

+249
-219
lines changed

9 files changed

+249
-219
lines changed

doc/pub/week15/html/week15-bs.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2034,7 +2034,7 @@ <h2 id="setting-up-a-vqc" class="anchor">Setting up a VQC </h2>
20342034
</p>
20352035

20362036
$$
2037-
\vert \Psi(\mathbf{x};\boldsymbol\Theta)\rangle = W(\boldsymbol\Theta),U(\mathbf{x}),|0\rangle^{\otimes n}.
2037+
\vert \Psi(\mathbf{x};\boldsymbol\Theta)\rangle = W(\boldsymbol\Theta)U(\mathbf{x})|0\rangle^{\otimes n}.
20382038
$$
20392039

20402040
<p>For instance, one common ansatz is the hardware-efficient circuit:
@@ -2052,7 +2052,7 @@ <h2 id="outputs" class="anchor">Outputs </h2>
20522052
given by the expectation values:
20532053
</p>
20542054
$$
2055-
f_k(\mathbf{x};\boldsymbol\Theta) ;=; \langle \Psi(\mathbf{x};\boldsymbol\Theta) | \hat B_k | \Psi(\mathbf{x};\boldsymbol\Theta)\rangle.
2055+
f_k(\mathbf{x};\boldsymbol\Theta) = \langle \Psi(\mathbf{x};\boldsymbol\Theta) | \hat B_k | \Psi(\mathbf{x};\boldsymbol\Theta)\rangle.
20562056
$$
20572057

20582058
<p>Equivalently, with</p>
@@ -2062,7 +2062,7 @@ <h2 id="outputs" class="anchor">Outputs </h2>
20622062

20632063
<p>one has</p>
20642064
$$
2065-
f_k(\mathbf{x};\boldsymbol\Theta) = \langle 0|U(\mathbf{x})^\dagger W(\boldsymbol\Theta)^\dagger ,\hat B_k, W(\boldsymbol\Theta) U(\mathbf{x}),|0\rangle.
2065+
f_k(\mathbf{x};\boldsymbol\Theta) = \langle 0|U(\mathbf{x})^\dagger W(\boldsymbol\Theta)^\dagger\hat B_k W(\boldsymbol\Theta) U(\mathbf{x})|0\rangle.
20662066
$$
20672067

20682068
<p>Commonly \( \hat B \) is a Pauli operator (e.g. \( Z \) on one qubit). In practice one runs many shots on quantum hardware or simulates this circuit classically to estimate \( \langle \hat B_k\rangle \) .</p>
@@ -2091,15 +2091,15 @@ <h2 id="mathematical-example" class="anchor">Mathematical example </h2>
20912091

20922092
<p>and a variational layer is</p>
20932093
$$
2094-
V(\boldsymbol\Theta)=R_y(\Theta_1)\otimes R_y(\Theta_2),\mathrm{CNOT}(0,1),
2094+
V(\boldsymbol\Theta)=R_y(\Theta_1)\otimes R_y(\Theta_2)\mathrm{CNOT}(0,1),
20952095
$$
20962096

20972097
<p>(apply \( R_y \) on each qubit then entangle). After
2098-
applying \( W(\boldsymbol\Theta)=V(\boldsymbol\Theta) \) to \( |0,0\rangle \),
2098+
applying \( W(\boldsymbol\Theta)=V(\boldsymbol\Theta) \) to \( |00\rangle \),
20992099
we measure \( \hat B=Z\otimes I \) on qubit 0. The output is
21002100
</p>
21012101
$$
2102-
f(\mathbf{x};\boldsymbol\Theta) = \langle 0,0|,U(\mathbf{x})^\dagger,V(\boldsymbol\Theta)^\dagger, (Z\otimes I), V(\boldsymbol\Theta),U(\mathbf{x}),|0,0\rangle.
2102+
f(\mathbf{x};\boldsymbol\Theta) = \langle 00|U(\mathbf{x})^\dagger V(\boldsymbol\Theta)^\dagger (Z\otimes I)V(\boldsymbol\Theta)U(\mathbf{x})|00\rangle.
21032103
$$
21042104

21052105
<p>This \( f(x;\Theta) \) is then compared to the target in a cost function for optimization.</p>

doc/pub/week15/html/week15-reveal.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1885,7 +1885,7 @@ <h2 id="setting-up-a-vqc">Setting up a VQC </h2>
18851885

18861886
<p>&nbsp;<br>
18871887
$$
1888-
\vert \Psi(\mathbf{x};\boldsymbol\Theta)\rangle = W(\boldsymbol\Theta),U(\mathbf{x}),|0\rangle^{\otimes n}.
1888+
\vert \Psi(\mathbf{x};\boldsymbol\Theta)\rangle = W(\boldsymbol\Theta)U(\mathbf{x})|0\rangle^{\otimes n}.
18891889
$$
18901890
<p>&nbsp;<br>
18911891

@@ -1906,7 +1906,7 @@ <h2 id="outputs">Outputs </h2>
19061906
</p>
19071907
<p>&nbsp;<br>
19081908
$$
1909-
f_k(\mathbf{x};\boldsymbol\Theta) ;=; \langle \Psi(\mathbf{x};\boldsymbol\Theta) | \hat B_k | \Psi(\mathbf{x};\boldsymbol\Theta)\rangle.
1909+
f_k(\mathbf{x};\boldsymbol\Theta) = \langle \Psi(\mathbf{x};\boldsymbol\Theta) | \hat B_k | \Psi(\mathbf{x};\boldsymbol\Theta)\rangle.
19101910
$$
19111911
<p>&nbsp;<br>
19121912

@@ -1920,7 +1920,7 @@ <h2 id="outputs">Outputs </h2>
19201920
<p>one has</p>
19211921
<p>&nbsp;<br>
19221922
$$
1923-
f_k(\mathbf{x};\boldsymbol\Theta) = \langle 0|U(\mathbf{x})^\dagger W(\boldsymbol\Theta)^\dagger ,\hat B_k, W(\boldsymbol\Theta) U(\mathbf{x}),|0\rangle.
1923+
f_k(\mathbf{x};\boldsymbol\Theta) = \langle 0|U(\mathbf{x})^\dagger W(\boldsymbol\Theta)^\dagger\hat B_k W(\boldsymbol\Theta) U(\mathbf{x})|0\rangle.
19241924
$$
19251925
<p>&nbsp;<br>
19261926

@@ -1955,17 +1955,17 @@ <h2 id="mathematical-example">Mathematical example </h2>
19551955
<p>and a variational layer is</p>
19561956
<p>&nbsp;<br>
19571957
$$
1958-
V(\boldsymbol\Theta)=R_y(\Theta_1)\otimes R_y(\Theta_2),\mathrm{CNOT}(0,1),
1958+
V(\boldsymbol\Theta)=R_y(\Theta_1)\otimes R_y(\Theta_2)\mathrm{CNOT}(0,1),
19591959
$$
19601960
<p>&nbsp;<br>
19611961

19621962
<p>(apply \( R_y \) on each qubit then entangle). After
1963-
applying \( W(\boldsymbol\Theta)=V(\boldsymbol\Theta) \) to \( |0,0\rangle \),
1963+
applying \( W(\boldsymbol\Theta)=V(\boldsymbol\Theta) \) to \( |00\rangle \),
19641964
we measure \( \hat B=Z\otimes I \) on qubit 0. The output is
19651965
</p>
19661966
<p>&nbsp;<br>
19671967
$$
1968-
f(\mathbf{x};\boldsymbol\Theta) = \langle 0,0|,U(\mathbf{x})^\dagger,V(\boldsymbol\Theta)^\dagger, (Z\otimes I), V(\boldsymbol\Theta),U(\mathbf{x}),|0,0\rangle.
1968+
f(\mathbf{x};\boldsymbol\Theta) = \langle 00|U(\mathbf{x})^\dagger V(\boldsymbol\Theta)^\dagger (Z\otimes I)V(\boldsymbol\Theta)U(\mathbf{x})|00\rangle.
19691969
$$
19701970
<p>&nbsp;<br>
19711971

doc/pub/week15/html/week15-solarized.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1933,7 +1933,7 @@ <h2 id="setting-up-a-vqc">Setting up a VQC </h2>
19331933
</p>
19341934

19351935
$$
1936-
\vert \Psi(\mathbf{x};\boldsymbol\Theta)\rangle = W(\boldsymbol\Theta),U(\mathbf{x}),|0\rangle^{\otimes n}.
1936+
\vert \Psi(\mathbf{x};\boldsymbol\Theta)\rangle = W(\boldsymbol\Theta)U(\mathbf{x})|0\rangle^{\otimes n}.
19371937
$$
19381938

19391939
<p>For instance, one common ansatz is the hardware-efficient circuit:
@@ -1951,7 +1951,7 @@ <h2 id="outputs">Outputs </h2>
19511951
given by the expectation values:
19521952
</p>
19531953
$$
1954-
f_k(\mathbf{x};\boldsymbol\Theta) ;=; \langle \Psi(\mathbf{x};\boldsymbol\Theta) | \hat B_k | \Psi(\mathbf{x};\boldsymbol\Theta)\rangle.
1954+
f_k(\mathbf{x};\boldsymbol\Theta) = \langle \Psi(\mathbf{x};\boldsymbol\Theta) | \hat B_k | \Psi(\mathbf{x};\boldsymbol\Theta)\rangle.
19551955
$$
19561956

19571957
<p>Equivalently, with</p>
@@ -1961,7 +1961,7 @@ <h2 id="outputs">Outputs </h2>
19611961

19621962
<p>one has</p>
19631963
$$
1964-
f_k(\mathbf{x};\boldsymbol\Theta) = \langle 0|U(\mathbf{x})^\dagger W(\boldsymbol\Theta)^\dagger ,\hat B_k, W(\boldsymbol\Theta) U(\mathbf{x}),|0\rangle.
1964+
f_k(\mathbf{x};\boldsymbol\Theta) = \langle 0|U(\mathbf{x})^\dagger W(\boldsymbol\Theta)^\dagger\hat B_k W(\boldsymbol\Theta) U(\mathbf{x})|0\rangle.
19651965
$$
19661966

19671967
<p>Commonly \( \hat B \) is a Pauli operator (e.g. \( Z \) on one qubit). In practice one runs many shots on quantum hardware or simulates this circuit classically to estimate \( \langle \hat B_k\rangle \) .</p>
@@ -1990,15 +1990,15 @@ <h2 id="mathematical-example">Mathematical example </h2>
19901990

19911991
<p>and a variational layer is</p>
19921992
$$
1993-
V(\boldsymbol\Theta)=R_y(\Theta_1)\otimes R_y(\Theta_2),\mathrm{CNOT}(0,1),
1993+
V(\boldsymbol\Theta)=R_y(\Theta_1)\otimes R_y(\Theta_2)\mathrm{CNOT}(0,1),
19941994
$$
19951995

19961996
<p>(apply \( R_y \) on each qubit then entangle). After
1997-
applying \( W(\boldsymbol\Theta)=V(\boldsymbol\Theta) \) to \( |0,0\rangle \),
1997+
applying \( W(\boldsymbol\Theta)=V(\boldsymbol\Theta) \) to \( |00\rangle \),
19981998
we measure \( \hat B=Z\otimes I \) on qubit 0. The output is
19991999
</p>
20002000
$$
2001-
f(\mathbf{x};\boldsymbol\Theta) = \langle 0,0|,U(\mathbf{x})^\dagger,V(\boldsymbol\Theta)^\dagger, (Z\otimes I), V(\boldsymbol\Theta),U(\mathbf{x}),|0,0\rangle.
2001+
f(\mathbf{x};\boldsymbol\Theta) = \langle 00|U(\mathbf{x})^\dagger V(\boldsymbol\Theta)^\dagger (Z\otimes I)V(\boldsymbol\Theta)U(\mathbf{x})|00\rangle.
20022002
$$
20032003

20042004
<p>This \( f(x;\Theta) \) is then compared to the target in a cost function for optimization.</p>

doc/pub/week15/html/week15.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2010,7 +2010,7 @@ <h2 id="setting-up-a-vqc">Setting up a VQC </h2>
20102010
</p>
20112011

20122012
$$
2013-
\vert \Psi(\mathbf{x};\boldsymbol\Theta)\rangle = W(\boldsymbol\Theta),U(\mathbf{x}),|0\rangle^{\otimes n}.
2013+
\vert \Psi(\mathbf{x};\boldsymbol\Theta)\rangle = W(\boldsymbol\Theta)U(\mathbf{x})|0\rangle^{\otimes n}.
20142014
$$
20152015

20162016
<p>For instance, one common ansatz is the hardware-efficient circuit:
@@ -2028,7 +2028,7 @@ <h2 id="outputs">Outputs </h2>
20282028
given by the expectation values:
20292029
</p>
20302030
$$
2031-
f_k(\mathbf{x};\boldsymbol\Theta) ;=; \langle \Psi(\mathbf{x};\boldsymbol\Theta) | \hat B_k | \Psi(\mathbf{x};\boldsymbol\Theta)\rangle.
2031+
f_k(\mathbf{x};\boldsymbol\Theta) = \langle \Psi(\mathbf{x};\boldsymbol\Theta) | \hat B_k | \Psi(\mathbf{x};\boldsymbol\Theta)\rangle.
20322032
$$
20332033

20342034
<p>Equivalently, with</p>
@@ -2038,7 +2038,7 @@ <h2 id="outputs">Outputs </h2>
20382038

20392039
<p>one has</p>
20402040
$$
2041-
f_k(\mathbf{x};\boldsymbol\Theta) = \langle 0|U(\mathbf{x})^\dagger W(\boldsymbol\Theta)^\dagger ,\hat B_k, W(\boldsymbol\Theta) U(\mathbf{x}),|0\rangle.
2041+
f_k(\mathbf{x};\boldsymbol\Theta) = \langle 0|U(\mathbf{x})^\dagger W(\boldsymbol\Theta)^\dagger\hat B_k W(\boldsymbol\Theta) U(\mathbf{x})|0\rangle.
20422042
$$
20432043

20442044
<p>Commonly \( \hat B \) is a Pauli operator (e.g. \( Z \) on one qubit). In practice one runs many shots on quantum hardware or simulates this circuit classically to estimate \( \langle \hat B_k\rangle \) .</p>
@@ -2067,15 +2067,15 @@ <h2 id="mathematical-example">Mathematical example </h2>
20672067

20682068
<p>and a variational layer is</p>
20692069
$$
2070-
V(\boldsymbol\Theta)=R_y(\Theta_1)\otimes R_y(\Theta_2),\mathrm{CNOT}(0,1),
2070+
V(\boldsymbol\Theta)=R_y(\Theta_1)\otimes R_y(\Theta_2)\mathrm{CNOT}(0,1),
20712071
$$
20722072

20732073
<p>(apply \( R_y \) on each qubit then entangle). After
2074-
applying \( W(\boldsymbol\Theta)=V(\boldsymbol\Theta) \) to \( |0,0\rangle \),
2074+
applying \( W(\boldsymbol\Theta)=V(\boldsymbol\Theta) \) to \( |00\rangle \),
20752075
we measure \( \hat B=Z\otimes I \) on qubit 0. The output is
20762076
</p>
20772077
$$
2078-
f(\mathbf{x};\boldsymbol\Theta) = \langle 0,0|,U(\mathbf{x})^\dagger,V(\boldsymbol\Theta)^\dagger, (Z\otimes I), V(\boldsymbol\Theta),U(\mathbf{x}),|0,0\rangle.
2078+
f(\mathbf{x};\boldsymbol\Theta) = \langle 00|U(\mathbf{x})^\dagger V(\boldsymbol\Theta)^\dagger (Z\otimes I)V(\boldsymbol\Theta)U(\mathbf{x})|00\rangle.
20792079
$$
20802080

20812081
<p>This \( f(x;\Theta) \) is then compared to the target in a cost function for optimization.</p>
0 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)