Skip to content
This repository has been archived by the owner on Feb 8, 2024. It is now read-only.

Commit

Permalink
Merge pull request #5 from Qiskit/fh-quantum-301
Browse files Browse the repository at this point in the history
Add quizzes and annotations
  • Loading branch information
jhwatrous committed Jun 10, 2022
2 parents 0b39217 + 2ed0245 commit f3879b3
Showing 1 changed file with 95 additions and 8 deletions.
103 changes: 95 additions & 8 deletions notebooks/basics/single-systems.ipynb
Expand Up @@ -8,6 +8,10 @@
"noise": {
"text": "Noise is useless information that's difficult to distinguish from useful information. For example, it's hard to hear someone talking to you if there are lots of other people talking loudly nearby. In quantum computation, noise is a result of imperfect hardware and uncontrollable factors in the environment.",
"title": "Noise"
},
"quantum": {
"text": "Quantum physics is a more accurate model of the universe, developed in the early 20th century due to shortcomings of the existing model (now known as 'classical physics'). Since classical physics is simpler and adequate in most cases, we usually consider things to follow classical physics; if we refer to something as being 'quantum', we mean we're describing its behavior with quantum physics instead.",
"title": "Quantum physics"
}
}
},
Expand All @@ -16,9 +20,9 @@
"\n",
"![Illustration of a notebook and an atom.](images/single-systems-hero.png)\n",
"\n",
"This lesson introduces the framework of *quantum information*, including the description of *quantum states* as vectors with complex number entries, basic types of *measurements* that allow classical information to be extracted from quantum states, and *operations* on quantum states that are described by unitary matrices.\n",
"We'll restrict our attention in this lesson to the comparatively simple situation in which a *single system* is considered *in isolation*.\n",
"In the next lesson we'll consider *multiple systems*, and *correlations* among the systems (such as entanglement).\n",
"This lesson introduces the framework of [quantum](gloss:quantum) information, including the description of quantum states as vectors with complex number entries, basic types of measurements that allow classical information to be extracted from quantum states, and operations on quantum states that are described by unitary matrices.\n",
"We'll restrict our attention in this lesson to the comparatively simple situation in which a single system is considered in isolation.\n",
"In the next lesson we'll consider multiple systems, and correlations among systems (such as entanglement).\n",
"\n",
"There are, in fact, two common mathematical descriptions of quantum information.\n",
"The one introduced in this lesson is the simpler of the two.\n",
Expand Down Expand Up @@ -63,13 +67,19 @@
"probability": {
"meaning": "The probability of the expression in the parentheses to the right being true."
}
},
"gloss": {
"system": {
"text": "In this course, a system is an abstraction of a physical device or a medium.",
"title": "System"
}
}
},
"source": [
"### 1.1 Classical states and probability vectors <a id='classical-states'></a>\n",
"\n",
"Suppose that we have a system — meaning an abstraction of a physical device or a medium of some sort — that stores information.\n",
"More specifically, we'll assume that this system can be in one of a finite number of *classical states* at each instant.\n",
"Suppose that we have a [system](gloss:system) that stores information.\n",
"More specifically, we'll assume that this system can be in one of a finite number of *classical states* at each instant.\n",
"Here, the term *classical state* should be understood in intuitive terms, as a configuration that can be recognized and described unambiguously.\n",
"\n",
"The archetypal example, which we'll come back to repeatedly, is that of a *bit*, which is a system whose classical states are 0 and 1.\n",
Expand Down Expand Up @@ -117,7 +127,41 @@
"1. All entries of the vector are *nonnegative real numbers*.\n",
"2. The sum of the entries is equal to 1.\n",
"\n",
"And similarly, any column vector that satisfies these conditions could represent a probabilistic state. We'll call vectors of this type *probability vectors*."
"And similarly, any column vector that satisfies these conditions could represent a probabilistic state. We'll call vectors of this type *probability vectors*.\n",
"\n",
"<!-- ::: q-block.exercise -->\n",
"\n",
"### Quick quiz\n",
"\n",
"<!-- ::: q-quiz(goal=\"ss-quiz-0\") -->\n",
"\n",
"<!-- ::: .question -->\n",
"\n",
"Which one of these is a valid probability vector?\n",
"\n",
"<!-- ::: -->\n",
"\n",
"<!-- ::: .option -->\n",
"\n",
"1. $\\begin{pmatrix} 0.25 \\end{pmatrix}$\n",
"\n",
"<!-- ::: -->\n",
"\n",
"<!-- ::: .option -->\n",
"\n",
"2. $\\begin{pmatrix} 0.3 \\\\\\\\ 0.3 \\end{pmatrix}$\n",
"\n",
"<!-- ::: -->\n",
"\n",
"<!-- ::: .option(correct) -->\n",
"\n",
"3. $\\begin{pmatrix} 0 \\\\\\\\ 1 \\\\\\\\ 0 \\end{pmatrix}$\n",
"\n",
"<!-- ::: -->\n",
"\n",
"<!-- ::: -->\n",
"\n",
"<!-- ::: -->"
]
},
{
Expand Down Expand Up @@ -1084,7 +1128,41 @@
"\n",
"Indeed, for any choice of a system, the set of *all* linear mappings that always transform quantum state vectors into quantum state vectors is precisely represented by the set of unitary matrices.\n",
"That is to say, the assumption that operations correspond to linear maps on state vectors, together with the decision to represent quantum states by complex unit vectors of a given dimension, leads naturally to the association of operations on quantum states with the unitary matrices of that dimension.\n",
"Notice here a resemblance to the classical probabilistic case, where operations are associated with stochastic matrices, which are the ones that always transform probability vectors into probability vectors."
"Notice here a resemblance to the classical probabilistic case, where operations are associated with stochastic matrices, which are the ones that always transform probability vectors into probability vectors.\n",
"\n",
"<!-- ::: q-block.exercise -->\n",
"\n",
"### Quick quiz\n",
"\n",
"<!-- ::: q-quiz(goal=\"ss-quiz-0\") -->\n",
"\n",
"<!-- ::: .question -->\n",
"\n",
"Which one of these is matrices is unitary?\n",
"\n",
"<!-- ::: -->\n",
"\n",
"<!-- ::: .option -->\n",
"\n",
"1. $\\begin{pmatrix} 1 & 0 \\\\\\\\ 0 & 0 \\end{pmatrix}$\n",
"\n",
"<!-- ::: -->\n",
"\n",
"<!-- ::: .option -->\n",
"\n",
"2. $\\begin{pmatrix} 0 & \\frac{1}{2} \\\\\\\\ \\frac{-i}{2} & 0 \\end{pmatrix}$\n",
"\n",
"<!-- ::: -->\n",
"\n",
"<!-- ::: .option(correct) -->\n",
"\n",
"3. $\\begin{pmatrix} 1 & 0 \\\\\\\\ 0 & 1 \\end{pmatrix}$\n",
"\n",
"<!-- ::: -->\n",
"\n",
"<!-- ::: -->\n",
"\n",
"<!-- ::: -->"
]
},
{
Expand Down Expand Up @@ -1645,7 +1723,16 @@
"$$\n",
"\n",
"This matrix describes an operation known as the *quantum Fourier transform*, specifically in the $4\\times 4$ case.\n",
"The quantum Fourier transform can be defined more generally, for any positive integer dimension $n$, and will be discussed in much greater detail in a later lesson."
"The quantum Fourier transform can be defined more generally, for any positive integer dimension $n$, and will be discussed in much greater detail in a later lesson.\n",
"\n",
"<!-- ::: q-block.exercise -->\n",
"\n",
"### Exercise\n",
"\n",
"Using Qiskit, create a `QuantumCircuit` that has the unitary\n",
"$\\frac{1}{\\sqrt{2}}\\begin{pmatrix} 1 & 1 \\\\\\\\ -1 & 1 \\end{pmatrix}$\n",
"\n",
"<!-- ::: -->"
]
}
],
Expand Down

0 comments on commit f3879b3

Please sign in to comment.