Skip to content

Commit f8f1a20

Browse files
committed
corrected matrix viz. bug
1 parent 98f1220 commit f8f1a20

File tree

24 files changed

+329
-246
lines changed

24 files changed

+329
-246
lines changed

content/posts/physics/quantum_computing/index.md

+26-19
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Quantum computers hold the promise of solving problems that are intractable for
2929

3030
Quantum computing's power stems from its unique use of quantum mechanics to represent and manipulate data. This section provides a detailed look into the mathematical principles that underpin quantum computing.
3131

32-
### **Quantum States and Qubits**
32+
### Quantum States and Qubits
3333

3434
In quantum computing, information is encoded in quantum states of qubits. A qubit is the quantum analog of a classical bit, but it can exist in a superposition of the two basis states $|0⟩$ and $|1⟩$.
3535

@@ -47,26 +47,35 @@ In quantum computing, information is encoded in quantum states of qubits. A qubi
4747
2. **Dirac Notation:**
4848
The vector form $|ψ⟩$ is often written in Dirac or bra-ket notation, which is a convenient way to describe quantum states. The basis states $|0⟩$ and $|1⟩$ are the eigenstates of the Pauli Z operator (more on this below).
4949

50-
### **Quantum Gates and Operations**
50+
### Quantum Gates and Operations
5151

5252
Quantum gates are the building blocks of quantum circuits, analogous to classical logic gates. They are represented by unitary matrices that act on the state vectors of qubits. Unitarity ensures that the operation preserves the total probability (i.e., it remains 1).
5353

54+
$$
55+
\begin{equation}
56+
\begin{pmatrix}
57+
0 & 1 \\\
58+
1 & 0
59+
\end{pmatrix}
60+
\end{equation}
61+
$$
5462
1. **Pauli Matrices:**
5563
The Pauli matrices are fundamental in quantum mechanics and quantum computing. They describe basic quantum operations and are used to represent qubit rotations.
5664

5765
- **Pauli-X (NOT Gate):**
58-
$$
59-
X = \begin{pmatrix}
60-
0 & 1 \\
66+
$
67+
X =
68+
\begin{bmatrix}
69+
0 & 1 \\\
6170
1 & 0
62-
\end{pmatrix}
63-
$$
71+
\end{bmatrix}
72+
$
6473
This gate flips the state of a qubit: $X|0⟩ = |1⟩$ and $X|1⟩ = |0⟩$.
6574

6675
- **Pauli-Y:**
6776
$$
6877
Y = \begin{pmatrix}
69-
0 & -i \\
78+
0 & -i \\\
7079
i & 0
7180
\end{pmatrix}
7281
$$
@@ -75,7 +84,7 @@ Quantum gates are the building blocks of quantum circuits, analogous to classica
7584
- **Pauli-Z (Phase Flip):**
7685
$$
7786
Z = \begin{pmatrix}
78-
1 & 0 \\
87+
1 & 0 \\\
7988
0 & -1
8089
\end{pmatrix}
8190
$$
@@ -85,7 +94,7 @@ Quantum gates are the building blocks of quantum circuits, analogous to classica
8594
The Hadamard gate creates a superposition of states. It transforms the basis states as follows:
8695
$$
8796
H = \frac{1}{\sqrt{2}} \begin{pmatrix}
88-
1 & 1 \\
97+
1 & 1 \\\
8998
1 & -1
9099
\end{pmatrix}
91100
$$
@@ -96,9 +105,9 @@ Quantum gates are the building blocks of quantum circuits, analogous to classica
96105
The CNOT gate is a two-qubit operation that flips the state of the target qubit if the control qubit is in state $|1⟩$.
97106
$$
98107
CNOT = \begin{pmatrix}
99-
1 & 0 & 0 & 0 \\
100-
0 & 1 & 0 & 0 \\
101-
0 & 0 & 0 & 1 \\
108+
1 & 0 & 0 & 0 \\\
109+
0 & 1 & 0 & 0 \\\
110+
0 & 0 & 0 & 1 \\\
102111
0 & 0 & 1 & 0
103112
\end{pmatrix}
104113
$$
@@ -108,7 +117,7 @@ Quantum gates are the building blocks of quantum circuits, analogous to classica
108117
- **S Gate:**
109118
$$
110119
S = \begin{pmatrix}
111-
1 & 0 \\
120+
1 & 0 \\\
112121
0 & i
113122
\end{pmatrix}
114123
$$
@@ -117,13 +126,13 @@ Quantum gates are the building blocks of quantum circuits, analogous to classica
117126
- **T Gate:**
118127
$$
119128
T = \begin{pmatrix}
120-
1 & 0 \\
129+
1 & 0 \\\
121130
0 & e^{iπ/4}
122131
\end{pmatrix}
123132
$$
124133
The T gate introduces a phase shift of $π/4$.
125134

126-
### **Quantum Measurement**
135+
### Quantum Measurement
127136

128137
Measurement in quantum computing collapses a quantum state into one of the basis states, which can be observed as classical information. The probabilities of the outcomes are determined by the amplitudes of the state vector components.
129138

@@ -142,9 +151,7 @@ Measurement in quantum computing collapses a quantum state into one of the basis
142151
After the measurement, the state collapses to $|0⟩$ or $|1⟩$ with the respective probabilities, and the post-measurement state reflects this collapse.
143152

144153
3. **Measurement in Different Bases:**
145-
Measurements can also be performed in other bases, such as the $\{|+\rangle, |-\rangle\}$ basis, where $|+\rangle = \frac{1}{\sqrt{2}}(|0\rangle + |1\rangle)$ and $|-\rangle = \frac{1}{\sqrt{2}}(|0\r
146-
147-
angle - |1\rangle)$. The probabilities and post-measurement states differ depending on the chosen basis.
154+
Measurements can also be performed in other bases, such as the $\{|+\rangle, |-\rangle\}$ basis, where $|+\rangle = \frac{1}{\sqrt{2}}(|0\rangle + |1\rangle)$ and $|-\rangle = \frac{1}{\sqrt{2}}(|0\rangle - |1\rangle)$. The probabilities and post-measurement states differ depending on the chosen basis.
148155

149156
## **Quantum Circuit Example with Qiskit**
150157

public/categories/index.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@
66
<description>Recent content in Categories on Stefano Giannini</description>
77
<generator>Hugo -- gohugo.io</generator>
88
<language>en</language>
9-
<lastBuildDate>Fri, 28 Jun 2024 00:00:00 +0100</lastBuildDate><atom:link href="http://localhost:1313/categories/index.xml" rel="self" type="application/rss+xml" />
9+
<lastBuildDate>Sun, 30 Jun 2024 08:00:00 +0100</lastBuildDate><atom:link href="http://localhost:1313/categories/index.xml" rel="self" type="application/rss+xml" />
1010
</channel>
1111
</rss>

public/categories/physics/index.html

+22-19
Original file line numberDiff line numberDiff line change
@@ -296,14 +296,16 @@
296296
<div class="post-card">
297297
<div class="card">
298298
<div class="card-head">
299-
<a href="/posts/physics/percolation/" class="post-card-link">
300-
<img class="card-img-top" src='/posts/physics/percolation/images/lattice_illustration.png' alt="Hero Image">
299+
<a href="/posts/physics/quantum_computing/" class="post-card-link">
300+
<img class="card-img-top" src='/posts/physics/quantum_computing/images/bell_state_sphere.png' alt="Hero Image">
301301
</a>
302302
</div>
303303
<div class="card-body">
304-
<a href="/posts/physics/percolation/" class="post-card-link">
305-
<h5 class="card-title">Percolation</h5>
306-
<p class="card-text post-summary">Introduction Percolation theory is a fundamental concept in statistical physics and mathematics that describes the behavior of connected clusters in a random graph. It is a model for understanding how a network behaves when nodes or links are added, leading to a phase transition from a state of disconnected clusters to a state where a large, connected cluster spans the system. This transition occurs at a critical threshold, known as the percolation threshold.</p>
304+
<a href="/posts/physics/quantum_computing/" class="post-card-link">
305+
<h5 class="card-title">Quantum Computing - Fundementals (Part 1)</h5>
306+
<p class="card-text post-summary">Introduction to Quantum Computing Quantum computing represents a transformative leap in computational technology. Unlike classical computers, which use bits as the smallest unit of data, quantum computers employ quantum bits, or qubits. These qubits take advantage of the principles of quantum mechanics, allowing for exponentially greater processing power in certain types of computations.
307+
Core Concepts:
308+
Superposition: Unlike classical bits that can be either 0 or 1, qubits can exist in a state that is a superposition of both.</p>
307309
</a>
308310

309311
<div class="tags">
@@ -313,10 +315,13 @@ <h5 class="card-title">Percolation</h5>
313315
<li class="rounded"><a href="/tags/science/" class="btn btn-sm btn-info">Science</a></li>
314316

315317

316-
<li class="rounded"><a href="/tags/physics/" class="btn btn-sm btn-info">Physics</a></li>
318+
<li class="rounded"><a href="/tags/statistics/" class="btn btn-sm btn-info">Statistics</a></li>
317319

318320

319-
<li class="rounded"><a href="/tags/statistics/" class="btn btn-sm btn-info">Statistics</a></li>
321+
<li class="rounded"><a href="/tags/quantum/" class="btn btn-sm btn-info">Quantum</a></li>
322+
323+
324+
<li class="rounded"><a href="/tags/physics/" class="btn btn-sm btn-info">Physics</a></li>
320325

321326
</ul>
322327
</div>
@@ -325,10 +330,10 @@ <h5 class="card-title">Percolation</h5>
325330
</div>
326331
<div class="card-footer">
327332
<span class="float-start">
328-
Saturday, June 8, 2024
329-
| 5 minutes </span>
333+
Sunday, June 30, 2024
334+
| 7 minutes </span>
330335
<a
331-
href="/posts/physics/percolation/"
336+
href="/posts/physics/quantum_computing/"
332337
class="float-end btn btn-outline-info btn-sm">Read</a>
333338
</div>
334339
</div>
@@ -340,16 +345,14 @@ <h5 class="card-title">Percolation</h5>
340345
<div class="post-card">
341346
<div class="card">
342347
<div class="card-head">
343-
<a href="/posts/physics/quantum_computing/" class="post-card-link">
344-
<img class="card-img-top" src='/posts/physics/quantum_computing/images/bell_state_sphere.png' alt="Hero Image">
348+
<a href="/posts/physics/percolation/" class="post-card-link">
349+
<img class="card-img-top" src='/posts/physics/percolation/images/lattice_illustration.png' alt="Hero Image">
345350
</a>
346351
</div>
347352
<div class="card-body">
348-
<a href="/posts/physics/quantum_computing/" class="post-card-link">
349-
<h5 class="card-title">Quantum Computing - Fundementals (Part 1)</h5>
350-
<p class="card-text post-summary">Introduction to Quantum Computing Quantum computing represents a transformative leap in computational technology. Unlike classical computers, which use bits as the smallest unit of data, quantum computers employ quantum bits, or qubits. These qubits take advantage of the principles of quantum mechanics, allowing for exponentially greater processing power in certain types of computations.
351-
Core Concepts:
352-
Superposition: Unlike classical bits that can be either 0 or 1, qubits can exist in a state that is a superposition of both.</p>
353+
<a href="/posts/physics/percolation/" class="post-card-link">
354+
<h5 class="card-title">Percolation</h5>
355+
<p class="card-text post-summary">Introduction Percolation theory is a fundamental concept in statistical physics and mathematics that describes the behavior of connected clusters in a random graph. It is a model for understanding how a network behaves when nodes or links are added, leading to a phase transition from a state of disconnected clusters to a state where a large, connected cluster spans the system. This transition occurs at a critical threshold, known as the percolation threshold.</p>
353356
</a>
354357

355358
<div class="tags">
@@ -372,9 +375,9 @@ <h5 class="card-title">Quantum Computing - Fundementals (Part 1)</h5>
372375
<div class="card-footer">
373376
<span class="float-start">
374377
Saturday, June 8, 2024
375-
| 9 minutes </span>
378+
| 5 minutes </span>
376379
<a
377-
href="/posts/physics/quantum_computing/"
380+
href="/posts/physics/percolation/"
378381
class="float-end btn btn-outline-info btn-sm">Read</a>
379382
</div>
380383
</div>

public/categories/physics/index.xml

+11-11
Original file line numberDiff line numberDiff line change
@@ -6,26 +6,26 @@
66
<description>Recent content in Physics on Stefano Giannini</description>
77
<generator>Hugo -- gohugo.io</generator>
88
<language>en</language>
9-
<lastBuildDate>Sat, 08 Jun 2024 08:06:25 +0600</lastBuildDate><atom:link href="http://localhost:1313/categories/physics/index.xml" rel="self" type="application/rss+xml" /><item>
10-
<title>Percolation</title>
11-
<link>http://localhost:1313/posts/physics/percolation/</link>
12-
<pubDate>Sat, 08 Jun 2024 08:06:25 +0600</pubDate>
13-
14-
<guid>http://localhost:1313/posts/physics/percolation/</guid>
15-
<description>Introduction Percolation theory is a fundamental concept in statistical physics and mathematics that describes the behavior of connected clusters in a random graph. It is a model for understanding how a network behaves when nodes or links are added, leading to a phase transition from a state of disconnected clusters to a state where a large, connected cluster spans the system. This transition occurs at a critical threshold, known as the percolation threshold.</description>
16-
</item>
17-
18-
<item>
9+
<lastBuildDate>Sun, 30 Jun 2024 08:00:00 +0100</lastBuildDate><atom:link href="http://localhost:1313/categories/physics/index.xml" rel="self" type="application/rss+xml" /><item>
1910
<title>Quantum Computing - Fundementals (Part 1)</title>
2011
<link>http://localhost:1313/posts/physics/quantum_computing/</link>
21-
<pubDate>Sat, 08 Jun 2024 08:06:25 +0600</pubDate>
12+
<pubDate>Sun, 30 Jun 2024 08:00:00 +0100</pubDate>
2213

2314
<guid>http://localhost:1313/posts/physics/quantum_computing/</guid>
2415
<description>Introduction to Quantum Computing Quantum computing represents a transformative leap in computational technology. Unlike classical computers, which use bits as the smallest unit of data, quantum computers employ quantum bits, or qubits. These qubits take advantage of the principles of quantum mechanics, allowing for exponentially greater processing power in certain types of computations.
2516
Core Concepts:
2617
Superposition: Unlike classical bits that can be either 0 or 1, qubits can exist in a state that is a superposition of both.</description>
2718
</item>
2819

20+
<item>
21+
<title>Percolation</title>
22+
<link>http://localhost:1313/posts/physics/percolation/</link>
23+
<pubDate>Sat, 08 Jun 2024 08:06:25 +0600</pubDate>
24+
25+
<guid>http://localhost:1313/posts/physics/percolation/</guid>
26+
<description>Introduction Percolation theory is a fundamental concept in statistical physics and mathematics that describes the behavior of connected clusters in a random graph. It is a model for understanding how a network behaves when nodes or links are added, leading to a phase transition from a state of disconnected clusters to a state where a large, connected cluster spans the system. This transition occurs at a critical threshold, known as the percolation threshold.</description>
27+
</item>
28+
2929

3030
</channel>
3131
</rss>

public/index.json

+1-1
Large diffs are not rendered by default.

public/posts/physics/index.html

+22-19
Original file line numberDiff line numberDiff line change
@@ -441,14 +441,16 @@
441441
<div class="post-card">
442442
<div class="card">
443443
<div class="card-head">
444-
<a href="/posts/physics/percolation/" class="post-card-link">
445-
<img class="card-img-top" src='/posts/physics/percolation/images/lattice_illustration.png' alt="Hero Image">
444+
<a href="/posts/physics/quantum_computing/" class="post-card-link">
445+
<img class="card-img-top" src='/posts/physics/quantum_computing/images/bell_state_sphere.png' alt="Hero Image">
446446
</a>
447447
</div>
448448
<div class="card-body">
449-
<a href="/posts/physics/percolation/" class="post-card-link">
450-
<h5 class="card-title">Percolation</h5>
451-
<p class="card-text post-summary">Introduction Percolation theory is a fundamental concept in statistical physics and mathematics that describes the behavior of connected clusters in a random graph. It is a model for understanding how a network behaves when nodes or links are added, leading to a phase transition from a state of disconnected clusters to a state where a large, connected cluster spans the system. This transition occurs at a critical threshold, known as the percolation threshold.</p>
449+
<a href="/posts/physics/quantum_computing/" class="post-card-link">
450+
<h5 class="card-title">Quantum Computing - Fundementals (Part 1)</h5>
451+
<p class="card-text post-summary">Introduction to Quantum Computing Quantum computing represents a transformative leap in computational technology. Unlike classical computers, which use bits as the smallest unit of data, quantum computers employ quantum bits, or qubits. These qubits take advantage of the principles of quantum mechanics, allowing for exponentially greater processing power in certain types of computations.
452+
Core Concepts:
453+
Superposition: Unlike classical bits that can be either 0 or 1, qubits can exist in a state that is a superposition of both.</p>
452454
</a>
453455

454456
<div class="tags">
@@ -458,10 +460,13 @@ <h5 class="card-title">Percolation</h5>
458460
<li class="rounded"><a href="/tags/science/" class="btn btn-sm btn-info">Science</a></li>
459461

460462

461-
<li class="rounded"><a href="/tags/physics/" class="btn btn-sm btn-info">Physics</a></li>
463+
<li class="rounded"><a href="/tags/statistics/" class="btn btn-sm btn-info">Statistics</a></li>
462464

463465

464-
<li class="rounded"><a href="/tags/statistics/" class="btn btn-sm btn-info">Statistics</a></li>
466+
<li class="rounded"><a href="/tags/quantum/" class="btn btn-sm btn-info">Quantum</a></li>
467+
468+
469+
<li class="rounded"><a href="/tags/physics/" class="btn btn-sm btn-info">Physics</a></li>
465470

466471
</ul>
467472
</div>
@@ -470,10 +475,10 @@ <h5 class="card-title">Percolation</h5>
470475
</div>
471476
<div class="card-footer">
472477
<span class="float-start">
473-
Saturday, June 8, 2024
474-
| 5 minutes </span>
478+
Sunday, June 30, 2024
479+
| 7 minutes </span>
475480
<a
476-
href="/posts/physics/percolation/"
481+
href="/posts/physics/quantum_computing/"
477482
class="float-end btn btn-outline-info btn-sm">Read</a>
478483
</div>
479484
</div>
@@ -485,16 +490,14 @@ <h5 class="card-title">Percolation</h5>
485490
<div class="post-card">
486491
<div class="card">
487492
<div class="card-head">
488-
<a href="/posts/physics/quantum_computing/" class="post-card-link">
489-
<img class="card-img-top" src='/posts/physics/quantum_computing/images/bell_state_sphere.png' alt="Hero Image">
493+
<a href="/posts/physics/percolation/" class="post-card-link">
494+
<img class="card-img-top" src='/posts/physics/percolation/images/lattice_illustration.png' alt="Hero Image">
490495
</a>
491496
</div>
492497
<div class="card-body">
493-
<a href="/posts/physics/quantum_computing/" class="post-card-link">
494-
<h5 class="card-title">Quantum Computing - Fundementals (Part 1)</h5>
495-
<p class="card-text post-summary">Introduction to Quantum Computing Quantum computing represents a transformative leap in computational technology. Unlike classical computers, which use bits as the smallest unit of data, quantum computers employ quantum bits, or qubits. These qubits take advantage of the principles of quantum mechanics, allowing for exponentially greater processing power in certain types of computations.
496-
Core Concepts:
497-
Superposition: Unlike classical bits that can be either 0 or 1, qubits can exist in a state that is a superposition of both.</p>
498+
<a href="/posts/physics/percolation/" class="post-card-link">
499+
<h5 class="card-title">Percolation</h5>
500+
<p class="card-text post-summary">Introduction Percolation theory is a fundamental concept in statistical physics and mathematics that describes the behavior of connected clusters in a random graph. It is a model for understanding how a network behaves when nodes or links are added, leading to a phase transition from a state of disconnected clusters to a state where a large, connected cluster spans the system. This transition occurs at a critical threshold, known as the percolation threshold.</p>
498501
</a>
499502

500503
<div class="tags">
@@ -517,9 +520,9 @@ <h5 class="card-title">Quantum Computing - Fundementals (Part 1)</h5>
517520
<div class="card-footer">
518521
<span class="float-start">
519522
Saturday, June 8, 2024
520-
| 9 minutes </span>
523+
| 5 minutes </span>
521524
<a
522-
href="/posts/physics/quantum_computing/"
525+
href="/posts/physics/percolation/"
523526
class="float-end btn btn-outline-info btn-sm">Read</a>
524527
</div>
525528
</div>

0 commit comments

Comments
 (0)