Skip to content
This repository has been archived by the owner on May 30, 2023. It is now read-only.

Commit

Permalink
Merge branch 'main' into feature_6_5_armonk
Browse files Browse the repository at this point in the history
  • Loading branch information
kUmezawa committed Apr 17, 2023
2 parents 0f0af67 + 56445ab commit 0783ccf
Show file tree
Hide file tree
Showing 10 changed files with 4,841 additions and 5,024 deletions.
6 changes: 4 additions & 2 deletions _data/ja/messages.yml
Expand Up @@ -13,5 +13,7 @@ nav_community: Community
nav_learn: Learn

beta_testing: Try the new textbook beta
beta_available: The new Qiskit Textbook beta is now available.
try_now: Try it out now

deprecation_warning_1: On April 11, this site will be replaced with the new
deprecation_warning_link_text: Qiskit Textbook
deprecation_warning_2: You will still be able to access these pages through the new platform.
6 changes: 4 additions & 2 deletions _data/messages.yml
Expand Up @@ -13,5 +13,7 @@ nav_community: Community
nav_learn: Learn

beta_testing: Try the new textbook beta
beta_available: The new Qiskit Textbook beta is now available.
try_now: Try it out now

deprecation_warning_1: On April 11, this site will be replaced with the new
deprecation_warning_link_text: Qiskit Textbook
deprecation_warning_2: You will still be able to access these pages through the new platform.
8 changes: 4 additions & 4 deletions _includes/banner.html
Expand Up @@ -5,8 +5,8 @@
{% endif %}

<div id="textbook-banner" class="page__banner">
{{ messages.beta_available }}
{{ messages.deprecation_warning_1 }}
<a href="https://qiskit.org/textbook-beta" target="_blank">
{{ messages.try_now }}
</a>
</div>
{{ messages.deprecation_warning_link_text }}</a>.
{{ messages.deprecation_warning_2 }}
</div>
9,801 changes: 4,807 additions & 4,994 deletions content/ch-algorithms/deutsch-jozsa.ipynb

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions content/ch-algorithms/quantum-counting.ipynb
Expand Up @@ -249,7 +249,7 @@
"source": [
"def qft(n):\n",
" \"\"\"Creates an n-qubit QFT circuit\"\"\"\n",
" circuit = QuantumCircuit(4)\n",
" circuit = QuantumCircuit(n)\n",
" def swap_registers(circuit, n):\n",
" for qubit in range(n//2):\n",
" circuit.swap(qubit, n-qubit-1)\n",
Expand Down Expand Up @@ -3288,7 +3288,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"We can see two values stand out, having a much higher probability of measurement than the rest. These two values correspond to $e^{i\\theta}$ and $e^{-i\\theta}$, but we can’t see the number of solutions yet. We need to little more processing to get this information, so first let us get our output into something we can work with (an `int`).\n",
"We can see two values stand out, having a much higher probability of measurement than the rest. These two values correspond to $e^{i\\theta}$ and $e^{-i\\theta}$, but we can’t see the number of solutions yet. We need to do a little more processing to get this information, so first let us get our output into something we can work with (an `int`).\n",
"\n",
"We will get the string of the most probable result from our output data:"
]
Expand Down Expand Up @@ -3366,7 +3366,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"You may remember that we can get the angle $\\theta/2$ can from the inner product of $|s\\rangle$ and $|s’\\rangle$:\n",
"You may remember that we can get the angle $\\theta/2$ from the inner product of $|s\\rangle$ and $|s’\\rangle$:\n",
"\n",
"![image3](images/quantum_counting3.svg)\n",
"\n",
Expand Down
20 changes: 10 additions & 10 deletions content/ch-labs/Lab01_QuantumCircuits.ipynb
Expand Up @@ -744,8 +744,8 @@
" \"\"\"An XOR gate.\n",
" \n",
" Parameters:\n",
" inpt1 (str): Input 1, encoded in qubit 0.\n",
" inpt2 (str): Input 2, encoded in qubit 1.\n",
" inp1 (str): Input 1, encoded in qubit 0.\n",
" inp2 (str): Input 2, encoded in qubit 1.\n",
" \n",
" Returns:\n",
" QuantumCircuit: Output XOR circuit.\n",
Expand Down Expand Up @@ -822,11 +822,11 @@
" \"\"\"An AND gate.\n",
" \n",
" Parameters:\n",
" inpt1 (str): Input 1, encoded in qubit 0.\n",
" inpt2 (str): Input 2, encoded in qubit 1.\n",
" inp1 (str): Input 1, encoded in qubit 0.\n",
" inp2 (str): Input 2, encoded in qubit 1.\n",
" \n",
" Returns:\n",
" QuantumCircuit: Output XOR circuit.\n",
" QuantumCircuit: Output AND circuit.\n",
" str: Output value measured from qubit 2.\n",
" \"\"\"\n",
" qc = QuantumCircuit(3, 1) \n",
Expand Down Expand Up @@ -895,8 +895,8 @@
" \"\"\"An NAND gate.\n",
" \n",
" Parameters:\n",
" inpt1 (str): Input 1, encoded in qubit 0.\n",
" inpt2 (str): Input 2, encoded in qubit 1.\n",
" inp1 (str): Input 1, encoded in qubit 0.\n",
" inp2 (str): Input 2, encoded in qubit 1.\n",
" \n",
" Returns:\n",
" QuantumCircuit: Output NAND circuit.\n",
Expand Down Expand Up @@ -968,11 +968,11 @@
" \"\"\"An OR gate.\n",
" \n",
" Parameters:\n",
" inpt1 (str): Input 1, encoded in qubit 0.\n",
" inpt2 (str): Input 2, encoded in qubit 1.\n",
" inp1 (str): Input 1, encoded in qubit 0.\n",
" inp2 (str): Input 2, encoded in qubit 1.\n",
" \n",
" Returns:\n",
" QuantumCircuit: Output XOR circuit.\n",
" QuantumCircuit: Output OR circuit.\n",
" str: Output value measured from qubit 2.\n",
" \"\"\"\n",
"\n",
Expand Down
12 changes: 6 additions & 6 deletions content/ch-quantum-hardware/calibrating-qubits-pulse.ipynb
Expand Up @@ -127,7 +127,7 @@
"\n",
"In the case of the T1 experiment introduced later, since there is only measurement after delay, it is sufficient to follow `acquire_alignment`. On the other hand, in an experiment where gates and delays are repeated, such as the Ramsey experiment, it is necessary to select the delay so that it is the minimum common multiple of `acquire_alignment` and` pulse_alignment`.\n",
"\n",
"We can use `granurality` to determine the length of the pulse."
"We can use `granularity` to determine the length of the pulse."
]
},
{
Expand Down Expand Up @@ -293,12 +293,12 @@
},
{
"cell_type": "code",
"execution_count": 10,
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
"def get_closest_multiple_of(vaule, base_number):\n",
" return int(vaule + base_number/2) - (int(vaule + base_number/2) % base_number)"
"def get_closest_multiple_of(value, base_number):\n",
" return int(value + base_number/2) - (int(value + base_number/2) % base_number)"
]
},
{
Expand Down Expand Up @@ -2186,7 +2186,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
Expand All @@ -2200,7 +2200,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9"
"version": "3.10.9"
}
},
"nbformat": 4,
Expand Down
2 changes: 1 addition & 1 deletion content/ch-states/single-qubit-gates.ipynb
Expand Up @@ -661,7 +661,7 @@
"metadata": {},
"source": [
"### 6.3 The T-gate <a id=\"tgate\"></a>\n",
"The T-gate is a very commonly used gate, it is an P-gate with $\\phi = \\pi/4$:\n",
"The T-gate is a very commonly used gate, it is a P-gate with $\\phi = \\pi/4$:\n",
"\n",
"$$ T = \\begin{bmatrix} 1 & 0 \\\\ 0 & e^{\\frac{i\\pi}{4}} \\end{bmatrix}, \\quad T^\\dagger = \\begin{bmatrix} 1 & 0 \\\\ 0 & e^{-\\frac{i\\pi}{4}} \\end{bmatrix}$$\n",
"\n",
Expand Down
2 changes: 1 addition & 1 deletion content/preface.ipynb
Expand Up @@ -114,7 +114,7 @@
"\n",
"<p> Learn Quantum Computation using Qiskit is the work of several individuals. If you use it in your work, cite it using <a href=\"https://github.com/qiskit-community/qiskit-textbook/blob/main/content/qiskit-textbook.bib\">this bib file</a> or directly as:</p>\n",
"<p><i>\n",
"Amira Abbas and Stina Andersson and Abraham Asfaw and Antonio Corcoles and Luciano Bello and Yael Ben-Haim and Mehdi Bozzo-Rey and Sergey Bravyi and Nicholas Bronn and Lauren Capelluto and Almudena Carrera Vazquez and Jack Ceroni and Richard Chen and Albert Frisch and Jay Gambetta and Shelly Garion and Leron Gil and Salvador De La Puente Gonzalez and Francis Harkins and Takashi Imamichi and Pavan Jayasinha and Hwajung Kang and Amir h. Karamlou and Robert Loredo and David McKay and Alberto Maldonado and Antonio Macaluso and Antonio Mezzacapo and Zlatko Minev and Ramis Movassagh and Giacomo Nannicini and Paul Nation and Anna Phan and Marco Pistoia and Arthur Rattew and Joachim Schaefer and Javad Shabani and John Smolin and John Stenger and Kristan Temme and Madeleine Tod and Ellinor Wanzambi and Stephen Wood and James Wootton.</i></p>"
"Amira Abbas and Stina Andersson and Abraham Asfaw and Antonio Corcoles and Luciano Bello and Yael Ben-Haim and Mehdi Bozzo-Rey and Sergey Bravyi and Nicholas Bronn and Lauren Capelluto and Almudena Carrera Vazquez and Jack Ceroni and Richard Chen and Albert Frisch and Jay Gambetta and Shelly Garion and Leron Gil and Salvador De La Puente Gonzalez and Francis Harkins and Takashi Imamichi and Pavan Jayasinha and Hwajung Kang and Amir h. Karamlou and Robert Loredo and David McKay and Alberto Maldonado and Antonio Macaluso and Antonio Mezzacapo and Zlatko Minev and Ramis Movassagh and Giacomo Nannicini and Paul Nation and Anna Phan and Marco Pistoia and Arthur Rattew and Joachim Schaefer and Diego Emilio Serrano and Javad Shabani and John Smolin and John Stenger and Kristan Temme and Madeleine Tod and Ellinor Wanzambi and Stephen Wood and James Wootton.</i></p>"
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion content/qiskit-textbook.bib
@@ -1,5 +1,5 @@
@electronic{Qiskit-Textbook,
author = {Amira Abbas and Stina Andersson and Abraham Asfaw and Antonio Corcoles and Luciano Bello and Yael Ben-Haim and Mehdi Bozzo-Rey and Sergey Bravyi and Nicholas Bronn and Lauren Capelluto and Almudena Carrera Vazquez and Jack Ceroni and Richard Chen and Albert Frisch and Jay Gambetta and Shelly Garion and Leron Gil and Salvador De La Puente Gonzalez and Francis Harkins and Takashi Imamichi and Pavan Jayasinha and Hwajung Kang and Amir h. Karamlou and Robert Loredo and David McKay and Alberto Maldonado and Antonio Macaluso and Antonio Mezzacapo and Zlatko Minev and Ramis Movassagh and Giacomo Nannicini and Paul Nation and Anna Phan and Marco Pistoia and Arthur Rattew and Joachim Schaefer and Javad Shabani and John Smolin and John Stenger and Kristan Temme and Madeleine Tod and Ellinor Wanzambi and Stephen Wood and James Wootton.},
author = {Amira Abbas and Stina Andersson and Abraham Asfaw and Antonio Corcoles and Luciano Bello and Yael Ben-Haim and Mehdi Bozzo-Rey and Sergey Bravyi and Nicholas Bronn and Lauren Capelluto and Almudena Carrera Vazquez and Jack Ceroni and Richard Chen and Albert Frisch and Jay Gambetta and Shelly Garion and Leron Gil and Salvador De La Puente Gonzalez and Francis Harkins and Takashi Imamichi and Pavan Jayasinha and Hwajung Kang and Amir h. Karamlou and Robert Loredo and David McKay and Alberto Maldonado and Antonio Macaluso and Antonio Mezzacapo and Zlatko Minev and Ramis Movassagh and Giacomo Nannicini and Paul Nation and Anna Phan and Marco Pistoia and Arthur Rattew and Joachim Schaefer and Diego Emilio Serrano and Javad Shabani and John Smolin and John Stenger and Kristan Temme and Madeleine Tod and Ellinor Wanzambi and Stephen Wood and James Wootton.},
title = {Learn Quantum Computation Using Qiskit},
year = {2020},
url = {https://qiskit.org/textbook/},
Expand Down

0 comments on commit 0783ccf

Please sign in to comment.