Skip to content

Commit 2a10591

Browse files
committed
Another try at fixing aligned multiline equation rendering
1 parent d16b43a commit 2a10591

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

learn-pr/quantum/explore-entanglement/includes/3-create-entanglement-qsharp.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,13 @@ Here's how it works:
4646
4747
1. Apply a CNOT operation to the qubit pair. Recall that the control qubit is in a superposition state and the target qubit is in the :::no-loc text="$\\ket{0_t}$"::: state.
4848

49-
:::no-loc text="$$
49+
$$
5050
\\begin{aligned}
5151
CNOT \\frac{1}{\\sqrt{2}}(\\ket{0_c}+\\ket{1_c})\\ket{0}_t &= CNOT \\frac{1}{\\sqrt2}(\\ket{0_c 0_t}+\\ket{1_c 0_t})\\\\
5252
&= \\frac{1}{\\sqrt2}(CNOT \\ket{0_c 0_t} + CNOT \\ket{1_c 0_t})\\\\
5353
&= \\frac{1}{\\sqrt2}(\\ket{0_c 0_t}+\\ket{1_c 1_t})
5454
\\end{aligned}
55-
$$":::
55+
$$
5656

5757
The state :::no-loc text="$\\frac{1}{\\sqrt2}(\\ket{0_c 0_t}+\\ket{1_c 1_t})$"::: is entangled. This particular entangled state is one of the four Bell states, :::no-loc text="$\\ket{\\phi^{+}}$":::.
5858

@@ -179,7 +179,7 @@ To create the Bell state :::no-loc text="$\\ket{\\phi^+}$"::: in Q#, follow thes
179179
180180
To create other Bell states, apply additional Pauli :::no-loc text="$X$"::: or :::no-loc text="$Z$"::: operations to the qubits.
181181
182-
For example, to create the Bell state :::no-loc text="$\\ket{\\phi^-}=\\frac1{\\sqrt2}(\\ket{00}-\\ket{11})$, apply the Pauli $Z$ operation to the control qubit after you apply the Hadamard gate, but before you apply CNOT. The :::no-loc text="$Z$"::: operation flips the state :::no-loc text="$\\ket{+}$"::: to $\\ket{-}$":::.
182+
For example, to create the Bell state :::no-loc text="$\\ket{\\phi^-}=\\frac1{\\sqrt2}(\\ket{00}-\\ket{11})$":::, apply the Pauli $Z$ operation to the control qubit after you apply the Hadamard gate, but before you apply CNOT. The :::no-loc text="$Z$"::: operation flips the state :::no-loc text="$\\ket{+}$"::: to :::no-loc text="$\\ket{-}$":::.
183183
184184
> [!NOTE]
185185
> The states :::no-loc text="$\\frac{1}{\\sqrt{2}}(\\ket{0}+\\ket{1})$"::: and :::no-loc text="$\\frac{1}{\\sqrt{2}}(\\ket{0} - \\ket{1})$"::: are also known as :::no-loc text="$\\ket{+}$"::: and :::no-loc text="$\\ket{-}$":::, respectively.
@@ -195,15 +195,15 @@ Here's how to create the :::no-loc text="$\\ket{\\phi^-}$"::: state:
195195
196196
:::no-loc text="$$Z \\frac{1}{\\sqrt{2}}(\\ket{0_c} + \\ket{1_c}) = \\frac{1}{\\sqrt{2}}(\\ket{0_c} - \\ket{1_c}) = \\ket{-}_c$$":::
197197
198-
1. Apply the CNOT operation to the control qubit and the target qubit, which is in the :::no-loc text="$\ket{0_t}$"::: state.
198+
1. Apply the CNOT operation to the control qubit and the target qubit, which is in the :::no-loc text="$\\ket{0_t}$"::: state.
199199
200-
":::no-loc text="$$
200+
$$
201201
\\begin{aligned}
202202
CNOT \\frac{1}{\\sqrt{2}}(\\ket{0_c}-\\ket{1_c})\\ket{0}_t &= CNOT \\frac{1}{\\sqrt2}(\\ket{0_c 0_t}-\\ket{1_c 0_t})\\\\
203203
&= \\frac{1}{\\sqrt2}(CNOT \\ket{0_c 0_t} - CNOT \\ket{1_c 0_t})\\\\
204204
&= \\frac{1}{\\sqrt2}(\\ket{0_c 0_t}-\\ket{1_c 1_t})
205205
\\end{aligned}
206-
$$":::
206+
$$
207207
208208
To create the :::no-loc text="$\\ket{\\phi^-}$"::: Bell state in Q#, replace the code in the your **Main.qs** with the following code:
209209

0 commit comments

Comments
 (0)