summaryrefslogtreecommitdiff
path: root/content
diff options
context:
space:
mode:
authorPrefetch2021-04-10 19:58:09 +0200
committerPrefetch2021-04-10 19:58:09 +0200
commit71b9e1aa3050dd492761973ad4be73c6d65e7eb1 (patch)
treeccbced70256143984e39440e3e3e882093e68229 /content
parent45af77f068aaa57c052cd861412d53beecbe5e3b (diff)
Expand knowledge base
Diffstat (limited to 'content')
-rw-r--r--content/know/category/algorithms.md9
-rw-r--r--content/know/concept/archimedes-principle/index.pdc94
-rw-r--r--content/know/concept/bernoullis-theorem/index.pdc96
-rw-r--r--content/know/concept/deutsch-jozsa-algorithm/index.pdc3
-rw-r--r--content/know/concept/gram-schmidt-method/index.pdc1
-rw-r--r--content/know/concept/quantum-gate/cnot.pngbin0 -> 4584 bytes
-rw-r--r--content/know/concept/quantum-gate/cu.pngbin0 -> 4625 bytes
-rw-r--r--content/know/concept/quantum-gate/index.pdc16
-rw-r--r--content/know/concept/quantum-gate/swap.pngbin0 -> 4061 bytes
-rw-r--r--content/know/concept/toffoli-gate/index.pdc4
-rw-r--r--content/know/concept/vorticity/index.pdc165
11 files changed, 384 insertions, 4 deletions
diff --git a/content/know/category/algorithms.md b/content/know/category/algorithms.md
new file mode 100644
index 0000000..228245e
--- /dev/null
+++ b/content/know/category/algorithms.md
@@ -0,0 +1,9 @@
+---
+title: "Algorithms"
+firstLetter: "A"
+date: 2021-02-26T16:01:02+01:00
+draft: false
+layout: "category"
+---
+
+This page will fill itself.
diff --git a/content/know/concept/archimedes-principle/index.pdc b/content/know/concept/archimedes-principle/index.pdc
new file mode 100644
index 0000000..6335a77
--- /dev/null
+++ b/content/know/concept/archimedes-principle/index.pdc
@@ -0,0 +1,94 @@
+---
+title: "Archimedes' principle"
+firstLetter: "A"
+publishDate: 2021-04-10
+categories:
+- Fluid statics
+- Fluid mechanics
+- Physics
+
+date: 2021-04-10T15:43:45+02:00
+draft: false
+markup: pandoc
+---
+
+# Archimedes' principle
+
+Many objects float when placed on a liquid,
+but some float higher than others,
+and some do not float at all, sinking instead.
+**Archimedes' principle** balances the forces,
+and predicts how much of a body is submerged,
+and how much is non-submerged.
+
+In truth, there is no real distinction between
+the submerged and non-submerged parts,
+since the latter is surrounded by another fluid (air),
+which has a pressure and thus affects it.
+The right thing to do is treat the entire body as being
+submerged in a fluid with varying properties.
+
+Let us consider a volume $V$ completely submerged in such a fluid.
+This volume will experience a downward force due to gravity, given by:
+
+$$\begin{aligned}
+ \va{F}_g
+ = \int_V \va{g} \rho_\mathrm{b} \dd{V}
+\end{aligned}$$
+
+Where $\va{g}$ is the gravitational field,
+and $\rho_\mathrm{b}$ is the density of the body.
+Meanwhile, the pressure $p$ of the surrounding fluid exerts a force
+on the surface $S$ of $V$:
+
+$$\begin{aligned}
+ \va{F}_p
+ = - \oint_S p \dd{\va{S}}
+\end{aligned}$$
+
+We rewrite this using Gauss' theorem,
+and replace $\nabla p$ by demanding
+[hydrostatic equilibrium](/know/concept/hydrostatic-pressure/):
+
+$$\begin{aligned}
+ \va{F}_p
+ = - \int_V \nabla p \dd{V}
+ = - \int_V \va{g} \rho_\mathrm{f} \dd{V}
+\end{aligned}$$
+
+For the body to be at rest, we require $\va{F}_g + \va{F}_p = 0$.
+Concretely, the equilibrium condition is:
+
+$$\begin{aligned}
+ \boxed{
+ \int_V \va{g} (\rho_\mathrm{b} - \rho_\mathrm{f}) \dd{V}
+ = 0
+ }
+\end{aligned}$$
+
+It is commonly assumed that $\va{g}$ has a constant direction
+and magnitude $\mathrm{g}$ everywhere.
+If we also assume that $\rho_\mathrm{b}$ and $\rho_\mathrm{f}$ are constant,
+and only integrate over the "submerged" part, we find:
+
+$$\begin{aligned}
+ 0
+ = \mathrm{g} (\rho_\mathrm{b} - \rho_\mathrm{f}) V
+ = \mathrm{g} (m_\mathrm{b} - m_\mathrm{f})
+\end{aligned}$$
+
+In other words, the mass $m_\mathrm{b}$ of the submerged portion $V$ of the body,
+is equal to the mass $m_\mathrm{f}$ of the fluid it displaces.
+This is the best-known version of Archimedes' principle.
+
+Note that if $\rho_\mathrm{b} > \rho_\mathrm{f}$, then,
+even if the entire body is submerged,
+the displaced mass $m_\mathrm{f} < m_\mathrm{b}$,
+and the object will continue to sink.
+
+
+
+## References
+1. B. Lautrup,
+ *Physics of continuous matter: exotic and everyday phenomena in the macroscopic world*, 2nd edition,
+ CRC Press.
diff --git a/content/know/concept/bernoullis-theorem/index.pdc b/content/know/concept/bernoullis-theorem/index.pdc
new file mode 100644
index 0000000..5ff5225
--- /dev/null
+++ b/content/know/concept/bernoullis-theorem/index.pdc
@@ -0,0 +1,96 @@
+---
+title: "Bernoulli's theorem"
+firstLetter: "B"
+publishDate: 2021-04-02
+categories:
+- Physics
+- Fluid mechanics
+- Fluid dynamics
+
+date: 2021-04-02T15:05:08+02:00
+draft: false
+markup: pandoc
+---
+
+# Bernoulli's theorem
+
+For inviscid fluids, **Bernuilli's theorem** states
+that an increase in flow velocity $\va{v}$ is paired
+with a decrease in pressure $p$ and/or potential energy.
+For a qualitative argument, look no further than
+one of the [Euler equations](/know/concept/euler-equations/),
+with a [material derivative](/know/concept/material-derivative/):
+
+$$\begin{aligned}
+ \frac{\mathrm{D} \va{v}}{\mathrm{D} t}
+ = \pdv{\va{v}}{t} + (\va{v} \cdot \nabla) \va{v}
+ = \va{g} - \frac{\nabla p}{\rho}
+\end{aligned}$$
+
+Assuming that $\va{v}$ and $\va{g}$ are constant in $t$,
+it becomes clear that a higher $\va{v}$ requires a lower $p$:
+
+$$\begin{aligned}
+ \frac{1}{2} \nabla \va{v}^2
+ = \va{g} - \frac{\nabla p}{\rho}
+\end{aligned}$$
+
+
+## Simple form
+
+For an incompressible fluid
+with a time-independent velocity field $\va{v}$ (i.e. **steady flow**),
+Bernoulli's theorem formally states that the
+**Bernoulli head** $H$ is constant along a streamline:
+
+$$\begin{aligned}
+ \boxed{
+ H
+ = \frac{1}{2} \va{v}^2 + \Phi + \frac{p}{\rho}
+ }
+\end{aligned}$$
+
+Where $\Phi$ is the gravitational potential, such that $\va{g} = - \nabla \Phi$.
+To prove this theorem, we take the material derivative of $H$:
+
+$$\begin{aligned}
+ \frac{\mathrm{D} H}{\mathrm{D} t}
+ &= \va{v} \cdot \frac{\mathrm{D} \va{v}}{\mathrm{D} t}
+ + \frac{\mathrm{D} \Phi}{\mathrm{D} t}
+ + \frac{1}{\rho} \frac{\mathrm{D} p}{\mathrm{D} t}
+\end{aligned}$$
+
+In the first term we insert the Euler equation,
+and in the other two we expand the derivatives:
+
+$$\begin{aligned}
+ \frac{\mathrm{D} H}{\mathrm{D} t}
+ &= \va{v} \cdot \Big( \va{g} - \frac{\nabla p}{\rho} \Big)
+ + \Big( \pdv{\Phi}{t} + (\va{v} \cdot \nabla) \Phi \Big)
+ + \frac{1}{\rho} \Big( \pdv{p}{t} + (\va{v} \cdot \nabla) p \Big)
+ \\
+ &= \pdv{\Phi}{t} + \frac{1}{\rho} \pdv{p}{t}
+ + \va{v} \cdot \big( \va{g} + \nabla \Phi \big) + \va{v} \cdot \Big( \frac{\nabla p}{\rho} - \frac{\nabla p}{\rho} \Big)
+\end{aligned}$$
+
+Using the fact that $\va{g} = - \nabla \Phi$,
+we are left with the following equation:
+
+$$\begin{aligned}
+ \frac{\mathrm{D} H}{\mathrm{D} t}
+ &= \pdv{\Phi}{t} + \frac{1}{\rho} \pdv{p}{t}
+\end{aligned}$$
+
+Assuming that the flow is steady, both derivatives vanish,
+leading us to the conclusion that $H$ is conserved along the streamline.
+
+In fact, there exists **Bernoulli's stronger theorem**,
+which states that $H$ is constant *everywhere* in regions with
+zero [vorticity](/know/concept/vorticity/) $\va{\omega} = 0$.
+For a proof, see the derivation of $\va{\omega}$'s equation of motion.
+
+
+## References
+1. B. Lautrup,
+ *Physics of continuous matter: exotic and everyday phenomena in the macroscopic world*, 2nd edition,
+ CRC Press.
diff --git a/content/know/concept/deutsch-jozsa-algorithm/index.pdc b/content/know/concept/deutsch-jozsa-algorithm/index.pdc
index b2b3d98..a891dd1 100644
--- a/content/know/concept/deutsch-jozsa-algorithm/index.pdc
+++ b/content/know/concept/deutsch-jozsa-algorithm/index.pdc
@@ -4,6 +4,7 @@ firstLetter: "D"
publishDate: 2021-04-08
categories:
- Quantum information
+- Algorithms
date: 2021-04-08T10:31:45+02:00
draft: false
@@ -59,7 +60,7 @@ $$\begin{aligned}
\end{aligned}$$
Starting on the left from two qubits $\ket{0}$ and $\ket{1}$,
-we apply the Hadamard gate $H$ to both:
+we apply the [Hadamard gate](/know/concept/quantum-gate/) $H$ to both:
$$\begin{aligned}
\ket{0} \ket{1}
diff --git a/content/know/concept/gram-schmidt-method/index.pdc b/content/know/concept/gram-schmidt-method/index.pdc
index 88488dd..0b02eee 100644
--- a/content/know/concept/gram-schmidt-method/index.pdc
+++ b/content/know/concept/gram-schmidt-method/index.pdc
@@ -4,6 +4,7 @@ firstLetter: "G"
publishDate: 2021-02-22
categories:
- Mathematics
+- Algorithms
date: 2021-02-22T21:36:08+01:00
draft: false
diff --git a/content/know/concept/quantum-gate/cnot.png b/content/know/concept/quantum-gate/cnot.png
new file mode 100644
index 0000000..9fae3ce
--- /dev/null
+++ b/content/know/concept/quantum-gate/cnot.png
Binary files differ
diff --git a/content/know/concept/quantum-gate/cu.png b/content/know/concept/quantum-gate/cu.png
new file mode 100644
index 0000000..465f09c
--- /dev/null
+++ b/content/know/concept/quantum-gate/cu.png
Binary files differ
diff --git a/content/know/concept/quantum-gate/index.pdc b/content/know/concept/quantum-gate/index.pdc
index cd09094..189145f 100644
--- a/content/know/concept/quantum-gate/index.pdc
+++ b/content/know/concept/quantum-gate/index.pdc
@@ -208,6 +208,10 @@ but not always in the basis of $\ket{0}_1$, $\ket{1}_1$, $\ket{0}_2$ and $\ket{1
With that said, the first two-qubit gate is $\mathrm{SWAP}$,
which simply swaps $\ket{\psi_1}$ and $\ket{\psi_2}$:
+<a href="swap.png">
+<img src="swap.png" style="width:22%;display:block;margin:auto;">
+</a>
+
$$\begin{aligned}
\boxed{
\mathrm{SWAP} =
@@ -233,6 +237,10 @@ $$\begin{aligned}
Next, there is the **controlled NOT gate** $\mathrm{CNOT}$,
which "flips" (applies $X$ to) $\ket{\psi_2}$ if $\ket{\psi_1}$ is true:
+<a href="cnot.png">
+<img src="cnot.png" style="width:22%;display:block;margin:auto;">
+</a>
+
$$\begin{aligned}
\boxed{
\mathrm{CNOT} =
@@ -252,7 +260,13 @@ $$\begin{aligned}
&= c_{00} \ket{00} + c_{01} \ket{01} + c_{11} \ket{10} + c_{10} \ket{11}
\end{aligned}$$
-More generally, each one-qubit gate $U$ can be turned into a **controlled** $U$ **gate**:
+More generally, from every one-qubit gate $U$,
+we can define a two-qubit **controlled U gate** $\mathrm{CU}$,
+which applies $U$ to $\ket{\psi_2}$ if $\ket{\psi_1}$ is true:
+
+<a href="cu.png">
+<img src="cu.png" style="width:22%;display:block;margin:auto;">
+</a>
$$\begin{aligned}
\boxed{
diff --git a/content/know/concept/quantum-gate/swap.png b/content/know/concept/quantum-gate/swap.png
new file mode 100644
index 0000000..fa20442
--- /dev/null
+++ b/content/know/concept/quantum-gate/swap.png
Binary files differ
diff --git a/content/know/concept/toffoli-gate/index.pdc b/content/know/concept/toffoli-gate/index.pdc
index 84e7656..da5f2a5 100644
--- a/content/know/concept/toffoli-gate/index.pdc
+++ b/content/know/concept/toffoli-gate/index.pdc
@@ -60,8 +60,8 @@ i.e. OR is NAND of NOT $A$ and NOT $B$:
</a>
Thanks to its reversibility and universality,
-the Toffoli gate is interesting in quantum computing,
-where it is often referred to as the CCNOT gate.
+the Toffoli gate is interesting for quantum computing.
+Its [quantum gate](/know/concept/quantum-gate/) form is often called **CCNOT**.
In the basis $\ket{A} \ket{B} \ket{C}$, its matrix is:
$$\begin{aligned}
diff --git a/content/know/concept/vorticity/index.pdc b/content/know/concept/vorticity/index.pdc
new file mode 100644
index 0000000..5aec049
--- /dev/null
+++ b/content/know/concept/vorticity/index.pdc
@@ -0,0 +1,165 @@
+---
+title: "Vorticity"
+firstLetter: "V"
+publishDate: 2021-04-03
+categories:
+- Physics
+- Fluid mechanics
+- Fluid dynamics
+
+date: 2021-04-03T09:24:42+02:00
+draft: false
+markup: pandoc
+---
+
+# Vorticity
+
+In fluid mechanics, the **vorticity** $\va{\omega}$
+is a measure of the local circulation in a fluid.
+It is defined as the curl of the flow velocity field $\va{v}$:
+
+$$\begin{aligned}
+ \boxed{
+ \va{\omega}
+ \equiv \nabla \cross \va{v}
+ }
+\end{aligned}$$
+
+Just as curves tangent to $\va{v}$ are called *streamlines*,
+curves tangent to $\va{\omega}$ are **vortex lines**,
+which are to be interpreted as the "axes" that $\va{v}$ is circulating around.
+
+The vorticity is a local quantity,
+and the corresponding global quantity is the **circulation** $\Gamma$,
+which is defined as the projection of $\va{v}$ onto a close curve $C$.
+Then, by Stokes' theorem:
+
+$$\begin{aligned}
+ \boxed{
+ \Gamma(C, t)
+ \equiv \oint_C \va{v} \cdot \dd{\va{l}}
+ = \int_S \va{\omega} \cdot \dd{\va{S}}
+ }
+\end{aligned}$$
+
+
+## Ideal fluids
+
+For an inviscid, incompressible fluid,
+consider the *Bernoulli field* $H$, which is defined as:
+
+$$\begin{aligned}
+ H
+ \equiv \frac{1}{2} \va{v}^2 + \Phi + \frac{p}{\rho}
+\end{aligned}$$
+
+Where $\Phi$ is the gravitational potential,
+$p$ is the pressure, and $\rho$ is the (constant) density.
+We then take the gradient of this scalar field:
+
+$$\begin{aligned}
+ \nabla H
+ &= \frac{1}{2} \nabla \va{v}^2 + \nabla \Phi + \frac{\nabla p}{\rho}
+ \\
+ &= \va{v} \cdot (\nabla \va{v}) - \Big( \!-\! \nabla \Phi - \frac{\nabla p}{\rho} \Big)
+\end{aligned}$$
+
+Since $-\nabla \Phi = \va{g}$,
+the rightmost term is the right-hand side of
+the [Euler equation](/know/concept/euler-equations/).
+We substitute the other side of said equation, yielding:
+
+$$\begin{aligned}
+ \nabla H
+ &= \va{v} \cdot (\nabla \va{v}) - \frac{\mathrm{D} \va{v}}{\mathrm{D} t}
+ = \va{v} \cdot (\nabla \va{v}) - \pdv{\va{v}}{t} - (\va{v} \cdot \nabla) \va{v}
+\end{aligned}$$
+
+We isolate this equation for $\pdv*{\va{v}}{t}$,
+and apply a vector identity to reduce it to the following:
+
+$$\begin{aligned}
+ \pdv{\va{v}}{t}
+ = \va{v} \cdot (\nabla \va{v}) - (\va{v} \cdot \nabla) \va{v} - \nabla H
+ = \va{v} \cross (\nabla \cross \va{v}) - \nabla H
+\end{aligned}$$
+
+Here, the definition of the vorticity $\va{\omega}$ is clear to see,
+leading us to an equation of motion for $\va{v}$:
+
+$$\begin{aligned}
+ \boxed{
+ \pdv{\va{v}}{t}
+ = \va{v} \cross \va{\omega} - \nabla H
+ }
+\end{aligned}$$
+
+More about this later.
+Now, we take the curl of both sides of this equation, giving us:
+
+$$\begin{aligned}
+ \nabla \cross \pdv{\va{v}}{t}
+ = \nabla \cross (\va{v} \cross \va{\omega}) - \nabla \cross (\nabla H)
+\end{aligned}$$
+
+On the left, we swap $\nabla$ with $\pdv*{t}$,
+and on the right, the curl of a gradient is always zero.
+We are thus left with the equation of motion of the vorticity $\va{\omega}$:
+
+$$\begin{aligned}
+ \boxed{
+ \pdv{\va{\omega}}{t}
+ = \nabla \cross (\va{v} \cross \va{\omega})
+ }
+\end{aligned}$$
+
+Let us now return to the equation of motion for $\va{v}$.
+For *steady* flows where $\pdv*{\va{v}}{t} = 0$, in which case
+[Bernoulli's theorem](/know/concept/bernoullis-theorem/) applies,
+it reduces to:
+
+$$\begin{aligned}
+ \nabla H
+ = \va{v} \cross \va{\omega}
+\end{aligned}$$
+
+If a fluid has $\va{\omega} = 0$ in some regions, it is known as **irrotational**.
+From this equation, we see that, in that case, $\nabla H = 0$,
+meaning that $H$ is a constant in those regions,
+a fact sometimes referred to as **Bernoulli's stronger theorem**.
+
+Furthermore, irrotationality $\va{\omega} = 0$
+implies that $\va{v}$ is the gradient of a potential $\Psi$:
+
+$$\begin{aligned}
+ \va{v}
+ = \nabla \Psi
+\end{aligned}$$
+
+This fact allows us to rewrite the Euler equations in a particularly simple way.
+Firstly, the condition of incompressibility becomes the well-known Laplace equation:
+
+$$\begin{aligned}
+ 0
+ = \nabla \cdot \va{v}
+ = \nabla^2 \Psi
+\end{aligned}$$
+
+And second, the main equation of motion for $\va{v}$ states
+that the quantity $H + \pdv*{\Psi}{t}$ is spatially constant
+in the irrotational region:
+
+$$\begin{aligned}
+ \pdv{\va{v}}{t}
+ = \nabla \pdv{\Psi}{t}
+ = - \nabla H
+ \quad \implies \quad
+ \nabla \Big( H + \pdv{\Psi}{t} \Big)
+ = 0
+\end{aligned}$$
+
+
+## References
+1. B. Lautrup,
+ *Physics of continuous matter: exotic and everyday phenomena in the macroscopic world*, 2nd edition,
+ CRC Press.