diff --git a/.github/workflows/check-for-nb.yaml b/.github/workflows/check-for-nb.yaml deleted file mode 100644 index 3b3856e04..000000000 --- a/.github/workflows/check-for-nb.yaml +++ /dev/null @@ -1,41 +0,0 @@ -name: Check for Textbook notebooks - -on: - workflow_dispatch: - # run every 1st of each month at 10:00am UTC - # https://crontab.guru/#0_10_1_*_* - schedule: - - cron: "0 10 1 * *" - -jobs: - check-notebooks: - name: Notebooks check - - runs-on: ubuntu-latest - - steps: - - name: Checkout Qiskit/platypus - uses: actions/checkout@v3 - with: - path: platypus - - - name: Checkout qiskit-community/qiskit-textbook - uses: actions/checkout@v3 - with: - repository: qiskit-community/qiskit-textbook - path: qiskit-textbook - - - name: Diff notebook directories - id: diff - shell: bash - run: platypus/scripts/missing_nb_check.sh - - - name: Create issue using REST API - if: steps.diff.outputs.NUM_NB != '0' - run: | - curl --request POST \ - --url https://api.github.com/repos/${{ github.repository }}/issues \ - --header 'authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' \ - --header 'content-type: application/json' \ - --data-binary @issue.txt \ - --fail diff --git a/LOCALIZATION_CONTRIBUTORS b/LOCALIZATION_CONTRIBUTORS index fcb9d6aba..fa020843d 100644 --- a/LOCALIZATION_CONTRIBUTORS +++ b/LOCALIZATION_CONTRIBUTORS @@ -34,6 +34,7 @@ German (DE) Thorsten Mรผhge | TMuehge Zina Efchary | zinaefchary +Sasko Schirmer | c0nr3f Spanish (ES_UN) @@ -80,6 +81,7 @@ Jaejun Ko | Rapo1756 Eunmi Bae | likeyellow Chanyang Im | imchanyang Yuri Han | urihan +Minje Kim | Quantum-Tiger-K Indonesian (ID) @@ -113,3 +115,4 @@ Bin Liu | fjirsmliu Weixiao Sun | sunwx17 Diksha Sharma | dikshasharma0795 Samanvay Sharma | starktech23 +Saiprateek Dasgandhi | PSD-20 diff --git a/TRANSLATING.md b/TRANSLATING.md index 4a20e5f11..fa276a292 100644 --- a/TRANSLATING.md +++ b/TRANSLATING.md @@ -4,6 +4,10 @@ First of all, **thank you** for showing interest in translating (localizing) Qis **Please note that you must sign up separately if you want to join the localization project for [Qiskit Documentation](https://qiskit.org/documentation/). For signing up to join the Qiskit Documentation Localization project, please refer the steps outlined [here](https://github.com/qiskit-community/qiskit-translations/blob/master/README.md).** +$$\color{#D22222}\textsf{\Large\⚠\kern{0.2cm}\Large No new joining requests will be accepted in GitLocalize.}$$ + +$$\color{#D22222}\textsf{\qquad\kern{0.2cm}\Large This is due the upcoming changes on Qiskit Textbook.}$$ + If you are interested in contributing to translating the Qiskit Textbook, please follow the instructions below.
## Steps to participate in Qiskit textbook translations: diff --git a/converter/common.ts b/converter/common.ts index fd071dd60..8c38ed878 100644 --- a/converter/common.ts +++ b/converter/common.ts @@ -3,6 +3,9 @@ import * as path from 'path' import * as fs from 'fs-extra' import { load as loadYAML } from 'js-yaml' +// NOTE: if changing this also update the same variable in 'server/utilities.ts' +const LATEST_TEXTBOOK_VERSION = 'v2' + const CWD = process.cwd() // Get the languages to translate from the mathigon config file or throw an error @@ -23,5 +26,6 @@ const workingTranslationsPath = path.join(CWD, 'working', 'translations') export { translationsLanguages, workingContentPath, - workingTranslationsPath + workingTranslationsPath, + LATEST_TEXTBOOK_VERSION } diff --git a/converter/converter.ts b/converter/converter.ts index 693d45eb0..2e3449ea3 100644 --- a/converter/converter.ts +++ b/converter/converter.ts @@ -6,7 +6,8 @@ import * as fs from 'fs-extra' import { translationsLanguages, workingContentPath, - workingTranslationsPath + workingTranslationsPath, + LATEST_TEXTBOOK_VERSION } from './common' const CWD = process.cwd() @@ -92,11 +93,17 @@ const prepare = function (language: string) { copyNotebookAssets(notebooks, working, (src: string, dest: string) => { return path.dirname(src).split(path.sep).indexOf(nbImagesDirName) > -1 }) + copyNotebookAssets(`${notebooks}${path.sep}${LATEST_TEXTBOOK_VERSION}`, working, (src: string, dest: string) => { + return path.dirname(src).split(path.sep).indexOf(nbImagesDirName) > -1 + }) // copy over notebook `resources/` copyNotebookAssets(notebooks, working, (src: string, dest: string) => { return path.dirname(src).split(path.sep).indexOf(nbResourcesDirName) > -1 }) + copyNotebookAssets(`${notebooks}${path.sep}${LATEST_TEXTBOOK_VERSION}`, working, (src: string, dest: string) => { + return path.dirname(src).split(path.sep).indexOf(nbResourcesDirName) > -1 + }) } const convert = function (language: string) { diff --git a/converter/textbook-converter/requirements.txt b/converter/textbook-converter/requirements.txt index f81a1e8c5..bbc5c87bb 100644 --- a/converter/textbook-converter/requirements.txt +++ b/converter/textbook-converter/requirements.txt @@ -2,4 +2,4 @@ ipython>=6 nbformat>=4 nbconvert>=5 requests -pyyaml +pyyaml==5.3.1 diff --git a/cypress/integration/sidebar.spec.js b/cypress/integration/sidebar.spec.js index 022f4aee1..1e59273a0 100644 --- a/cypress/integration/sidebar.spec.js +++ b/cypress/integration/sidebar.spec.js @@ -7,11 +7,8 @@ describe('Sidebar', () => { it('can be toggled on a laptop', () => { cy.viewport('macbook-15') cy.visit('/course/ch-prerequisites') - cy.get(sidebarSelector).should('be.visible') cy.get(toggleSidebarSelector).click() cy.get(sidebarSelector).should('be.not.visible') - cy.get(toggleSidebarSelector).click() - cy.get(sidebarSelector).should('be.visible') }) it('can be toggled on a tablet', () => { @@ -19,7 +16,6 @@ describe('Sidebar', () => { cy.visit('/course/ch-prerequisites') cy.get(sidebarSelector).should('be.not.visible') cy.get(toggleSidebarSelector).click() - cy.get(sidebarSelector).should('be.visible') cy.get(toggleSidebarSelector).click() cy.get(sidebarSelector).should('be.not.visible') }) diff --git a/frontend/scss/components/textbook__page.scss b/frontend/scss/components/textbook__page.scss index 7980f9388..3099bea87 100755 --- a/frontend/scss/components/textbook__page.scss +++ b/frontend/scss/components/textbook__page.scss @@ -20,11 +20,14 @@ main.body { .c-textbook { display: flex; - max-height: 100%; - min-height: calc(100vh - $qiskit-navbar-height); + height: calc(100vh - $qiskit-navbar-height - $one-xp-banner-height-desktop); overflow: hidden; position: relative; + @include mq($until: large) { + height: calc(100vh - $qiskit-navbar-height - $one-xp-banner-height-mobile); + } + @include mq($until: medium) { display: grid; grid-template-columns: 1fr 1fr; diff --git a/frontend/scss/variables/settings.scss b/frontend/scss/variables/settings.scss index 26d0ea9ea..f8432ab60 100755 --- a/frontend/scss/variables/settings.scss +++ b/frontend/scss/variables/settings.scss @@ -7,6 +7,9 @@ $textbook-page-width: 100%; $qiskit-navbar-height: 3.5rem; $textbook-page-banner-height: 40px; +$one-xp-banner-height-desktop: 3.25rem; +$one-xp-banner-height-mobile: 5rem; + $left-sidebar-width: 16rem; $left-sidebar-width-hidden: 3rem; $left-sidebar-width-sm: 3.5rem; @@ -19,6 +22,6 @@ $spacing-unit-small: 12px; $spacing-unit: 24px; // Grid parameters. -$column-size-large: 4rem; +$column-size-large: 6rem; $column-size-medium: 5rem; -$column-size-small: 5rem; +$column-size-small: 4rem; diff --git a/frontend/vue/components/CodeExercise/CodeExercise.vue b/frontend/vue/components/CodeExercise/CodeExercise.vue index ffcf325f7..3cec855e0 100644 --- a/frontend/vue/components/CodeExercise/CodeExercise.vue +++ b/frontend/vue/components/CodeExercise/CodeExercise.vue @@ -13,6 +13,7 @@
-
+
{{ $translate('Connecting to the server') }}
@@ -45,6 +45,7 @@ export default defineComponent({ }, data () { return { + kernelLoading: false, kernelPromise: undefined as Promise | undefined, kernel: undefined as IKernelConnection | undefined, outputArea: undefined as OutputArea | undefined, @@ -53,19 +54,6 @@ export default defineComponent({ } }, mounted () { - this.$emit('loadingKernel') - const outputDivRef = (this.$refs.outputDiv as HTMLDivElement) - - this.kernelPromise = requestBinderKernel() - - this.kernelPromise.then((kernel: IKernelConnection) => { - this.kernel = kernel - this.$emit('kernelReady') - this.outputArea = createOutputArea(outputDivRef) - }, (error: Error) => { - this.error = error.message - }) - this.apiTokenPromise = getQiskitUser().then(user => user?.apiToken) }, methods: { @@ -103,9 +91,9 @@ export default defineComponent({ }, _executeCode (code: string) { this.error = '' - this.outputArea!.setHidden(true) - this.kernelPromise!.then((kernel: IKernelConnection) => { + this._initKernel()!.then((kernel: IKernelConnection) => { this.$emit('running') + this.outputArea!.setHidden(true) try { const requestFuture = kernel.requestExecute({ code }) this.setOutputFuture(requestFuture) @@ -128,6 +116,26 @@ export default defineComponent({ } }) }, + _initKernel (): Promise { + if (this.kernelPromise) { + return this.kernelPromise + } + + this.$emit('kernelLoading') + this.kernelLoading = true + const outputDivRef = (this.$refs.outputDiv as HTMLDivElement) + + this.kernelPromise = requestBinderKernel() + + return this.kernelPromise.then((kernel: IKernelConnection) => { + this.kernelLoading = false + this.$emit('kernelReady') + this.outputArea = createOutputArea(outputDivRef) + return kernel + }, (error: Error) => { + this.error = error.message + }) as Promise + }, setOutputFuture (future : IOutputShellFuture) { this.outputArea!.future = future }, diff --git a/frontend/vue/components/CodeExercise/ExerciseActionsBar.vue b/frontend/vue/components/CodeExercise/ExerciseActionsBar.vue index f4f59a022..c615e9af5 100644 --- a/frontend/vue/components/CodeExercise/ExerciseActionsBar.vue +++ b/frontend/vue/components/CodeExercise/ExerciseActionsBar.vue @@ -1,5 +1,14 @@ + + + + diff --git a/frontend/vue/components/SignIn/SignIn.vue b/frontend/vue/components/SignIn/SignIn.vue index f9f66d7e3..76af5cc53 100644 --- a/frontend/vue/components/SignIn/SignIn.vue +++ b/frontend/vue/components/SignIn/SignIn.vue @@ -63,20 +63,26 @@ export default class SignIn extends Vue { " - ], + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAKoAAAB7CAYAAADkFBsIAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8qNh9FAAAACXBIWXMAAAsTAAALEwEAmpwYAAAIyUlEQVR4nO3dfUxV9x3H8fe5F1BQVrUkWkXw8RpFQGXtlG2izhlc0tQsPqYj6khEcWsat2VbVvyjZKRVtzVLjLFbqkvWukXEZs3Uba6IWkhT64TZJ1oBlVQEH0bBWp7u3R838iAi9+KBc37k80pODOeee843Nx9+v/s73svXCgQCAURczuN0ASKhUFDFCAqqGEFBFSMoqG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vU6YOGZwukPHxWJbSAfC/9oBrIgIPFnB3y5v7lYCddfxHznqXFHduHJEBfD5fBQX93y/lpWVxZw5c4iOjnaoqmC7yOR4KL9q73nnJ9h7vnD4/3MB/7ETROz9PVZEMBJWTAzen/+Ujl++gOfrC7CmTnWuQFw6ovbl3Llzvab9vLw84uPjKSsrIycnh/j4eC5dGty759/02Xs+C0ifae85w+GZP4/IvxVhTY7vuX9uEpFvHXU8pGBQUO817b3/Rn9+fj61tbW0tLRw8+ZNamtrmT59+qDWMnM8zI3v/7hQLZ0DY0fZd77hyLVT//3c1LTXsmDtU1DdEPwUVV9CWURNeAxWOveW2xjGjKhu87Vo2LoUoh9hAfT4aMhZCpFe++oarhTURzD5cXjuu8E7AeHyTYDnVmjKD5UxU79bPTEGdmTC2x/B6Y+h+SFvBSA4ii5PgoXT9Z2pcCioNojwwoq5sGw2/Le261uozS3BFf1jMV3fQp31xODchx3uFFQbRXhhfmJwE3vpPaoYQUEVI2jqH6ZSY2OH1XWtwEA/RiQyhDT1ixEUVDGCgipGUFDFCAqqGEFBFSMoqGIEBVWMoKCKERRUMYKCKkZQUMUICqoYQUEVIyioYgQFVYygoIoRFFQxwv8BeA13HgLs0AYAAAAASUVORK5CYII=\n", "text/plain": [ - "
" + "
" ] }, "execution_count": 2, @@ -506,11 +503,11 @@ " \"\"\"\n", " Compiles a circuit for use in Deutsch's algorithm.\n", " \"\"\"\n", - " n = function.num_qubits - 1\n", - " qc = QuantumCircuit(n + 1, n)\n", + " n = function.num_qubits-1\n", + " qc = QuantumCircuit(n+1, n)\n", "\n", " qc.x(n)\n", - " qc.h(range(n + 1))\n", + " qc.h(range(n+1))\n", "\n", " qc.barrier()\n", " qc.compose(function, inplace=True)\n", @@ -538,11 +535,9 @@ "outputs": [ { "data": { - "image/svg+xml": [ - "" - ], + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAbsAAACoCAYAAAB5XECfAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNp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itVjz+cLrL/4FERFrx3anTeO3tzbBabY5lE8c8DEPcPeJC3YBHdh1w9rwFe6sOw263s+iIiG7Q+66eeOQ3Qxx/Tx2YoJiiAyQou4MHD2Ls2LEICwtDYGAg4uLiMG/ePK/sq/yzKtjtdpiG3eeV7RMRqVn6kIGIjuyD0B4h+PfMYaLjOFH1acz9+/djxIgRiIyMxJw5cxAVFYW6ujrs3r0ba9asafe1c5es9lFKIiLylsVzprq1nqpvKp81axa6d++OvXv3okePHo7lkydPFpiKiIiURrVHdhcvXkRISAimT5+OV1991av7OnvegpdX/w2D743HmKwRXt0XERF5nmqP7M6cOQObzdbpGw87cxqz4osaVHxR06n9ERGR57l7GlO1F6iEhoZCr9ejsbFRdBQiIlI41Z7GBACTyYTDhw/j6NGjuOOOth9Fczve+79PUPHFETw/9UmE9gjxyj6IiMi7VHtkBwCFhYWwWCxIS0vD+vXrUVZWhrfffhtTpkzxyPbPnrdg35c1SB2YwKIjIlIx1X5mBwCDBw/Gnj17MH/+fMycOROXL19GZGQknnzySY9sv/nseYR078b76oiIVE7VpzF9wWazQa9X9QEwEZHmseyIiEh6PGQhIiLpseyIiEh6LDsiIpIey46IiKTHsiMiIumx7IiISHosOyIikh7LjoiIpMeyIyIi6bHsiIhIeiw7IiKSHsuOiIikx7IjIiLpseyIiEh6LDsiIpIey46IiKTHsiMiIumx7IiISHosOyIikh7LjoiIpMeyIyIi6bHsiIhIeiw7IiKSHsuOiIikx7IjIiLpseyIiEh6LDsiIpLe/wO10bKZbbpoVAAAAABJRU5ErkJggg==\n", "text/plain": [ - "
" + "
" ] }, "execution_count": 4, @@ -551,7 +546,9 @@ } ], "source": [ - "compile_circuit(deutsch_function(3)).draw()" + "compile_circuit(\n", + " deutsch_function(3)\n", + ").draw()" ] }, { @@ -571,16 +568,15 @@ "source": [ "from qiskit_aer import AerSimulator\n", "\n", - "\n", "def deutsch_algorithm(function: QuantumCircuit):\n", " \"\"\"\n", " Determine if a Deutsch function is constant or balanced.\n", " \"\"\"\n", " qc = compile_circuit(function)\n", - "\n", - " result = AerSimulator().run(qc, shots=1, memory=True).result()\n", + " \n", + " result = AerSimulator().run(qc,shots=1,memory=True).result()\n", " measurements = result.get_memory()\n", - " if measurements[0] == \"0\":\n", + " if measurements[0] == '0':\n", " return \"constant\"\n", " return \"balanced\"" ] @@ -601,11 +597,9 @@ "outputs": [ { "data": { - "image/svg+xml": [ - "" - ], + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAKoAAAB7CAYAAADkFBsIAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8qNh9FAAAACXBIWXMAAAsTAAALEwEAmpwYAAAIyUlEQVR4nO3dfUxV9x3H8fe5F1BQVrUkWkXw8RpFQGXtlG2izhlc0tQsPqYj6khEcWsat2VbVvyjZKRVtzVLjLFbqkvWukXEZs3Uba6IWkhT64TZJ1oBlVQEH0bBWp7u3R838iAi9+KBc37k80pODOeee843Nx9+v/s73svXCgQCAURczuN0ASKhUFDFCAqqGEFBFSMoqGIEBVWMoKCKERRUMYKCKkZQUMUICqoYQUEVIyioYgQFVYygoIoRFFQxgoIqRlBQxQgKqhhBQRUjKKhiBAVVjKCgihEUVDGCgipGUFDFCAqqGEFBFSMoqGIEBVWMoKCKERRUMYKCKkZQUMUICqoYQUEVI0Q4XcBw5Q/Aly1gWRATFfxXBs7VI6rf72fPnj3MnDmTkSNHkpqaSklJCbNmzWLLli1Ol/dAre1w8gN48U144Qj8qhBe/juUfRYMrwyMq0fU7OxsioqKyMvLIy0tjdLSUjZs2EBDQwM7duxwurxeWtth39tQ3dBz//VG+Ou78Nl1eDYdPBpdw+baoB46dIiDBw9y6tQpMjIyAFi6dCnnz5+nqKiIBQsWOFxhb8fKe4cU4N5A+n4NzBgPi2YMZVXDg2un/oKCAjIzMztDes+MGTOIjIwkJSUFgJqaGjIyMvD5fCQnJ3PmzBknyqW1HcouPfwYCyj5GNS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1jMV3fQp31xODchx3uFFQbRXhhfmJwE3vpPaoYQUEVI2jqH6ZSY2OH1XWtwEA/RiQyhDT1ixEUVDGCgipGUFDFCAqqGEFBFSMoqGIEBVWMoKCKERRUMYKCKkZQUMUICqoYQUEVIyioYgQFVYygoIoRFFQxwv8BeA13HgLs0AYAAAAASUVORK5CYII=\n", "text/plain": [ - "
" + "
" ] }, "metadata": {}, @@ -833,41 +827,40 @@ "from qiskit import QuantumCircuit\n", "import numpy as np\n", "\n", - "\n", "def dj_function(num_qubits):\n", " \"\"\"\n", " Create a random Deutsch-Jozsa function.\n", " \"\"\"\n", "\n", - " qc = QuantumCircuit(num_qubits + 1)\n", + " qc = QuantumCircuit(num_qubits+1)\n", " if np.random.randint(0, 2):\n", " # Flip output qubit with 50% chance\n", " qc.x(num_qubits)\n", " if np.random.randint(0, 2):\n", " # return constant circuit with 50% chance\n", " return qc\n", - "\n", + " \n", " # next, choose half the possible input states\n", " on_states = np.random.choice(\n", " range(2**num_qubits), # numbers to sample from\n", - " 2**num_qubits // 2, # number of samples\n", - " replace=False, # makes sure states are only sampled once\n", + " 2**num_qubits // 2, # number of samples\n", + " replace=False # makes sure states are only sampled once\n", " )\n", "\n", " def add_cx(qc, bit_string):\n", " for qubit, bit in enumerate(reversed(bit_string)):\n", - " if bit == \"1\":\n", + " if bit == '1':\n", " qc.x(qubit)\n", " return qc\n", "\n", " for state in on_states:\n", - " qc.barrier() # Barriers are added to help visualize how the functions are created. They can safely be removed.\n", + " qc.barrier() # Barriers are added to help visualize how the functions are created. They can safely be removed.\n", " qc = add_cx(qc, f\"{state:0b}\")\n", " qc.mct(list(range(num_qubits)), num_qubits)\n", " qc = add_cx(qc, f\"{state:0b}\")\n", "\n", " qc.barrier()\n", - "\n", + " \n", " return qc" ] }, @@ -887,11 +880,9 @@ "outputs": [ { "data": { - "image/svg+xml": [ - "" - ], + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAyYAAADWCAYAAAAkTZa2AAAAOXRFWHRTb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cHMqcA8V0jUpZynJhrHjEhP/n5+aJLUIbmMj97ZOS/Abf1CW/95Axg9I85lFiNubZOTLz5+SNDvwt0DePIhzsO6Hc3MGoWhxKryZrr3sPM7ViPFIR1m9jb+wOjHgYGjLJ/KAmXrL12osQe5t/3wLHmdZShdO5mnv457EEOJVaTLdeOucaE7FNUVCS6BOXceicw4iFz71BNOVBbA1w+D+g+801bwh3mxcA907jRjRTm2no9U803nhdPmBe0flUDXL1kfiBjbCfzzcetd5nr8a5ykSFzrrt0A7KmAldrzaNrX50C6s4CeqN5nVHX283PKemRZq4rO5l77USuGHMw6XePee3axSrzd2PDFXM4jU8089G9n/kl68DqdLLlmoMJkY263g4M5AV7pBBNA27rbX4RBdIp0TxiRhSIOwZITje/iHgqFxERERERCcfBhPyUlpaKLoHIcsw1qYi5tg97TSqSLdc8lSuE7MTEqHvttWvXIi8vT8hrE0UKc00qYq7tw16TimTLNW8XHIVC3T4uIyMj5ATNWyKSTMK5JSJzTU7DXNuHvSYVOTHXPJWLiIiIiIiE42BCRERERETCcTAhPytXrhRdApHlmGtSEXNtH/aaVCRbrjmYkB+PxyO6BCLLMdekIubaPuw1qUi2XHMwIT+5ubmiSyCyHHNNKmKu7cNek4pkyzUHEyIiIiIiEo6fYxKFQt327YknnuAtD8lRwskrc01Ow1zbh70mFTkx1/wcEyIiIiIiEo6nchERERERkXAcTIiIiIiISDgOJkREREREJBwHEyIiIiIiEo6DCRERERERCcfBhIiIiIiIhONgQkREREREwnEwISIiIiIi4TiYEBERERGRcBxMiIiIiIhIuP8Pv1domhP7CFEAAAAASUVORK5CYII=\n", "text/plain": [ - "
" + "
" ] }, "execution_count": 8, @@ -922,10 +913,10 @@ " \"\"\"\n", " Compiles a circuit for use in the Deutsch-Jozsa algorithm.\n", " \"\"\"\n", - " n = function.num_qubits - 1\n", - " qc = QuantumCircuit(n + 1, n)\n", + " n = function.num_qubits-1\n", + " qc = QuantumCircuit(n+1, n)\n", " qc.x(n)\n", - " qc.h(range(n + 1))\n", + " qc.h(range(n+1))\n", " qc.compose(function, inplace=True)\n", " qc.h(range(n))\n", " qc.measure(range(n), range(n))\n", @@ -949,18 +940,17 @@ "source": [ "from qiskit_aer import AerSimulator\n", "\n", - "\n", "def dj_algorithm(function: QuantumCircuit):\n", " \"\"\"\n", " Determine if a Deutsch-Jozsa function is constant or balanced.\n", " \"\"\"\n", " qc = compile_circuit(function)\n", - "\n", - " result = AerSimulator().run(qc, shots=1, memory=True).result()\n", + " \n", + " result = AerSimulator().run(qc,shots=1,memory=True).result()\n", " measurements = result.get_memory()\n", - " if \"1\" in measurements[0]:\n", - " return \"balanced\"\n", - " return \"constant\"" + " if '1' in measurements[0]:\n", + " return 'balanced'\n", + " return 'constant'" ] }, { @@ -973,17 +963,15 @@ }, { "cell_type": "code", - "execution_count": 11, + "execution_count": 18, "id": "46392e96", "metadata": {}, "outputs": [ { "data": { - "image/svg+xml": [ - "" - ], + "image/png": "iVBORw0KGgoAAAANSUhEUgAAA1QAAADWCAYAAADW8cMTAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8qNh9FAAAACXBIWXMAAAsTAAALEwEAmpwYAAAuXklEQVR4nO3de3RU9b338c+eSbgZFDUKCgJyCZBIwkUEpCVwan2wxy59KsR6Wh9LORVD6Kk8pZe1fKpl0cPqsbHxOafFejy11Hqk5aJ90IJtVRK8oSAXARMjEI3BcL9IIECSmeePjYRIkplM9p6992/er7WyhD2/zHz9+XHP/u79mz1WNBqNCgAAAADQYSGvCwAAAACAoKKhAgAAAIAE0VABAAAAQIJoqAAAAAAgQTRUAAAAAJAgGioAAAAASBANFQAAAAAkiIYKAAAAABJEQwUAAAAACaKhAgAAAIAE0VABAAAAQIJoqAAAAAAgQTRUAAAAAJAgGioAAAAASBANFQAAAAAkiIYKAAAAABJEQwUAAAAACaKhAgAAAIAE0VABAAAAQILSvC4gyCoqKmKO+dWvfqW5c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ORK5CYII=\n", "text/plain": [ - "
" + "
" ] }, "metadata": {}, @@ -995,7 +983,7 @@ "'balanced'" ] }, - "execution_count": 11, + "execution_count": 18, "metadata": {}, "output_type": "execute_result" } @@ -1182,20 +1170,18 @@ }, { "cell_type": "code", - "execution_count": 12, + "execution_count": 19, "id": "689ab37a", "metadata": {}, "outputs": [ { "data": { - "image/svg+xml": [ - "" - ], + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAKoAAAEDCAYAAAClEp8QAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8qNh9FAAAACXBIWXMAAAsTAAALEwEAmpwYAAAOlElEQVR4nO3df1CUh53H8fcuiD+CxhpSUoOgoBglgsbWGtsGdTKO9Gxr668wOTsxzIUL5uZM7o/z/jAXh4x/5Mecd9NMYm7mYq9p7TXGtJec2OoIEjVmDkU8TVIURaQaT4kaMYr82Ptju5wgPx7WffZ5vvp5zeyMLPjsN+bts+y67DcQCoVCiPhc0OsBRJxQqGKCQhUTFKqYoFDFBIUqJihUMUGhigkKVUxQqGKCQhUTFKqYoFDFBIUqJihUMUGhigkKVUxQqGKCQhUTFKqYoFDFBIUqJihUMUGhigkKVUxQqGKCQhUTFKqYoFDFBIUqJihUMUGhigkKVUxQqGKCQhUTFKqYkOj1ALerxi/g+DkIhSAjBTLugUDA66ns8vUZtaOjg1deeYUJEyYwZMgQ8vLy2LVrFxMnTuSpp57yerwenbsM//R7eKUMtlTBe/th/Z8/Pn3B6+ns8nWoRUVFlJaWUlxcTFlZGUuXLqWwsJDjx48zffp0r8e7yYUr8M9/gIammz93+iL8y3Y4+2Xcx7ot+Pauf9OmTWzcuJGKigry8/MBmDNnDgcOHGDLli089NBDHk94s+2H4co16GlxVygELa1QVgNPfC/uo5nn2zPqunXrmD9/fmekEePHj2fQoEHk5uYCUF9fT35+PtnZ2UyZMoUPP/zQi3G53gb/faLnSCNCwKFT0Hwt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v+/pb2FhQUdF7X1tbGk08+yeuvv86qVasc38ZANhvfaNy0Bfzw797vcl1/j5J7+/yqX3b9uPDxn/LZ7l9ENVd/fvryZ3ztGxMdzdXX57rPXHWghkDB1Kjncvo0vi/PqANZ2ltaWkpBQQFTp06Ny2ztre49emi7ftXFY7szt5t/Hjfy5RnV6dLejz/+mJ07d1JRUTHg24j2H+QufgUvvNf1uu5nmYjIWam3z3dX+ft3+MbIqMbq1893Q/XJrtf1NNdAZ/7hvG/z6390/x83fXlGdbq0t7y8nLq6OrKyshg7diz79u2jpKSEV1991bXZ7h4KI1x4JVFSAnx9ROyPG5F+jzvHHTPKneN258szKjhb2rt69WpWr17d+fnZs2fzzDPPsHjxYtfmCgRgagZU/jG2x81LhwQXTxt5Y+A/D8T2+d9gAHLHxPCAfd1WfG4mNqqqqjx9oj/CjecN3X4uclQyTI7xlujcMXD3sNgeszdmQo0s7e3rif6KigpXz6YRqSPguzEMa/pYGJsSu+P15gfTwq8tjYVBCbBgamyO5YRe5helllZ4uezWXj0FMGIo/P1fwF2D+//aWCj/NDYvgln0TfjexP6/LlbMnFH9ZvAg+Os54deURit5MDw9N36RAsx+AB65xcDmTo7tPYoTOqPeogtX4Bd7wj8rNRBjRsHy77j7SL83oRBUfBZ+9VNbHz+C0l1iAvxgajj0KP+9JGoKNQY6QuEXJO/8BC708zqAEUPDZ7X8B9x9lO/E55fg/Wr45E99PxsQAHLS4EfT4F4P/mKBQo2pjg749DQcPRt+scaXV8MBDB8SPoNmfR0eTPM+0O6amuHgyfDMn18Kv2Y1KSH8U6hjRoV/sM+rn+2KUKhigs/+bov0TKGKCQpVTFCoYoJCFRMUqpigUMUEhSomKFQxQaGKCQpVTFCoYoJCFRMUqpigUMUEhSomKFQxQaGKCQpVTFCoYoJCFRMUqpjwf8Ng1djwLbVaAAAAAElFTkSuQmCC\n", "text/plain": [ - "
" + "
" ] }, - "execution_count": 12, + "execution_count": 19, "metadata": {}, "output_type": "execute_result" } @@ -1205,14 +1191,13 @@ " \"\"\"\n", " Create a Bernstein-Vazirani function from a string of 1s and 0s.\n", " \"\"\"\n", - " qc = QuantumCircuit(len(s) + 1)\n", + " qc = QuantumCircuit(len(s)+1)\n", " for index, bit in enumerate(reversed(s)):\n", - " if bit == \"1\":\n", + " if bit == '1':\n", " qc.cx(index, len(s))\n", " return qc\n", "\n", - "\n", - "bv_function(\"1001\").draw()" + "bv_function('1001').draw()" ] }, { @@ -1226,7 +1211,7 @@ }, { "cell_type": "code", - "execution_count": 13, + "execution_count": 20, "id": "d015d981", "metadata": {}, "outputs": [ @@ -1236,7 +1221,7 @@ "'1001'" ] }, - "execution_count": 13, + "execution_count": 20, "metadata": {}, "output_type": "execute_result" } @@ -1244,11 +1229,12 @@ "source": [ "def bv_algorithm(function: QuantumCircuit):\n", " qc = compile_circuit(function)\n", - " result = AerSimulator().run(qc, shots=1, memory=True).result()\n", + " result = AerSimulator().run(qc,shots=1,memory=True).result()\n", " return result.get_memory()[0]\n", "\n", - "\n", - "bv_algorithm(bv_function(\"1001\"))" + "bv_algorithm(\n", + " bv_function('1001')\n", + ")" ] }, { @@ -1355,7 +1341,7 @@ "\n", "### Analysis\n", "\n", - "The analysis of Simon's algorithm begins along similar lines to the Deutsch-Jozsa algorithm.\n", + "The analysis of Simon's algorithm begins along similar lines to the Deutsch-Jozsa algortithm.\n", "After the first layer of Hadamard gates is performed on the top $n$ qubits, the state becomes\n", "\n", "$$\n", @@ -1611,7 +1597,7 @@ }, { "cell_type": "code", - "execution_count": 14, + "execution_count": 21, "id": "d17ea0f7", "metadata": {}, "outputs": [], @@ -1621,33 +1607,29 @@ "from qiskit import QuantumCircuit\n", "import numpy as np\n", "\n", - "\n", "def simon_function(s: str):\n", " \"\"\"\n", - " Create a QuantumCircuit implementing a query gate for Simon problem\n", - " obeying the promise for the hidden string `s`\n", + " Create a QuantumCircuit implementing a query gate for Simon problem obeying the promise for the hidden string `s`\n", " \"\"\"\n", " # Our quantum circuit has 2n qubits for n = len(s)\n", " n = len(s)\n", - " qc = QuantumCircuit(2 * n)\n", - "\n", - " # Define a random permutation of all n bit strings. This permutation\n", - " # will effectively hide the string s.\n", + " qc = QuantumCircuit(2*n)\n", + " \n", + " # Define a random permutation of all n bit strings. This permutation will effectively hide the string s.\n", " pi = np.random.permutation(2**n)\n", - "\n", - " # Now we'll define a query gate explicitly. The idea is to first define\n", - " # a function g(x) = min{x,x ^ s}, which is a simple function that\n", - " # satisfies the promise. Then we take f to be the composition of g and\n", - " # the random permutation pi. This gives us a random function satisfying\n", - " # the promise for s.\n", - " query_gate = np.zeros((4**n, 4**n))\n", + " \n", + " # Now we'll define a query gate explicitly. The idea is to first define a function g(x) = min{x,x ^ s}, which\n", + " # is a simple function that satisfies the promise, and then we take f to be the composition of g and the random\n", + " # permutation pi. This gives us a random function satisfying the promise for s.\n", + " \n", + " query_gate = np.zeros((4**n,4**n))\n", " for x in range(2**n):\n", - " for y in range(2**n):\n", - " z = y ^ pi[min(x, x ^ int(s, 2))]\n", - " query_gate[x + 2**n * z, x + 2**n * y] = 1\n", + " for y in range(2**n): \n", + " z = y ^ pi[min(x,x ^ int(s,2))]\n", + " query_gate[x + 2**n *z, x + 2**n *y] = 1 \n", "\n", " # Our circuit has just this one query gate\n", - " qc.unitary(query_gate, range(2 * n))\n", + " qc.unitary(query_gate,range(2*n))\n", " return qc" ] }, @@ -1661,7 +1643,7 @@ }, { "cell_type": "code", - "execution_count": 15, + "execution_count": 23, "id": "29be9b92", "metadata": {}, "outputs": [], @@ -1669,7 +1651,6 @@ "from qiskit_aer import AerSimulator\n", "from qiskit import ClassicalRegister\n", "\n", - "\n", "def simon_measurements(problem: QuantumCircuit, k: int):\n", " \"\"\"\n", " Quantum part of Simon's algorithm. Given a `QuantumCircuit` that\n", @@ -1677,13 +1658,13 @@ " \"\"\"\n", " n = problem.num_qubits // 2\n", "\n", - " qc = QuantumCircuit(2 * n, n)\n", + " qc = QuantumCircuit(2*n,n)\n", " qc.h(range(n))\n", " qc.compose(problem, inplace=True)\n", " qc.h(range(n))\n", " qc.measure(range(n), range(n))\n", - "\n", - " result = AerSimulator().run(qc, shots=k, memory=True).result()\n", + " \n", + " result = AerSimulator().run(qc,shots=k,memory=True).result()\n", " return result.get_memory()" ] }, @@ -1698,34 +1679,37 @@ }, { "cell_type": "code", - "execution_count": 16, + "execution_count": 24, "id": "5b3513c3", "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "['11111',\n", - " '01001',\n", + "['00111',\n", + " '10001',\n", " '01101',\n", - " '10101',\n", - " '00000',\n", - " '11011',\n", - " '01110',\n", + " '11111',\n", + " '01010',\n", + " '00111',\n", + " '00011',\n", + " '10110',\n", + " '10110',\n", " '00000',\n", - " '00100',\n", - " '10010',\n", - " '00100',\n", - " '01010']" + " '00111',\n", + " '11111']" ] }, - "execution_count": 16, + "execution_count": 24, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "simon_measurements(simon_function(\"11011\"), k=12)" + "simon_measurements(\n", + " simon_function('11011'),\n", + " k=12\n", + ")" ] }, { @@ -1738,7 +1722,7 @@ }, { "cell_type": "code", - "execution_count": 17, + "execution_count": 25, "id": "0f74e289", "metadata": {}, "outputs": [], @@ -1746,34 +1730,33 @@ "import numpy as np\n", "import galois\n", "\n", - "\n", "def simon_algorithm(problem: QuantumCircuit):\n", " \"\"\"\n", - " Given a `QuantumCircuit` that implements a query gate for Simon problem,\n", - " return the hidden string `s`.\n", + " Given a `QuantumCircuit` that implements a query gate for Simon problem, return the hidden string `s`.\n", " \"\"\"\n", - " # Quantum part: run the circuit defined previously k times and gather\n", - " # the measurement results. Replace +10 by +r for any nonnegative\n", - " # integer r depending on desired confidence.\n", + " \n", + " # Quantum part: run the circuit defined previously k times and gather the measurement results.\n", + " # Replace +10 by +r for any nonnegative integer r depending on desired confidence.\n", + "\n", " measurements = simon_measurements(problem, k=problem.num_qubits // 2 + 10)\n", - " print(\"Measurement results:\")\n", + " print('Measurement results:')\n", " display(measurements)\n", - "\n", + " \n", " # Classical post-processing:\n", - "\n", + " \n", " # 1. Convert measurements of form '11101' to 2D-array of integers\n", - " matrix = np.array([list(bitstring) for bitstring in measurements]).astype(int)\n", - "\n", + " matrix = np.array([list(bitstring) for bitstring in measurements]).astype(int) \n", + " \n", " # 2. Interpret matrix as using arithmetic mod 2, and find null space\n", - " null_space = galois.GF(2)(matrix).null_space()\n", - " print(\"Null space:\")\n", + " null_space = galois.GF(2)(matrix).null_space() \n", + " print('Null space:')\n", " display(null_space)\n", - "\n", + " \n", " # 3. Convert back to a string\n", " if len(null_space) == 0:\n", " # No non-trivial solution; `s` is all-zeros\n", - " return \"0\" * len(measurements[0])\n", - " return \"\".join(np.array(null_space[0]).astype(str))" + " return '0'*len(measurements[0])\n", + " return ''.join(np.array(null_space[0]).astype(str))" ] }, { @@ -1786,10 +1769,10 @@ }, { "cell_type": "code", - "execution_count": 18, + "execution_count": 28, "id": "2d77b5fd", "metadata": { - "scrolled": false + "scrolled": true }, "outputs": [ { @@ -1802,33 +1785,26 @@ { "data": { "text/plain": [ - "['01100',\n", - " '11001',\n", - " '11110',\n", - " '00100',\n", - " '01100',\n", + "['01111',\n", + " '10010',\n", + " '11101',\n", + " '10010',\n", + " '00000',\n", " '11110',\n", " '10110',\n", " '11010',\n", - " '01000',\n", " '10001',\n", - " '10001',\n", - " '10010',\n", - " '11101',\n", + " '01011',\n", + " '01000',\n", " '00011',\n", - " '10010']" + " '00100',\n", + " '11101',\n", + " '01011']" ] }, "metadata": {}, "output_type": "display_data" }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "OMP: Info #271: omp_set_nested routine deprecated, please use omp_set_max_active_levels instead.\n" - ] - }, { "name": "stdout", "output_type": "stream", @@ -1851,13 +1827,32 @@ "'10011'" ] }, - "execution_count": 18, + "execution_count": 28, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "simon_algorithm(simon_function(\"10011\"))" + "simon_algorithm(\n", + " simon_function('10011')\n", + ")\n" + ] + }, + { + "cell_type": "markdown", + "id": "823ef32b", + "metadata": {}, + "source": [ + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n" ] } ], diff --git a/notebooks/v2/algorithms/02.algorithmic-foundations/algorithmic-foundations.ipynb b/notebooks/v2/algorithms/02.algorithmic-foundations/algorithmic-foundations.ipynb new file mode 100644 index 000000000..734485a8f --- /dev/null +++ b/notebooks/v2/algorithms/02.algorithmic-foundations/algorithmic-foundations.ipynb @@ -0,0 +1,1208 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "id": "b929937e", + "metadata": {}, + "source": [ + "# Algorithmic foundations\n", + "\n", + "## Introduction\n", + "\n", + "Quantum algorithms provide provable advantages over classical algorithms in the query model โ€” but what about more standard models of computation, where problem inputs are given explicitly rather than in the form of an oracle or black box?\n", + "This turns out to be a much more difficult question to answer, and to address it we must first establish a solid foundation upon which to base our investigation.\n", + "That's the purpose of this lesson.\n", + "\n", + "We'll begin by discussing *computational cost*, for both classical and quantum computations, and how it can be measured.\n", + "This is a general notion that can be applied to a wide range of computational problems โ€” but to keep things simple we'll mainly examine it through the lens of *computational number theory*, which addresses problems including basic arithmetic, computing greatest common divisors, and integer factorization, which are computational tasks that are likely to be familiar to most readers.\n", + "While computational number theory is a narrow application domain, these problems serve well to illustrate the basic issues โ€” and as a bonus they happen to be highly relevant to the lesson following this one.\n", + "\n", + "Our focus will be on *algorithms*, as opposed to the ever-improving hardware on which they're run โ€” so we'll be more concerned with how the cost of running an algorithm scales as the specific problem instances it is run on grow in size, rather than how many seconds, minutes, or hours some particular computation requires.\n", + "We focus on this aspect of computational cost in recognition of the fact that algorithms have fundamental importance, and will naturally be deployed against larger and larger problem instances using faster and more reliable hardware as technology develops.\n", + "\n", + "Finally, we turn to a critically important task, which is running *classical* computations on quantum computers.\n", + "The reason this task is important is not because we hope to replace classical computers with quantum computers (which seems extremely unlikely to happen any time soon, if ever), but rather because it opens up many interesting possibilities for quantum algorithms.\n", + "Specifically, classical computations running on quantum computers become available as *subroutines* โ€” effectively leveraging decades of research and development on classical algorithms in pursuit of quantum computational advantages." + ] + }, + { + "cell_type": "markdown", + "id": "e4566cc2", + "metadata": {}, + "source": [ + "## Two examples: factoring and GCDs\n", + "\n", + "The classical computers that exist today are incredibly fast, and their speed seems to be ever increasing.\n", + "For this reason, some might be inclined to believe that computers are so fast that no computational problem is beyond their reach.\n", + "\n", + "This belief is false.\n", + "Some computational problems are so inherently difficult that, although there exist algorithms to solve them, no computer on the planet Earth today is fast enough to run these algorithms to completion on even moderately sized inputs within the lifetime of a human โ€” or even within the lifetime of the Earth itself.\n", + "\n", + "To explain further, let's introduce the *integer factorization* problem.\n", + "\n", + "\n", + "\n", + "**Integer factorization**\n", + "\n", + "Input: an integer $N\\geq 2$\n", + "\n", + "Output: the prime factorization of $N$\n", + "\n", + "\n", + "\n", + "By the *prime factorization* of $N$, we mean a list of the prime factors of $N$ and the powers to which they must be raised to obtain $N$ by multiplication.\n", + "For example, the prime factors of $12$ are $2$ and $3$, and to obtain $12$ we must take the product of $2$ to the power $2$ and $3$ to the power $1:$\n", + "\n", + "$$\n", + "12 = 2^2 \\cdot 3\n", + "$$\n", + "\n", + "Up to the ordering of the prime factors, there is only one prime factorization for each positive integer $N\\geq 2$, which is a fact known as the *fundamental theorem of arithmetic*.\n", + "\n", + "The `SymPy` symbolic mathematics package for Python includes a function `factorint` that solves the integer factorization problem for whatever input $N$ we choose." + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "id": "999fdebb", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "{2: 2, 3: 1}" + ] + }, + "execution_count": 1, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "from sympy.ntheory import factorint\n", + "N = 12\n", + "factorint(N)" + ] + }, + { + "cell_type": "markdown", + "id": "8aea3921", + "metadata": {}, + "source": [ + "Factoring small numbers like $12$ is easy, but when the number $N$ to be factored gets larger, the problem becomes more difficult.\n", + "For example, running `factorint` on a significantly larger number will cause a noticeable delay." + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "id": "e5f7c10f", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "{3: 2, 74519450661011221: 1, 5073729280707932631243580787: 1}" + ] + }, + "execution_count": 2, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "N = 3402823669209384634633740743176823109843098343\n", + "factorint(N)" + ] + }, + { + "cell_type": "markdown", + "id": "0e3cd1ac", + "metadata": {}, + "source": [ + "For even larger values of $N$, things become impossibly difficult, at least as far as we know.\n", + "For example, the *RSA Factoring Challenge*, which was run by RSA Laboratories from 1991 to 2007, offered a cash prize of $100,000 to factor the following number, which has 309 decimal digits (and 1024 bits when written in binary).\n", + "The prize for this number was never collected and its prime factors remain unknown." + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "id": "074752ae", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "135066410865995223349603216278805969938881475605667027524485143851526510604859533833940287150571909441798207282164471551373680419703964191743046496589274256239341020864383202110372958725762358509643110564073501508187510676594629205563685529475213500852879416377328533906109750544334999811150056977236890927563\n" + ] + } + ], + "source": [ + "RSA1024 = 135066410865995223349603216278805969938881475605667027524485143851526510604859533833940287150571909441798207282164471551373680419703964191743046496589274256239341020864383202110372958725762358509643110564073501508187510676594629205563685529475213500852879416377328533906109750544334999811150056977236890927563\n", + "print(RSA1024)\n" + ] + }, + { + "cell_type": "markdown", + "id": "2d2655a2", + "metadata": {}, + "source": [ + "We need not bother running `factorint` on RSA1024, it wouldn't finish within our lifetimes." + ] + }, + { + "cell_type": "markdown", + "id": "3fbc4923", + "metadata": {}, + "source": [ + "The fastest known algorithm for factoring large integers is known as the *number field sieve*.\n", + "As an example of this algorithm's use, the RSA challenge number RSA250, which has 250 decimal digits (and 829 bits in its binary representation), was factored using the number field sieve in 2020.\n", + "The computation required thousands of CPU core-years, distributed across tens of thousands of machines around the world." + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "id": "2568ca8e", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "True\n" + ] + } + ], + "source": [ + "RSA250 = 2140324650240744961264423072839333563008614715144755017797754920881418023447140136643345519095804679610992851872470914587687396261921557363047454770520805119056493106687691590019759405693457452230589325976697471681738069364894699871578494975937497937\n", + "\n", + "p = 64135289477071580278790190170577389084825014742943447208116859632024532344630238623598752668347708737661925585694639798853367\n", + "q = 33372027594978156556226010605355114227940760344767554666784520987023841729210037080257448673296881877565718986258036932062711\n", + "\n", + "print(RSA250 == p*q)" + ] + }, + { + "cell_type": "markdown", + "id": "37d39e3c", + "metadata": {}, + "source": [ + "The security of the RSA public-key cryptosystem is based on the computational difficulty of integer factoring;\n", + "an efficient algorithm for integer factoring would break it." + ] + }, + { + "cell_type": "markdown", + "id": "fa3150ec", + "metadata": {}, + "source": [ + "Next let's consider a related but very different problem, which is computing the greatest common divisor (or GCD) of two integers.\n", + "\n", + "\n", + "\n", + "**Greatest common divisor (GCD)**\n", + "\n", + "Input: nonnegative integers $N$ and $M$, at least one of which is positive\n", + "\n", + "Output: the greatest common divisor of $N$ and $M$\n", + "\n", + "\n", + "\n", + "The greatest common divisor of two numbers is the largest integer that evenly divides both of them.\n", + "\n", + "This problem is easy for computers โ€” it has roughly the same computational cost as multiplying the two input numbers together.\n", + "The following code cell runs the `gcd` function from the Python `math` module on two numbers that are both quite a bit larger than RSA1024 in the blink of an eye. (In fact, RSA1024 is the GCD of the two numbers in this example.)" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "id": "33786838", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "135066410865995223349603216278805969938881475605667027524485143851526510604859533833940287150571909441798207282164471551373680419703964191743046496589274256239341020864383202110372958725762358509643110564073501508187510676594629205563685529475213500852879416377328533906109750544334999811150056977236890927563" + ] + }, + "execution_count": 5, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "import math\n", + "\n", + "N = 4636759690183918349682239573236686632636353319755818421393667064929987310592347460711767784882455889983961546491666129915628431549982893638464243493812487979530329460863532041588297885958272943021122033997933550246447236884738870576045537199814804920281890355275625050796526864093092006894744790739778376848205654332434378295899591539239698896074\n", + "M = 5056714874804877864225164843977749374751021379176083540426461360945653967249306494545888621353613218518084414930846655066495767441010526886803458300440345782982127522212209489410315422285463057656809702949608368597012967321172325810519806487247195259818074918082416290513738155834341957254558278151385588990304622183174568167973121179585331770773\n", + "\n", + "math.gcd(N,M)" + ] + }, + { + "cell_type": "markdown", + "id": "a404015e", + "metadata": {}, + "source": [ + "We can push it even further and compute GCDs for numbers with thousands of digits in no time." + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "id": "9c012920", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "113" + ] + }, + "execution_count": 6, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "math.gcd(N**200 + 1 ,M**100 + M**2)" + ] + }, + { + "cell_type": "markdown", + "id": "4f884bdd", + "metadata": {}, + "source": [ + "This is possible because we have very efficient algorithms for computing GCDs, the most well-known of which is\n", + "*Euclid's algorithm*, discovered over 2,000 years ago.\n", + "\n", + "Could there be a fast algorithm for integer factorization that we just haven't discovered yet, allowing large numbers like RSA1024 to be factored in the blink of an eye?\n", + "The answer is yes.\n", + "Although we might expect that an efficient algorithm for factoring as simple and elegant as Euclid's algorithm for computing GCDs would have been discovered by now, there is nothing that rules out the existence of a very fast classical algorithm for integer factoring, beyond the fact that we've failed to find one thus far.\n", + "One could be discovered tomorrow โ€” but don't hold your breath.\n", + "Generations of mathematicians and computer scientists have searched, and factoring numbers like RSA1024 remains beyond our reach." + ] + }, + { + "cell_type": "markdown", + "id": "a3db50dd", + "metadata": {}, + "source": [ + "## Measuring computational cost\n", + "\n", + "Next we'll discuss a mathematical framework through which computational cost can be measured.\n", + "It should be understood that this discussion is narrowly focused on the needs of this series โ€” the *analysis of algorithms* and *computational complexity* are entire subjects onto themselves, and have much more to say about these notions.\n", + "\n", + "As a starting point, consider the following figure (which first appeared in Lesson 5), which represents a very high level abstraction of a computation.\n", + "\n", + "![Illustration of a standard computation.](images/standard-computation.png)\n", + "\n", + "The computation itself could be modeled or described in a variety of ways, such as by a computer program written in Python, a Turing machine, a Boolean circuit, or a quantum circuit.\n", + "Our focus will be on circuits (both Boolean and quantum)." + ] + }, + { + "cell_type": "markdown", + "id": "3ee7705d", + "metadata": {}, + "source": [ + "### Encodings and input length\n", + "\n", + "Let's begin with the input and output of a computational problem, which we'll assume are *binary strings*.\n", + "Different symbols could be used, but we'll keep things simple for the purposes of this discussion by restricting our attention to binary string inputs and outputs.\n", + "\n", + "Through binary strings, we can *encode* a variety of interesting objects that the problems we're interested in solving might concern, such as numbers, vectors, matrices, and graphs, as well as lists of these and other objects.\n", + "For example, to encode nonnegative integers, we can use *binary notation*.\n", + "The following table lists the binary encoding of the first nine nonnegative integers, along with the *length* (meaning the total number of bits) of each encoding. \n", + "\n", + "| number | binary encoding | length |\n", + "| :-- | :-- | :-- |\n", + "| 0 | 0 | 1 |\n", + "| 1 | 1 | 1 |\n", + "| 2 | 10 | 2 |\n", + "| 3 | 11 | 2 |\n", + "| 4 | 100 | 3 |\n", + "| 5 | 101 | 3 |\n", + "| 6 | 110 | 3 |\n", + "| 7 | 111 | 3 |\n", + "| 8 | 1000 | 4 |\n", + "\n", + "We can easily extend this encoding to handle both positive and negative integers by appending a *sign bit* to the representations if we choose.\n", + "Sometimes it's also convenient to allow binary representations of nonnegative integers to have leading zeros, which don't change the value being encoded but can allow representations to fill up a string or word of a fixed size.\n", + "\n", + "Using binary notation to represent nonnegative integers is both common and efficient, but if we wanted to we could choose a different way to represent nonnegative integers using binary strings, such as the ones suggested in the following table.\n", + "The specifics of these alternatives are not important to this discussion โ€” the point is only to clarify that we do have choices for the encodings we use.\n", + "(In this table, the symbol $\\varepsilon$ represents the *empty string*, which has no symbols in it and length equal to zero. Naturally, to avoid an obvious source of confusion, we use a special symbol such as $\\varepsilon$ to represent the empty string rather than literally writing nothing.)\n", + "\n", + "| number | unary encoding | lexicographic encoding |\n", + "| :-- | :-- | :-- | \n", + "| 0 | $\\varepsilon$ | $\\varepsilon$ |\n", + "| 1 | 0 | 0 |\n", + "| 2 | 00 | 1 |\n", + "| 3 | 000 | 00 |\n", + "| 4 | 0000 | 01 |\n", + "| 5 | 00000 | 10 |\n", + "| 6 | 000000 | 11 |\n", + "| 7 | 0000000 | 000 |\n", + "| 8 | 00000000 | 001 |\n", + "\n", + "Other types of inputs, such as vectors and matrices, or more complicated objects like descriptions of molecules, can also be encoded as binary strings.\n", + "Just like we have for nonnegative integers, a variety of different encoding schemes can be selected or invented.\n", + "For whatever scheme we come up with to encode inputs to a given problem, we interpret the *length* of an input string as representing the size of the problem instance being solved.\n", + "\n", + "For example, the number of bits required to express a nonnegative integer $N$ in binary notation, which is sometimes denoted $\\operatorname{lg}(N)$, is given by the following formula.\n", + "\n", + "$$\n", + "\\operatorname{lg}(N) = \n", + "\\begin{cases}\n", + "1 & N = 0\\\\\n", + "1 + \\lfloor \\log_2 (N) \\rfloor & N \\geq 1\n", + "\\end{cases}\n", + "$$\n", + "\n", + "Assuming that we use binary notation to encode the input to the integer factoring problem, the *input length* for the number $N$ is therefore $\\operatorname{lg}(N)$.\n", + "Note, in particular, that the length (or size) of the input $N$ is not $N$ itself โ€” when $N$ is large we don't need nearly this many bits to express $N$ in binary notation.\n", + "\n", + "From a strictly formal viewpoint, whenever we consider a computational problem or task, it should be understood that a specific scheme has been selected for encoding whatever objects are given as input or produced as output.\n", + "This allows computations that solve interesting problems to be viewed abstractly as transformations from binary string inputs to binary string outputs โ€” and naturally the details of how objects are encoded as binary strings must be important to computations at some level.\n", + "\n", + "Usually, though, we don't worry all that much about these details when we're analyzing computational cost, so that we can avoid getting into details of secondary importance.\n", + "The basic reasoning is that we expect the computational cost of converting back and forth between \"reasonable\" encoding schemes to be insignificant compared with the cost of solving the actual problem.\n", + "In those situation in which this is not the case, the details can (and should) be clarified.\n", + "\n", + "For example, a very simple computation with low cost converts between the binary representation of a nonnegative integer and its lexicographic encoding (which we have not explained in detail, but it can be inferred from the table). For this reason, the computational cost of integer factoring wouldn't differ significantly if we decided to switch from using one of these encodings to the other for the input $N$.\n", + "On the other hand, encoding nonnegative integers in unary notation incurs an exponential blow-up in the total number of symbols required, and we would not consider it to be a \"reasonable\" encoding scheme." + ] + }, + { + "cell_type": "markdown", + "id": "d2f61183", + "metadata": {}, + "source": [ + "### Elementary operations\n", + "\n", + "Now let's consider the computation itself, which is represented by the blue rectangle in the figure above.\n", + "The way that we'll measure computational cost is to count the number of *elementary operations* that each computation requires.\n", + "Intuitively speaking, an elementary operation is one involving a small, fixed number of bits or qubits that can be performed quickly and easily โ€” such as computing the AND of two bits.\n", + "(In contrast, running the `factorint` function is not reasonably viewed as being an elementary operation.)\n", + "\n", + "Formally speaking, there are different choices for what constitutes an elementary operation depending on the computational model being used.\n", + "Our focus will be on circuit models, and specifically quantum and Boolean circuits.\n", + "\n", + "#### Universal gate sets\n", + "\n", + "For circuit-based models of computation, it is typical that each *gate* is viewed as an elementary operation.\n", + "This leads to the question of precisely which gates we allow.\n", + "\n", + "Focusing for the moment on quantum circuits, we've seen several gates thus far in the series, including $X$, $Y$, $Z$, $H$, $S$, and $T$ gates, *swap* gates, controlled versions of gates (including *controlled-NOT*, *Toffoli*, and *Fredkin* gates), as well as gates that represent standard basis measurements.\n", + "In the context of the CHSH game we also saw a few additional *rotation* gates.\n", + "\n", + "We also discussed *query gates* (within the query model), and saw that any unitary operation $U$, acting on any number of qubits, can be viewed as being a gate if we so choose.\n", + "We'll disregard both of these options for the sake of this discussion.\n", + "We won't be working in the query model (although the implementation of query gates using elementary operations is discussed later in the lesson), and viewing arbitrary unitary gates, potentially acting on millions of qubits, as being elementary operations does not lead to meaningful or realistic notions of computational cost.\n", + "\n", + "Sticking with quantum gates that operate on small numbers of qubits, one approach to deciding which ones are to be considered elementary is to tease out a precise criterion โ€” but this is not the standard approach or the one we'll take.\n", + "Rather, we simply make a choice.\n", + "\n", + "Here's one standard choice, which we shall adopt as the *default* gate set for quantum circuits:\n", + "\n", + " - Single-qubit unitary gates from this list: $X$, $Y$, $Z$, $H$, $S$, $S^{\\dagger}$, $T$, and $T^{\\dagger}$\n", + " - Controlled-NOT gates\n", + " - Single-qubit standard basis measurements\n", + "\n", + "A common alternative is to view Toffoli, Hadamard, and $S$ gates as being elementary, in addition to standard basis measurements.\n", + "(Sometimes all single-qubit gates are viewed as being elementary, although this does lead to an unrealistically powerful model when noise and inaccuracies are not properly accounted for.)\n", + "\n", + "The unitary gates in our default collection form what's called a *universal* gate set.\n", + "This means that we can approximate any unitary operation, on any number of qubits, and to any degree of accuracy we wish, with circuits composed of these gates alone.\n", + "To be clear, the definition of universality places no requirements on the cost of such approximations, meaning the number of gates from our set that we need.\n", + "Indeed, a fairly simple argument based on the mathematical notion of *measure* reveals that most unitary operations must have extremely high cost.\n", + "Proving the universality of quantum gate sets is not a simple matter and won't be covered in this series.\n", + "\n", + "For Boolean circuits, we'll take AND, OR, NOT, and FANOUT gates to be the ones representing elementary operations.\n", + "We don't actually need both AND gates and OR gates โ€” we can use *De Morgan's laws* to convert from either one to the other by placing NOT gates on all three input and output wires โ€” but nevertheless it's both typical and convenient to allow both AND and OR gates.\n", + "AND, OR, NOT, and FANOUT gates form a universal set for deterministic computations, meaning that any function from any fixed number of input bits to any fixed number of output bits can be implemented with these gates.\n", + "\n", + "#### The principle of deferred measurement\n", + "\n", + "Standard measurement gates can appear within quantum circuits โ€” but sometimes it's convenient to delay them until the end, so that we can view quantum computations as consisting of a unitary part (representing the computation itself), followed by a simple read-out phase where qubits are measured and the results are output.\n", + "\n", + "This can always be done, provided that we're willing to add an additional qubit for each standard basis measurement.\n", + "In the following figure, the circuit on the right illustrates how this can be done for the gate on the left.\n", + "\n", + "![Deferring measurements](images/deferred-measurement.png)\n", + "\n", + "Specifically, the classical bit in the circuit on the left is replaced by a qubit on the right (initialized to the $\\vert 0\\rangle$ state), and the standard basis measurement is replaced by a controlled-NOT gate, followed by a standard basis measurement on the bottom qubit.\n", + "The point is that the standard basis measurement in the right-hand circuit can be pushed all the way to the end of the circuit.\n", + "If the classical bit in the circuit on the left is later used as a control bit, we can use the bottom *qubit* in the circuit on the right as a control instead, and the overall effect will be the same.\n", + "(We are assuming that the classical bit in the circuit on the left doesn't get overwritten after the measurement takes place by another measurement โ€” but if it did we could always just use a new classical bit rather than overwriting one that was used for a previous measurement.)" + ] + }, + { + "cell_type": "markdown", + "id": "78ea8a62", + "metadata": {}, + "source": [ + "### Circuit size and depth\n", + "\n", + "#### Circuit size\n", + "\n", + "The total number of gates in a circuit is referred to as that circuit's *size*.\n", + "Thus, presuming that the gates in our circuits represent elementary operations, we have that a circuit's size represents the number of elementary operations it requires โ€” or, in other words, its *computational cost*.\n", + "We write $\\operatorname{size}(C)$ to refer to the size of a given circuit $C$.\n", + "\n", + "For example, consider the following Boolean circuit (from Lesson 3) for computing the XOR of two bits.\n", + "\n", + "![Boolean circuit for XOR](images/Boolean-circuit-XOR.png)\n", + "\n", + "The size of this circuit is 7, because there are 7 gates in total.\n", + "(Fanout operations are not always counted as being gates, but for the purposes of this lesson we will count FANOUT operations as being gates.)\n", + "\n", + "#### Time, cost, and circuit depth\n", + "\n", + "In the previous lesson we discussed the importance of *time* as a resource, or limiting constraint, on computations.\n", + "The examples above, such as the task of factoring RSA1024, reinforce this viewpoint.\n", + "The `factorint` function doesn't fail to factor RSA1024 per se, it's just that we don't have enough time to let it finish.\n", + "\n", + "The notion of computational cost, as the number of elementary operations required to perform a computation, is\n", + "intended to be an abstract proxy for the time required to implement a computation.\n", + "Each elementary operation requires a certain amount of time to perform, and the more of them a computation needs to perform the longer it's going to take, at least in general.\n", + "In the interest of simplicity, we'll continue to make this association between computational cost and the time required to run algorithms as we continue on in the series.\n", + "\n", + "But notice that the size of a circuit doesn't necessarily correspond directly to how long it takes to run.\n", + "In our Boolean circuit for computing the XOR of two bits, for instance, the two FANOUT gates could be performed simultaneously, as could the two NOT gates, as well as the two AND gates.\n", + "\n", + "A different way to measure efficiency for circuits, which takes this possibility of *parallelization* into account, is by their *depth*.\n", + "This is the minimum number of *layers* of gates needed within the circuit, where the gates within in each layer operate on different wires.\n", + "Equivalently, the depth of a circuit is the maximum number of gates encountered on any path from an input wire to an output wire.\n", + "For the circuit above, for instance, the depth is 4.\n", + "\n", + "Circuit depth is one way to formalize the running time of parallel computations.\n", + "It's an advanced topic, and there exist very sophisticated circuit constructions known to minimize the depth required for certain computations.\n", + "There are also some fascinating unanswered questions concerning circuit depth.\n", + "(For example, much remains unknown about the circuit depth required to compute GCDs.)\n", + "We won't have too much more to say about circuit depth in this series, aside from including a few interesting facts concerning circuit depth as we go along, but it should be clearly acknowledged that parallelization is a potential source of computational advantages.\n", + "\n", + "#### Assigning costs to different gates\n", + "\n", + "One final note concerning circuit size and computational cost is that it is possible to assign different costs to different gates, rather than viewing every gate as contributing equally to cost.\n", + "\n", + "For example, as was already mentioned, FANOUT gates are often viewed as being free for Boolean circuits โ€” which is to say that we could choose that FANOUT gates have zero cost.\n", + "As another example, when we're working in the query model and we count the number of queries that a circuit makes to an input function (in the form of a black box), we're effectively assigning unit cost to query gates and zero cost to other gates, such as Hadamard gates.\n", + "A final example is that we sometimes weigh the costs of different gates depending on how difficult they are to implement, depending on the particular hardware implementation we have in mind.\n", + "\n", + "While all of these options are sensible in different contexts, for this lesson we'll keep things simple and stick with circuit size as a representation of computational cost." + ] + }, + { + "cell_type": "markdown", + "id": "2f0684fe", + "metadata": {}, + "source": [ + "### Cost as a function of input length\n", + "\n", + "We're primarily interested in how computational cost scales as inputs become larger and larger.\n", + "This leads us to represent the costs of algorithms as *functions* of the input length.\n", + "\n", + "#### Families of circuits\n", + "\n", + "Inputs to a given computational problem can vary in length, potentially becoming arbitrarily large.\n", + "Every circuit, on the other hand, has a fixed number of gates and wires.\n", + "For this reason, when we think about algorithms in terms of circuits, we generally need infinitely large *families* of circuits to represent algorithms.\n", + "By a family of circuits, we mean a sequence of circuits that grow in size, allowing larger and larger inputs to be accommodated.\n", + "\n", + "For example, imagine that we have a classical algorithm for integer factorization, such as the one used by `factorint`.\n", + "Like all classical algorithms, it is possible to implement this algorithm using Boolean circuits โ€” but to do it we'll need a separate circuit for each possible input length.\n", + "If we looked at the resulting circuits for different input lengths, we would see that their sizes naturally grow as the input length grows โ€” reflecting the fact that factoring 4-bit integers is much easier and requires far fewer elementary operations than factoring 1024-bit integers, for instance.\n", + "\n", + "This leads us to represent the computational cost of an algorithm by a function $t$, defined so that $t(n)$ is the number of gates in the circuit that implements the algorithm for $n$ bit inputs.\n", + "In more formal terms, an algorithm in the Boolean circuit model is described by a sequence of circuits\n", + "$\\{C_1, C_2, C_3,\\ldots\\}$, where $C_n$ solves whatever problem we're talking about for $n$-bit inputs (or, more generally, for inputs whose size is parameterized in some way by $n$), and the function $t$ representing the cost of this algorithm is defined as \n", + "\n", + "$$\n", + "t(n) = \\operatorname{size}(C_n).\n", + "$$\n", + "\n", + "For quantum circuits the situation is similar, where larger and larger circuits are needed to accommodate longer and longer input strings.\n", + "\n", + "#### Example: integer addition\n", + "\n", + "To explain this further, let's take a moment to consider a much simpler problem than integer factoring, or even computing GCDs, which is the problem of addition.\n", + "\n", + "\n", + "\n", + "**Integer addition**\n", + "\n", + "Input: integers $N$ and $M$\n", + "\n", + "Output: $N+M$\n", + "\n", + "\n", + "\n", + "How might we design Boolean circuits for solving this problem?\n", + "\n", + "Just to keep things simple, let's restrict our attention to the case where $N$ and $M$ are both nonnegative integers represented by $n$-bit registers using binary notation.\n", + "We'll allow for any number of leading zeros in these encodings, so that $0\\leq N,M\\leq 2^n - 1$.\n", + "The output will be an $(n+1)$-bit binary string representing the sum, which is the maximum number of bits we need to express the result.\n", + "\n", + "We begin with an algorithm โ€” the *standard* algorithm for addition of binary representations โ€” which is the base $2$ analogue to the way addition is taught in elementary/primary schools around the world.\n", + "This algorithm can be implemented with Boolean circuits as follows.\n", + "\n", + "Starting from the least significant bits, we can compute their XOR to determine the least significant bit for the sum.\n", + "Then we can compute the carry bit, which is the AND of the two least significant bits of $N$ and $M$.\n", + "Sometimes these two operations together are known as a *half adder*.\n", + "Using the XOR circuit we've now seen a few times together with an AND gate and two FANOUT gates, we can build a half adder with 10 gates.\n", + "If for some reason we changed our minds and decided to include XOR gates in our set of elementary operations, we would need 1 AND gate, 1 XOR gate, and 2 FANOUT gates to build a half adder.\n", + "\n", + "![A half-adder](images/half-adder.png)\n", + "\n", + "Moving on to the more significant bits we can use a similar procedure, but this time including the carry bit from each previous position into our calculation.\n", + "By cascading 2 half adders and taking the OR of the carry bits they produce, we can create what's known as a *full adder*.\n", + "(Fortunately both carry bits can't be $1$, so we don't need to worry about that case.)\n", + "This requires 21 gates in total: 2 AND gates, 2 XOR gates (each requiring 7 gates to implement), one OR gate, and 4 FANOUT gates.\n", + "\n", + "![A full-adder](images/full-adder.png)\n", + "\n", + "Finally, by cascading the full adders, we obtain a Boolean circuit for nonnegative integer addition having \n", + "$21 (n-1) + 10 = 21 n - 11$ gates.\n", + "Had we decided to include XOR gates in our set of elementary operations, we'd need \n", + "$2n-1$ AND gates, $2n-1$ XOR gates, $n-1$ OR gates, and $4n-2$ FANOUT gates, for a total of $9n-5$ gates.\n", + "If in addition we decide not to count FANOUT gates, it's $5n-3$ gates.\n", + "\n", + "For example, the following circuit computes the sum of two 4-bit integers.\n", + "\n", + "![A circuit for addition of two 4-bit integers](images/addition-circuit.png)\n", + "\n", + "\n", + "#### Asymptotic notation\n", + "\n", + "On the one hand, it is good to know precisely how many gates are needed to perform various computations, like in the example of integer addition above.\n", + "These details are important for actually building the circuits.\n", + "\n", + "On the other hand, if we perform analyses at this level of detail for all the computations we're interested in, including ones for tasks that are much more complicated than addition, we'll very quickly be buried in details.\n", + "To keep things manageable, and to intentionally suppress details of secondary importance, we typically use *Big-O* notation when analyzing algorithms.\n", + "Through this notation we can express the *order* at which functions grow.\n", + "\n", + "Formally speaking, if we have two functions $g(n)$ and $h(n)$, we write that $g(n) = O(h(n))$ if there exists a positive real number $c > 0$ and a positive integer $n_0$ such that\n", + "\n", + "$$\n", + "g(n) \\leq c\\cdot h(n)\n", + "$$\n", + "\n", + "for all $n \\geq n_0$.\n", + "Typically $h(n)$ is chosen to be as simple an expression as possible, so that the notation can be used to reveal the limiting behavior of a function in simple terms.\n", + "For example, $17 n^3 - 257 n^2 + 65537 = O(n^3)$.\n", + "\n", + "This notation can be extended to functions having multiple arguments in a fairly straightforward way.\n", + "For instance, if we have two functions $g(n,m)$ and $h(n,m)$ defined on positive integers $n$ and $m$, we write that $g(n,m) = O(h(n,m))$ if there exists a positive real number $c > 0$ and a positive integer $k_0$ such that\n", + "\n", + "$$\n", + "g(n,m) \\leq c\\cdot h(n,m)\n", + "$$\n", + "\n", + "whenever $n+m \\geq k_0$.\n", + "\n", + "Connecting this notation to the example of nonnegative integer addition, we conclude that there exists a family of\n", + "Boolean circuits $\\{C_1, C_2,\\ldots,\\}$, where $C_n$ adds two $n$-bit nonnegative integers together, such that\n", + "$\\operatorname{size}(C_n) = O(n)$.\n", + "This reveals the most essential feature of how the cost of addition scales with the input size: it scales *linearly*.\n", + "Notice also that it doesn't depend on the specific detail of whether we consider XOR gates to have unit cost or cost $7$.\n", + "In general, using Big-O notation allows us to make statements about computational costs that aren't sensitive to such low-level details." + ] + }, + { + "cell_type": "markdown", + "id": "22e69f48", + "metadata": {}, + "source": [ + "#### More examples\n", + "\n", + "Here are a few more examples of problems from computational number theory, beginning with *multiplication*.\n", + "\n", + "\n", + "\n", + "**Integer multiplication**\n", + "\n", + "Input: integers $N$ and $M$\n", + "\n", + "Output: $NM$\n", + "\n", + "\n", + "\n", + "Creating Boolean circuits for this problem is more difficult than creating circuits for addition โ€” but by thinking about the standard multiplication algorithm, we can come up with circuits having size $O(n^2)$ for this problem (assuming $N$ and $M$ are both represented by $n$-bit binary representations).\n", + "More generally, if $N$ has $n$ bits and $M$ has $m$ bits, there are Boolean circuits of size $O(nm)$ for multiplying $N$ and $M$.\n", + "\n", + "There are, in fact, other ways to multiply that scale better.\n", + "For instance, the Schรถnhage-Strassen multiplication algorithm can be used to create a Boolean circuits for multiplying two $n$-bit integers having size $O(n \\operatorname{lg}(n) \\operatorname{lg}(\\operatorname{lg}(n)))$.\n", + "The intricacy of this method causes a lot of overhead, however, making it only practical for numbers having tens of thousands of bits.\n", + "\n", + "Another basic problem is *division*, which we interpret to mean computing both the quotient and remainder given an integer divisor and dividend.\n", + "\n", + "\n", + "\n", + "**Integer division**\n", + "\n", + "Input: integers $N$ and $M\\neq0$\n", + "\n", + "Output: integers $q$ and $r$ satisfying $0\\leq r < |M|$ and $N = q M + r$\n", + "\n", + "\n", + "\n", + "The cost of integer division is similar to multiplication: if $N$ has $n$ bits and $M$ has $m$ bits, there are Boolean circuits of size $O(nm)$ for solving this problem.\n", + "Like multiplication, there are asymptotically superior methods.\n", + "\n", + "We can now compare known algorithms for computing GCDs with those for addition and multiplication.\n", + "Euclid's algorithm for computing the GCD of an $n$-bit number $N$ and an $m$-bit number $M$ requires Boolean circuits of size $O(nm)$, similar to the standard algorithms for multiplication and division.\n", + "Also similar to multiplication and division, there are asymptotically faster GCD algorithms โ€” including ones requiring $O(n(\\operatorname{lg}(n))^2 \\operatorname{lg}(\\operatorname{lg}(n)))$ elementary operations to compute the GCD of two $n$-bit numbers.\n", + "\n", + "A somewhat more expensive computation that arises in number theory is *modular exponentiation*.\n", + "\n", + "\n", + "\n", + "**Integer modular exponentiation**\n", + "\n", + "Input: integers $N$, $K$, and $M$ with $K\\geq 0$ and $M\\geq 1$\n", + "\n", + "Output: $N^K \\hspace{1mm} (\\text{mod }M)$\n", + "\n", + "\n", + "\n", + "By $N^K\\hspace{1mm} (\\text{mod }M)$ we mean the remainder when $N^K$ is divided by $M$ โ€” meaning the unique integer $r$ satisfying $0\\leq r < M$ and $N^K = q M + r$ for some integer $q$.\n", + "\n", + "If $N$ has $n$ bits, $M$ has $m$ bits, and $K$ has $k$ bits, this problem can solved by Boolean circuits having size $O(k m^2 + nm)$ โ€” which is not at all obvious at first glance.\n", + "The solution is not to first compute $N^K$ and then take the remainder โ€” that would require exponentially many bits just to store the number $N^K$.\n", + "Rather, we can use the *power algorithm* (known alternatively as the *binary method* and *repeated squaring*), where we use the binary representation of $K$ to perform the entire computation modulo $M$.\n", + "Assuming $N$, $M$, and $K$ are all $n$-bit numbers, we obtain an $O(n^3)$ algorithm โ€” or a *cubic* time algorithm.\n", + "(Once again, there are asymptotically faster algorithms.)\n", + "\n", + "Here's a code cell that computes a modular exponent for fairly large input numbers." + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "id": "79c8b245", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "5420808908959774060288987536719770456217318912094898225713892936909049029205875268391016773496273016272919329382669533127141405381618319955871147811133071683113976741106560564348611362839209748910974112799894385464900617664468329271717655067495341858822704829649579551724483155264208314048742469387847020407987537873027379036515942355206425576104942394452390040081069041858525217985044712018028991394635458870225358476099232040714610377672598679720015462702833934580459151626243131178465271884695260294198503010478207039551370657556801980546328939683389782893101937977023160027020824612118350981172299997784862364914426784395705304625946981620876565903630321426713564601636615003526450559450988257054265576673783996389684225946503950767764911765912500478971120407712043832726706539999202935732936820400534970855338294653369081634048804115320256182211145544094816107629124112742249226319353536843143250675559791743355892993051078488285292927178023438402583054839832109503781471596500072959107707020065782555861325253891174468479828455070701800024212593144971400832140786063620665224339027746048978496589265602430286475229240500730395030244167373760773225724090156004049352594635867027935465962414764456373585290956999305794964617561548270565216080421238370652518997421499178722058617256564053290758153841574743341020230723665105568383923335524981262395314837292291351213579853233800664543959697570668968932545105391200894345122403901126855808339292892144618034647640594129638891809347433516954054255735374114229687467253661509404329081038467536976485314005457794642793240728907716748113582623047896927299525364803461784339899349011331842366119834985254767022797817541982842136038797346045524543446837609691961446346898034481960162369906547207851740703325595273724313509866798139791862738941412435088490790473992542655256187359052648995226579813780101763700632784177318998593960123977376065188642849714402071821332656099246595192273548124579308954369379166791375504366177963367167357734204250134523901012053728414505662083719483277149998297345600850207968594611610502058119754052458059616153460321784141539990056380808571117172677389938997159425776949065037133138197247161115127659585109470076784212846689843449874294528288829117435818727532583190741742686601090580534050289592016761135679603364904072305569448382741870366244397396582565453282641402195407023981530691751496898222633942198230270907098913253995651978611545066193950188718245653197837791596426329560941347753939650429611447245577078846931722372616367550006355620360276455568080512099035179175416756143233950934214736621950039902506644221443998435341460452476466171419972558395644689971465747907674896790822097660307109062931957694684033978412952567599593488687529011526359106169809555979667401866723277931201510177630302133847932158278990312682334549377652520626935835739547712983314320798573894229076437190704856364396327795151484278956526648597260084828697308427169704251546673832583609705456575281533722178029103192256765343504645112826902073960223407989624481672668703972408414665894403347181679160774217536153364422436840721557202572348021932511877708639899866042064925150997870115610130091923308716372491505600234638328560252998561255435872867079194898819838898311502430190295512215594677576275248220954675704199712880196887650126401810574270118295619216693001247689245264372564423355830421087279204264834276290790089692636984198176930764597788529620410821188522782016777910796700483449826" + ] + }, + "execution_count": 7, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "K = 64135289477071580278790190170577389084825014742943447208116859632024532344630238623598752668347708737661925585694639798853367\n", + "N = 4636759690183918349682239573236686632636353319755818421393667064929987310592347460711767784882455889983961546491666129915628431549982893638464243493812487979530329460863532041588297885958272943021122033997933550246447236884738870576045537199814804920281890355275625050796526864093092006894744790739778376848205654332434378295899591539239698896074\n", + "M = 5056714874804877864225164843977749374751021379176083540426461360945653967249306494545888621353613218518084414930846655066495767441010526886803458300440345782982127522212209489410315422285463057656809702949608368597012967321172325810519806487247195259818074918082416290513738155834341957254558278151385588990304622183174568167973121179585331770773\n", + "\n", + "pow(N,K**10+1,M**10 + 1)\n" + ] + }, + { + "cell_type": "markdown", + "id": "5a21c198", + "metadata": {}, + "source": [ + "It's a little bit slower than computing GCDs, but it's still fast." + ] + }, + { + "cell_type": "markdown", + "id": "8691fa99", + "metadata": {}, + "source": [ + "A different example, outside of the domain of computational number theory, arose in the previous lesson.\n", + "For the post-processing step of Simon's algorithm, we need to compute the null space modulo $2$ of an $n\\times m$ matrix of binary values (so here the input length is $nm$ bits in total).\n", + "We can do this using Gaussian elimination with $O(n m \\min\\{n,m\\})$ elementary operations, which is $O(n^3)$ elementary operations if $m=O(n)$.\n", + "Even for a $1000\\times 1000$ binary matrix, which is a million bits of input, the computation time is on the order of seconds." + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "id": "75327a9d", + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "OMP: Info #276: omp_set_nested routine deprecated, please use omp_set_max_active_levels instead.\n" + ] + }, + { + "data": { + "text/plain": [ + "GF([[1, 0, 1, 0, 0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 0,\n", + " 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 1, 0, 0,\n", + " 1, 0, 1, 1, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1,\n", + " 1, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1,\n", + " 1, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 1, 0, 1, 0, 0, 0, 1,\n", + " 0, 1, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 1, 1, 0, 0, 1, 0, 1, 0, 1, 1, 0,\n", + " 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1,\n", + " 0, 1, 1, 1, 0, 1, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1,\n", + " 1, 1, 0, 0, 1, 1, 0, 1, 1, 0, 0, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 0,\n", + " 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 1, 1, 0, 0, 1, 1, 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1, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0,\n", + " 1, 0, 0, 0, 1, 0, 0, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 0,\n", + " 1, 1, 0, 1, 0, 0, 1, 1, 0, 1, 1, 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 1, 1,\n", + " 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1,\n", + " 1, 1, 1, 1, 1, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0,\n", + " 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1,\n", + " 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0]], order=2)" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "import galois\n", + "GF = galois.GF(2)\n", + "\n", + "N, n = 1000, 1000\n", + "\n", + "A = GF.Random((N, n))\n", + "B = A.null_space()\n", + "display(B)" + ] + }, + { + "cell_type": "markdown", + "id": "3ab95746", + "metadata": {}, + "source": [ + "#### Cost of integer factorization\n", + "\n", + "In contrast to the algorithms just discussed, known algorithms for integer factorization are much more expensive โ€” as we might expect from the examples in the first section of the lesson.\n", + "\n", + "If we consider a simple *trial division* algorithm that searches through the list $2,\\ldots,\\sqrt{N}$ for prime factors of an input number $N$, then we have $\\sqrt{N}$ iterations โ€” which means $O(2^{n/2})$ iterations when $N$ is an $n$-bit number.\n", + "Each iteration requires a trial division, which means $O(n^2)$ elementary operations for each iteration (using a standard algorithm for integer division).\n", + "So we end up with circuits of size $O(n^2 2^{n/2})$, which is *exponential* in the input size $n$.\n", + "\n", + "There are algorithms for integer factorization having better scaling.\n", + "The number field sieve mentioned earlier, for instance, which is an algorithm that makes use of randomness, is generally believed (but not rigorously proven) to require\n", + "\n", + "$$\n", + "2^{O\\bigl(n^{1/3} \\operatorname{lg}^{2/3}(n)\\bigr)}\n", + "$$\n", + "\n", + "elementary operations to factor $n$-bit integers with high probability.\n", + "While it is quite significant that $n$ is raised to the power $1/3$, the fact that $n^{1/3}$ appears in the exponent is still a problem that causes poor scaling โ€” and explains in part why RSA1024 remains outside of its domain of applicability." + ] + }, + { + "cell_type": "markdown", + "id": "38d29b7e", + "metadata": {}, + "source": [ + "#### Polynomial versus exponential cost\n", + "\n", + "As we have seen, classical algorithms for integer addition, multiplication, division, and computing greatest common divisors allow us to solve these problems in the blink of an eye for inputs with thousands of bits.\n", + "Addition has *linear* cost while the other three problems have *quadratic* cost (or *subquadratic* cost using asymptotically fast algorithms).\n", + "Modular exponentiation is more expensive but can still be done pretty efficiently, with *cubic* cost (or sub-cubic cost using asymptotically fast algorithms).\n", + "Computing the null space modulo $2$ of an $n\\times n$ binary matrix has cost $O(n^3)$ (bearing in mind that there are $n^2$ input bits for this problem).\n", + "\n", + "All of these algorithms are examples having *polynomial* cost, meaning that they have cost $O(n^c)$ for some choice of a fixed constant $c > 0$.\n", + "As a rough, first-order approximation, algorithms having polynomial cost are abstractly viewed as representing *efficient* algorithms.\n", + "\n", + "In contrast, known classical algorithms for integer factoring have *exponential* cost.\n", + "Sometimes the cost of the number field sieve is described as *sub-exponential*, but in complexity theory it is more typical to reserve this term for algorithms whose cost is\n", + "\n", + "$$\n", + "O\\left(2^{n^{\\varepsilon}}\\right)\n", + "$$\n", + "\n", + "for *every* $\\varepsilon > 0$.\n", + "\n", + "The so-called *NP-complete* problems are a class of problems not known to (and widely conjectured not to) have polynomial-cost algorithms.\n", + "A circuit-based formulation of the *exponential-time hypothesis* posits something even stronger, which is that no NP-complete problem can have a sub-exponential cost algorithm.\n", + "\n", + "The association of polynomial-cost algorithms with efficient algorithms must be understood as being a loose abstraction.\n", + "Of course, if an algorithm's cost scales as $n^{1000}$ or $n^{1000000}$ for inputs of size $n$, then it's a stretch to describe that algorithm as efficient.\n", + "\n", + "However, even an algorithm having cost that scales as $n^{1000000}$ must be doing something clever to avoid having *exponential* cost, which is generally what we expect of algorithms based in some way on \"brute force\" or \"exhaustive search.\"\n", + "Even the sophisticated refinements of the number field sieve, for instance, fail to avoid this exponential scaling in cost.\n", + "Polynomial-cost algorithms, on the other hand, manage take advantage of the problem structure in some way that avoids an exponential scaling.\n", + "\n", + "In practice, the identification of a polynomial cost algorithm for a problem is just a first step toward actual efficiency.\n", + "Through algorithmic refinements, polynomial-cost algorithms with large exponents can sometimes be improved dramatically, lowering the cost to a more \"reasonable\" polynomial scaling.\n", + "Sometimes things become easier when they're known to be possible โ€” so the identification of a polynomial-cost algorithm for a problem can also have the effect of inspiring new, more efficient algorithms.\n", + "\n", + "As we consider advantages of quantum computing over classical computing, our eyes are generally turned first toward *exponential* advantages, or at least *super-polynomial* advantages โ€” ideally finding polynomial-cost quantum algorithms for problems not known to have polynomial-cost classical algorithms.\n", + "Theoretical advantages on this order have the greatest chances to lead to actual practical advantages โ€” but identifying such advantages is an extremely difficult challenge.\n", + "Only a few examples are currently known, but the search continues.\n", + "\n", + "Polynomial (but not super-polynomial) advantages in computational cost of quantum over classical are also interesting and should not be dismissed โ€” but given the current gap between quantum and classical computing technology, they do seem rather less compelling at the present time.\n", + "One day, though, they could become significant.\n", + "Grover's algorithm, which is covered in Lesson 8, provides an example of a *quadratic* advantage of quantum over classical for so-called *unstructured searching*, which could potentially be broadly applicable." + ] + }, + { + "cell_type": "markdown", + "id": "740332ac", + "metadata": {}, + "source": [ + "#### A hidden cost of circuit computation\n", + "\n", + "There is one final issue that is worth mentioning, although we will not concern ourselves with it further in this series.\n", + "There's a \"hidden\" computational cost when we're working with circuits, and it concerns the specifications of the circuits themselves.\n", + "As inputs get longer, we need larger and larger circuits โ€” but somehow we're going to need to get our hands on the descriptions of these circuits if we're going to implement them.\n", + "\n", + "For all of the examples we've discussed, or will discuss later in the series, there's some underlying algorithm from which the circuits are derived.\n", + "Usually the circuits in a family follow some basic pattern that's easy to extrapolate to larger and larger inputs\n", + "โ€” such as cascading full adders to create Boolean circuits for addition or performing layers of Hadamard gates and other gates in some simple to describe pattern.\n", + "\n", + "But what happens if there are prohibitive computational costs associated with the patterns of the circuits themselves?\n", + "For instance, the description of each member $C_n$ in a circuit family could, in principle, be determined by some extremely difficult to compute function of $n$.\n", + "\n", + "The answer is that this is a problem, and we must place additional restrictions on families of circuits beyond having polynomial cost in order for them to truly represent efficient algorithms.\n", + "The property of *uniformity* for circuits does this by stipulating that it must (in various precise formulations) be computationally easy to obtain the description of each circuit in a family.\n", + "All of the circuit families we'll discuss do indeed have this property, so we won't concern ourselves with it further โ€” but this is an important issue to be aware of when studying circuit models of computation from a formal viewpoint." + ] + }, + { + "cell_type": "markdown", + "id": "d15daf3e", + "metadata": {}, + "source": [ + "## Classical computations on quantum computers\n", + "\n", + "We'll now turn our attention to implementing classical algorithms on quantum computers.\n", + "We'll see that any computation that can be performed with a classical Boolean circuit can also be performed by a quantum circuit with asymptotically the same computational cost.\n", + "Moreover, this can be done in a \"clean\" manner, which is an important requirement for using these computations as subroutines inside of larger quantum computations.\n", + "\n", + "### Simulating Boolean circuits with quantum circuits\n", + "\n", + "Boolean circuits are composed of AND, OR, NOT, and FANOUT gates.\n", + "To simulate Boolean circuit with quantum circuit, we'll begin by showing how each of these four gates can be simulated by quantum gates.\n", + "Once that's done, converting a given Boolean circuit to a quantum circuit is a simple matter of simulating one gate at a time.\n", + "We'll only need NOT gates, controlled-NOT gates, and Toffoli gates to do this, which are all deterministic operations in addition to being unitary.\n", + "\n", + "#### Toffoli gates\n", + "\n", + "Toffoli gates can alternatively be described as controlled-controlled-NOT (or CCX) gates, whose action on standard basis states is as the following figure suggests.\n", + "\n", + "![Toffoli gate](images/Toffoli-gate.png)\n", + "\n", + "The matrix representation of this gate is as follows.\n", + "\n", + "$$\n", + "\\mathrm{CCX} =\n", + "\\begin{pmatrix}\n", + "1 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\\\\n", + "0 & 1 & 0 & 0 & 0 & 0 & 0 & 0 \\\\\n", + "0 & 0 & 1 & 0 & 0 & 0 & 0 & 0 \\\\\n", + "0 & 0 & 0 & 0 & 0 & 0 & 0 & 1 \\\\\n", + "0 & 0 & 0 & 0 & 1 & 0 & 0 & 0 \\\\\n", + "0 & 0 & 0 & 0 & 0 & 1 & 0 & 0 \\\\\n", + "0 & 0 & 0 & 0 & 0 & 0 & 1 & 0 \\\\\n", + "0 & 0 & 0 & 1 & 0 & 0 & 0 & 0 \n", + "\\end{pmatrix}\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "c32ef23e", + "metadata": {}, + "source": [ + "Another way to think about Toffoli gates is that they're essentially query gates for the AND function, in the sense that they follow exactly the same pattern we saw in the previous lesson for the unitary query gate implementation of arbitrary functions with binary string inputs and outputs.\n", + "\n", + "Toffoli gates are not included in the default gate set discussed earlier in the lesson, but it is possible to construct a Tofolli gate from $H$, $T$, $T^{\\dagger}$, and CNOT gates as the following Qiskit code cell illustrates." + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "id": "9e36d499", + "metadata": {}, + "outputs": [ + { + "data": { + "image/svg+xml": [ + "" + ], + "text/plain": [ + "
" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/latex": [ + "$$\n", + "\n", + "\\begin{bmatrix}\n", + "1 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\\\\n", + " 0 & 1 & 0 & 0 & 0 & 0 & 0 & 0 \\\\\n", + " 0 & 0 & 1 & 0 & 0 & 0 & 0 & 0 \\\\\n", + " 0 & 0 & 0 & 0 & 0 & 0 & 0 & 1 \\\\\n", + " 0 & 0 & 0 & 0 & 1 & 0 & 0 & 0 \\\\\n", + " 0 & 0 & 0 & 0 & 0 & 1 & 0 & 0 \\\\\n", + " 0 & 0 & 0 & 0 & 0 & 0 & 1 & 0 \\\\\n", + " 0 & 0 & 0 & 1 & 0 & 0 & 0 & 0 \\\\\n", + " \\end{bmatrix}\n", + "$$" + ], + "text/plain": [ + "" + ] + }, + "execution_count": 9, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "from qiskit import QuantumCircuit\n", + "from qiskit.quantum_info import Statevector, Operator\n", + "from qiskit.visualization import array_to_latex\n", + "\n", + "Toffoli = QuantumCircuit(3)\n", + "\n", + "Toffoli.h(2)\n", + "Toffoli.cx(1, 2)\n", + "Toffoli.tdg(2)\n", + "Toffoli.cx(0, 2)\n", + "Toffoli.t(2)\n", + "Toffoli.cx(1, 2)\n", + "Toffoli.tdg(2)\n", + "Toffoli.cx(0, 2)\n", + "Toffoli.t(1)\n", + "Toffoli.t(2)\n", + "Toffoli.cx(0, 1)\n", + "Toffoli.t(0)\n", + "Toffoli.tdg(1)\n", + "Toffoli.h(2)\n", + "Toffoli.cx(0, 1)\n", + "\n", + "display(Toffoli.draw())\n", + "U = Operator(Toffoli)\n", + "\n", + "array_to_latex(U)" + ] + }, + { + "cell_type": "markdown", + "id": "66991522", + "metadata": {}, + "source": [ + "#### Simulating Boolean gates with Toffoli, controlled-NOT, and NOT gates\n", + "\n", + "A single Toffoli gate, used in conjunction with a few NOT gates, can implement an AND and OR gate, as the following diagrams suggest.\n", + "\n", + "![Simulating AND and OR gates with Toffoli gates](images/AND-and-OR-with-Toffoli.png)\n", + "\n", + "FANOUT gates can easily be implemented using controlled-NOT gates like this:\n", + "\n", + "![Simulating FANOUT gates with CNOT gates](images/FANOUT-with-CNOT.png)\n", + "\n", + "In all three cases, the bits that the AND, OR, and FANOUT gates act upon come in from the left as inputs, and in addition we require one *workspace* qubit initialized to the zero state.\n", + "These workspace qubits appear within the dotted rectangles to illustrate that they're new, and one of the costs\n", + "of implementing Boolean gates and circuits through the method being described is the inclusion of these new qubits.\n", + "\n", + "For the AND and OR gates, in addition to the output bits we also have two additional qubits left over.\n", + "For example, inside the dotted rectangle in the diagram for an AND gate, the top two qubits are left in the states $\\vert a\\rangle$ and $\\vert b\\rangle$.\n", + "These bits appear inside the dotted rectangles to illustrate that they're no longer needed โ€” they aren't output by the Boolean logic gates we're simulating, and we can simply ignore them (for now at least).\n", + "\n", + "The remaining Boolean gate, the NOT gate, is also a gate in our default set of quantum gates, so we don't need to worry about simulating them in a special way." + ] + }, + { + "cell_type": "markdown", + "id": "50f183c2", + "metadata": {}, + "source": [ + "#### Gate-by-gate simulation of Boolean circuits\n", + "\n", + "Now suppose that we have an ordinary Boolean circuit named $C$, composed of AND, OR, NOT, and FANOUT gates, and having\n", + "$n$ input bits and $m$ of output bits.\n", + "We'll let $t$ be the total number of gates in $C$, and we'll give the name $f$ to the function that $C$ computes โ€” so this function takes the form $f:\\Sigma^n\\rightarrow\\Sigma^m$ where $\\Sigma = \\{0,1\\}$.\n", + "\n", + "Now consider what happens when we go one at a time through the AND, OR, and FANOUT gates of $C$, replacing each one by the simulation described above, including the addition of a workspace qubit.\n", + "We'll arrange the qubits of $R$ so that the $n$ input bits of $C$ are on the top and the workspace qubits are on the bottom.\n", + "As a result of performing these substitutions, we obtain a new circuit $R$ that operates as this figure suggests:\n", + "\n", + "![Reversible circuit simulation](images/reversible-circuit-simulation.png)\n", + "\n", + "Here, $k$ is the number of workspace qubits that need to be added, and $g$ is a function of the form\n", + "$g:\\Sigma^n \\rightarrow \\Sigma^{n+k-m}$ that describes the states of the leftover qubits after $R$ is executed.\n", + "\n", + "In the figure, the qubits corresponding to the output $f(x)$ are on the top and the remaining, leftover qubits storing $g(x)$ are on the bottom.\n", + "We can force this to happen if we wish by rearranging the qubits using swap gates.\n", + "A swap gate can be implemented with three controlled-NOT gates like this:\n", + "\n", + "![Swapping with cNOT gates](images/swap.png)\n", + "\n", + "As we'll see in the next section, it isn't essential to rearrange the output qubits like this, but it's easy enough to do it if we choose.\n", + "\n", + "The function $g$ that describes the classical states of the leftover qubits is determined somehow by the circuit $C$, but we don't really need to worry all that much about it, because we really don't care specifically what state these qubits are in when the computation finishes.\n", + "The letter $g$ comes after $f$, so it is a reasonable name for this function on that account, but there's a better reason to pick the name $g;$ \n", + "it's short for *garbage* โ€” or stuff left over from the simulation that's cluttering up these qubits." + ] + }, + { + "cell_type": "markdown", + "id": "ca1e5224", + "metadata": {}, + "source": [ + "### Cleaning up the garbage\n", + "\n", + "If our only interest is in computing whatever function $f$ is computed by a given Boolean circuit $C$ with a quantum circuit, we don't need to proceed any further than the gate-by-gate simulation just described โ€” and we can accept that in addition to the answer we'll have a bunch of garbage left over.\n", + "\n", + "This, however, won't be good enough if we want to perform classical computations as subroutines within larger quantum computations, because those garbage qubits will cause problems.\n", + "As we saw in the previous lesson, the phenomenon of *interference* is critically important to quantum algorithms, and garbage qubits can ruin the interference patterns needed to make quantum algorithms work.\n", + "\n", + "Fortunately, it's not to difficult to clean up the garbage, so-to-speak.\n", + "The key is to use the fact that because $R$ is a quantum circuit, we can run it in reverse โ€” by simply replacing each gate with its inverse and applying them in the reverse order โ€” thereby obtaining a quantum circuit for the operation $R^{\\dagger}$.\n", + "(Toffoli gates, CNOT gates, and NOT gates are their own inverses, so in this case running $R$ in reverse is just a matter of applying the gates in the reverse order โ€” but more generally any quantum circuit can be reversed as just described.)\n", + "\n", + "So, what we can do is to add $m$ more qubits (recalling that $m$ is the number of output bits of the function $f$), use CNOT gates to copy the output of $R$ onto these qubits, and then reverse $R$ to clean up the garbage.\n", + "The following figure illustrates the resulting circuit and describes its action on standard basis states.\n", + "\n", + "![Garbage-free computation](images/garbage-free-computation.png)\n", + "\n", + "If we put a box around the entire circuit and call it $Q$, it looks like this:\n", + "\n", + "![Simulation as a query gate](images/simulation-as-query-gate.png)\n", + "\n", + "If $C$ has $t$ gates, then $Q$ has $O(t)$ gates.\n", + "\n", + "If we disregard the $k$ additional workspace qubits, what we have is a circuit $Q$ that functions exactly like a query gate for the function $f$.\n", + "If we simply want to compute the function $f$ on some string $x$, we can set $y = 0^m$ and the resulting value $f(x)$ will appear on the bottom $m$ qubits โ€” or we can feed in a different state to the bottom $m$ qubits if we wish\n", + "(perhaps to make use of a phase kickback, like in Deutsch's or the Deutsch-Jozsa algorithm).\n", + "This means that for any query algorithm, if we have a Boolean circuit that computes the input function, we can replace each query gate with a unitary implementation as just described and the query algorithm will function correctly.\n", + "\n", + "Note that the workspace qubits are needed to make this process work โ€” but they are, in fact, returned to their initial states once the combined circuit is executed, so they could be used again as workspace qubits for other purposes.\n", + "There are strategies that reduce the number of workspace qubits required, but we won't discuss those strategies here." + ] + }, + { + "cell_type": "markdown", + "id": "9aca4d6f", + "metadata": {}, + "source": [ + "#### Implementing invertible functions\n", + "\n", + "The construction just described allows us to simulate any Boolean circuit with a quantum circuit in a garbage-free manner, following this basic pattern:\n", + "if $C$ is a Boolean circuit implementing a function $f:\\Sigma^n \\rightarrow \\Sigma^m$, then \n", + "we obtain a quantum circuit $Q$ that operates as the next equation describes on standard basis states.\n", + "\n", + "$$\n", + "Q \\bigl( \\vert y \\rangle \\vert 0^k \\rangle \\vert x\\rangle\\bigr)\n", + "= \\vert y \\oplus f(x) \\rangle \\vert 0^k \\rangle \\vert x\\rangle\n", + "$$\n", + "\n", + "The number $k$ indicates how many workspace qubits are required, and depends on how many gates $C$ has and which ones they are.\n", + "\n", + "This will be enough for the purposes of this series, but it is possible to take this one step further when the \n", + "function $f$ itself is invertible.\n", + "To be precise, suppose that the function $f$ takes the form $f:\\Sigma^n \\rightarrow \\Sigma^n$, and suppose furthermore there exists a function $f^{-1}$ such that $f^{-1}(f(x)) = x$ for every $x\\in\\Sigma^n$.\n", + "(The function $f^{-1}$ is necessarily unique when it exists.)\n", + "\n", + "This means that the operation that transforms $\\vert x \\rangle$ into $\\vert f(x) \\rangle$ for every $x\\in\\Sigma^n$ is unitary โ€” so we might hope to build a quantum circuit that implements the unitary operation defined by\n", + "\n", + "$$\n", + "U \\vert x \\rangle = \\vert f(x) \\rangle\n", + "$$\n", + "\n", + "for every $x\\in\\Sigma^n$.\n", + "To be clear, the fact that this is a unitary operation relies on $f$ being invertible โ€” it's not unitary when $f$ isn't invertible.\n", + "Disregarding the workspace qubits, $U$ is different from the operation that the circuit $Q$ implements because we're not keeping a copy of the input around and XORing it to an arbitrary string, we're *replacing* $x$ by $f(x)$.\n", + "\n", + "So the question is: when $f$ is invertible, can we do this?\n", + "The answer is yes โ€” provided that in addition to having a Boolean circuit that computes $f$, we also have one that computes $f^{-1}$.\n", + "(So this won't be a shortcut to inverting functions computationally if we don't already know how to do that.)\n", + "The following diagram illustrates how it can be done by composing two quantum circuits, $Q_f$ and $Q_{f^{-1}}$, which are obtained individually for the functions $f$ and $f^{-1}$ through the method described above.\n", + "\n", + "![Simulation of an invertible function](images/fully-reversible-simulation.png)\n" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "id": "afe4325b", + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "

Version Information

Qiskit SoftwareVersion
qiskit-terra0.24.1
qiskit-aer0.12.1
qiskit-ibmq-provider0.20.2
qiskit0.43.2
qiskit-nature0.6.0
qiskit-finance0.3.4
qiskit-optimization0.5.0
qiskit-machine-learning0.6.1
System information
Python version3.10.11
Python compilerClang 14.0.0 (clang-1400.0.29.202)
Python buildmain, Apr 7 2023 07:31:31
OSDarwin
CPUs8
Memory (Gb)32.0
Tue Jul 18 12:32:10 2023 BST
" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "# pylint: disable=unused-import\n", + "import qiskit.tools.jupyter\n", + "%qiskit_version_table" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.9" + } + }, + "nbformat": 4, + "nbformat_minor": 5 +} diff --git a/notebooks/v2/algorithms/02.algorithmic-foundations/images/AND-and-OR-with-Toffoli.png b/notebooks/v2/algorithms/02.algorithmic-foundations/images/AND-and-OR-with-Toffoli.png new file mode 100644 index 000000000..5ebaa0266 Binary files /dev/null and b/notebooks/v2/algorithms/02.algorithmic-foundations/images/AND-and-OR-with-Toffoli.png differ diff --git a/notebooks/v2/algorithms/02.algorithmic-foundations/images/Boolean-circuit-XOR.png b/notebooks/v2/algorithms/02.algorithmic-foundations/images/Boolean-circuit-XOR.png new file mode 100644 index 000000000..90bf15d3e Binary files /dev/null and b/notebooks/v2/algorithms/02.algorithmic-foundations/images/Boolean-circuit-XOR.png differ diff --git a/notebooks/v2/algorithms/02.algorithmic-foundations/images/FANOUT-with-CNOT.png b/notebooks/v2/algorithms/02.algorithmic-foundations/images/FANOUT-with-CNOT.png new file mode 100644 index 000000000..3e131c60a Binary files /dev/null and b/notebooks/v2/algorithms/02.algorithmic-foundations/images/FANOUT-with-CNOT.png differ diff --git a/notebooks/v2/algorithms/02.algorithmic-foundations/images/Toffoli-gate.png b/notebooks/v2/algorithms/02.algorithmic-foundations/images/Toffoli-gate.png new file mode 100644 index 000000000..fb4cb1aa8 Binary files /dev/null and b/notebooks/v2/algorithms/02.algorithmic-foundations/images/Toffoli-gate.png differ diff --git a/notebooks/v2/algorithms/02.algorithmic-foundations/images/addition-circuit.png b/notebooks/v2/algorithms/02.algorithmic-foundations/images/addition-circuit.png new file mode 100644 index 000000000..bb807051c Binary files /dev/null and b/notebooks/v2/algorithms/02.algorithmic-foundations/images/addition-circuit.png differ diff --git a/notebooks/v2/algorithms/02.algorithmic-foundations/images/deferred-measurement.png b/notebooks/v2/algorithms/02.algorithmic-foundations/images/deferred-measurement.png new file mode 100644 index 000000000..62f0d782c Binary files /dev/null and b/notebooks/v2/algorithms/02.algorithmic-foundations/images/deferred-measurement.png differ diff --git a/notebooks/v2/algorithms/02.algorithmic-foundations/images/full-adder.png b/notebooks/v2/algorithms/02.algorithmic-foundations/images/full-adder.png new file mode 100644 index 000000000..483f214d1 Binary files /dev/null and b/notebooks/v2/algorithms/02.algorithmic-foundations/images/full-adder.png differ diff --git a/notebooks/v2/algorithms/02.algorithmic-foundations/images/fully-reversible-simulation.png b/notebooks/v2/algorithms/02.algorithmic-foundations/images/fully-reversible-simulation.png new file mode 100644 index 000000000..b35cfcbb5 Binary files /dev/null and b/notebooks/v2/algorithms/02.algorithmic-foundations/images/fully-reversible-simulation.png differ diff --git a/notebooks/v2/algorithms/02.algorithmic-foundations/images/garbage-free-computation.png b/notebooks/v2/algorithms/02.algorithmic-foundations/images/garbage-free-computation.png new file mode 100644 index 000000000..870efd0b3 Binary files /dev/null and b/notebooks/v2/algorithms/02.algorithmic-foundations/images/garbage-free-computation.png differ diff --git a/notebooks/v2/algorithms/02.algorithmic-foundations/images/half-adder.png b/notebooks/v2/algorithms/02.algorithmic-foundations/images/half-adder.png new file mode 100644 index 000000000..36b081df4 Binary files /dev/null and b/notebooks/v2/algorithms/02.algorithmic-foundations/images/half-adder.png differ diff --git a/notebooks/v2/algorithms/02.algorithmic-foundations/images/reversible-circuit-simulation.png b/notebooks/v2/algorithms/02.algorithmic-foundations/images/reversible-circuit-simulation.png new file mode 100644 index 000000000..a50dabb45 Binary files /dev/null and b/notebooks/v2/algorithms/02.algorithmic-foundations/images/reversible-circuit-simulation.png differ diff --git a/notebooks/v2/algorithms/02.algorithmic-foundations/images/simulation-as-query-gate.png b/notebooks/v2/algorithms/02.algorithmic-foundations/images/simulation-as-query-gate.png new file mode 100644 index 000000000..02aefbe1c Binary files /dev/null and b/notebooks/v2/algorithms/02.algorithmic-foundations/images/simulation-as-query-gate.png differ diff --git a/notebooks/v2/algorithms/02.algorithmic-foundations/images/standard-computation.png b/notebooks/v2/algorithms/02.algorithmic-foundations/images/standard-computation.png new file mode 100644 index 000000000..559e16e3f Binary files /dev/null and b/notebooks/v2/algorithms/02.algorithmic-foundations/images/standard-computation.png differ diff --git a/notebooks/v2/algorithms/02.algorithmic-foundations/images/swap.png b/notebooks/v2/algorithms/02.algorithmic-foundations/images/swap.png new file mode 100644 index 000000000..dea1f5479 Binary files /dev/null and b/notebooks/v2/algorithms/02.algorithmic-foundations/images/swap.png differ diff --git a/notebooks/v2/algorithms/03.phase-estimation/images/QFT_32.png b/notebooks/v2/algorithms/03.phase-estimation/images/QFT_32.png new file mode 100644 index 000000000..f590eecd3 Binary files /dev/null and b/notebooks/v2/algorithms/03.phase-estimation/images/QFT_32.png differ diff --git a/notebooks/v2/algorithms/03.phase-estimation/images/arc-and-chord.png b/notebooks/v2/algorithms/03.phase-estimation/images/arc-and-chord.png new file mode 100644 index 000000000..a0e4852d9 Binary files /dev/null and b/notebooks/v2/algorithms/03.phase-estimation/images/arc-and-chord.png differ diff --git a/notebooks/v2/algorithms/03.phase-estimation/images/controlled-phase-gates.png b/notebooks/v2/algorithms/03.phase-estimation/images/controlled-phase-gates.png new file mode 100644 index 000000000..1ef482d33 Binary files /dev/null and b/notebooks/v2/algorithms/03.phase-estimation/images/controlled-phase-gates.png differ diff --git a/notebooks/v2/algorithms/03.phase-estimation/images/double-kickback-probabilities.png b/notebooks/v2/algorithms/03.phase-estimation/images/double-kickback-probabilities.png new file mode 100644 index 000000000..353261dfc Binary files /dev/null and b/notebooks/v2/algorithms/03.phase-estimation/images/double-kickback-probabilities.png differ diff --git a/notebooks/v2/algorithms/03.phase-estimation/images/double-phase-kickback.png b/notebooks/v2/algorithms/03.phase-estimation/images/double-phase-kickback.png new file mode 100644 index 000000000..017d9a763 Binary files /dev/null and b/notebooks/v2/algorithms/03.phase-estimation/images/double-phase-kickback.png differ diff --git a/notebooks/v2/algorithms/03.phase-estimation/images/estimate-phase-with-kickback-analysis.png b/notebooks/v2/algorithms/03.phase-estimation/images/estimate-phase-with-kickback-analysis.png new file mode 100644 index 000000000..3bb58afed Binary files /dev/null and b/notebooks/v2/algorithms/03.phase-estimation/images/estimate-phase-with-kickback-analysis.png differ diff --git a/notebooks/v2/algorithms/03.phase-estimation/images/estimate-phase-with-kickback.png b/notebooks/v2/algorithms/03.phase-estimation/images/estimate-phase-with-kickback.png new file mode 100644 index 000000000..ece00e862 Binary files /dev/null and b/notebooks/v2/algorithms/03.phase-estimation/images/estimate-phase-with-kickback.png differ diff --git a/notebooks/v2/algorithms/03.phase-estimation/images/four-bit-probabilities.png b/notebooks/v2/algorithms/03.phase-estimation/images/four-bit-probabilities.png new file mode 100644 index 000000000..0472cfc42 Binary files /dev/null and b/notebooks/v2/algorithms/03.phase-estimation/images/four-bit-probabilities.png differ diff --git a/notebooks/v2/algorithms/03.phase-estimation/images/kickback-probabilities.png b/notebooks/v2/algorithms/03.phase-estimation/images/kickback-probabilities.png new file mode 100644 index 000000000..509da1d14 Binary files /dev/null and b/notebooks/v2/algorithms/03.phase-estimation/images/kickback-probabilities.png differ diff --git a/notebooks/v2/algorithms/03.phase-estimation/images/phase-estimation-procedure.png b/notebooks/v2/algorithms/03.phase-estimation/images/phase-estimation-procedure.png new file mode 100644 index 000000000..59467fdea Binary files /dev/null and b/notebooks/v2/algorithms/03.phase-estimation/images/phase-estimation-procedure.png differ diff --git a/notebooks/v2/algorithms/03.phase-estimation/images/phase-injection.png b/notebooks/v2/algorithms/03.phase-estimation/images/phase-injection.png new file mode 100644 index 000000000..2081d727d Binary files /dev/null and b/notebooks/v2/algorithms/03.phase-estimation/images/phase-injection.png differ diff --git a/notebooks/v2/algorithms/03.phase-estimation/images/roots-of-unity.png b/notebooks/v2/algorithms/03.phase-estimation/images/roots-of-unity.png new file mode 100644 index 000000000..0431e66d5 Binary files /dev/null and b/notebooks/v2/algorithms/03.phase-estimation/images/roots-of-unity.png differ diff --git a/notebooks/v2/algorithms/03.phase-estimation/images/three-bit-phase-estimation.png b/notebooks/v2/algorithms/03.phase-estimation/images/three-bit-phase-estimation.png new file mode 100644 index 000000000..ce0b709b3 Binary files /dev/null and b/notebooks/v2/algorithms/03.phase-estimation/images/three-bit-phase-estimation.png differ diff --git a/notebooks/v2/algorithms/03.phase-estimation/images/three-bit-probabilities.png b/notebooks/v2/algorithms/03.phase-estimation/images/three-bit-probabilities.png new file mode 100644 index 000000000..2019ecd32 Binary files /dev/null and b/notebooks/v2/algorithms/03.phase-estimation/images/three-bit-probabilities.png differ diff --git a/notebooks/v2/algorithms/03.phase-estimation/images/two-bit-phase-estimation-initial.png b/notebooks/v2/algorithms/03.phase-estimation/images/two-bit-phase-estimation-initial.png new file mode 100644 index 000000000..8b23b51db Binary files /dev/null and b/notebooks/v2/algorithms/03.phase-estimation/images/two-bit-phase-estimation-initial.png differ diff --git a/notebooks/v2/algorithms/03.phase-estimation/images/two-bit-phase-estimation-states.png b/notebooks/v2/algorithms/03.phase-estimation/images/two-bit-phase-estimation-states.png new file mode 100644 index 000000000..0f15fc44c Binary files /dev/null and b/notebooks/v2/algorithms/03.phase-estimation/images/two-bit-phase-estimation-states.png differ diff --git a/notebooks/v2/algorithms/03.phase-estimation/images/two-bit-phase-estimation.png b/notebooks/v2/algorithms/03.phase-estimation/images/two-bit-phase-estimation.png new file mode 100644 index 000000000..3a1d4b7b5 Binary files /dev/null and b/notebooks/v2/algorithms/03.phase-estimation/images/two-bit-phase-estimation.png differ diff --git a/notebooks/v2/algorithms/03.phase-estimation/images/two-bit-probabilities.png b/notebooks/v2/algorithms/03.phase-estimation/images/two-bit-probabilities.png new file mode 100644 index 000000000..bee60ce8f Binary files /dev/null and b/notebooks/v2/algorithms/03.phase-estimation/images/two-bit-probabilities.png differ diff --git a/notebooks/v2/algorithms/03.phase-estimation/images/uncontrolled-and-controlled-unitary.png b/notebooks/v2/algorithms/03.phase-estimation/images/uncontrolled-and-controlled-unitary.png new file mode 100644 index 000000000..8ec485423 Binary files /dev/null and b/notebooks/v2/algorithms/03.phase-estimation/images/uncontrolled-and-controlled-unitary.png differ diff --git a/notebooks/v2/algorithms/03.phase-estimation/phase-estimation-and-factoring.ipynb b/notebooks/v2/algorithms/03.phase-estimation/phase-estimation-and-factoring.ipynb new file mode 100644 index 000000000..873316d14 --- /dev/null +++ b/notebooks/v2/algorithms/03.phase-estimation/phase-estimation-and-factoring.ipynb @@ -0,0 +1,2864 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "id": "b1cea6ac", + "metadata": {}, + "source": [ + "# Phase estimation and factoring" + ] + }, + { + "cell_type": "markdown", + "id": "7dd56c6c", + "metadata": { + "gloss": { + "shor-algorithm-comment": { + "text": "In addition to his integer factorization algorithm, Peter Shor also discovered an efficient quantum algorithm for the different but related problem of computing discrete logarithms. The two algorithms appeared in the same paper, first published as a conference paper in 1994 and then as a journal paper in 1997.", + "title": "Shor's algorithm" + } + } + }, + "source": [ + "## Introduction\n", + "\n", + "In this lesson we'll discuss the phase estimation problem and a quantum algorithm to solve it.\n", + "We'll then apply the solution to obtain [Shor's algorithm](gloss:shor-algorithm-comment) โ€” an efficient quantum algorithm for the integer factorization problem.\n", + "\n", + "Along the way, we'll encounter the quantum Fourier transform, and we'll see how it can be implemented efficiently by a quantum circuit." + ] + }, + { + "cell_type": "markdown", + "id": "bc37795e", + "metadata": {}, + "source": [ + "## Phase estimation problem\n", + "\n", + "This section explains the *phase estimation problem*.\n", + "We'll begin with a short discussion of the *spectral theorem* from linear algebra, and then move on to a statement of the phase estimation problem itself." + ] + }, + { + "cell_type": "markdown", + "id": "db278fe0", + "metadata": {}, + "source": [ + "### Spectral theorem\n", + "\n", + "The *spectral theorem* is an important fact in linear algebra that states that matrices of a certain type (called *normal matrices*) can be expressed in a simple and useful way.\n", + "We're only going to use this theorem for unitary matrices in this lesson, but later on we'll need it for Hermitian matrices as well.\n", + "\n", + "#### Normal matrices\n", + "\n", + "Suppose that $M$ is an $n\\times n$ matrix with complex number entries.\n", + "We say that $M$ is a *normal* matrix if it commutes with its conjugate transpose:\n", + "$M M^{\\dagger} = M^{\\dagger} M$.\n", + "\n", + "Every unitary matrix $U$ is normal because\n", + "\n", + "$$\n", + "U U^{\\dagger} = I = U^{\\dagger} U.\n", + "$$\n", + "\n", + "Hermitian matrices, which are matrices that equal their own conjugate transpose, are another important class of normal matrices.\n", + "If $H$ is a Hermitian matrix, then\n", + "\n", + "$$\n", + "H H^{\\dagger} = H^2 = H^{\\dagger} H,\n", + "$$ \n", + "\n", + "so $H$ is normal.\n", + "We'll see the spectral theorem being applied to Hermitian matrices later in the series.\n", + "\n", + "Not every square matrix is normal.\n", + "For instance, this matrix isn't normal:\n", + "\n", + "$$\n", + "\\begin{pmatrix}\n", + "0 & 1\\\\\n", + "0 & 0\n", + "\\end{pmatrix}\n", + "$$\n", + "\n", + "(This is a simple but great example of a matrix that's always good to keep in mind.)\n", + "This matrix isn't normal because\n", + "\n", + "$$\n", + "\\begin{pmatrix}\n", + "0 & 1\\\\\n", + "0 & 0\n", + "\\end{pmatrix}\n", + "\\begin{pmatrix}\n", + "0 & 1\\\\\n", + "0 & 0\n", + "\\end{pmatrix}^{\\dagger}\n", + "=\n", + "\\begin{pmatrix}\n", + "0 & 1\\\\\n", + "0 & 0\n", + "\\end{pmatrix}\n", + "\\begin{pmatrix}\n", + "0 & 0\\\\\n", + "1 & 0\n", + "\\end{pmatrix}\n", + "=\n", + "\\begin{pmatrix}\n", + "1 & 0\\\\\n", + "0 & 0\n", + "\\end{pmatrix}\n", + "$$\n", + "\n", + "while\n", + "\n", + "$$\n", + "\\begin{pmatrix}\n", + "0 & 1\\\\\n", + "0 & 0\n", + "\\end{pmatrix}^{\\dagger}\n", + "\\begin{pmatrix}\n", + "0 & 1\\\\\n", + "0 & 0\n", + "\\end{pmatrix}\n", + "=\n", + "\\begin{pmatrix}\n", + "0 & 0\\\\\n", + "1 & 0\n", + "\\end{pmatrix}\n", + "\\begin{pmatrix}\n", + "0 & 1\\\\\n", + "0 & 0\n", + "\\end{pmatrix}\n", + "=\n", + "\\begin{pmatrix}\n", + "0 & 0\\\\\n", + "0 & 1\n", + "\\end{pmatrix}.\n", + "$$\n", + "\n", + "#### Theorem statement\n", + "\n", + "Now here's a statement of the spectral theorem.\n", + "\n", + "\n", + "\n", + "**Theorem** (spectral theorem)\n", + "\n", + "Let $M$ be a *normal* $N\\times N$ complex matrix.\n", + "\n", + "There exists an orthonormal basis of $N$ dimensional complex vectors $\\bigl\\{ \\vert\\psi_1\\rangle,\\ldots,\\vert\\psi_N\\rangle \\bigr\\}$ along with complex numbers $\\lambda_1,\\ldots,\\lambda_N$ such that $M = \\lambda_1 \\vert \\psi_1\\rangle\\langle \\psi_1\\vert + \\cdots + \\lambda_N \\vert \\psi_N\\rangle\\langle \\psi_N\\vert$.\n", + "\n", + "\n", + "\n", + "The expression of a matrix in the form\n", + "\n", + "$$\n", + "M = \\sum_{k = 1}^N \\lambda_k \\vert \\psi_k\\rangle\\langle \\psi_k\\vert \\tag{1}\n", + "$$\n", + "\n", + "is commonly called a *spectral decomposition*.\n", + "Notice that if $M$ is a normal matrix expressed in the form $(1)$, then the equation\n", + "\n", + "$$ \n", + "M \\vert \\psi_j \\rangle = \\lambda_j \\vert \\psi_j \\rangle\n", + "$$\n", + "\n", + "must true for every $j = 1,\\ldots,N$.\n", + "This is a consequence of the fact that $\\bigl\\{ \\vert\\psi_1\\rangle,\\ldots,\\vert\\psi_N\\rangle \\bigr\\}$ is orthonormal:\n", + "\n", + "$$ \n", + "M \\vert \\psi_j \\rangle \n", + "= \\left(\\sum_{k = 1}^N \\lambda_k \\vert \\psi_k\\rangle\\langle \\psi_k\\vert\\right)\\vert \\psi_j\\rangle\n", + "= \\sum_{k = 1}^n \\lambda_k \\vert \\psi_k\\rangle\\langle \\psi_k\\vert\\psi_j \\rangle\n", + "= \\lambda_j \\vert\\psi_j \\rangle\n", + "$$\n", + "\n", + "That is to say, each number $\\lambda_j$ is an *eigenvalue* of $M$ and $\\vert\\psi_j\\rangle$ is an *eigenvector* corresponding to that eigenvalue." + ] + }, + { + "cell_type": "markdown", + "id": "92aaac48", + "metadata": {}, + "source": [ + " - **Example 1**.\n", + " Let\n", + " \n", + " $$\n", + " I = \\begin{pmatrix}1 & 0\\\\0 & 1\\end{pmatrix},\n", + " $$\n", + " \n", + " which is normal.\n", + " The theorem implies that $I$ can be written in the form $(1)$ for some choice \n", + " of $\\lambda_1$, $\\lambda_2$, $\\vert\\psi_1\\rangle$, and $\\vert\\psi_2\\rangle$ โ€” and in particular \n", + " the equation is true for\n", + "\n", + " $$\n", + " \\lambda_1 = 1, \\hspace{5pt} \n", + " \\lambda_2 = 1, \\hspace{5pt} \n", + " \\vert\\psi_1\\rangle = \\vert 0\\rangle, \\hspace{5pt}\n", + " \\vert\\psi_2\\rangle = \\vert 1\\rangle.\n", + " $$\n", + " \n", + " (Notice that the theorem does not say that the complex numbers $\\lambda_1,\\ldots,\\lambda_n$ are \n", + " distinct โ€” we can have the same complex number repeated.)\n", + " \n", + " These choices work because\n", + " $$\n", + " I = \\vert 0\\rangle\\langle 0\\vert + \\vert 1\\rangle\\langle 1\\vert.\n", + " $$\n", + " \n", + " Indeed, we could choose $\\{\\vert\\psi_1\\rangle,\\vert\\psi_2\\rangle\\}$ to be *any* orthonormal basis and the \n", + " equation will be true. For instance,\n", + " \n", + " $$\n", + " I = \\vert +\\rangle\\langle +\\vert + \\vert -\\rangle\\langle -\\vert.\n", + " $$\n", + "\n", + " - **Example 2**. Consider a Hadamard operation.\n", + "\n", + " $$\n", + " H = \\frac{1}{\\sqrt{2}}\n", + " \\begin{pmatrix}\n", + " 1 & 1\\\\[1mm] \n", + " 1 & -1\n", + " \\end{pmatrix}\n", + " $$\n", + " \n", + " This is a unitary matrix, so it is normal. The spectral theorem implies that $H$ can be written in the \n", + " form $(1)$, and in particular we have\n", + "\n", + " $$\n", + " H = \n", + " \\vert\\psi_{\\pi/8}\\rangle \\langle \\psi_{\\pi/8}\\vert \n", + " - \\vert\\psi_{5\\pi/8}\\rangle \\langle \\psi_{5\\pi/8}\\vert\n", + " $$\n", + " \n", + " where\n", + " \n", + " $$\n", + " \\vert\\psi_{\\theta}\\rangle \n", + " = \\cos(\\theta)\\vert 0\\rangle + \\sin(\\theta) \\vert 1\\rangle.\n", + " $$\n", + "\n", + " More explicitly,\n", + " \n", + " $$\n", + " \\begin{aligned}\n", + " \\vert\\psi_{\\pi/8}\\rangle & = \\frac{\\sqrt{2 + \\sqrt{2}}}{2}\\vert 0\\rangle \n", + " + \\frac{\\sqrt{2 - \\sqrt{2}}}{2}\\vert 1\\rangle \\\\[3mm]\n", + " \\vert\\psi_{5\\pi/8}\\rangle & = -\\frac{\\sqrt{2 - \\sqrt{2}}}{2}\\vert 0\\rangle \n", + " + \\frac{\\sqrt{2 + \\sqrt{2}}}{2}\\vert 1\\rangle.\n", + " \\end{aligned}\n", + " $$\n", + "\n", + " We can check that this decomposition is correct by performing the required calculations:\n", + " \n", + " $$\n", + " \\vert\\psi_{\\pi/8}\\rangle \\langle \\psi_{\\pi/8}\\vert \n", + " - \\vert\\psi_{5\\pi/8}\\rangle \\langle \\psi_{5\\pi/8}\\vert\n", + " = \\begin{pmatrix}\n", + " \\frac{2 + \\sqrt{2}}{4} & \\frac{\\sqrt{2}}{4}\\\\[2mm]\n", + " \\frac{\\sqrt{2}}{4} & \\frac{2 - \\sqrt{2}}{4}\n", + " \\end{pmatrix}\n", + " -\n", + " \\begin{pmatrix}\n", + " \\frac{2 - \\sqrt{2}}{4} & -\\frac{\\sqrt{2}}{4}\\\\[2mm]\n", + " -\\frac{\\sqrt{2}}{4} & \\frac{2 + \\sqrt{2}}{4}\n", + " \\end{pmatrix}\n", + " = H.\n", + " $$\n", + " \n", + " We can also use Qiskit to check that this decomposition is correct, as the following code cell demonstrates." + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "id": "69b7665f", + "metadata": {}, + "outputs": [ + { + "data": { + "text/latex": [ + "$$\n", + "\n", + "\\begin{bmatrix}\n", + "\\frac{\\sqrt{2}}{2} & \\frac{\\sqrt{2}}{2} \\\\\n", + " \\frac{\\sqrt{2}}{2} & - \\frac{\\sqrt{2}}{2} \\\\\n", + " \\end{bmatrix}\n", + "$$" + ], + "text/plain": [ + "" + ] + }, + "execution_count": 1, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "from qiskit.visualization import array_to_latex\n", + "from qiskit.quantum_info import Statevector\n", + "from qiskit.quantum_info.operators import Operator\n", + "import math\n", + "\n", + "psi1 = Statevector([math.cos(math.pi/8),math.sin(math.pi/8)])\n", + "psi2 = Statevector([math.cos(5*math.pi/8),math.sin(5*math.pi/8)])\n", + "\n", + "# When given a Statevector input, the Operator function returns the outer\n", + "# product of that state vector with itself โ€” or, in other words, the\n", + "# product of the vector times its conjugate transpose.\n", + "\n", + "H = Operator(psi1) - Operator(psi2)\n", + "array_to_latex(H)" + ] + }, + { + "cell_type": "markdown", + "id": "d37cf02d", + "metadata": {}, + "source": [ + "As the first example reveals, there can be some freedom in how eigenvectors are selected.\n", + "There is, however, no freedom at all in how the eigenvalues are chosen (except for their ordering).\n", + "For any given matrix $M$, the same $n$ complex numbers $\\lambda_1,\\ldots,\\lambda_N$ (which can include repetitions of the same complex number) will always occur in the equation $(1)$.\n", + "\n", + "Now let's focus in on unitary matrices.\n", + "Using the same terminology that was just mentioned, if we have a complex number $\\lambda$ and a non-zero vector $\\vert\\psi\\rangle$ that satisfy the equation\n", + "\n", + "$$\n", + "U\\vert\\psi\\rangle = \\lambda\\vert\\psi\\rangle,\n", + "\\tag{2}\n", + "$$\n", + "\n", + "then we say that $\\lambda$ is an *eigenvalue* of $U$ and $\\vert\\psi\\rangle$ is an *eigenvector* corresponding to the eigenvalue $\\lambda$.\n", + "\n", + "Unitary matrices preserve Euclidean norm.\n", + "So, if the equation $(2)$ is true, then because $U$ is unitary we conclude\n", + "\n", + "$$\n", + "\\bigl\\| \\vert\\psi\\rangle \\bigr\\|\n", + "= \\bigl\\| U \\vert\\psi\\rangle \\bigr\\|\n", + "= \\bigl\\| \\lambda \\vert\\psi\\rangle \\bigr\\|\n", + "= \\vert \\lambda \\vert \\bigl\\| \\vert\\psi\\rangle \\bigr\\|.\n", + "$$\n", + "\n", + "The condition that $\\vert\\psi\\rangle$ is non-zero implies that $\\bigl\\| \\vert\\psi\\rangle \\bigr\\|\\not=0$, so we can cancel it from both sides to obtain\n", + "\n", + "$$\n", + "\\vert \\lambda \\vert = 1.\n", + "$$\n", + "\n", + "So, eigenvalues of unitary matrices must always have absolute value equal to one.\n", + "That is to say, they lie on the *unit circle* \n", + "\n", + "$$\n", + "\\mathbb{T} = \\{\\alpha\\in\\mathbb{C} : \\vert\\alpha\\vert = 1\\}.\n", + "$$\n", + "\n", + "The symbol $\\mathbb{T}$ is a common name for the complex unit circle.\n", + "The name is $S^1$ is also common." + ] + }, + { + "cell_type": "markdown", + "id": "33b0a480", + "metadata": {}, + "source": [ + "### Problem statement\n", + "\n", + "In the *phase estimation problem*, we're given a quantum state $\\vert \\psi\\rangle$ of $n$ qubits, along with a unitary quantum circuit that acts on $n$ qubits.\n", + "We're *promised* that $\\vert \\psi\\rangle$ is an eigenvector of the unitary matrix $U$ that describes the action of the circuit, and our goal is to either identify or approximate the eigenvalue $\\lambda$ to which $\\vert \\psi\\rangle$ corresponds.\n", + "\n", + "More precisely, because $\\lambda$ lies on the complex unit circle we can write\n", + "\n", + "$$\n", + "\\lambda = e^{2\\pi i \\theta}\n", + "$$\n", + "\n", + "for a unique real number $\\theta$ satisfying $0\\leq\\theta<1$.\n", + "The goal of the problem is to compute or approximate this real number $\\theta$.\n", + "\n", + "\n", + "\n", + "**Phase estimation problem**\n", + "\n", + "Input: An $n$ qubit quantum state $\\vert\\psi\\rangle$ and a unitary quantum circuit for an $n$-qubit operation $U$\n", + "\n", + "Promise: $\\vert\\psi\\rangle$ is an eigenvector of $U$\n", + "\n", + "Output: an approximation to the number $\\theta\\in[0,1)$ satisfying $U\\vert\\psi\\rangle = e^{2\\pi i \\theta}\\vert\\psi\\rangle$\n", + "\n", + "\n", + "\n", + "\n", + "#### Remarks\n", + "\n", + "1. The phase estimation problem is different from other problems we've seen so far in the series in that the input includes a quantum state. Typically we're focused on problems having classical inputs and outputs, but nothing prevents us from considering quantum state inputs like this. In terms of its practical relevance, the phase estimation problem tends to appear as a *subproblem* inside of larger computations. We'll see this happening in the context of integer factorization later in the lesson.\n", + "\n", + "2. The statement of the phase estimation problem above isn't specific about what constitutes an approximation of $\\theta$, but we can formulate more precise problem statements depending on our needs and interests. In the context of integer factorization we'll demand a very precise approximation to $\\theta$, but in other cases we might be satisfied with a very rough approximation. We'll discuss shortly how the precision we require affects the computational cost of a solution.\n", + "\n", + "3. Notice that as we go from $\\theta = 0$ toward $\\theta = 1$ in the phase estimation problem, we're going all the way around the unit circle, starting from $e^{2\\pi i \\cdot 0} = 1$ and moving counter-clockwise โ€” and as we get closer to $\\theta = 1$ we're moving toward $e^{2\\pi i \\cdot 1} = 1$, which is back where we started at $\\theta = 0$. So, as we consider the accuracy of approximations, choices of $\\theta$ near $1$ should be considered as being near $0$. For example, an approximation $\\theta = 0.999$ should be considered as being within $1/1000$ of $\\theta = 0$." + ] + }, + { + "cell_type": "markdown", + "id": "20118913", + "metadata": {}, + "source": [ + "## Phase estimation procedure\n", + "\n", + "Next we'll discuss the *phase-estimation procedure*, which is a quantum algorithm for solving the phase estimation problem.\n", + "We'll begin with a low-precision warm-up, which explains some of the basic intuition behind the method.\n", + "We'll then talk about the *quantum Fourier transform*, which is an important quantum operation used in the phase-estimation procedure, as well as its quantum circuit implementation.\n", + "And finally, we'll describe the phase-estimation procedure in general and analyze its performance." + ] + }, + { + "cell_type": "markdown", + "id": "014a6154", + "metadata": {}, + "source": [ + "### Warm-up: approximating phases with low precision\n", + "\n", + "We'll begin with a warm-up: a couple of simple versions of the phase-estimation procedure that provide low-precision solutions to the phase-estimation problem.\n", + "This is helpful for explaining the intuition behind the general procedure that we'll see a bit later in the lesson." + ] + }, + { + "cell_type": "markdown", + "id": "3a25f7b4", + "metadata": {}, + "source": [ + "#### Using the phase kickback\n", + "\n", + "A simple approach to the phase-estimation problem, which allows us to learn something about the value $\\theta$ we seek, is based on the *phase kick-back* phenomenon.\n", + "As we will see, this is essentially a single-qubit version of the general phase-estimation procedure to be discussed later in the lesson.\n", + "\n", + "As part of the input to the phase estimation problem, we have a unitary quantum circuit for the operation $U$.\n", + "We can use the description of this circuit to create a circuit for a *controlled*-$U$ operation, which can be depicted as this figure suggests (with the operation $U$, viewed as a quantum gate, on the left and a controlled-$U$ operation on the right).\n", + "\n", + "![Uncontrolled and controlled versions of a unitary operation](images/uncontrolled-and-controlled-unitary.png)\n", + "\n", + "We can create a quantum circuit for a controlled-$U$ operation by first adding a control qubit to the circuit for $U$, and then replacing every gate in the circuit for $U$ with a controlled version of that gate โ€” so our one new control qubit effectively controls every single gate in the circuit for $U$.\n", + "This requires that we have a controlled version of every gate in our circuit, but if we want to restrict ourselves to a standard gate set, we can always build circuits for these controlled operations rather than insisting that they're single gates.\n", + "\n", + "Now let's consider the following circuit, where the input state $\\vert\\psi\\rangle$ of all the qubits except the top one is the quantum state eigenvector of $U:$\n", + "\n", + "![A single-qubit circuit for phase-estimation](images/estimate-phase-with-kickback.png)\n", + "\n", + "The eigenvalue of $U$ corresponding to the eigenvector $\\vert\\psi\\rangle$ determines the measurement outcome probabilities.\n", + "To see exactly how, let's analyze the circuit.\n", + "\n", + "![States of a single-qubit circuit for phase-estimation](images/estimate-phase-with-kickback-analysis.png)\n", + "\n", + "The initial state of the circuit is\n", + "\n", + "$$\n", + "\\vert\\pi_0\\rangle = \\vert\\psi\\rangle \\vert 0\\rangle\n", + "$$\n", + "\n", + "and the first Hadamard gate transforms this state to\n", + "\n", + "$$\n", + "\\vert\\pi_1\\rangle = \\vert\\psi\\rangle \\vert +\\rangle \n", + "= \\frac{1}{\\sqrt{2}} \\vert\\psi\\rangle \\vert 0\\rangle + \\frac{1}{\\sqrt{2}} \\vert\\psi\\rangle \\vert 1\\rangle.\n", + "$$\n", + "\n", + "Next, the controlled-$U$ operation is performed, which results in the state\n", + "\n", + "$$\n", + "\\vert\\pi_2\\rangle \n", + "= \\frac{1}{\\sqrt{2}} \\vert\\psi\\rangle \\vert 0\\rangle + \\frac{1}{\\sqrt{2}} \\bigl(U \\vert\\psi\\rangle\\bigr) \\vert 1\\rangle.\n", + "$$\n", + "\n", + "Using the assumption that $\\vert\\psi\\rangle$ is an eigenvector of $U$ having eigenvalue $\\lambda = e^{2\\pi i\\theta}$,\n", + "we can alternatively express this state as follows.\n", + "\n", + "$$\n", + "\\vert\\pi_2\\rangle\n", + "= \\frac{1}{\\sqrt{2}} \\vert\\psi\\rangle \\vert 0\\rangle + \\frac{e^{2\\pi i \\theta}}{\\sqrt{2}} \\vert\\psi\\rangle \\vert 1\\rangle = \\vert\\psi\\rangle \\otimes \\left( \\frac{1}{\\sqrt{2}} \\vert 0\\rangle + \\frac{e^{2\\pi i \\theta}}{\\sqrt{2}} \\vert 1\\rangle\\right)\n", + "$$\n", + "\n", + "Here we see the phase kickback phenomenon taking place.\n", + "It is slightly different this time than it was for Deutsch's algorithm and the Deutsch-Jozsa algorithm because we're not working with a query gate โ€” but the idea is the similar.\n", + "\n", + "Finally, the second Hadamard gate is performed, which results in the state\n", + "\n", + "$$\n", + "\\vert\\pi_3\\rangle\n", + "= \\vert\\psi\\rangle \\otimes \\left( \\frac{1+ e^{2\\pi i \\theta}}{2} \\vert 0\\rangle + \\frac{1 - e^{2\\pi i \\theta}}{2} \\vert 1\\rangle\\right).\n", + "$$\n", + "\n", + "The measurement therefore yields the outcomes $0$ and $1$ with these probabilities:\n", + "\n", + "$$\n", + "\\begin{aligned}\n", + "p_0 &= \\left\\vert \\frac{1+ e^{2\\pi i \\theta}}{2} \\right\\vert^2 = \\cos^2(\\pi\\theta)\\\\[1mm]\n", + "p_1 &= \\left\\vert \\frac{1- e^{2\\pi i \\theta}}{2} \\right\\vert^2 = \\sin^2(\\pi\\theta).\n", + "\\end{aligned}\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "1f287001", + "metadata": {}, + "source": [ + "Here's a table that lists the probabilities for the two possible measurement outcomes for various choices of the number $\\theta$.\n", + "\n", + "| $\\theta$ | $\\cos^2(\\pi\\theta)$ | $\\sin^2(\\pi\\theta)$ |\n", + "| :--: | :--: | :--: |\n", + "| 0.0000 | 1.0000 | 0.0000 |\n", + "| 0.1250 | 0.8536 | 0.1464 |\n", + "| 0.2500 | 0.5000 | 0.5000 |\n", + "| 0.3750 | 0.1464 | 0.8536 |\n", + "| 0.5000 | 0.0000 | 1.0000 |\n", + "| 0.6250 | 0.1464 | 0.8536 |\n", + "| 0.7500 | 0.5000 | 0.5000 |\n", + "| 0.8750 | 0.8536 | 0.1464 |\n", + "\n", + "We can also plot the probabilities for the two possible outcomes, $0$ and $1$, as follows:\n", + "\n", + "![Outcome probabilities from phase kickback](images/kickback-probabilities.png)\n", + "\n", + "Naturally, the two probabilities always sum to $1$.\n", + "Notice that when $\\theta = 0$, the measurement outcome is always $0$, and when $\\theta = 1/2$, the measurement outcome is always $1$.\n", + "So, although the measurement result doesn't reveal exactly what $\\theta$ is, it does provide us with some information about it โ€” and if we were promised that either $\\theta = 0$ or $\\theta = 1/2$, we could learn from the circuit which one is correct without error." + ] + }, + { + "cell_type": "markdown", + "id": "103ae33e", + "metadata": { + "gloss": { + "binary-point": { + "text": "The binary point is analogous to the decimal point when we express numbers with a fractional part in ordinary, decimal notation.", + "title": "Binary point" + } + } + }, + "source": [ + "Intuitively speaking, we can think of the circuit's measurement outcome as being a guess for $\\theta$ to \"one bit of accuracy.\"\n", + "In other words, if we were to write $\\theta$ in *binary notation* and round it off to one bit after the [binary point](gloss:binary-point), we'd have a number like this:\n", + "\n", + "$$\n", + "0.a = \\begin{cases}\n", + "0 & a = 0\\\\\n", + "\\frac{1}{2} & a = 1.\n", + "\\end{cases}\n", + "$$\n", + "\n", + "The measurement outcome can be viewed as a guess for the bit $a$.\n", + "When $\\theta$ is neither $0$ nor $1/2$, there's a nonzero probability that the guess will be wrong โ€” but the \n", + "probability of making an error becomes smaller and smaller as we get closer to $0$ or $1/2$.\n", + "\n", + "It's natural to ask what role the two Hadamard gates play in this procedure:\n", + "\n", + " - The first Hadamard gate sets the control qubit to a uniform superposition of $\\vert 0\\rangle$ and $\\vert 1\\rangle$, so that when the phase kickback occurs, it happens for the $\\vert 1\\rangle$ state and not the $\\vert 0\\rangle$ state, creating a *relative* phase difference that affects the measurement outcomes. If we didn't do this and the phase kickback produced a *global* phase, it would have no effect on the probabilities of obtaining different measurement outcomes.\n", + "\n", + " - The second Hadamard gate allows us to learn something about the number $\\theta$ through the phenomenon of *interference*. Prior to the second Hadamard gate, the state of the top qubit is\n", + "\n", + " $$\n", + " \\frac{1}{\\sqrt{2}} \\vert 0\\rangle + \\frac{e^{2\\pi i \\theta}}{\\sqrt{2}} \\vert 1\\rangle,\n", + " $$\n", + "\n", + " and if we were to measure this state, we would obtain $0$ and $1$ each with probability $1/2$ โ€” which tells us nothing at all about $\\theta$. Performing the second Hadamard gate allows the number $\\theta$ to affect the output probabilities." + ] + }, + { + "cell_type": "markdown", + "id": "4eae75c7", + "metadata": {}, + "source": [ + "#### Qiskit implementation\n", + "\n", + "Here's an implementation of this circuit in Qiskit.\n", + "(For this implementation we're using a phase gate for the unitary operation, just in the interest of simplicity, so the relevant eigenvector is the $\\vert 1\\rangle$ state.)" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "id": "5d1a710b", + "metadata": {}, + "outputs": [ + { + "data": { + "image/svg+xml": [ + "" + ], + "text/plain": [ + "
" + ] + }, + "execution_count": 2, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "from math import pi, cos, sin\n", + "from qiskit import QuantumCircuit\n", + "\n", + "theta = 0.7 # Can be changed to any value between 0 and 1\n", + "\n", + "qc = QuantumCircuit(2, 1)\n", + "\n", + "# Prepare eigenvector, which is the |1> state\n", + "\n", + "qc.x(1)\n", + "qc.barrier()\n", + "\n", + "# Implement the estimation procedure\n", + "qc.h(0)\n", + "qc.cp(2*pi*theta, 0, 1)\n", + "qc.h(0)\n", + "qc.barrier()\n", + "\n", + "# Perform the final measurement\n", + "qc.measure(0, 0)\n", + "\n", + "# Draw the circuit\n", + "qc.draw()" + ] + }, + { + "cell_type": "markdown", + "id": "fbb2e85d", + "metadata": {}, + "source": [ + "Now we'll run the circuit using the `Sampler` primitive." + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "id": "50c7117b", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "SamplerResult(quasi_dists=[{0: 0.3454915028125262, 1: 0.6545084971874736}], metadata=[{}])" + ] + }, + "execution_count": 3, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "from qiskit.primitives import Sampler\n", + "Sampler().run(qc).result()" + ] + }, + { + "cell_type": "markdown", + "id": "89543d57", + "metadata": {}, + "source": [ + "We can now compare the results to the predicted values to see that they're correct." + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "id": "c011fc3d", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "{0: 0.34549150281252616, 1: 0.6545084971874737}" + ] + }, + "execution_count": 4, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "{ # Calculate predicted results\n", + " 0: cos(pi * theta) ** 2, \n", + " 1: sin(pi * theta) ** 2\n", + "}" + ] + }, + { + "cell_type": "markdown", + "id": "7d78c61f", + "metadata": {}, + "source": [ + "
\n", + "\n", + "#### Doubling the phase" + ] + }, + { + "cell_type": "markdown", + "id": "6c7c3d3c", + "metadata": {}, + "source": [ + "The circuit described above uses the phase kickback phenomenon to approximate $\\theta$ to a single bit of accuracy.\n", + "One bit of accuracy may be all we need in some situations โ€” but for factoring we're going to need a lot more accuracy than that.\n", + "The natural question is, how can we learn more about $\\theta?$\n", + "\n", + "One simple thing we could do is to replace the controlled-$U$ operation in our circuit with *two copies* of this operation, like in this circuit:\n", + "\n", + "![Single-bit phase estimation doubled](images/double-phase-kickback.png)\n", + "\n", + "Two copies of a controlled-$U$ operation is equivalent to a controlled-$U^2$ operation.\n", + "If $\\vert\\psi\\rangle$ is an eigenvector of $U$ having eigenvalue $\\lambda = e^{2\\pi i \\theta}$, then this state is also an eigenvector of $U^2$, this time having eigenvalue $\\lambda^2 = e^{2\\pi i (2\\theta)}$.\n", + "\n", + "So, if we run this version of the circuit, we're effectively performing the same computation as before, except that the number $\\theta$ is replaced by $2\\theta$.\n", + "The following plot illustrates the output probabilities as $\\theta$ ranges from $0$ to $1$.\n", + "\n", + "![Outcome probabilities from double-phase kickback](images/double-kickback-probabilities.png)\n", + "\n", + "Doing this can indeed provide us with some additional information about $\\theta$.\n", + "If the binary representation of $\\theta$ is\n", + "\n", + "$$\n", + "\\theta = 0.a_1 a_2 a_3\\cdots\n", + "$$\n", + "\n", + "then doubling $\\theta$ effectively shifts the binary point one position to the right:\n", + "\n", + "$$\n", + "2\\theta = a_1. a_2 a_3\\cdots\n", + "$$\n", + "\n", + "And because we're equating $\\theta = 1$ with $\\theta = 0$ as we move around the unit circle, we see that the bit $a_1$ has no influence on our probabilities โ€” so we're effectively obtaining a guess for what we would get for the *second* bit after the binary point if we were to round $\\theta$ to two bits.\n", + "For instance, if we knew in advance that $\\theta$ was either $0$ or $1/4$, then we could fully trust the measurement outcome to tell us which.\n", + "\n", + "It's not immediately clear, though, how this estimation should be reconciled with what we learned from the original (non-doubled) phase kickback circuit to give us the most accurate information possible about $\\theta$.\n", + "So let's take a step back and consider how to proceed." + ] + }, + { + "cell_type": "markdown", + "id": "7e1f8f05", + "metadata": {}, + "source": [ + "#### Two-qubit phase estimation" + ] + }, + { + "cell_type": "markdown", + "id": "634e708b", + "metadata": {}, + "source": [ + "Rather than considering the two options described above separately, let's combine them into a single circuit like this:\n", + "\n", + "![The initial set-up for phase estimation with two qubits](images/two-bit-phase-estimation-initial.png)\n", + "\n", + "The Hadamard gates after the controlled operations have been removed and there are no measurements here yet.\n", + "We'll add more to the circuit as we consider our options for learning as much as we can about $\\theta$.\n", + "\n", + "If we run this circuit for $\\vert\\psi\\rangle$ being an eigenvector of $U$, the state of the bottom qubits will remain $\\vert\\psi\\rangle$ throughout the entire circuit โ€” and phases will be \"kicked\" into the state of the top two qubits.\n", + "Let's analyze the circuit carefully, by means of the following figure.\n", + "\n", + "\n", + "![States for phase estimation with two qubits](images/two-bit-phase-estimation-states.png)\n", + "\n", + "We can write the state $\\vert\\pi_1\\rangle$ like this:\n", + "\n", + "$$\n", + "\\vert\\pi_1\\rangle = \\vert \\psi\\rangle \\otimes \\frac{1}{2} \\sum_{a_0 = 0}^1 \\sum_{a_1 = 0}^1 \\vert a_1 a_0 \\rangle.\n", + "$$\n", + "\n", + "When the first controlled-$U$ operation is performed, the eigenvalue $\\lambda = e^{2\\pi i\\theta}$ gets kicked into the phase when $a_0$ (the top qubit) is equal to $1$, but not when it's $0$.\n", + "So, we can express the resulting state like this:\n", + "\n", + "$$\n", + "\\vert\\pi_2\\rangle \n", + "= \\vert\\psi\\rangle \\otimes \\frac{1}{2} \\sum_{a_0=0}^1 \\sum_{a_1=0}^1 e^{2 \\pi i a_0 \\theta} \\vert a_1 a_0 \\rangle.\n", + "$$\n", + "\n", + "The second and third controlled-$U$ gates do something similar, except for $a_1$ rather than $a_0$, and with $\\theta$ replaced by $2\\theta$.\n", + "We can express the resulting state like this:\n", + "\n", + "$$\n", + "\\vert\\pi_3\\rangle\n", + "= \\vert\\psi\\rangle\\otimes\\frac{1}{2}\\sum_{a_0 = 0}^1 \\sum_{a_1 = 0}^1 \n", + "e^{2\\pi i (2 a_1 + a_0)\\theta} \\vert a_1 a_0 \\rangle.\n", + "$$\n", + "\n", + "If we think about the binary string $a_1 a_0$ as representing an integer $x \\in \\{0,1,2,3\\}$ in binary notation, which is $x = 2 a_1 + a_0$, we can alternatively express this state as follows:\n", + "\n", + "$$\n", + "\\vert\\pi_3\\rangle \n", + "= \\vert \\psi\\rangle \\otimes \\frac{1}{2} \\sum_{x = 0}^3 e^{2\\pi i x \\theta} \\vert x \\rangle.\n", + "$$\n", + "\n", + "Our goal is to extract as much information about $\\theta$ as we can from this state." + ] + }, + { + "cell_type": "markdown", + "id": "a9b61f7b", + "metadata": {}, + "source": [ + "At this point, we'll consider a special case, where we're promised that $\\theta = \\frac{y}{4}$ for some integer $y\\in\\{0,1,2,3\\}$. \n", + "In other words, we have $\\theta\\in \\{0, 1/4, 1/2, 3/4\\}$, so we can express this number exactly using binary notation with two bits, as $.00$, $.01$, $.10$, or $.11$.\n", + "In general, $\\theta$ might not be one of these four values โ€” but thinking about this special case will help us to figure out how to most effectively extract information about this value.\n", + "\n", + "Let's define one two-qubit state vector for each possible value $y \\in \\{0, 1, 2, 3\\}$.\n", + "\n", + "$$\n", + "\\vert \\phi_y\\rangle = \\frac{1}{2} \\sum_{x = 0}^3 e^{2\\pi i x \\bigl(\\frac{y}{4}\\bigr)} \\vert x \\rangle = \\frac{1}{2} \\sum_{x = 0}^3 e^{2\\pi i \\frac{x y}{4}} \\vert x \\rangle\n", + "$$\n", + "\n", + "After simplifying the exponentials, we can write these vectors as follows:\n", + "\n", + "$$\n", + "\\begin{aligned}\n", + "\\vert\\phi_0\\rangle & = \\frac{1}{2} \\vert 0 \\rangle + \\frac{1}{2} \\vert 1 \\rangle + \\frac{1}{2} \\vert 2 \\rangle + \\frac{1}{2} \\vert 3 \\rangle \\\\[2mm]\n", + "\\vert\\phi_1\\rangle & = \\frac{1}{2} \\vert 0 \\rangle + \\frac{i}{2} \\vert 1 \\rangle - \\frac{1}{2} \\vert 2 \\rangle - \\frac{i}{2} \\vert 3 \\rangle \\\\[2mm]\n", + "\\vert\\phi_2\\rangle & = \\frac{1}{2} \\vert 0 \\rangle - \\frac{1}{2} \\vert 1 \\rangle + \\frac{1}{2} \\vert 2 \\rangle - \\frac{1}{2} \\vert 3 \\rangle \\\\[2mm]\n", + "\\vert\\phi_3\\rangle & = \\frac{1}{2} \\vert 0 \\rangle - \\frac{i}{2} \\vert 1 \\rangle - \\frac{1}{2} \\vert 2 \\rangle + \\frac{i}{2} \\vert 3 \\rangle\n", + "\\end{aligned}\n", + "$$\n", + "\n", + "These vectors are orthogonal: if we choose any pair of them and compute their inner product, we get $0$.\n", + "Each one is also a unit vector, so this implies that $\\{\\vert\\phi_0\\rangle, \\vert\\phi_1\\rangle, \\vert\\phi_2\\rangle, \\vert\\phi_3\\rangle\\}$ is an orthonormal basis.\n", + "So, we know right away that there is a measurement that can discriminate them perfectly โ€” meaning that if we're given one of them but we don't know which, then we can figure out which one it is without error.\n", + "\n", + "To perform such a discrimination with a quantum circuit, let's first define a unitary operation $V$ that transforms standard basis states into the four states listed above:\n", + "\n", + "$$\n", + "\\begin{aligned}\n", + "V \\vert 00 \\rangle & = \\vert\\phi_0\\rangle \\\\\n", + "V \\vert 01 \\rangle & = \\vert\\phi_1\\rangle \\\\\n", + "V \\vert 10 \\rangle & = \\vert\\phi_2\\rangle \\\\\n", + "V \\vert 11 \\rangle & = \\vert\\phi_3\\rangle \\\\\n", + "\\end{aligned}\n", + "$$\n", + "\n", + "To write down $V$ as a $4\\times 4$ matrix, it's just a matter of taking the columns of $V$ to be the states $\\vert\\phi_0\\rangle,\\ldots,\\vert\\phi_3\\rangle$.\n", + "\n", + "$$\n", + "V =\n", + "\\frac{1}{2}\n", + "\\begin{pmatrix}\n", + "1 & 1 & 1 & 1\\\\\n", + "1 & i & -1 & -i\\\\\n", + "1 & -1 & 1 & -1\\\\\n", + "1 & -i & -1 & i\n", + "\\end{pmatrix}\n", + "$$\n", + "\n", + "We saw this matrix as an example at the end of Lesson 1.\n", + "It's a special matrix, and some readers will have seen it before:\n", + "it's the matrix associated with the $4$-dimensional *discrete Fourier transform*.\n", + "\n", + "In light of this fact, let us call it by the name $\\mathrm{QFT}_4$ rather than $V$.\n", + "The name $\\mathrm{QFT}$ is short for *quantum Fourier transform* โ€” which is essentially just the discrete Fourier transform, viewed as a quantum operation.\n", + "We'll discuss the quantum Fourier transform in greater detail and generality shortly.\n", + "\n", + "$$\n", + "\\mathrm{QFT}_4 =\n", + "\\frac{1}{2}\n", + "\\begin{pmatrix}\n", + "1 & 1 & 1 & 1\\\\\n", + "1 & i & -1 & -i\\\\\n", + "1 & -1 & 1 & -1\\\\\n", + "1 & -i & -1 & i\n", + "\\end{pmatrix}\n", + "$$\n", + "\n", + "So, the operation $\\mathrm{QFT}_4$ maps standard basis states to the four possible states we have above.\n", + "We can perform this operation in reverse to go the other way, to transform the states $\\vert\\phi_0\\rangle,\\ldots,\\vert\\phi_3\\rangle$ into the standard basis states $\\vert 0\\rangle,\\ldots,\\vert 3\\rangle$.\n", + "If we do this, then we can measure to learn which value $y\\in\\{0,1,2,3\\}$ describes $\\theta$ as $\\theta = y/4$.\n", + "\n", + "Here's a diagram of the quantum circuit that does this.\n", + "\n", + "![Phase estimation with two qubits](images/two-bit-phase-estimation.png)\n", + "\n", + "To summarize, if we run this circuit when $\\theta = y/4$ for $y\\in\\{0,1,2,3\\}$, the state immediately before the measurements take place will be $\\vert \\psi\\rangle \\vert y\\rangle$ (for $y$ encoded as a two-bit binary string), so the measurements will reveal the value $y$ without error." + ] + }, + { + "cell_type": "markdown", + "id": "ff7f0eed", + "metadata": {}, + "source": [ + "This circuit is motivated by the special case that $\\theta \\in \\{0,1/4,1/2,3/4\\}$ โ€” but we can run it for any choice of $U$ and $\\vert \\psi\\rangle$, and hence any value of $\\theta$, that we wish.\n", + "Here's a plot of the output probabilities the circuit produces for arbitrary choices of $\\theta:$\n", + "\n", + "![Outcome probabilities from two-qubit phase estimation](images/two-bit-probabilities.png)\n", + "\n", + "This is a clear improvement over the single-qubit variant described earlier in the lesson.\n", + "It's not perfect โ€” it can give us the wrong answer โ€” but the answer is heavily skewed toward values of $y$ for which $y/4$ is close to $\\theta$.\n", + "In particular, the most likely outcome always corresponds to the closest value of $y/4$ to $\\theta$ (equating $\\theta = 0$ and $\\theta = 1$ as before), and it appears from the plot that this closest value for $x$ always appears with probability above $40\\%$.\n", + "When $\\theta$ is exactly halfway between two such values, like $\\theta = 0.375$ for instance, the two equally close values of $y$ are equally likely." + ] + }, + { + "cell_type": "markdown", + "id": "32664572", + "metadata": {}, + "source": [ + "#### Qiskit implementation\n", + "\n", + "Here's an implementation of this procedure in Qiskit.\n", + "Similar to the previous implementation, we'll use a phase gate with a chosen angle $\\theta$ for the unitary operation and $\\vert 1\\rangle$ for the eigenvector." + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "id": "945240a6", + "metadata": {}, + "outputs": [ + { + "data": { + "image/svg+xml": [ + "" + ], + "text/plain": [ + "
" + ] + }, + "execution_count": 5, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "from math import pi\n", + "from qiskit import QuantumCircuit\n", + "\n", + "theta = .7\n", + "qc = QuantumCircuit(3, 2)\n", + "\n", + "# Prepare the eigenvector\n", + "qc.x(2)\n", + "qc.barrier()\n", + "\n", + "# The initial Hadamard gates\n", + "qc.h(0)\n", + "qc.h(1)\n", + "qc.barrier()\n", + "\n", + "# The controlled unitary gates\n", + "qc.cp(2*pi*theta,0,2)\n", + "qc.cp(2*pi*(2*theta),1,2)\n", + "qc.barrier()\n", + "\n", + "# An implementation of the inverse of the two-qubit QFT\n", + "qc.swap(0,1)\n", + "qc.h(0)\n", + "qc.cp(-pi/2,0,1)\n", + "qc.h(1)\n", + "qc.barrier()\n", + "\n", + "# And finally the measurements\n", + "qc.measure([0, 1], [0, 1])\n", + "qc.draw()\n" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "id": "712b60f1", + "metadata": {}, + "outputs": [ + { + "data": { + "image/svg+xml": [ + "" + ], + "text/plain": [ + "
" + ] + }, + "execution_count": 6, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "from qiskit.visualization import plot_histogram\n", + "result = Sampler().run(qc).result()\n", + "plot_histogram(result.quasi_dists)" + ] + }, + { + "cell_type": "markdown", + "id": "813fc3de", + "metadata": {}, + "source": [ + "#### Generalizing to many qubits\n", + "\n", + "Given the improvement we've just obtained by using two control qubits rather than one, in conjunction with the $4$-dimensional quantum Fourier transform, it's natural to consider generalizing it further โ€” by adding more control qubits.\n", + "When we do this, we obtain the general *phase estimation procedure*.\n", + "We'll see how this works shortly, but in order to describe it precisely we're going to need to discuss the quantum Fourier transform in greater generality, to see how it's defined for other dimensions and to see how we can implement it with a quantum circuit." + ] + }, + { + "cell_type": "markdown", + "id": "20367e3c", + "metadata": {}, + "source": [ + "### Quantum Fourier transform\n", + "\n", + "The quantum Fourier transform is a unitary operation that can be defined for any positive integer dimension $N$.\n", + "In this subsection we'll see how this operation is defined, and we'll see how it can be implemented with a quantum circuit on $m$ qubits with cost $O(m^2)$ when $N = 2^m$.\n", + "\n", + "The matrices that describe this operation are derived from an analogous operation on $N$ dimensional vectors known as the *discrete Fourier transform*.\n", + "We can think about the discrete Fourier transform abstractly, in purely mathematical terms, but we can also think about it as a computational problem, where we're given an $N$ dimensional vector of complex numbers (using binary notation to encode the real and imaginary parts of the entries, let us suppose), and our goal is to calculate the result, which is again an $N$ dimensional vector.\n", + "An efficient algorithm for performing this computation known as the *fast Fourier transform* is considered by many to be one of the most important algorithms ever discovered โ€” it's critical in signal processing and has wide-ranging applications.\n", + "\n", + "Our focus, however, is on viewing this transform as a unitary operation that can be performed on a quantum system." + ] + }, + { + "cell_type": "markdown", + "id": "6902f80b", + "metadata": {}, + "source": [ + "#### Definition of the quantum Fourier transform\n", + "\n", + "To define the quantum Fourier transform, we'll first define a complex number $\\omega_N$, for each positive integer $N$, like this:\n", + "\n", + "$$\n", + "\\omega_N = e^{\\frac{2\\pi i}{N}} = \\cos\\left(\\frac{2\\pi}{N}\\right) + i \\sin\\left(\\frac{2\\pi}{N}\\right).\n", + "$$\n", + "\n", + "This is the number on the complex unit circle we obtain if we start at $1$ and move counter-clockwise by an angle of $2\\pi/N$ โ€” or \"one click\" if we imagine that $N$ discrete \"clicks\" would take us all the way around the circle.\n", + "\n", + "Here are a few examples:\n", + "\n", + "$$\n", + "\\begin{gathered}\n", + "\\omega_1 = 1\\\\[1mm]\n", + "\\omega_2 = -1\\\\[1mm]\n", + "\\omega_3 = -\\frac{1}{2} + \\frac{\\sqrt{3}}{2} i\\\\[1mm]\n", + "\\omega_4 = i\\\\[1mm]\n", + "\\omega_8 = \\frac{1+i}{\\sqrt{2}}\\\\[1mm]\n", + "\\omega_{16} = \\frac{\\sqrt{2 + \\sqrt{2}}}{2} + \\frac{\\sqrt{2 - \\sqrt{2}}}{2} i\\\\[1mm]\n", + "\\omega_{100} \\approx 0.998 + 0.063 i\n", + "\\end{gathered}\n", + "$$\n" + ] + }, + { + "cell_type": "markdown", + "id": "c1bc8d2e", + "metadata": {}, + "source": [ + "Now we can define the $N$-dimensional quantum Fourier transform, which is described by an $N\\times N$ matrix whose rows and columns are associated with the standard basis states $\\vert 0\\rangle,\\ldots,\\vert N-1\\rangle$.\n", + "\n", + "$$\n", + "\\mathrm{QFT}_N = \\frac{1}{\\sqrt{N}} \\sum_{x = 0}^{N-1} \\sum_{y = 0}^{N-1} \\omega_N^{xy} \\vert x \\rangle\\langle y\\vert\n", + "$$\n", + "\n", + "For phase estimation we're only going to need this operation for when $N = 2^m$ is a power of $2$, but the operation can be defined for any positive integer $N$.\n", + "\n", + "As was already stated, this is the matrix associated with the $N$-dimensional *discrete Fourier transform*.\n", + "(Often the leading factor of $1/\\sqrt{N}$ is not included in the definition of the matrix associated with the discrete Fourier transform, but we need to include it to obtain a unitary matrix.\n", + "Sometimes a minus sign appears in the exponent of $\\omega_N$ as well โ€” different people define it in slightly different ways, but these differences are superficial and easily reconciled.)\n", + "\n", + "Here's the quantum Fourier transform written as a matrix for some small values of $N$.\n", + "\n", + "$$\n", + "\\mathrm{QFT}_1 = \\begin{pmatrix} 1 \\end{pmatrix}\n", + "$$\n", + "\n", + "$$\n", + "\\mathrm{QFT}_2 = \n", + "\\frac{1}{\\sqrt{2}} \\begin{pmatrix} 1 & 1\\\\ 1 & -1 \\end{pmatrix}\n", + "$$\n", + "\n", + "$$\n", + "\\mathrm{QFT}_3 = \n", + "\\frac{1}{\\sqrt{3}} \n", + "\\begin{pmatrix} \n", + " 1 & 1 & 1\\\\[2mm]\n", + " 1 & \\frac{-1 + i\\sqrt{3}}{2} & \\frac{-1 - i\\sqrt{3}}{2}\\\\[2mm]\n", + " 1 & \\frac{-1 - i\\sqrt{3}}{2} & \\frac{-1 + i\\sqrt{3}}{2}\n", + "\\end{pmatrix}\n", + "$$\n", + "\n", + "$$\n", + "\\mathrm{QFT}_4 =\n", + "\\frac{1}{2}\n", + "\\begin{pmatrix}\n", + "1 & 1 & 1 & 1\\\\\n", + "1 & i & -1 & -i\\\\\n", + "1 & -1 & 1 & -1\\\\\n", + "1 & -i & -1 & i\n", + "\\end{pmatrix}\n", + "$$\n", + "\n", + "$$\n", + "\\mathrm{QFT}_8 =\n", + "\\frac{1}{2\\sqrt{2}}\n", + "\\begin{pmatrix}\n", + " 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1\\\\[2mm]\n", + " 1 & \\frac{1+i}{\\sqrt{2}} & i & \\frac{-1+i}{\\sqrt{2}} & -1 & \\frac{-1-i}{\\sqrt{2}} & -i & \\frac{1-i}{\\sqrt{2}}\\\\[2mm]\n", + " 1 & i & -1 & -i & 1 & i & -1 & -i\\\\[2mm]\n", + " 1 & \\frac{-1+i}{\\sqrt{2}} & -i & \\frac{1+i}{\\sqrt{2}} & -1 & \\frac{1-i}{\\sqrt{2}} & i & \\frac{-1-i}{\\sqrt{2}}\\\\[2mm]\n", + " 1 & -1 & 1 & -1 & 1 & -1 & 1 & -1\\\\[2mm]\n", + " 1 & \\frac{-1-i}{\\sqrt{2}} & i & \\frac{1-i}{\\sqrt{2}} & -1 & \\frac{1+i}{\\sqrt{2}} & -i & \\frac{-1+i}{\\sqrt{2}}\\\\[2mm]\n", + " 1 & -i & -1 & i & 1 & -i & -1 & i\\\\[2mm]\n", + " 1 & \\frac{1-i}{\\sqrt{2}} & -i & \\frac{-1-i}{\\sqrt{2}} & -1 & \\frac{-1+i}{\\sqrt{2}} & i & \\frac{1+i}{\\sqrt{2}}\\\\[2mm]\n", + "\\end{pmatrix}\n", + "$$\n", + "\n", + "Notice, in particular, that $\\mathrm{QFT}_2$ is another name for a Hadamard operation." + ] + }, + { + "cell_type": "markdown", + "id": "979df05e", + "metadata": {}, + "source": [ + "#### Unitarity\n", + "\n", + "Let's check that $\\mathrm{QFT}_N$ is indeed unitary, for any selection of $N$.\n", + "One way to do this is to show that the columns form an orthonormal basis.\n", + "We can define column number $y$, starting from $y = 0$ and going up to $y = N-1$, like this:\n", + "\n", + "$$\n", + "\\vert\\phi_y\\rangle = \\frac{1}{\\sqrt{N}} \\sum_{x = 0}^{N-1} \\omega_N^{xy} \\vert x \\rangle.\n", + "$$\n", + "\n", + "Taking the inner product between any two columns gives us this expression:\n", + "\n", + "$$\n", + "\\langle \\phi_z \\vert \\phi_y \\rangle = \\frac{1}{N} \\sum_{x = 0}^{N-1} \\omega_N^{x (y - z)}\n", + "$$\n", + "\n", + "One way to evaluate sums like this is to use the following formula for the sum of the first $N$ terms of a geometric series.\n", + "\n", + "$$\n", + "1 + \\alpha + \\alpha^2 + \\cdots + \\alpha^{N-1} =\n", + "\\begin{cases}\n", + "\\frac{\\alpha^N - 1}{\\alpha - 1} & \\text{if } \\alpha\\not=1\\\\[2mm]\n", + "N & \\text{if } \\alpha=1\n", + "\\end{cases}\n", + "$$\n", + "\n", + "Specifically, we can use this formula when $\\alpha = \\omega_N^{y-z}$.\n", + "When $y = z$, we have $\\alpha = 1$, so using the formula and dividing by $N$ gives\n", + "\n", + "$$\n", + "\\langle \\phi_y \\vert \\phi_y \\rangle = 1.\n", + "$$\n", + "\n", + "When $y\\neq z$, we have $\\alpha \\neq 1$, so using the formula reveals this:\n", + "\n", + "$$\n", + "\\langle \\phi_z \\vert \\phi_y \\rangle = \\frac{1}{N} \\frac{\\omega_N^{N(y-z)} - 1}{\\omega_N^{y-z} - 1} \n", + "= \\frac{1}{N} \\frac{1 - 1}{\\omega_N^{y-z} - 1} = 0.\n", + "$$\n", + "\n", + "This happens because $\\omega_N^N = e^{2\\pi i} = 1$, so $\\omega_N^{N(y-z)} = 1^{y-z} = 1$, and the numerator becomes $0$ (while the denominator is nonzero because $\\omega_N^{y-z} \\neq 1)$.\n", + "\n", + "At a more intuitive level, what we're effectively doing in the formula for $\\langle \\phi_z\\vert\\phi_y\\rangle$ is summing a bunch of points that are evenly spread around the unit circle โ€” so that they cancel each other out, leaving $0$ when we sum them.\n", + "\n", + "So, we have established that $\\{\\vert\\phi_0\\rangle,\\ldots,\\vert\\phi_{N-1}\\rangle\\}$ is an orthonormal set.\n", + "\n", + "$$\n", + "\\langle \\phi_z \\vert \\phi_y \\rangle =\n", + "\\begin{cases}\n", + "0 & y=z\\\\\n", + "1 & y\\not=z\n", + "\\end{cases}\n", + "$$\n", + "\n", + "This reveals that $\\mathrm{QFT}_N$ is unitary." + ] + }, + { + "cell_type": "markdown", + "id": "22732ff6", + "metadata": {}, + "source": [ + "#### Controlled-phase gates\n", + "\n", + "In order to implement the quantum Fourier transform as a quantum circuit, we're going to need to make use of *controlled-phase* gates.\n", + "\n", + "Recall from Lesson 1 that a *phase operation* is a single-qubit quantum operation of the form\n", + "\n", + "$$\n", + "P_{\\alpha} = \n", + "\\begin{pmatrix}\n", + "1 & 0\\\\\n", + "0 & e^{i\\alpha}\n", + "\\end{pmatrix}\n", + "$$\n", + "\n", + "for any real number $\\alpha$.\n", + "(In Lesson 1 we used the name $\\theta$ in place of $\\alpha$, but in this lesson we'll reserve the letter $\\theta$ for the parameter in phase estimation.)\n", + "\n", + "A controlled version of this gate has the following matrix:\n", + "\n", + "$$\n", + "CP_{\\alpha} = \n", + "\\begin{pmatrix}\n", + "1 & 0 & 0 & 0\\\\\n", + "0 & 1 & 0 & 0\\\\\n", + "0 & 0 & 1 & 0\\\\\n", + "0 & 0 & 0 & e^{i\\alpha}\n", + "\\end{pmatrix}\n", + "$$\n", + "\n", + "For this controlled gate, it doesn't actually matter which qubit is the control and which is the target โ€” the two possibilities are equivalent.\n", + "We can use any of the following symbols to represent this gate in quantum circuit diagrams:\n", + "\n", + "![Quantum circuit diagram representation for controlled-phase gates](images/controlled-phase-gates.png)\n", + "\n", + "For the third form, the label $\\alpha$ is also sometimes placed on the side of the control line or under the lower control when that's convenient.\n", + "\n", + "Using controlled-phase gates we can perform the following transformation,\n", + "where $a$ is a bit and $y \\in \\{0,\\ldots,2^{m-1} - 1\\}$ is a number encoded in binary notation as a string of $m-1$ bits.\n", + "\n", + "$$\n", + "\\vert y \\rangle \\vert a \\rangle \\mapsto \\omega_{2^m}^{ay} \\vert y \\rangle \\vert a \\rangle\n", + "$$\n", + "\n", + "As an example, here's for how this is done for $m=5$.\n", + "\n", + "![Quantum circuit diagram for phase injection](images/phase-injection.png)\n", + "\n", + "This can be naturally generalized for any $m$ โ€” the phase gates always start from $\\frac{\\pi}{2}$ on the most significant bit of $x$ down to $\\pi/2^{m-1}$ on the least significant bit." + ] + }, + { + "cell_type": "markdown", + "id": "b00638a6", + "metadata": {}, + "source": [ + "#### Circuit implementation of the QFT\n", + "\n", + "Now we'll see how we can implement the quantum Fourier transform with a circuit when the dimension $N = 2^m$ is a power of $2$.\n", + "There are, in fact, multiple ways to implement the quantum Fourier transform, but this is arguably the simplest method.\n", + "\n", + "The implementation is recursive in nature, and so that's how it's most naturally described.\n", + "The base case is that the quantum Fourier transform on a single qubit is a Hadamard operation.\n", + "\n", + "To perform the quantum Fourier transform on $m$ qubits when $m \\geq 2$, we can perform the following steps, whose actions we'll describe for standard basis states of the form $\\vert x \\rangle \\vert a\\rangle$, where $x\\in\\{0,\\ldots,2^{m-1} - 1\\}$ is an integer encoded as $m-1$ bits using binary notation and $a$ is a single bit.\n", + "\n", + "1. First apply the $2^{m-1}$-dimensional quantum Fourier transform to the bottom/leftmost $m-1$ qubits to obtain \n", + " this state:\n", + "\n", + " $$\n", + " \\Bigl(\\mathrm{QFT}_{2^{m-1}} \\vert x \\rangle\\Bigr) \\vert a\\rangle\n", + " = \\frac{1}{\\sqrt{2^{m-1}}} \\sum_{y = 0}^{2^{m-1} - 1} \\omega_{2^{m-1}}^{xy} \\vert y \\rangle \\vert a \\rangle\n", + " $$\n", + "\n", + " This is done by recursively applying the method being described for one fewer qubit, using the Hadamard \n", + " operation on a single qubit as the base case.\n", + "\n", + "2. Use the top/rightmost qubit as a control to inject the phase $\\omega_{2^m}^y$ for each standard basis \n", + " state $\\vert y\\rangle$ of the remaining $m-1$ qubits (as described above) to obtain this state:\n", + "\n", + " $$\n", + " \\frac{1}{\\sqrt{2^{m-1}}} \\sum_{y = 0}^{2^{m-1} - 1} \\omega_{2^{m-1}}^{xy}\n", + " \\omega_{2^m}^{ay} \\vert y \\rangle \\vert a \\rangle\n", + " $$\n", + " \n", + "3. Perform a Hadamard gate on the top/rightmost qubit to obtain this state:\n", + "\n", + " $$\n", + " \\frac{1}{\\sqrt{2^{m}}} \\sum_{y = 0}^{2^{m-1} - 1} \\sum_{b=0}^1 \n", + " (-1)^{ab} \\omega_{2^{m-1}}^{xy} \\omega_{2^m}^{ay} \n", + " \\vert y \\rangle \\vert b \\rangle\n", + " $$\n", + "\n", + "4. Permute the order of the qubits so that the least significant bit becomes the most significant bit, with \n", + " all others shifted:\n", + "\n", + " $$\n", + " \\frac{1}{\\sqrt{2^{m}}} \\sum_{y = 0}^{2^{m-1} - 1} \\sum_{b=0}^1 \n", + " (-1)^{ab} \\omega_{2^{m-1}}^{xy} \\omega_{2^m}^{ay} \n", + " \\vert b \\rangle \\vert y \\rangle \n", + " $$" + ] + }, + { + "cell_type": "markdown", + "id": "b7315ca9", + "metadata": {}, + "source": [ + "For example, here's the circuit we obtain for $N = 32 = 2^5$.\n", + "In this diagram, the qubits are given names that correspond to the standard basis vectors $\\vert x\\rangle \\vert a\\rangle$ (for the input) and $\\vert b\\rangle \\vert y\\rangle$ (for the output) for clarity.\n", + "\n", + "![Quantum circuit diagram for the 32-dimensional quantum Fourier transform](images/QFT_32.png)" + ] + }, + { + "cell_type": "markdown", + "id": "34486329", + "metadata": {}, + "source": [ + "
\n", + "\n", + "#### Analysis\n", + "\n", + "The key formula we need to verify that the circuit just described implements the $2^m$-dimensional quantum Fourier transform is this one:\n", + "\n", + "$$\n", + "(-1)^{ab}\n", + "\\omega_{2^{m-1}}^{xy}\n", + "\\omega_{2^m}^{ay}\n", + "=\n", + "\\omega_{2^m}^{(2x+ a)(2^{m-1}b + y)}.\n", + "$$\n", + "\n", + "This formula works for any choice of integers $a$, $b$, $x$, and $y$, but we'll only need it for\n", + "$a,b\\in\\{0,1\\}$ and $x,y\\in\\{0,\\ldots,2^{m-1}-1\\}$.\n", + "We can check the formula by expanding the product in the exponent on the right-hand side,\n", + "\n", + "$$\n", + " \\omega_{2^m}^{(2x+ a)(2^{m-1}b + y)}\n", + " = \\omega_{2^m}^{2^m xb} \\omega_{2^m}^{2xy} \\omega_{2^m}^{2^{m-1}ab} \\omega_{2^m}^{ay}\n", + " = (-1)^{ab} \\omega_{2^{m-1}}^{xy} \\omega_{2^m}^{ay},\n", + "$$\n", + "\n", + "where the second equality makes use of the observation that\n", + "\n", + "$$\n", + "\\omega_{2^m}^{2^m xb} = \\bigl(\\omega_{2^m}^{2^m}\\bigr)^{xb} = 1^{xb} = 1.\n", + "$$\n", + "\n", + "Now, the $2^m$-dimensional quantum Fourier transform is defined as follows for every $u\\in\\{0,\\ldots,2^m - 1\\}$.\n", + "\n", + "$$\n", + "\\mathrm{QFT}_{2^m} \\vert u\\rangle = \\frac{1}{\\sqrt{2^m}}\n", + "\\sum_{v = 0}^{2^m - 1} \\omega_{2^m}^{uv} \\vert v\\rangle\n", + "$$\n", + "\n", + "If we write $u$ and $v$ as\n", + "\n", + "$$\n", + "\\begin{aligned}\n", + "u & = 2x + a\\\\\n", + "v & = 2^{m-1}b + y\n", + "\\end{aligned}\n", + "$$\n", + "\n", + "for $a,b\\in\\{0,1\\}$ and $x,y\\in\\{0,\\ldots,2^{m-1} - 1\\}$, we obtain\n", + "\n", + "$$\n", + "\\begin{aligned}\n", + "\\mathrm{QFT}_{2^m} \\vert 2x + a\\rangle\n", + "& = \n", + "\\frac{1}{\\sqrt{2^m}}\n", + "\\sum_{y = 0}^{2^{m-1} - 1}\n", + "\\sum_{b=0}^1 \n", + "\\omega_{2^m}^{(2x+ a)(2^{m-1}b + y)} \\vert b 2^{m-1} + y\\rangle\\\\[2mm]\n", + "& =\n", + "\\frac{1}{\\sqrt{2^m}}\n", + "\\sum_{y = 0}^{2^{m-1} - 1}\n", + "\\sum_{b=0}^1 \n", + "(-1)^{ab}\n", + "\\omega_{2^{m-1}}^{xy}\n", + "\\omega_{2^m}^{ay}\n", + "\\vert b 2^{m-1} + y\\rangle.\n", + "\\end{aligned}\n", + "$$\n", + "\n", + "Finally, by thinking about the standard basis states $\\vert x \\rangle \\vert a\\rangle$ and $\\vert b \\rangle \\vert y \\rangle$ as binary encodings of integers in the range $\\{0,\\ldots,2^m-1\\}$,\n", + "\n", + "$$\n", + "\\begin{aligned}\n", + "\\vert x \\rangle \\vert a\\rangle & = \\vert 2x + a \\rangle\\\\\n", + "\\vert b \\rangle \\vert y \\rangle & = \\vert 2^{m-1}b + y\\rangle,\n", + "\\end{aligned}\n", + "$$\n", + "\n", + "we see that the circuit above implements the required operation.\n", + "\n", + "If this method for performing the quantum Fourier transform seems remarkable, it's because it is.\n", + "It's essentially the same methodology that underlies the fast Fourier transform โ€” one of the most important and useful classical algorithms ever discovered โ€” in the form of a quantum circuit." + ] + }, + { + "cell_type": "markdown", + "id": "11c6351c", + "metadata": {}, + "source": [ + "#### Computational cost\n", + "\n", + "Now let's count how many gates are used in the circuit just described.\n", + "The controlled-phase gates aren't in the standard gate set that we discussed in the previous lesson, but to begin we'll ignore this and count each of them as a single gate.\n", + "\n", + "Let's let $s_m$ denote the number of gates we need for each possible choice of $m$.\n", + "If $m=1$, the quantum Fourier transform is just a Hadamard operation, so\n", + "\n", + "$$\n", + "s_1 = 1.\n", + "$$\n", + "\n", + "If $m\\geq 2$, then in the circuit above we need $s_{m-1}$ gates for the quantum Fourier transform on $m-1$ qubits, plus $m-1$ controlled-phase gates, plus a Hadamard gate, plus $m-1$ swap gates, so\n", + "\n", + "$$\n", + "s_m = s_{m-1} + (2m - 1).\n", + "$$\n", + "\n", + "We can obtain a closed-form expression by summing:\n", + "\n", + "$$\n", + "s_m = \\sum_{k = 1}^m (2k - 1) = m^2.\n", + "$$\n", + "\n", + "We don't actually need as many swap gates as the method describes โ€” if we rearrange the gates just a bit, we can push all of the swap gates out to the right and reduce the number of swap gates required to $\\lfloor m/2\\rfloor$.\n", + "Asymptotically speaking this isn't a major improvement: we still obtain circuits with size $O(m^2)$ for performing $\\mathrm{QFT}_{2^m}$.\n", + "\n", + "If we wish to implement the quantum Fourier transform using only gates from our standard gate set, we need to either build or approximate each of the controlled-phase gates with gates from our set.\n", + "The number required depends on how much accuracy we require, but the total number remains quadratic in the number $m$.\n", + "(We can even come up with a pretty good approximation to the quantum Fourier transform with a sub-quadratic number of gates by using the fact that when $\\alpha$ is very small, we have $e^{i\\alpha} \\approx 1$, so the controlled-phase gate $CP_{\\alpha}$ can be very well approximated by doing nothing at all in such cases.)" + ] + }, + { + "cell_type": "markdown", + "id": "793c8ec5", + "metadata": {}, + "source": [ + "#### QFTs in Qiskit\n", + "\n", + "A circuit implementation of the QFT on any number of qubits can be obtained from Qiskit's circuit library.\n", + "(Note that for three or more qubits the circuit will differ slightly from the general description above because it incorporates some minor optimizations. In particular, the number of swap gates required can be reduced significantly by effectively pushing them to the end of the circuit and adjusting the controlled-phase gates accordingly.)" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "id": "adbb2d1a", + "metadata": {}, + "outputs": [ + { + "data": { + "image/svg+xml": [ + "" + ], + "text/plain": [ + "
" + ] + }, + "execution_count": 7, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "from qiskit.circuit.library import QFT\n", + "QFT(4).decompose().draw()" + ] + }, + { + "cell_type": "markdown", + "id": "25964ba6", + "metadata": {}, + "source": [ + "### General procedure and analysis\n", + "\n", + "Now we'll examine the phase-estimation procedure in general.\n", + "The idea is to extend the single- and double-qubit versions of phase estimation that we considered above in the natural way, as suggested by the following diagram.\n", + "\n", + "![Phase estimation procedure](images/phase-estimation-procedure.png)\n", + "\n", + "Notice that for each new control qubit added on the top, we *double* the number of times the unitary operation $U$ is performed.\n", + "Rather than drawing however many copies of the controlled-$U$ operation are needed to do this in the diagram, we've instead raised $U$ to the required powers.\n", + "\n", + "In general, adding additional control qubits on the top like this will contribute significantly to the size of the circuit: if we have $m$ control qubits, like the diagram depicts, a total of $2^m - 1$ copies of the controlled-$U$ operation are required.\n", + "This means that a significant computational cost is incurred as $m$ is increased โ€” but as we will see, it also leads to a significantly more accurate approximation of $\\theta$.\n", + "\n", + "It is important to note, however, that for *some* choices of $U$ it may be possible to create a circuit that implements the operation $U^k$ for large values of $k$ in a more efficient way than simply repeating $k$ times the circuit for $U$.\n", + "We'll see a specific example of this in the context of integer factorization later in the lesson, where the efficient algorithm for *modular exponentiation* discussed in the previous lesson comes to the rescue.\n", + "\n", + "Now let us analyze the circuit just described.\n", + "The state immediately prior to the quantum Fourier transform looks like this:\n", + "\n", + "$$\n", + "\\frac{1}{\\sqrt{2^m}} \\sum_{x = 0}^{2^m - 1} \\bigl( U^x \\vert\\psi\\rangle \\bigr) \\vert x\\rangle\n", + "= \\vert\\psi\\rangle \\otimes \\frac{1}{\\sqrt{2^m}} \\sum_{x = 0}^{2^m - 1} e^{2\\pi i x\\theta} \\vert x\\rangle.\n", + "$$\n", + "\n", + "#### A special case\n", + "\n", + "Along similar lines to what we did in the $m=2$ case above, we can consider the special case that\n", + "$\\theta = y/2^m$ for $y\\in\\{0,\\ldots,2^m-1\\}$, and we see that this state can alternatively be written like this:\n", + "\n", + "$$\n", + "\\vert\\psi\\rangle \\otimes \\frac{1}{\\sqrt{2^m}} \\sum_{x = 0}^{2^m - 1} e^{2\\pi i \\frac{xy}{2^m}} \\vert x\\rangle\n", + "= \\vert\\psi\\rangle \\otimes \\frac{1}{\\sqrt{2^m}} \\sum_{x = 0}^{2^m - 1} \\omega_{2^m}^{xy} \\vert x\\rangle\n", + "= \\vert\\psi\\rangle \\otimes \\mathrm{QFT}_{2^m} \\vert y\\rangle.\n", + "$$\n", + "\n", + "So, when the inverse of the quantum Fourier transform is applied, the state becomes\n", + "\n", + "$$\n", + "\\vert\\psi\\rangle \\vert y\\rangle\n", + "$$\n", + "\n", + "and the measurements reveal $y$ (encoded in binary).\n" + ] + }, + { + "cell_type": "markdown", + "id": "7e14c809", + "metadata": {}, + "source": [ + "#### Bounding the probabilities\n", + "\n", + "For other values of $\\theta$, meaning ones that don't take the form $y/2^m$ for an integer $y$, the measurement outcomes won't be certain, but we can prove certain bounds on the probabilities for different outcomes.\n", + "Going forward, let's consider an arbitrary choice of $\\theta$ satisfying $0\\leq \\theta < 1$.\n", + "\n", + "After the quantum Fourier transform is performed, the state of the circuit is this:\n", + "\n", + "$$\n", + "\\vert \\psi \\rangle \\otimes \n", + "\\frac{1}{2^m} \\sum_{y=0}^{2^m - 1} \\sum_{x=0}^{2^m-1} e^{2\\pi i x (\\theta - y/2^m)} \\vert y\\rangle.\n", + "$$\n", + "\n", + "So, when the measurements on the top $m$ qubits are performed, we see each outcome $y$ with probability\n", + "\n", + "$$\n", + "p_y = \n", + "\\left\\vert \n", + "\\frac{1}{2^m} \\sum_{x=0}^{2^m - 1} e^{2\\pi i x (\\theta - y/2^m)} \\right|^2\n", + "$$\n", + "\n", + "To get a better handle on these probabilities, we'll make use of the same formula that we saw before, for the sum of the initial portion of a geometric series.\n", + "\n", + "$$\n", + "1 + \\alpha + \\alpha^2 + \\cdots + \\alpha^{N-1} =\n", + "\\begin{cases}\n", + "\\frac{\\alpha^N - 1}{\\alpha - 1} & \\text{if } \\alpha\\not=1\\\\[2mm]\n", + "N & \\text{if } \\alpha=1\n", + "\\end{cases}\n", + "$$\n", + "\n", + "We can simplify the sum appearing in the formula for $p_y$ by taking $\\alpha = e^{2\\pi i (\\theta - y/2^m)}$.\n", + "Here's what we obtain.\n", + "\n", + "$$\n", + "\\sum_{x=0}^{2^m - 1} e^{2\\pi i x (\\theta - y/2^m)}\n", + "=\n", + "\\begin{cases}\n", + "2^m & \\theta = y/2^m\\\\[2mm]\n", + "\\frac{e^{2\\pi (2^m \\theta - y)} - 1}{e^{2\\pi (\\theta - y/2^m)} - 1}\n", + "& \\theta\\neq y/2^m\n", + "\\end{cases}\n", + "$$\n", + "\n", + "So, in the case that $\\theta = y/2^m$, we find that $p_y = 1$ (as we already knew from considering this special case),\n", + "and in the case that $\\theta \\neq y/2^m$, we find that\n", + "\n", + "$$\n", + "p_y = \\frac{1}{2^{2m}} \\left\\vert \\frac{e^{2\\pi i (2^m \\theta - y)} - 1}{e^{2\\pi i (\\theta - y/2^m)} - 1}\\right\\vert^2.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "c8ce0834", + "metadata": {}, + "source": [ + "We can learn more about these probabilities by thinking about how arc length and chord length on the unit circle are related.\n", + "Here's a figure that illustrates the relationships we need for any real number $\\delta\\in \\bigl[ -\\frac{1}{2},\\frac{1}{2}\\bigr]$." + ] + }, + { + "cell_type": "markdown", + "id": "07b4b461", + "metadata": {}, + "source": [ + "![Illustration of the relationship between arc and chord lengths](images/arc-and-chord.png)\n" + ] + }, + { + "cell_type": "markdown", + "id": "d5cf40a2", + "metadata": {}, + "source": [ + "First, the chord length (drawn in blue) can't possibly be larger than the arc length (drawn in purple):\n", + "\n", + "$$\n", + "\\bigl\\vert e^{2\\pi i \\delta} - 1\\bigr\\vert \\leq 2\\pi\\vert\\delta\\vert.\n", + "$$\n", + "\n", + "Relating these lengths in the other direction, we see that the ratio of the arc length to the chord length is greatest when $\\delta = \\pm 1/2$, and in this case the ratio is half the circumference of the circle divided by the diameter, which is $\\pi/2$.\n", + "Thus, we can write\n", + "\n", + "$$\n", + "4\\vert\\delta\\vert \\leq\n", + "\\bigl\\vert e^{2\\pi i \\delta} - 1\\bigr\\vert.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "d0c45343", + "metadata": {}, + "source": [ + "An analysis based on this relation reveals the following two facts.\n", + "\n", + "1. Suppose that $\\theta$ is a real number and $y\\in \\{0,\\ldots,2^m-1\\}$ satisfies\n", + " \n", + " $$\n", + " \\Bigl\\vert \\theta - \\frac{y}{2^m}\\Bigr\\vert \\leq 2^{-(m+1)}.\n", + " $$\n", + " \n", + " This means that $y/2^m$ is either the best $m$-bit approximation to $\\theta$, or it's one of the two best approximations in case $\\theta$ is exactly halfway between $y/2^m$ and either $(y-1)/2^m$ or $(y+1)/2^m$.\n", + "\n", + " We'll prove that $p_y$ has to be pretty large in this case.\n", + " By the assumption we're considering, it follows that $\\vert 2^m \\theta - y \\vert \\leq 1/2$, so we can use the second observation above relating arc and chord lengths to conclude that\n", + " \n", + " $$\n", + " \\left\\vert e^{2\\pi (2^m \\theta - y)} - 1\\right\\vert \n", + " \\geq 4 \\vert 2^m \\theta - y \\vert = 4 \\cdot 2^m \\cdot \\Bigl\\vert \\theta - \\frac{y}{2^m}\\Bigr\\vert.\n", + " $$\n", + " \n", + " We can also use the first observation about arc and chord lengths to conclude that\n", + " \n", + " $$\n", + " \\left\\vert e^{2\\pi (\\theta - y/2^m)} - 1\\right\\vert \\leq 2\\pi \\Bigl\\vert \\theta - \\frac{y}{2^m}\\Bigr\\vert.\n", + " $$\n", + " \n", + " Putting these two inequalities to use on $p_y$ reveals\n", + " \n", + " $$\n", + " p_y \\geq \\frac{1}{2^{2m}} \\frac{16 \\cdot 2^{2m}}{4 \\pi^2} = \\frac{4}{\\pi^2} \\approx 0.405.\n", + " $$\n", + " \n", + " (So, our observation that the best outcome occurs with probability greater than $40\\%$ in the $m=2$ version of phase estimation discussed earlier in fact holds for every choice of $m$.)" + ] + }, + { + "cell_type": "markdown", + "id": "83e02530", + "metadata": {}, + "source": [ + "2. Now suppose that $y\\in \\{0,\\ldots,2^m-1\\}$ satisfies\n", + "\n", + " $$\n", + " 2^{-m} \\leq \\Bigl\\vert \\theta - \\frac{y}{2^m}\\Bigr\\vert \\leq \\frac{1}{2}.\n", + " $$\n", + "\n", + " This means that there's a better approximation $z/2^m$ to $\\theta$ in between $\\theta$ and $y/2^m$.\n", + " \n", + " This time we'll prove that $p_y$ can't be too big.\n", + " We can start with the simple observation that\n", + " \n", + " $$\n", + " \\left\\vert e^{2\\pi (2^m \\theta - y)} - 1\\right\\vert \\leq 2,\n", + " $$\n", + " \n", + " which follows from the fact that any two points on the unit circle can differ in absolute value by at most $2$.\n", + " \n", + " We can also use the second observation about arc and chord lengths from above, this time working with the denominator of $p_y$ rather than the numerator, to conclude\n", + " \n", + " $$\n", + " \\left\\vert e^{2\\pi (\\theta - y/2^m)} - 1\\right\\vert \\geq 4\\Bigl\\vert \\theta - \\frac{y}{2^m}\\Bigr\\vert\n", + " \\geq 4 \\cdot 2^{-m}.\n", + " $$\n", + " \n", + " Putting the two inequalities together reveals\n", + " \n", + " $$\n", + " p_y \\leq \\frac{1}{2^{2m}} \\frac{4}{16 \\cdot 2^{-2m}} = \\frac{1}{4}.\n", + " $$\n" + ] + }, + { + "cell_type": "markdown", + "id": "fb142a09", + "metadata": {}, + "source": [ + "This is quite good, in the sense that very close approximations to $\\theta$ are likely to occur, with probability greater than $40\\%$, whereas approximations off by more than $2^{-m}$ are less likely, with probability at most $25\\%$.\n", + "\n", + "We may, however, wish to boost our confidence.\n", + "One way to do this is to repeat the phase estimation procedure several times to gather statistical evidence about $\\theta$.\n", + "Notice that the state $\\vert\\psi\\rangle$ of the bottom collection of qubits is unchanged by the phase estimation procedure, so it can be used to run the procedure as many times as we like.\n", + "\n", + "Each time we rum the circuit, we get a best $m$-bit approximation to $\\theta$ with probability greater than $40\\%$, while the probability of being off by more than $2^{-m}$ is bounded by $25\\%$.\n", + "So, if we run the circuit several times and take the most commonly appearing outcome of the runs, it's exceedingly likely that the outcome that appears most commonly will not be one that occurs at most $25\\%$ of the time.\n", + "As a result, we'll be very likely to obtain an approximation $y/2^m$ that's within $1/2^m$ of the value $\\theta$, and indeed the unlikely chance that we're off by more than $1/2^m$ decreases exponentially in the number of times the procedure is run." + ] + }, + { + "cell_type": "markdown", + "id": "1eb0ce8d", + "metadata": {}, + "source": [ + "#### Qiskit implementation\n", + "\n", + "Here's an implementation of phase estimation in Qiskit.\n", + "Try adjusting $\\theta$ and the number of control qubits $m$ to see how the results change." + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "id": "349571e1", + "metadata": {}, + "outputs": [ + { + "data": { + "image/svg+xml": [ + "" + ], + "text/plain": [ + "
" + ] + }, + "execution_count": 8, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "from qiskit import QuantumCircuit, QuantumRegister, ClassicalRegister\n", + "from qiskit.circuit.library import QFT\n", + "\n", + "theta = .7\n", + "m = 3 # Number of control qubits\n", + "\n", + "control_register = QuantumRegister(m, name=\"Control\")\n", + "target_register = QuantumRegister(1, name=\"|ฯˆ>\")\n", + "output_register = ClassicalRegister(m, name=\"Result\")\n", + "qc = QuantumCircuit(control_register, target_register, output_register)\n", + "\n", + "# Prepare the eigenvector |ฯˆ>\n", + "qc.x(target_register)\n", + "qc.barrier()\n", + "\n", + "# Perform phase estimation\n", + "for index, qubit in enumerate(control_register):\n", + " qc.h(qubit)\n", + " for _ in range(2**index):\n", + " qc.cp(2*pi*theta, qubit, target_register)\n", + "qc.barrier()\n", + "\n", + "# Do inverse quantum Fourier transform\n", + "qc.compose(\n", + " QFT(m, inverse=True),\n", + " inplace=True\n", + ")\n", + "\n", + "# Measure everything\n", + "qc.measure(range(m), range(m))\n", + "qc.draw()" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "id": "61f7f268", + "metadata": {}, + "outputs": [ + { + "data": { + "image/svg+xml": [ + "" + ], + "text/plain": [ + "
" + ] + }, + "execution_count": 9, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "result = Sampler().run(qc).result()\n", + "plot_histogram(result.quasi_dists)" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "id": "b614e0fc", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Most probable output: 6\n", + "Estimated theta: 0.75\n" + ] + } + ], + "source": [ + "most_probable = max(result.quasi_dists[0],\n", + " key=result.quasi_dists[0].get)\n", + "\n", + "print(f\"Most probable output: {most_probable}\")\n", + "print(f\"Estimated theta: {most_probable/2**m}\")" + ] + }, + { + "cell_type": "markdown", + "id": "8c3bd3a7", + "metadata": {}, + "source": [ + "## Shor's algorithm" + ] + }, + { + "cell_type": "markdown", + "id": "0074c9ef", + "metadata": {}, + "source": [ + "Now we'll turn our attention to the integer factorization problem, and see how it can be solved efficiently on a quantum computer using phase estimation.\n", + "The algorithm we'll obtain is *Shor's algorithm for integer factorization*.\n", + "Shor didn't describe his algorithm specifically in terms of phase estimation, but it is a natural and intuitive way to explain how it works.\n", + "\n", + "In the two subsections that follow we'll describe the two main parts of Shor's algorithm.\n", + "In the first subsection we'll define an intermediate problem known as the *order-finding problem* and see how phase estimation provides a solution to this problem.\n", + "In the second subsection we'll explain how an efficient solution to the order-finding problem also gives us an efficient solution to the integer factorization problem.\n", + "(When a solution to one problem provides a solution to another problem like this, we say that the second problem *reduces* to the first โ€” so in this case we're reducing integer factorization to order finding.)\n", + "This part of Shor's algorithm doesn't make use of quantum computing at all โ€” it's completely classical." + ] + }, + { + "cell_type": "markdown", + "id": "b3be9237", + "metadata": {}, + "source": [ + "### Order finding\n", + "\n", + "#### Some basic number theory\n", + "\n", + "To explain the order-finding problem and how it can be solved using phase estimation, it will be very helpful to explain a couple of basic concepts in number theory and introduce some handy notation along the way.\n", + "\n", + "To begin, for any given positive integer $N$, we'll define a set\n", + "\n", + "$$\n", + "\\mathbb{Z}_N = \\{0,1,\\ldots,N-1\\}.\n", + "$$\n", + "\n", + "For instance, $\\mathbb{Z}_1 = \\{0\\}$, $\\mathbb{Z}_2 = \\{0,1\\}$, $\\mathbb{Z}_3 = \\{0,1,2\\}$,\n", + "and so on.\n", + "\n", + "These are sets of numbers, but we can think of them as more than sets.\n", + "In particular, we can think about *arithmetic operations* on $\\mathbb{Z}_N$ such as addition and multiplication โ€” and if we agree to always take our answers modulo $N$, we'll always stay within this set when we perform these operations.\n", + "(The two specific operations of addition and multiplication, both taken modulo $N$, turn $\\mathbb{Z}_N$ into a *ring*, which is a fundamentally important type of object in algebra.)\n", + "\n", + "For example, $3$ and $5$ are elements of $\\mathbb{Z}_7$, and if we multiply them together we get $3\\cdot 5 = 15$, which leaves a remainder of $1$ when divided by $7$.\n", + "Sometimes we express this as follows.\n", + "\n", + "$$\n", + "3 \\cdot 5 \\equiv 1 \\; (\\textrm{mod } 7)\n", + "$$\n", + "\n", + "But we can also simply write $3 \\cdot 5 = 1$, provided that it's been made clear that we're working in $\\mathbb{Z}_7$, just to keep our notation as simple and clear as possible.\n", + "\n", + "As an example, here are the addition and multiplication tables for $\\mathbb{Z}_6$.\n", + "\n", + "$$\n", + "\\begin{array}{c|cccccc}\n", + " + & 0 & 1 & 2 & 3 & 4 & 5 \\\\\\hline\n", + " 0 & 0 & 1 & 2 & 3 & 4 & 5 \\\\\n", + " 1 & 1 & 2 & 3 & 4 & 5 & 0 \\\\\n", + " 2 & 2 & 3 & 4 & 5 & 0 & 1 \\\\\n", + " 3 & 4 & 5 & 0 & 1 & 2 & 3 \\\\\n", + " 4 & 5 & 0 & 1 & 2 & 3 & 4 \\\\\n", + " 5 & 0 & 1 & 2 & 3 & 4 & 5 \\\\\n", + "\\end{array}\n", + "\\qquad\n", + "\\begin{array}{c|cccccc}\n", + "\\cdot & 0 & 1 & 2 & 3 & 4 & 5 \\\\\\hline\n", + " 0 & 0 & 0 & 0 & 0 & 0 & 0 \\\\\n", + " 1 & 0 & 1 & 2 & 3 & 4 & 5 \\\\\n", + " 2 & 0 & 2 & 4 & 0 & 2 & 4 \\\\\n", + " 3 & 0 & 3 & 0 & 3 & 0 & 3 \\\\\n", + " 4 & 0 & 4 & 2 & 0 & 4 & 2 \\\\\n", + " 5 & 0 & 5 & 4 & 3 & 2 & 1 \\\\\n", + "\\end{array}\n", + "$$\n", + "\n", + "Among the $N$ elements of $\\mathbb{Z}_N$, the elements $a\\in\\mathbb{Z}_N$ that satisfy $\\gcd(a,N) = 1$ are special.\n", + "Frequently the set containing these elements is denoted with a star like this:\n", + "\n", + "$$\n", + "\\mathbb{Z}_N^{\\ast} = \\{a\\in \\mathbb{Z}_N : \\gcd(a,N) = 1\\}.\n", + "$$\n", + "\n", + "If we focus our attention on the operation of multiplication, the set $\\mathbb{Z}_N^{\\ast}$ forms a *group* โ€” and specifically an *abelian group* โ€” which is another important type of object in algebra.\n", + "It's a basic fact about these sets (and indeed about finite groups in general), that if we pick any element $a\\in\\mathbb{Z}_N^{\\ast}$ and repeatedly multiply $a$ to itself, we'll always eventually get the number $1$.\n", + "\n", + "For a first example, let's take $N=6$.\n", + "We have that $5\\in\\mathbb{Z}_6^{\\ast}$ because $\\gcd(5,6) = 1$, and if we multiply $5$ to itself we get $1$\n", + "(as the table above confirms).\n", + "\n", + "$$\n", + "5^2 = 1 \\quad \\text{(working within $\\mathbb{Z}_6$)}\n", + "$$\n", + "\n", + "As a second example, let's take $N = 21$.\n", + "If we go through the numbers from $0$ to $20$, these are the ones that have GCD equal to $1$ with $21:$\n", + "\n", + "$$\n", + "\\mathbb{Z}_{21}^{\\ast} = \\{1,2,4,5,8,10,11,13,16,17,19,20\\}.\n", + "$$\n", + "\n", + "For each of these elements, it is possible to raise that number to a positive integer power to get $1$.\n", + "Here are the smallest powers for which this works:\n", + "\n", + "$$\n", + "\\begin{aligned}\n", + "1^{1} = 1\\\\\n", + "2^{6} = 1\\\\\n", + "4^{3} = 1\\\\\n", + "5^{6} = 1\\\\\n", + "8^{2} = 1\\\\\n", + "10^{6} = 1\\\\\n", + "11^{6} = 1\\\\\n", + "13^{2} = 1\\\\\n", + "16^{3} = 1\\\\\n", + "17^{6} = 1\\\\\n", + "19^{6} = 1\\\\\n", + "20^{2} = 1\\\\\n", + "\\end{aligned}\n", + "$$\n", + "\n", + "Naturally we're working within $\\mathbb{Z}_{21}$ for all of these equations, which we haven't bothered to write โ€” we take it to be implicit to avoid cluttering things up. We'll continue to do that throughout the rest of the lesson.\n", + "\n", + "You can check each of these equations above, as well as the fact that these are the smallest positive integer powers for which the equations work, using the following code cell (changing the numbers as needed)." + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "id": "64db66b1", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "k \t a^k \n", + "\n", + " 1 \t 17\n", + " 2 \t 16\n", + " 3 \t 20\n", + " 4 \t 4\n", + " 5 \t 5\n", + " 6 \t 1\n", + " 7 \t 17\n", + " 8 \t 16\n", + " 9 \t 20\n", + "10 \t 4\n", + "11 \t 5\n", + "12 \t 1\n" + ] + } + ], + "source": [ + "N = 21\n", + "a = 17\n", + "max_power = 12\n", + "\n", + "print(\"k \\t a^k \\n\")\n", + "for k in range(1,max_power+1):\n", + " print(\"%2d \\t %2d\" %(k, a**k % N)) # The % operation computes the remainder modulo N" + ] + }, + { + "cell_type": "markdown", + "id": "53484e4c", + "metadata": {}, + "source": [ + "Notice that after we get back to $1$, the cycle repeats โ€” which makes sense because multiplying $1$ by $a$ brings us back to $a$, which is where we started.\n", + "\n", + "Although it isn't essential for the sake of the lesson, we can also check that we never get back to $1$ when $\\gcd(a,N)\\neq 1$ โ€” so we're relying on the fact that $a\\in\\mathbb{Z}_N^{\\ast}$ for this to work." + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "id": "4df0ffff", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "k \t a^k \n", + "\n", + " 1 \t 18\n", + " 2 \t 9\n", + " 3 \t 15\n", + " 4 \t 18\n", + " 5 \t 9\n", + " 6 \t 15\n", + " 7 \t 18\n", + " 8 \t 9\n", + " 9 \t 15\n", + "10 \t 18\n", + "11 \t 9\n", + "12 \t 15\n" + ] + } + ], + "source": [ + "N = 21\n", + "a = 18\n", + "max_power = 12\n", + "\n", + "print(\"k \\t a^k \\n\")\n", + "for k in range(1,max_power+1):\n", + " print(\"%2d \\t %2d\" %(k, a**k % N))\n", + " " + ] + }, + { + "cell_type": "markdown", + "id": "db405808", + "metadata": {}, + "source": [ + "
\n", + "\n", + "#### Problem statement\n", + "\n", + "Now we can state the order-finding problem.\n", + "\n", + "\n", + "\n", + "**Order finding**\n", + "\n", + "Input: positive integers $N$ and $a$ satisfying $\\gcd(N, a) = 1$\n", + "\n", + "Output: the smallest positive integer $r$ such that $a^r \\equiv 1 \\pmod N$\n", + "\n", + "\n", + "\n", + "Alternatively, in terms of the notation we just introduced above, we're given $a \\in \\mathbb{Z}_N^{\\ast}$, and we're looking for the smallest positive integer $r$ such that $a^r = 1$.\n", + "This number $r$ is called the *order* of $a$ modulo $N$." + ] + }, + { + "cell_type": "markdown", + "id": "a12335d6", + "metadata": {}, + "source": [ + "#### Multiplication by an element in $\\mathbb{Z}_N^{\\ast}$\n", + "\n", + "To connect the order-finding problem to phase estimation, let's think about the operation defined on a system whose classical states correspond to $\\mathbb{Z}_N$, where we multiply by a fixed element $a\\in\\mathbb{Z}_N^{\\ast}$.\n", + "\n", + "$$\n", + "M_a \\vert x\\rangle = \\vert ax \\rangle \\qquad \\text{(for each $x\\in\\mathbb{Z}_N$)}\n", + "$$\n", + "\n", + "To be clear, we're doing the multiplication in $\\mathbb{Z}_N$, so it's implicit that we're taking the remainder modulo $N$ inside of the ket on the right-hand side of the equation.\n", + "\n", + "For example, if $N = 15$ and $a=2$, we have\n", + "\n", + "$$\n", + "\\begin{aligned}\n", + "M_{2} \\vert 0 \\rangle & = \\vert 0\\rangle \\\\[1mm]\n", + "M_{2} \\vert 1 \\rangle & = \\vert 2\\rangle \\\\[1mm]\n", + "M_{2} \\vert 2 \\rangle & = \\vert 4\\rangle \\\\[1mm]\n", + "M_{2} \\vert 3 \\rangle & = \\vert 6\\rangle \\\\[1mm]\n", + "M_{2} \\vert 4 \\rangle & = \\vert 8\\rangle \\\\[1mm]\n", + "M_{2} \\vert 5 \\rangle & = \\vert 10\\rangle \\\\[1mm]\n", + "M_{2} \\vert 6 \\rangle & = \\vert 12\\rangle \\\\[1mm]\n", + "M_{2} \\vert 7 \\rangle & = \\vert 14\\rangle \\\\[1mm]\n", + "M_{2} \\vert 8 \\rangle & = \\vert 1\\rangle \\\\[1mm]\n", + "M_{2} \\vert 9 \\rangle & = \\vert 3\\rangle \\\\[1mm]\n", + "M_{2} \\vert 10 \\rangle & = \\vert 5\\rangle \\\\[1mm]\n", + "M_{2} \\vert 11 \\rangle & = \\vert 7\\rangle \\\\[1mm]\n", + "M_{2} \\vert 12 \\rangle & = \\vert 9\\rangle \\\\[1mm]\n", + "M_{2} \\vert 13 \\rangle & = \\vert 11\\rangle \\\\[1mm]\n", + "M_{2} \\vert 14 \\rangle & = \\vert 13\\rangle\n", + "\\end{aligned}\n", + "$$\n", + "\n", + "So long as $\\gcd(a,N)=1$, this is a unitary operation.\n", + "It shuffles the elements of the standard basis\n", + "$\\{\\vert 0\\rangle,\\ldots,\\vert N-1\\rangle\\}$, so as a matrix it's a *permutation matrix*.\n", + "It's evident from its definition that this operation is deterministic, and a simple way to see that it's invertible is to think about the order $r$ of $a$ modulo $N$, and to recognize that the inverse of $M_a$ is $M_a^{r-1}$.\n", + "\n", + "$$\n", + "M_a^{r-1} M_a = M_a^r = M_{a^r} = M_1 = I\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "bf37dea7", + "metadata": {}, + "source": [ + "There's another way to think about the inverse that doesn't require any knowledge of $r$ โ€” which, after all, is what we're trying to compute.\n", + "For every element $a\\in\\mathbb{Z}_N^{\\ast}$ there's always a unique element $b\\in\\mathbb{Z}_N^{\\ast}$ that satisfies $ab=1$. \n", + "We denote this element $b$ by $a^{-1}$, and it can be computed efficiently.\n", + "(An extension of Euclid's GCD algorithm does it at cost quadratic in $\\operatorname{lg}(N)$.)\n", + "And thus\n", + "\n", + "$$\n", + "M_{a^{-1}} M_a = M_{a^{-1}a} = M_1 = I.\n", + "$$\n", + "\n", + "So, the operation $M_a$ is both deterministic and invertible.\n", + "That implies that it's described by a permutation matrix, and it's therefore unitary." + ] + }, + { + "cell_type": "markdown", + "id": "6fcc4a86", + "metadata": {}, + "source": [ + "#### Eigenvectors and eigenvalues of multiplication operations\n", + "\n", + "Now let's think about the eigenvectors and eigenvalues of the operation $M_a$, assuming that $a\\in\\mathbb{Z}_N^{\\ast}$. \n", + "As was just argued, this assumption tells us that $M_a$ is unitary.\n", + "\n", + "There are $N$ eigenvalues of $M_a$, possibly including the same eigenvalue repeated multiple times, and in general there's some freedom in selecting corresponding eigenvectors โ€” but we won't need to worry about all of the possibilities.\n", + "Let's start simple and identify just one eigenvector of $M_a$.\n", + "\n", + "$$\n", + "\\vert \\psi_0 \\rangle = \\frac{\\vert 1 \\rangle + \\vert a \\rangle + \\cdots + \\vert a^{r-1} \\rangle}{\\sqrt{r}}\n", + "$$\n", + "\n", + "The number $r$ is the order of $a$ modulo $N$ โ€” here and throughout the remainder of the lesson.\n", + "The eigenvalue associated with this eigenvector is $1$ because it isn't changed when we multiply by $a$.\n", + "\n", + "$$\n", + "M_a \\vert \\psi_0 \\rangle \n", + "= \\frac{\\vert a \\rangle + \\cdots + \\vert a^{r-1} \\rangle + \\vert a^r \\rangle}{\\sqrt{r}}\n", + "= \\frac{\\vert a \\rangle + \\cdots + \\vert a^{r-1} \\rangle + \\vert 1 \\rangle}{\\sqrt{r}}\n", + "= \\vert \\psi_0 \\rangle\n", + "$$\n", + "\n", + "This happens because $a^r = 1$, so each standard basis state $\\vert a^k \\rangle$ gets shifted to $\\vert a^{k+1} \\rangle$ for $k\\leq r-1$, and $\\vert a^{r-1} \\rangle$ gets shifted back to $\\vert 1\\rangle$.\n", + "Informally speaking, it's like we're slowly stirring $\\vert \\psi_0 \\rangle$, but it's already completely stirred so nothing changes.\n", + "\n", + "Here's another example of an eigenvector of $M_a$.\n", + "This one happens to be more interesting in the context of order finding and phase estimation.\n", + "\n", + "$$\n", + "\\vert \\psi_1 \\rangle = \\frac{\\vert 1 \\rangle + \\omega_r^{-1} \\vert a \\rangle + \\cdots + \\omega_r^{r-1}\\vert a^{r-1} \\rangle}{\\sqrt{r}}\n", + "$$\n", + "\n", + "Alternatively, we can write this vector using a summation as follows.\n", + "\n", + "$$\n", + "\\vert \\psi_1 \\rangle = \\frac{1}{\\sqrt{r}}\n", + "\\sum_{k = 0}^{r-1} \\omega_r^{-k} \\vert a^k \\rangle \n", + "$$\n", + "\n", + "Here we see the complex number $\\omega_r = e^{2\\pi i/r}$ showing up naturally, due to the underlying structure of multiplication by $a$ modulo $N$.\n", + "This time the corresponding eigenvalue is $\\omega_r$.\n", + "To see this, we can first compute like this:\n", + "\n", + "$$\n", + "M_a \\vert \\psi_1 \\rangle \n", + "= \\sum_{k = 0}^{r-1} \\omega_r^{-k} M_a\\vert a^k \\rangle \n", + "= \\sum_{k = 0}^{r-1} \\omega_r^{-k} \\vert a^{k+1} \\rangle \n", + "= \\sum_{k = 1}^{r} \\omega_r^{-(k - 1)} \\vert a^{k} \\rangle \n", + "= \\omega_r \\sum_{k = 1}^{r} \\omega_r^{-k} \\vert a^{k} \\rangle.\n", + "$$\n", + "\n", + "Then, because $\\omega_r^{-r} = 1 = \\omega_r^0$ and $\\vert a^r \\rangle = \\vert 1\\rangle = \\vert a^0\\rangle$, we see that\n", + "\n", + "$$\n", + "\\sum_{k = 1}^{r} \\omega_r^{-k} \\vert a^{k} \\rangle = \\sum_{k = 0}^{r-1} \\omega_r^{-k} \\vert a^k \\rangle\n", + "= \\vert\\psi_1\\rangle,\n", + "$$\n", + "\n", + "so $M_a \\vert\\psi_1\\rangle = \\omega_r \\vert\\psi_1\\rangle$.\n", + "\n", + "Using the same reasoning, we can identify additional eigenvector/eigenvalue pairs for $M_a$.\n", + "Indeed, for any choice of $j\\in\\{0,\\ldots,r-1\\}$ we have that\n", + "\n", + "$$\n", + "\\vert \\psi_j \\rangle = \\frac{1}{\\sqrt{r}}\n", + "\\sum_{k = 0}^{r-1} \\omega_r^{-jk} \\vert a^k \\rangle \n", + "$$\n", + "\n", + "is an eigenvector of $M_a$ whose corresponding eigenvalue is $\\omega_r^j$.\n", + "\n", + "$$\n", + "M_a \\vert \\psi_j \\rangle = \\omega_r^j \\vert \\psi_j \\rangle\n", + "$$\n", + "\n", + "There are other eigenvectors, such as $\\vert 0 \\rangle$, which has eigenvalue $1$, but we'll only be concerned with the eigenvectors $\\vert\\psi_0\\rangle,\\ldots,\\vert\\psi_{r-1}\\rangle$ that we've just identified." + ] + }, + { + "cell_type": "markdown", + "id": "3534900a", + "metadata": {}, + "source": [ + "#### Applying phase estimation\n", + "\n", + "To solve the order-finding problem for a given choice of $a\\in\\mathbb{Z}_N^{\\ast}$, we can apply the phase-estimation procedure to the operation $M_a$.\n", + "\n", + "To do this, we need to implement not only $M_a$ efficiently with a quantum circuit, but also $M_a^2$, $M_a^4$, $M_a^8$, and so on, going as far as needed to obtain a precise enough estimate from the phase estimation procedure.\n", + "Here we'll explain how this can be done, and we'll figure out exactly how much precision is needed a bit later.\n", + "\n", + "Let's start with the operation $M_a$ by itself.\n", + "Naturally, because we're working with the quantum circuit model, we'll use binary notation to encode the numbers between $0$ and $N-1$.\n", + "The largest number we need to encode is $N-1$, so the number of bits we need is\n", + "\n", + "$$\n", + "n = \\operatorname{lg}(N-1) = \\lfloor \\log(N-1) \\rfloor + 1.\n", + "$$\n", + "\n", + "For example, if $N = 21$ we have $n = \\operatorname{lg}(N-1) = 5$.\n", + "Here's what the encoding of elements of $\\mathbb{Z}_{20}$ as binary strings of length $5$ looks like.\n", + "\n", + "$$\n", + "\\begin{gathered}\n", + "0 \\mapsto 00000\\\\[1mm]\n", + "1 \\mapsto 00001\\\\[1mm]\n", + "\\vdots\\\\[1mm]\n", + "20 \\mapsto 10100\n", + "\\end{gathered}\n", + "$$\n", + "\n", + "And now, here's a precise definition of how $M_a$ is defined as an $n$-qubit operation.\n", + "\n", + "$$\n", + "M_a \\vert x\\rangle = \n", + "\\begin{cases}\n", + "\\vert ax \\; (\\textrm{mod}\\;N)\\rangle & 0\\leq x < N\\\\[1mm]\n", + "\\vert x\\rangle & N\\leq x < 2^n\n", + "\\end{cases}\n", + "$$\n", + "\n", + "The point is that although we only care about how $M_a$ works for $\\vert 0\\rangle,\\ldots,\\vert N-1\\rangle$, we do have to specify how it works for the remaining $2^n - N$ standard basis states โ€” and we need to do this in a way that still gives us a unitary operation.\n", + "Defining $M_a$ so that it does nothing to the remaining standard basis states accomplishes this.\n", + "\n", + "Using the algorithms for integer multiplication and division discussed in the previous lesson, together with the methodology for reversible, garbage-free implementations of them, we can build a quantum circuit that performs $M_a$, for any choice of $a\\in\\mathbb{Z}_N^{\\ast}$, at cost $O(n^2)$.\n", + "Here's one way that this can be done.\n", + "\n", + "1. We build a circuit for performing the operation\n", + "\n", + " $$\n", + " \\vert x \\rangle \\vert y \\rangle \\mapsto \\vert x \\rangle \\vert y \\oplus f_a(x)\\rangle\n", + " $$\n", + "\n", + " where\n", + "\n", + " $$\n", + " f_a(x) = \n", + " \\begin{cases}\n", + " ax \\; (\\textrm{mod}\\;N) & 0\\leq x < N\\\\[1mm]\n", + " x & N\\leq x < 2^n\n", + " \\end{cases}\n", + " $$\n", + "\n", + " using the method described in the previous lesson.\n", + " This gives us a circuit of size $O(n^2)$.\n", + "\n", + "2. We swap the two $n$-qubit systems using $n$ swap gates to swap the qubits individually.\n", + "\n", + "3. Along similar lines to the first step, we can build a circuit for the operation\n", + "\n", + " $$\n", + " \\vert x \\rangle \\vert y \\rangle \\mapsto \\vert x \\rangle \\bigl\\vert y \\oplus f_{a^{-1}}(x)\\bigr\\rangle\n", + " $$\n", + "\n", + " where $a^{-1}$ is the inverse of $a$ in $\\mathbb{Z}_N^{\\ast}$.\n", + "\n", + "By initializing the bottom $n$ qubits and composing the three steps, we obtain this transformation:\n", + "\n", + "$$\n", + "\\vert x \\rangle \\vert 0^n \\rangle \n", + "\\stackrel{\\text{step 1}}{\\mapsto} \n", + "\\vert x \\rangle \\vert f_a(x)\\rangle\n", + "\\stackrel{\\text{step 2}}{\\mapsto}\n", + "\\vert f_a(x)\\rangle \\vert x \\rangle\n", + "\\stackrel{\\text{step 3}}{\\mapsto}\n", + "\\vert f_a(x)\\rangle \\bigl\\vert x \\oplus f_{a^{-1}}(f_a(x)) \\bigr\\rangle\n", + "= \\vert f_a(x)\\rangle\\vert 0^n \\rangle \n", + "$$\n", + "\n", + "The total cost of the circuit we obtain is $O(n^2)$.\n", + "\n", + "To perform $M_a^2$, $M_a^4$, $M_a^8$, and so on, we can use exactly the same method, except that we replace $a$ with $a^2$, $a^4$, $a^8$, and so on, as elements of $\\mathbb{Z}_N^{\\ast}$.\n", + "That is, for any power $k$ we choose, we can create a circuit for $M_a^k$ not by iterating $k$ times the circuit for $M_a$, but instead by computing $b = a^k \\in \\mathbb{Z}_N^{\\ast}$ and then using the circuit for $M_b$.\n", + "\n", + "The computation of powers $a^k \\in \\mathbb{Z}_N$ is the *modular exponentiation* problem mentioned in the previous lesson.\n", + "This computation can be done *classically*, using the algorithm for modular exponentiation mentioned in the previous lesson (often called the *power algorithm* in computational number theory).\n", + "This time we don't need to implement this algorithm reversibly with a quantum circuit, we just need to do it classically.\n", + "\n", + "And we're fortunate that this is possible.\n", + "We're effectively offloading the problem of iterating $M_a$ a huge number of times, which can be exponential in the number $m$ we choose in phase estimation, to an efficient classical computation.\n", + "In terms of the quantum circuit we're running, the cost of $M_a$ iterated $k$ times is simply the cost of $M_b$, for $b = a^k$ โ€” and so the cost is $O(n^2)$.\n", + "\n", + "For an arbitrary choice of a quantum circuit in the phase estimation problem this won't be possible, resulting in a cost for phase estimation that's *exponential* in the number $m$ we use in phase estimation. \n", + "By the power of computational number theory, the cost in the case at hand is *linear* in $m$." + ] + }, + { + "cell_type": "markdown", + "id": "c804ee0d", + "metadata": {}, + "source": [ + "#### A convenient eigenvector/eigenvalue pair\n", + "\n", + "To understand how we can solve the order-finding problem using phase estimation, let's start by supposing that\n", + "we run the phase estimation procedure on the operation $M_a$ using the eigenvector $\\vert\\psi_1\\rangle$.\n", + "Getting our hands on this eigenvector isn't easy, as it turns out, so this won't be the end of the story โ€” but it's helpful to start here.\n", + "\n", + "The eigenvalue of $M_a$ corresponding to the eigenvector $\\vert \\psi_1\\rangle$ is\n", + "\n", + "$$\n", + "\\omega_r = e^{2\\pi i \\frac{1}{r}}.\n", + "$$\n", + "\n", + "That is, $\\omega_r = e^{2\\pi i \\theta}$ for $\\theta = 1/r$.\n", + "So, if we run the phase estimation procedure on $M_a$ using the eigenvector $\\vert\\psi_1\\rangle$, we'll get an approximation to $1/r$.\n", + "By computing the reciprocal we'll be able to learn $r$ โ€” provided that our approximation is good enough.\n", + "\n", + "To be more precise, when we run the phase-estimation procedure using $m$ control qubits, what we obtain is a number\n", + "$y\\in\\{0,\\ldots,2^m-1\\}$, and we take $y/2^m$ as a guess for $\\theta$, which is $1/r$ in the case at hand.\n", + "To figure out what $r$ is from this approximation, the natural thing to do is to compute the reciprocal of our approximation and round to the nearest integer.\n", + "\n", + "$$\n", + "\\left\\lfloor \\frac{2^m}{y} + \\frac{1}{2} \\right\\rfloor\n", + "$$\n", + "\n", + "For example, let's suppose $r = 6$ and we perform phase estimation on $M_a$ with the eigenvector $\\vert\\psi_1\\rangle$ using $m = 5$ control bits.\n", + "The best $5$-bit approximation to $1/r = 1/6$ is $5/32$, and we have a pretty good chance (about $68\\%$ in this case) to obtain the outcome $y=5$ from phase estimation.\n", + "We have\n", + "\n", + "$$\n", + "\\frac{2^m}{y} = \\frac{32}{5} = 6.4\n", + "$$\n", + "\n", + "and rounding to the nearest integer gives $6$, which is the correct answer.\n", + "\n", + "On the other hand, if we don't use enough precision we may not get the right answer.\n", + "For instance, if we take $m = 4$ control qubits in phase estimation, we might obtain the best $4$-bit approximation to $1/r = 1/6$, which is $3/16$.\n", + "Taking the reciprocal yields\n", + "\n", + "$$\n", + "\\frac{2^m}{y} = \\frac{16}{3} = 5.333 \\cdots\n", + "$$\n", + "\n", + "and rounding to the nearest integer gives an incorrect answer of $5$.\n", + "\n", + "How much precision do we need to get the right answer?\n", + "We know that the order $r$ is an integer, and intuitively speaking what we need is enough precision to distinguish $1/r$ from nearby possibilities, including $1/(r+1)$ and $1/(r-1)$.\n", + "The closest number to $1/r$ that we need to be concerned with is $1/(r+1)$, and the distance between these two numbers is\n", + "\n", + "$$\n", + "\\frac{1}{r} - \\frac{1}{r+1} = \\frac{1}{r(r+1)}.\n", + "$$\n", + "\n", + "So, if we want to make sure that we don't mistake $1/r$ for $1/(r+1)$, it suffices to use enough precision to guarantee that a best approximation $y/2^m$ to $1/r$ is closer to $1/r$ than it is to $1/(r+1)$.\n", + "If we use enough precision so that\n", + "\n", + "$$\n", + "\\left\\vert\n", + "\\frac{y}{2^m} - \\frac{1}{r}\n", + "\\right\\vert\n", + "< \\frac{1}{2 r (r+1)},\n", + "$$\n", + "\n", + "so that the error is less than half of the distance between $1/r$ and $1/(r+1)$, then $y/2^m$ will be closer to $1/r$ than to any other possibility, including $1/(r+1)$ and $1/(r-1)$.\n", + "\n", + "We can double-check this as follows.\n", + "Suppose that \n", + "\n", + "$$\n", + "\\frac{y}{2^m} = \\frac{1}{r} + \\varepsilon\n", + "$$\n", + "\n", + "for $\\varepsilon$ satisfying\n", + "\n", + "$$\n", + "\\vert\\varepsilon\\vert < \\frac{1}{2 r (r+1)}.\n", + "$$\n", + "\n", + "When we take the reciprocal we obtain\n", + "\n", + "$$\n", + "\\frac{2^m}{y} = \\frac{1}{\\frac{1}{r} + \\varepsilon} = \\frac{r}{1+\\varepsilon r} = r - \\frac{\\varepsilon r^2}{1+\\varepsilon r}.\n", + "$$\n", + "\n", + "By maximizing in the numerator and minimizing in the denominator, we can bound how far away we are from $r$ as follows.\n", + "\n", + "$$\n", + "\\left\\vert\n", + "\\frac{\\varepsilon r^2}{1+\\varepsilon r}\n", + "\\right\\vert\n", + "\\leq \\frac{ \\frac{r^2}{2 r(r+1)}}{1 - \\frac{r}{2r(r+1)}}\n", + "%= \\frac{r^2}{2 r (r+1) - r}\n", + "= \\frac{r}{2 r + 1}\n", + "< \\frac{1}{2}\n", + "$$\n", + "\n", + "We're less than $1/2$ away from $r$, so as expected we'll get $r$ when we round.\n", + "\n", + "Unfortunately, because we don't yet know what $r$ is, we can't use it to tell us how much accuracy we need.\n", + "What we can do instead is to use the fact that $r$ must be smaller than $N$ to ensure that we use enough precision.\n", + "In particular, if we use enough accuracy to guarantee that the best approximation $y/2^m$ to $1/r$ satisfies\n", + "\n", + "$$\n", + "\\left\\vert \\frac{y}{2^m} - \\frac{1}{r} \\right\\vert \\leq \\frac{1}{2N^2},\n", + "$$\n", + "\n", + "then we'll have enough precision to correctly determine $r$ when we take the reciprocal.\n", + "Taking $m = 2\\operatorname{lg}(N)+1$ ensures that we have a high chance to obtain an estimation with this precision using the method described previously.\n", + "(Taking $m = 2\\operatorname{lg}(N)$ is good enough if we're comfortable with a lower-bound of 40% on the probability of success.)" + ] + }, + { + "cell_type": "markdown", + "id": "8f67a3de", + "metadata": {}, + "source": [ + "#### Other eigenvector/eigenvalue pairs\n", + "\n", + "As we just saw, if we had the eigenvector $\\vert \\psi_1 \\rangle$ of $M_a$, we would be able to learn $r$ through phase estimation, so long as we use enough control qubits to get sufficient precision to do this.\n", + "Unfortunately it's not easy to get our hands on the eigenvector $\\vert\\psi_1\\rangle$, so we need to figure out how to proceed.\n", + "\n", + "Let's suppose we proceed just like we did above, except with the eigenvector $\\vert\\psi_k\\rangle$ in place of $\\vert\\psi_1\\rangle$, for any choice of $k\\in\\{0,\\ldots,r-1\\}$ that we choose to think about.\n", + "The result we get from the phase estimation procedure will be an approximation\n", + "\n", + "$$\n", + "\\frac{y}{2^m} \\approx \\frac{k}{r}.\n", + "$$\n", + "\n", + "Working under the assumption that we don't know either $k$ or $r$, this might or might not allow us to identify $r$.\n", + "For example, if $k = 0$ we'll get an approximation $y/2^m$ to $0$, which unfortunately tells us nothing.\n", + "This, however, is an unusual case; for other values of $k$, we'll at least be able to learn something about $r$.\n", + "\n", + "We can use an algorithm known as the *continued fraction algorithm* to turn our approximation $y/2^m$ into nearby fractions โ€” including $k/r$ if the approximation is good enough.\n", + "We won't explain the continued fraction algorithm here.\n", + "Instead, here's a statement of a known fact about this algorithm.\n", + "\n", + "\n", + "\n", + "\n", + "**Fact**\n", + "\n", + "Given an integer $N\\geq 2$ and a real number $\\alpha\\in(0,1)$, there is at most choice of integers $u,v\\in\\{0,\\ldots,N-1\\}$ with $v\\neq 0$ and $\\gcd(u,v)=1$ satisfying $\\vert \\alpha - u/v\\vert < \\frac{1}{2N^2}$.\n", + "\n", + "Given $\\alpha$ and $N$, the *continued fraction algorithm* finds $u$ and $v$ (or reports that they don't exist). \n", + "\n", + "This algorithm can be implemented as a Boolean circuit having size $O((\\operatorname{lg}(N))^3)$.\n", + "\n", + "\n", + "\n", + "If we have a very close approximation $y/2^m$ to $r/k$, and we run the continued fraction algorithm for $N$ and $\\alpha = y/2^m$, we'll get $u$ and $v$, as they're described in the fact.\n", + "A careful reading of the fact allows us to conclude that\n", + "\n", + "$$\n", + "\\frac{u}{v} = \\frac{k}{r}.\n", + "$$\n", + "\n", + "So we don't necessarily learn $k$ and $r$, we only learn $k/r$ in lowest terms.\n", + "\n", + "For example, and as we've already noticed, we're not going to learn anything from $k=0$.\n", + "But that's the only value of $k$ where that happens.\n", + "When $k$ is nonzero, it might have common factors with $r$ โ€” but the number $v$ we obtain from the continued fraction algorithm must divide $r$.\n", + "\n", + "It's far from obvious, but it is a known fact that if we have the ability to learn $u$ and $v$ for $u/v = k/r$ for $k\\in\\{0,\\ldots,r-1\\}$ chosen *uniformly at random*, then we're very likely to recover $r$ after just a few samples.\n", + "In particular, if our guess for $r$ is the *least common multiple* of all the values for $v$ that we observe, we'll be right with high probability.\n", + "Some values of $k$ aren't good because they share common factors with $r$, and those common factors are hidden to us when we learn $u$ and $v$.\n", + "But *random* choices of $k$ aren't likely to hide factors of $r$ for long, and the probability that we don't guess $r$ correctly drops exponentially in the number of samples." + ] + }, + { + "cell_type": "markdown", + "id": "697531be", + "metadata": {}, + "source": [ + "#### Proceeding without an eigenvector\n", + "\n", + "So far we haven't addressed the issue of how we get our hands on an eigenvector $\\vert\\psi_k\\rangle$ of $M_a$ to run the phase estimation procedure on.\n", + "As it turns out, we don't need to create them.\n", + "What we will do instead is to run the phase estimation procedure on the state $\\vert 1\\rangle$, by which we mean the $n$-bit binary encoding of the number $1$, in place of an eigenvector $\\vert\\psi\\rangle$ of $M_a$.\n", + "\n", + "So far, we've talked about running the phase estimation procedure on a particular eigenvector, but nothing prevents us from running the procedure on an input state that isn't an eigenvector of $M_a$, and that's what we're doing here with the state $\\vert 1\\rangle$.\n", + "(This isn't an eigenvector of $M_a$ for $a\\in\\mathbb{Z}_N^{\\ast}$ unless $a=1$, which is a choice for $a$ that we'll avoid.)\n", + "\n", + "The following equation helps to explain why we choose the state $\\vert 1\\rangle$ in place of an eigenvector.\n", + "\n", + "$$\n", + "\\vert 1\\rangle = \\frac{1}{\\sqrt{r}} \\sum_{k = 0}^{r-1} \\vert \\psi_k\\rangle\n", + "$$\n", + "\n", + "This can be verified by taking the inner product of the right-hand side with standard basis states and using formulas mentioned previously.\n", + "\n", + "In greater detail, let's imagine that we run the phase estimation procedure with the state $\\vert 1\\rangle$ in place of one of the eigenvectors $\\vert\\psi_k\\rangle$.\n", + "After the quantum Fourier transform is performed, this leaves us with the state\n", + "\n", + "$$\n", + "\\frac{1}{\\sqrt{r}} \\sum_{k = 0}^{r-1} \\vert \\psi_k\\rangle \\vert \\gamma_k\\rangle,\n", + "$$\n", + "\n", + "where\n", + "\n", + "$$\n", + "\\vert\\gamma_k\\rangle = \n", + "\\frac{1}{2^m} \\sum_{y=0}^{2^m - 1} \\sum_{x=0}^{2^m-1} e^{2\\pi i x (k/r - y/2^m)} \\vert y\\rangle\n", + "$$\n", + "\n", + "represents the state of the top $m$ qubits after the inverse of the quantum Fourier transform is performed.\n", + "When the top $m$ qubits are measured, we therefore obtain an approximation $y/2^m$ to the value $k/r$ where $k\\in\\{0,\\ldots,r-1\\}$ is chosen uniformly at random.\n", + "\n", + "As we've already discussed, this allows us to learn $r$ with a high degree of confidence after several independent runs, which was our goal." + ] + }, + { + "cell_type": "markdown", + "id": "342f425e", + "metadata": {}, + "source": [ + "#### Total cost\n", + "\n", + "The cost to implement each controlled-unitary $M_a^k$ is $O(n^2)$.\n", + "There are $m$ controlled-unitary operations, so the total cost for the controlled-unitary operations is $O(n^3)$.\n", + "In addition, we have $m$ Hadamard gates (which contribute $O(n)$ to the cost), and the quantum Fourier transform contributes $O(n^2)$ to the cost.\n", + "Thus, the cost of the controlled-unitary operations dominates the cost of the entire procedure โ€” which is therefore $O(n^3)$.\n", + "\n", + "In addition to the quantum circuit itself, there are a few classical computations that need to be performed along the way.\n", + "This includes computing the powers $a^k$ in $\\mathbb{Z}_N$ for $k = 2, 4, 8, \\ldots, 2^{m-1}$, which are needed to create the controlled-unitary gates, as well as the continued fraction algorithm that converts approximations of $\\theta$ into fractions.\n", + "In both cases, these computations can be performed by Boolean circuits having cost $O(n^3)$.\n", + "\n", + "As is typical, all of these bounds can be improved using asymptotically fast algorithms; these bounds assume we're using standard algorithms for basic arithmetic operations." + ] + }, + { + "cell_type": "markdown", + "id": "5259f80f", + "metadata": {}, + "source": [ + "### Factoring by order-finding\n", + "\n", + "The very last thing we need to discuss is how solving the order-finding problem helps us to factor.\n", + "This part is completely classical โ€” it has nothing specifically to do with quantum computing.\n", + "\n", + "Here's the basic idea.\n", + "We want to factorize the number $N$, and we can do this *recursively*.\n", + "Specifically, we can focus on the task of *splitting* $N$, which means finding any two integers $b,c\\geq 2$ for which $N = bc$. \n", + "This isn't possible if $N$ is a prime number, but we can efficiently test to see if $N$ is prime using a primality testing algorithm first, and if $N$ isn't prime we'll try to split it.\n", + "Once we split $N$, we can simply recurse on $b$ and $c$ until all of our factors are prime and we obtain the prime factorization of $N$.\n", + "\n", + "Splitting even integers is easy: we just output $2$ and $N/2$.\n", + "\n", + "It's also easy to split perfect powers, meaning numbers of the form $N = s^j$ for integers $s,j\\geq 2$, just by \n", + "approximating the roots $N^{1/2}$, $N^{1/3}$, $N^{1/4}$, etc., and checking nearby integers as suspects for $s$.\n", + "We don't need to go further than $\\log(N)$ steps into this sequence, because at that point the root drops below $2$ and won't reveal additional candidates.\n", + "\n", + "It's good that we can do both of these things because order-finding won't help us for even numbers or for *prime* powers, where the number $s$ happens to be prime.\n", + "\n", + "If $N$ is odd and not a prime power, order-finding allows us to split $N$.\n", + "\n", + "\n", + "\n", + "Input an odd, composite integer N that is not a prime power.\n", + "\n", + "Iterate the following steps:\n", + "\n", + "1. Randomly choose $a\\in\\{2,\\ldots,N-1\\}$. \n", + "2. Compute $d=\\gcd(a,N)$.\n", + "3. If $d > 1$ then output $b = d$ and $c = N/d$ and stop. Otherwise continue to the next step knowing that $a\\in\\mathbb{Z}_N^{\\ast}$.\n", + "4. Let $r$ be the order of $a$ modulo $N$. (Here's where we need order-finding.) \n", + "5. If $r$ is even: \\\n", + " 5.1 Compute $x = a^{r/2} - 1$ (modulo $N$) \\\n", + " 5.2 Compute $d = \\gcd(x,N)$. \\\n", + " 5.3 If $d>1$ then output $b=d$ and $c = N/d$ and stop.\n", + "6. If this point is reached, the iteration has failed to find a factor of $N$.\n", + "\n", + "\n", + "\n", + "An iteration of this algorithm may fail to find a factor of $N$.\n", + "Specifically, this happens in two situations:\n", + "- The order of $a$ modulo $N$ is odd.\n", + "- The order of $a$ modulo $N$ is even and $\\gcd\\bigl(a^{r/2} - 1, N\\bigr) = 1$.\n", + "\n", + "Using basic number theory it can be proved that, for a random choice of $a$, with probability at least $1/2$ neither of these events happens.\n", + "In fact, the probability is at most $2^{-(m-1)}$ for $m$ being the number of distinct prime factors of $N$.\n", + "This is why the assumption that $N$ is not a prime power is important.\n", + "The assumption that $N$ is odd is also required for this to be true, which is why the (easy) case that $N$ is even has to be handled separately.\n", + "\n", + "So, if we repeat the process $t$ times, randomly choosing $a$ each time, we'll succeed in splitting $N$ with probability at least $1 - 2^{-t}$.\n", + "\n", + "We won't go through this analysis in detail, but here's the basic idea.\n", + "If we have a choice of $a$ for which the order $r$ of $a$ modulo $N$ is even, then it makes sense to consider the\n", + "numbers\n", + "\n", + "$$\n", + "a^{r/2} - 1\\; (\\textrm{mod}\\; N) \\quad \\text{and} \\quad a^{r/2} + 1\\; (\\textrm{mod}\\; N).\n", + "$$\n", + "\n", + "Using the formula $Z^2 - 1 = (Z+1)(Z-1)$, we conclude that\n", + "\n", + "$$\n", + "\\bigl(a^{r/2} - 1\\bigr) \\bigl(a^{r/2} + 1\\bigr) = a^r - 1.\n", + "$$\n", + "\n", + "We know that $a^r \\; (\\textrm{mod}\\; N) = 1$ by the definition of the order, which is another way of saying that\n", + "$N$ evenly divides $a^r - 1$.\n", + "So, $N$ evenly divides the number\n", + "\n", + "$$\n", + "\\bigl(a^{r/2} - 1\\bigr) \\bigl(a^{r/2} + 1\\bigr),\n", + "$$\n", + "\n", + "which means that every prime factor of $N$ must divide either $a^{r/2} - 1$ or $a^{r/2} + 1$ (or both).\n", + "For a randomly selected $a$, we're likely to have prime factors of $N$ dividing both terms, which allows us to split $N$ by computing the GCD." + ] + }, + { + "cell_type": "markdown", + "id": "e31d3e27", + "metadata": {}, + "source": [ + "### Implementation in Qiskit\n", + "\n", + "Here we'll implement Shor's algorithm in Qiskit to factor number $15$.\n", + "First we'll hard code a controlled-multiplication operation for a given element $a\\in\\mathbb{Z}_{15}^{\\ast}$." + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "id": "708b8242", + "metadata": {}, + "outputs": [], + "source": [ + "def c_amod15(a):\n", + " \"\"\"\n", + " Controlled multiplication by a mod 15.\n", + " This is hard-coded for simplicity.\n", + " \"\"\"\n", + " if a not in [2,4,7,8,11,13]:\n", + " raise ValueError(\"'a' must not have common factors with 15\")\n", + " U = QuantumCircuit(4)\n", + " if a in [2,13]:\n", + " U.swap(2,3)\n", + " U.swap(1,2)\n", + " U.swap(0,1)\n", + " if a in [7,8]:\n", + " U.swap(0,1)\n", + " U.swap(1,2)\n", + " U.swap(2,3)\n", + " if a in [4, 11]:\n", + " U.swap(1,3)\n", + " U.swap(0,2)\n", + " if a in [7,11,13]:\n", + " for q in range(4):\n", + " U.x(q)\n", + " U = U.to_gate()\n", + " U.name = f\"{a} mod 15\"\n", + " c_U = U.control()\n", + " return c_U" + ] + }, + { + "cell_type": "markdown", + "id": "952577bc", + "metadata": {}, + "source": [ + "Here's the phase estimation procedure from earlier implemented as a function." + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "id": "09cc6893", + "metadata": {}, + "outputs": [], + "source": [ + "def phase_estimation(\n", + " controlled_operation: QuantumCircuit,\n", + " psi_prep: QuantumCircuit,\n", + " precision: int\n", + " ):\n", + " \"\"\"\n", + " Carry out phase estimation on a simulator.\n", + " Args:\n", + " controlled_operation: The operation to perform phase estimation on,\n", + " controlled by one qubit.\n", + " psi_prep: Circuit to prepare |ฯˆ>\n", + " precision: Number of counting qubits to use\n", + " Returns:\n", + " float: Best guess for phase of U|ฯˆ>\n", + " \"\"\"\n", + " control_register = QuantumRegister(precision)\n", + " output_register = ClassicalRegister(precision)\n", + " \n", + " target_register = QuantumRegister(psi_prep.num_qubits)\n", + " qc = QuantumCircuit(control_register, target_register, output_register)\n", + "\n", + " # Prepare |ฯˆ>\n", + " qc.compose(psi_prep,\n", + " qubits=target_register,\n", + " inplace=True)\n", + "\n", + " # Do phase estimation\n", + " for index, qubit in enumerate(control_register):\n", + " qc.h(qubit)\n", + " for _ in range(2**index):\n", + " qc.compose(\n", + " controlled_operation,\n", + " qubits=[qubit] + list(target_register),\n", + " inplace=True\n", + " )\n", + "\n", + " qc.compose(\n", + " QFT(precision, inverse=True),\n", + " qubits=control_register,\n", + " inplace=True\n", + " )\n", + "\n", + " qc.measure(control_register, output_register)\n", + " \n", + " measurement = Sampler().run(qc, shots=1).result().quasi_dists[0].popitem()[0]\n", + " return measurement / 2**precision" + ] + }, + { + "cell_type": "markdown", + "id": "d9c82f40", + "metadata": {}, + "source": [ + "We can't easily prepare eigenvectors of the multiplication by $a\\in\\mathbb{Z}_{15}^{\\ast}$ operation, so we use $\\vert 1\\rangle$ as suggested above." + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "id": "0acc851d", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "" + ] + }, + "execution_count": 15, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "psi_prep = QuantumCircuit(4)\n", + "psi_prep.x(0)" + ] + }, + { + "cell_type": "markdown", + "id": "35181600", + "metadata": {}, + "source": [ + "And finally we can run the circuit to try to find a nontrivial factor of $15$." + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "id": "1d1e7c7b", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "Attempt 1\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "Attempt 2\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Non-trivial factor found: 3\n" + ] + } + ], + "source": [ + "from fractions import Fraction\n", + "from math import gcd\n", + "\n", + "a = 8\n", + "N = 15\n", + "\n", + "FACTOR_FOUND = False\n", + "ATTEMPT = 0\n", + "while not FACTOR_FOUND:\n", + " ATTEMPT += 1\n", + " print(f\"\\nAttempt {ATTEMPT}\")\n", + " \n", + " phase = phase_estimation(\n", + " c_amod15(a),\n", + " psi_prep,\n", + " precision=8\n", + " )\n", + " frac = Fraction(phase).limit_denominator(N)\n", + " r = frac.denominator\n", + " if phase != 0:\n", + " # Guess for a factor is gcd(x^{r/2} - 1 , 15)\n", + " guess = gcd(a**(r//2)-1, N)\n", + " if guess not in [1,N] and (N % guess) == 0:\n", + " # Guess is a factor!\n", + " print(f\"Non-trivial factor found: {guess}\")\n", + " FACTOR_FOUND = True " + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "id": "37933870", + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "

Version Information

Qiskit SoftwareVersion
qiskit-terra0.24.1
qiskit-aer0.12.1
qiskit-ibmq-provider0.20.2
qiskit0.43.2
qiskit-nature0.6.0
qiskit-finance0.3.4
qiskit-optimization0.5.0
qiskit-machine-learning0.6.1
System information
Python version3.10.11
Python compilerClang 14.0.0 (clang-1400.0.29.202)
Python buildmain, Apr 7 2023 07:31:31
OSDarwin
CPUs8
Memory (Gb)32.0
Tue Jul 18 12:32:18 2023 BST
" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "# pylint: disable=unused-import\n", + "import qiskit.tools.jupyter\n", + "%qiskit_version_table" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.9" + } + }, + "nbformat": 4, + "nbformat_minor": 5 +} diff --git a/notebooks/v2/ch-applications/qaoa.ipynb b/notebooks/v2/ch-applications/qaoa.ipynb index 43fc83568..b66b7c5d7 100644 --- a/notebooks/v2/ch-applications/qaoa.ipynb +++ b/notebooks/v2/ch-applications/qaoa.ipynb @@ -1,6 +1,7 @@ { "cells": [ { + "attachments": {}, "cell_type": "markdown", "metadata": { "tags": [ @@ -12,17 +13,19 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "In this tutorial, we will:\n", - "- introduce combinatorial optimization problems,\n", - "- explain approximate optimization algorithms,\n", - "- explain how the Quantum Approximate Optimization Algorithm (QAOA) works,\n", - "- and run a simple example on a simulator or a real quantum system." + "- introduce combinatorial optimization problems;\n", + "- explain approximate optimization algorithms;\n", + "- explain how the Quantum Approximate Optimization Algorithm (QAOA) works; and\n", + "- run a simple example on a simulator or a real quantum system." ] }, { + "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ @@ -38,6 +41,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ @@ -45,6 +49,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ @@ -53,12 +58,13 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "## QAOA\n", "\n", - "QAOA (Quantum Approximate Optimization Algorithm) introduced by Farhi et al.[1] is a quantum algorithm that attempts to \n", + "QAOA (Quantum Approximate Optimization Algorithm), introduced by Farhi et al. [1], is a quantum algorithm that attempts to \n", "solve such combinatorial problems.
\n", "\n", "It is a variational algorithm that uses a unitary $U(\\boldsymbol{\\beta}, \\boldsymbol{\\gamma})$ characterized by the parameters \n", @@ -80,8 +86,8 @@ "\n", "where $\\lvert \\psi_0 \\rangle$ is a suitable initial state. \n", "\n", - "We will demonstrate these steps using the Max-Cut problem discussed above. For that we would first define\n", - "the underlying graph of the problem shown above." + "We will demonstrate these steps using the Max-Cut problem discussed above. For that, we would first define\n", + "the underlying graph of the problem as shown above." ] }, { @@ -111,6 +117,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ @@ -146,6 +153,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ @@ -193,6 +201,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ @@ -229,6 +238,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ @@ -238,7 +248,7 @@ "\n", "$$\\lvert \\psi_0 \\rangle = \\bigg(\\frac{1}{\\sqrt{2}}\\big(\\lvert 0 \\rangle + \\lvert 1 \\rangle\\big)\\bigg)^{\\otimes n}$$\n", "\n", - "Such a state, when number of qubits is 4 ($n=4$), can be prepared by applying Hadamard gates starting from an all zero state as shown in \n", + "Such a state, when the number of qubits is 4 ($n=4$), can be prepared by applying Hadamard gates starting from an all-zero state as shown in \n", "the circuit below. " ] }, @@ -270,12 +280,13 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "### The QAOA circuit\n", "\n", - "So far we have seen that the preparation of a quantum state during QAOA is composed of three elements\n", + "So far, we have seen that the preparation of a quantum state during QAOA is composed of three elements:\n", "- Preparing an initial state\n", "- Applying the unitary `{latex} U(H_P) = e^{-i \\gamma H_P}` corresponding to the problem Hamiltonian\n", "- Then, applying the mixing unitary `{latex} U(H_B) = e^{-i \\beta H_B}`\n", @@ -312,6 +323,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ @@ -461,6 +473,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ @@ -468,6 +481,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ @@ -506,6 +520,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ @@ -513,6 +528,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ @@ -520,12 +536,13 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "### 1. Constructing Problem Hamiltonian \n", "\n", - "Any maximization problem can be cast in terms of a minimization problem and vice versa. Hence the general form a combinatorial optimization problem is given by\n", + "Any maximization problem can be cast in terms of a minimization problem and vice versa. Hence, the general form a combinatorial optimization problem is given by\n", "\n", "\n", "\n", @@ -552,12 +569,13 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "#### 1.1 Diagonal Hamiltonians\n", "\n", - "This cost function can be mapped to a Hamiltonian that is diagonal in the computational basis. Given the cost-function $C$ this Hamiltonian is then written as\n", + "This cost function can be mapped to a Hamiltonian that is diagonal in the computational basis. Given the cost function, $C$, this Hamiltonian is then written as\n", "\n", "\n", "\n", @@ -595,6 +613,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ @@ -605,7 +624,7 @@ "\n", "#### 2.1 (weighted) $MAXCUT$\n", "\n", - "Consider an $n$-node non-directed graph *G = (V, E)* where *|V| = n* with edge weights $w_{ij}>0$, `{latex} w_{ij}=w_{ji}`, for $(i,j)\\in E$. A cut is defined as a partition of the original set V into two subsets. The cost function to be optimized is in this case the sum of weights of edges connecting points in the two different subsets, *crossing* the cut. By assigning $x_i=0$ or $x_i=1$ to each node $i$, one tries to maximize the global profit function (here and in the following summations run over indices 1,2,...,n)\n", + "Consider an $n$-node non-directed graph *G = (V, E)* where *|V| = n* with edge weights $w_{ij}>0$, `{latex} w_{ij}=w_{ji}`, for $(i,j)\\in E$. A cut is defined as a partition of the original set V into two subsets. The cost function to be optimized is, in this case, the sum of weights of edges connecting points in the two different subsets, *crossing* the cut. By assigning $x_i=0$ or $x_i=1$ to each node $i$, one tries to maximize the global profit function (here and in the following summations run over indices 1,2,...,n)\n", "\n", "\n", "\n", @@ -648,16 +667,17 @@ "\n", "for a bit string $\\textbf{x} \\in \\{0,1\\}^{133}$. The clause can only be satisfied by setting the bits $x_1 = 0$,$x_3 = 0$ and $x_{132} = 1$. The $\\text{3-SAT}$ problem now asks whether there is a bit string that satisfies all the $m$ clauses or whether no such string exists. This decision problem is the prime example of a problem that is $NP$-complete. \n", "\n", - "The closely related optimization problem $\\text{MAX 3-SAT}$ asks to find the bit string $\\textbf{x}$ that satisfies the maximal number of clauses in $C(\\textbf{x})$. This can of course be turned again in to a decision problem if we ask where there exists a bit string that satisfies more than $\\tilde{m}$ of the $m$ clauses, which is again $NP$-complete." + "The closely related optimization problem $\\text{MAX 3-SAT}$ asks to find the bit string $\\textbf{x}$ that satisfies the maximal number of clauses in $C(\\textbf{x})$. Of course, this can be turned again in to a decision problem if we ask where there exists a bit string that satisfies more than $\\tilde{m}$ of the $m$ clauses, which is again $NP$-complete." ] }, { + "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "### 3. Approximate optimization algorithms \n", "\n", - "Both the previously considered problems $MAXCUT$ and $\\text{MAX 3-SAT}$ are actually known to be a NP-hard problems [3](#references). In fact it turns out that many combinatorial optimization problems are computationally hard to solve in general. In light of this fact, we can't expect to find a provably efficient algorithm, i.e. an algorithm with polynomial runtime in the problem size, that solves these problems. This also applies to quantum algorithms. There are two main approaches to dealing with such problems. First approach is approximation algorithms that are guaranteed to find solution of specified quality in polynomial time. The second approach are heuristic algorithms that don't have a polynomial runtime guarantee but appear to perform well on some instances of such problems. \n", + "Both the previously considered problems $MAXCUT$ and $\\text{MAX 3-SAT}$ are known to be a NP-hard problems [3](#references). In fact, it turns out that many combinatorial optimization problems are computationally hard to solve in general. In light of this, we can't expect to find a provably efficient algorithm, i.e., an algorithm with polynomial runtime in the problem size, that solves these problems; this also applies to quantum algorithms. There are two main approaches to dealing with such problems. First approach is approximation algorithms that are guaranteed to find solution of specified quality in polynomial time. The second approach, heuristic algorithms, don't have a polynomial runtime guarantee, but appear to perform well on some instances of such problems. \n", "\n", "Approximate optimization algorithms are efficient and provide a provable guarantee on how close the approximate solution is to the actual optimum of the problem. The guarantee typically comes in the form of an approximation ratio, $\\alpha \\leq 1$. A probabilistic approximate optimization algorithm guarantees that it produces a bit-string $\\textbf{x}^* \\in \\{0,1\\}^n$ so that *with high probability* we have that with a positive `{latex} C_\\text{max} = \\max_{\\textbf{x}}C(\\textbf{x})` \n", "\n", @@ -667,18 +687,19 @@ "\n", "\n", "\n", - "For the $MAXCUT$ problem there is a famous approximate algorithm due to Goemans and Williamson [2](#references) . This algorithm is based on an SDP relaxation of the original problem combined with a probabilistic rounding technique that yields an with high probability approximate solution $\\textbf{x}^*$ that has an approximation ratio of $\\alpha \\approx 0.878$. This approximation ratio is actually believed to optimal so we do not expect to see an improvement by using a quantum algorithm." + "For the $MAXCUT$ problem, there is a famous approximate algorithm due to Goemans and Williamson [2](#references). This algorithm, based on an SDP relaxation of the original problem, is combined with a probabilistic rounding technique that yields a high probability approximate solution $\\textbf{x}^*$ that has an approximation ratio of $\\alpha \\approx 0.878$. This approximation ratio is believed to be optimal. So, we do not expect to see an improvement by using a quantum algorithm." ] }, { + "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "\n", "\n", "### 4. The QAOA algorithm \n", - "The Quantum approximate optimization algorithm (QAOA) by Farhi, Goldstone and Gutmann [1](#references) is an example of a heuristic algorithm. Unlike Goemans-Williamson algorithm, QAOA does not come with performance guarantees.\n", - "QAOA takes the approach of classical approximate algorithms and looks for a quantum analogue that will likewise produce a classical bit string $x^*$ that with high probability is expected to have a good approximation ratio $\\alpha$. Before discussing the details, let us first present the general idea of this approach. \n", + "The Quantum Approximate Optimization Algorithm (QAOA) by Farhi, Goldstone and Gutmann [1](#references) is an example of a heuristic algorithm. Unlike Goemans-Williamson algorithm, QAOA does not come with performance guarantees.\n", + "QAOA takes the approach of classical approximate algorithms and looks for a quantum analogue that will likewise produce a classical bit string $x^*$. The outputted bit string is expected, with a high probability, to have a good approximation ratio $\\alpha$. Before discussing the details, let us first present the general idea of this approach. \n", "\n", "#### 4.1 Overview:\n", "\n", @@ -808,6 +829,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ @@ -827,6 +849,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ diff --git a/notebooks/v2/ch-machine-learning/machine-learning-qiskit-pytorch.ipynb b/notebooks/v2/ch-machine-learning/machine-learning-qiskit-pytorch.ipynb index 758a16539..4e7833482 100644 --- a/notebooks/v2/ch-machine-learning/machine-learning-qiskit-pytorch.ipynb +++ b/notebooks/v2/ch-machine-learning/machine-learning-qiskit-pytorch.ipynb @@ -160,10 +160,7 @@ " def run(self, thetas):\n", " t_qc = transpile(self._circuit,\n", " self.backend)\n", - " qobj = assemble(t_qc,\n", - " shots=self.shots,\n", - " parameter_binds = [{self.theta: theta} for theta in thetas])\n", - " job = self.backend.run(qobj)\n", + " job = self.backend.run(t_qc)\n", " result = job.result().get_counts()\n", " \n", " counts = np.array(list(result.values()))\n", @@ -425,7 +422,11 @@ { "cell_type": "code", "execution_count": 9, - "metadata": {}, + "metadata": { + "tags": [ + "ignore-warning" + ] + }, "outputs": [ { "name": "stderr", diff --git a/notebooks/v2/ch-states/atoms-computation.ipynb b/notebooks/v2/ch-states/atoms-computation.ipynb index 60cbd6ac6..18c257f8c 100644 --- a/notebooks/v2/ch-states/atoms-computation.ipynb +++ b/notebooks/v2/ch-states/atoms-computation.ipynb @@ -258,7 +258,7 @@ "source": [ "The reason for running many times and showing the result as a histogram is because quantum computers may have some randomness in their results. In this case, since we arenโ€™t doing anything quantum, we get just the ```00000000``` result with certainty.\n", "\n", - "Note that this result comes from a quantum simulator, which is a standard computer calculating what an ideal quantum computer would do. Simulations are only possible for small numbers of qubits (~30 qubits), but they are nevertheless a very useful tool when designing your first quantum circuits. To run on a real device you simply need to replace ```Aer.get_backend('aer_simulator')``` with the backend object of the device you want to use. " + "Note that this result comes from a quantum simulator, which is a standard computer calculating what an ideal quantum computer would do. Simulations are only possible for small numbers of qubits (~30 qubits), but they are nevertheless a very useful tool when designing your first quantum circuits. To run on a real device you simply need to replace `Aer.get_backend('aer_simulator')` with the backend object of the device you want to use. " ] }, { diff --git a/notebooks/v2/ch-states/introduction.ipynb b/notebooks/v2/ch-states/introduction.ipynb index 0e89e0fde..884820288 100644 --- a/notebooks/v2/ch-states/introduction.ipynb +++ b/notebooks/v2/ch-states/introduction.ipynb @@ -74,7 +74,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "This chapter will be most effective for readers who are already familiar with vectors and matrices. Those who aren't familiar will likely be fine too, though it might be useful to consult our [Introduction to Linear Algebra for Quantum Computing](/course/ch-appendix/an-introduction-to-linear-algebra-for-quantum-computing) from time to time.\n", + "This chapter will be most effective for readers who are already familiar with vectors and matrices. Those who aren't familiar will likely be fine too, though it might be useful to consult our [Introduction to Linear Algebra for Quantum Computing](/course/ch-appendix/linear_algebra) from time to time.\n", "\n", "Since we will be using Qiskit, our Python-based framework for quantum computing, it would also be useful to know the basics of Python. Those who need a primer can consult the [Introduction to Python and Jupyter notebooks](/course/ch-prerequisites/introduction-to-python-and-jupyter-notebooks)." ] diff --git a/notebooks/v2/ch-states/representing-qubit-states.ipynb b/notebooks/v2/ch-states/representing-qubit-states.ipynb index f32fb3ca8..0969f5695 100644 --- a/notebooks/v2/ch-states/representing-qubit-states.ipynb +++ b/notebooks/v2/ch-states/representing-qubit-states.ipynb @@ -19,7 +19,7 @@ "\n", "In quantum computers, our basic variable is the _qubit:_ a quantum variant of the bit. These have exactly the same restrictions as normal bits do: they can store only a single binary piece of information, and can only ever give us an output of [[0 or 1|-1 or 1|0|1|-1]]. However, they can also be manipulated in ways that can only be described by quantum mechanics. This gives us new gates to play with, allowing us to find new ways to design algorithms.\n", "\n", - "To fully understand these new gates, we first need to understand how to write down qubit states. For this we will use the mathematics of vectors, matrices, and complex numbers. Though we will introduce these concepts as we go, it would be best if you are comfortable with them already. If you need a more in-depth explanation or a refresher, you can find the guide [here](/course/ch-appendix/an-introduction-to-linear-algebra-for-quantum-computing).\n" + "To fully understand these new gates, we first need to understand how to write down qubit states. For this we will use the mathematics of vectors, matrices, and complex numbers. Though we will introduce these concepts as we go, it would be best if you are comfortable with them already. If you need a more in-depth explanation or a refresher, you can find the guide [here](/course/ch-appendix/linear_algebra).\n" ] }, { diff --git a/notebooks/v2/ch-states/single-qubit-gates.ipynb b/notebooks/v2/ch-states/single-qubit-gates.ipynb index 8e73e6c58..e14b6b58f 100644 --- a/notebooks/v2/ch-states/single-qubit-gates.ipynb +++ b/notebooks/v2/ch-states/single-qubit-gates.ipynb @@ -298,7 +298,7 @@ "\n", "$$ |\\circlearrowleft\\rangle, \\quad |\\circlearrowright\\rangle$$\n", "\n", - "We leave it as an exercise to calculate these. There are in fact an infinite number of bases; to form one, we simply need two orthogonal vectors. The eigenvectors of both Hermitian and unitary matrices form a basis for the vector space. Due to this property, we can be sure that the eigenstates of the X-gate and the Y-gate indeed form a basis for 1-qubit states (read more about this in the [linear algebra page](/course/ch-appendix/an-introduction-to-linear-algebra-for-quantum-computing) in the appendix)\n", + "We leave it as an exercise to calculate these. There are in fact an infinite number of bases; to form one, we simply need two orthogonal vectors. The eigenvectors of both Hermitian and unitary matrices form a basis for the vector space. Due to this property, we can be sure that the eigenstates of the X-gate and the Y-gate indeed form a basis for 1-qubit states (read more about this in the [linear algebra page](/course/ch-appendix/linear_algebra) in the appendix)\n", "\n", "### Quick Exercises\n", "1. Verify that $|+\\rangle$ and $|-\\rangle$ are in fact eigenstates of the X-gate.\n", diff --git a/notebooks/v2/intro/entangled-states.ipynb b/notebooks/v2/intro/entangled-states.ipynb index fbd35c049..6fb836aff 100644 --- a/notebooks/v2/intro/entangled-states.ipynb +++ b/notebooks/v2/intro/entangled-states.ipynb @@ -2126,7 +2126,7 @@ "1. If z measurements are made on both qubits, they never both output `0`;\n", "2. If an x measurement of one qubit outputs `1`, a z measurement of the other will output `0` (because the `11` result never occurs in these cases).\n", "\n", - "These correspond exactly to the observations made for the colored shapes in the classical scenario. If we apply the same logic as we did in that case, we can analyse the case where both Alice and Bob make an x measurement, and they both get the result `1`. Bob would then be able to apply observation 2 and infer that Alice would certainly have gotten a `0` if she had instead done a z measurement. Alice can do the same, inferring that Bob would have gotten a `1` if he'd have made a z measurement. So together they conclude that, if they had both made z measurements, they would both have gotten the output `0`. Since observation 1 shows us that such a result would be impossible, Alice and Bob could predict that the `11` result will never occur.\n", + "These correspond exactly to the observations made for the colored shapes in the classical scenario. If we apply the same logic as we did in that case, we can analyse the case where both Alice and Bob make an x measurement, and they both get the result `1`. Bob would then be able to apply observation 2 and infer that Alice would certainly have gotten a `0` if she had instead done a z measurement. Alice can do the same, inferring that Bob would have gotten a `0` if he had made a z measurement. So together they conclude that, if they had both made z measurements, they would both have gotten the output `0`. Since observation 1 shows us that such a result would be impossible, Alice and Bob could predict that the `11` result will never occur.\n", "\n", "So let's see if they would be right." ] diff --git a/notebooks/v2/intro/why-quantum-computing.ipynb b/notebooks/v2/intro/why-quantum-computing.ipynb index 94e810d1d..8fd864bd1 100644 --- a/notebooks/v2/intro/why-quantum-computing.ipynb +++ b/notebooks/v2/intro/why-quantum-computing.ipynb @@ -21,6 +21,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "metadata": { "formulas": { @@ -95,7 +96,7 @@ "\n", "![graph of constant and linear running times vs input sizes for different running times](images/why-qc/graph-linear-constant.svg)\n", "\n", - "Here is one final example that is very particularly interesting to us. Letโ€™s say I have a secret number (such as a PIN), and the problem is to guess it. In this case, the size of the problem is the length of the number. \n", + "Here is one final example that is particularly interesting to us. Letโ€™s say I have a secret number (such as a PIN), and the problem is to guess it. In this case, the size of the problem is the length of the number. \n", "\n", "Letโ€™s say the only way we can check if our answer is correct is by punching it into a keypad. Since we have no information about what that number might be, the best algorithm to find this secret number uses a โ€˜brute-forceโ€™ method, which means it does nothing clever and simply tries every possible number.\n", "\n", diff --git a/notebooks/v2/quantum-hardware/density-matrix.ipynb b/notebooks/v2/quantum-hardware/density-matrix.ipynb index e009b7e7d..e97479571 100644 --- a/notebooks/v2/quantum-hardware/density-matrix.ipynb +++ b/notebooks/v2/quantum-hardware/density-matrix.ipynb @@ -15,7 +15,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "Throughout the majority of the Qiskit textbook, we have been representing the state of our qubits using the state-vector notation introduced in the [Representing Qubit States](../ch-states/representing-qubit-states) section. Working with this representation is convenient when dealing with states that can always be expressed as a [linear combination](../ch-appendix/an-introduction-to-linear-algebra-for-quantum-computing#an-6-146) of basis states, each with an associated probability amplitude. However, in quantum computation and quantum communication, there are many practical scenarios in which the state of our qubits cannot be written down as linear combinations in a given basis, but instead must be expressed in terms of ensembles (statistical mixtures) of multiple states, each with an associated probability of occurrence.\n", + "Throughout the majority of the Qiskit textbook, we have been representing the state of our qubits using the state-vector notation introduced in the [Representing Qubit States](../ch-states/representing-qubit-states) section. Working with this representation is convenient when dealing with states that can always be expressed as a [linear combination](../ch-appendix/linear_algebra#linear_algebra-6-146) of basis states, each with an associated probability amplitude. However, in quantum computation and quantum communication, there are many practical scenarios in which the state of our qubits cannot be written down as linear combinations in a given basis, but instead must be expressed in terms of ensembles (statistical mixtures) of multiple states, each with an associated probability of occurrence.\n", "\n", "For example, consider the case where Alice wants to send Bob the state $| + \\rangle$. Imagine that, due to noise in their communication channel, there is a chance that the relative phase of the state could flip with some probability $p$. Therefore, Bob could end up with the \"flipped\" state $| - \\rangle$ (with probability $p$), or with the desired state $| + \\rangle$ (with probability $1 - p$). Notice that Bobโ€™s state is either $| + \\rangle$ **or** $| - \\rangle$, but not a quantum superposition of the two. Thus, if we want to know what will happen to Bobโ€™s qubit after he, for instance, applies some gates and performs a measurement, we will have to consider both of these cases separately. This might not be too difficult a task when dealing with only two states, but in situations where the number of possible states is larger, keeping track of how each of these states evolves individually can become impractical. As we will see throughout this section, this is where the density matrix representation comes in handy.\n", "\n", @@ -63,10 +63,10 @@ "\n", "$$ \n", "\\begin{aligned}\n", - "& \\rho = \\begin{bmatrix} \\alpha_0 \\\\ \\alpha_1 \\\\ \\vdots \\\\ \\alpha_N \\end{bmatrix} \\begin{bmatrix} \\alpha_0^* & \\alpha_1^* & \\dots & \\alpha_N^* \\end{bmatrix} \n", + "& \\rho = \\begin{bmatrix} \\alpha_0 \\\\ \\alpha_1 \\\\ \\vdots \\\\ \\alpha_{N-1} \\end{bmatrix} \\begin{bmatrix} \\alpha_0^* & \\alpha_1^* & \\dots & \\alpha_{N-1}^* \\end{bmatrix} \n", "\\\\\n", "\\\\\n", - "& \\rho = \\begin{bmatrix} |\\alpha_0|^2 & \\alpha_0 \\alpha_1^* & \\dots & \\alpha_0 \\alpha_N^* \\\\ \\alpha_1 \\alpha_0^* & |\\alpha_1|^2 & \\dots & \\alpha_1 \\alpha_N^* \\\\ \\vdots & \\vdots & \\ddots & \\vdots \\\\ \\alpha_N \\alpha_0^* & \\alpha_N \\alpha_1^* & \\dots & |\\alpha_N|^2 \\end{bmatrix}\n", + "& \\rho = \\begin{bmatrix} |\\alpha_0|^2 & \\alpha_0 \\alpha_1^* & \\dots & \\alpha_0 \\alpha_{N-1}^* \\\\ \\alpha_1 \\alpha_0^* & |\\alpha_1|^2 & \\dots & \\alpha_1 \\alpha_{N-1}^* \\\\ \\vdots & \\vdots & \\ddots & \\vdots \\\\ \\alpha_{N-1} \\alpha_0^* & \\alpha_{N-1} \\alpha_1^* & \\dots & |\\alpha_{N-1}|^2 \\end{bmatrix}\n", "\\end{aligned}\n", "$$\n", "\n", @@ -109,7 +109,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "Let's once again consider the entangled pure state $| \\psi_{AB} \\rangle $. We can prepare this state by applying a Hadamard gate to the first qubit, and an CNOT between the first and second qubits:" + "Let's once again consider the entangled pure state $| \\psi_{AB} \\rangle $. We can prepare this state by applying a Hadamard gate to the first qubit, and a CNOT between the first and second qubits:" ] }, { @@ -176,7 +176,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "Similarly, we can use the `DensityMatrix.from_instruction()` class method to obtain density matrix representation for this same state:" + "Similarly, we can use the `DensityMatrix.from_instruction()` class method to obtain the density matrix representation for this same state:" ] }, { @@ -265,7 +265,7 @@ "source": [ "## 2. Mixed States \n", "\n", - "Mixed states are those that consist of statistical ensembles of different quantum states. This means that, unlike pure states, mixed states cannot be represented as linear superpositions of normalized state vectors. Lets first take a look at a simple example to explain what we mean by this. \n", + "Mixed states are those that consist of statistical ensembles of different quantum states. This means that, unlike pure states, mixed states cannot be represented as linear superpositions of normalized state vectors. Let's first take a look at a simple example to explain what we mean by this. \n", "\n", "Consider, once again, the two-qubit entangled state:\n", "\n", @@ -299,9 +299,9 @@ "\n", "$$ \\left \\{ p_0, p_1 \\right \\} = \\left \\{ 1/2, 1/2 \\right \\} $$\n", "\n", - "What this representation shows is that, upon measurement of $q_1$, $\\psi_B$ will be in either state $| 0_B \\rangle $ `or` state $| 1_B \\rangle $, each with a classical probability of occurrence of $ 1/2$. Notice we avoided using the ket notation for state $\\psi_B$ since we reserve kets only for state vectors that can be written as linear combinations in an orthonormal basis, which $\\psi_B$ is not.\n", + "What this representation shows is that, upon measurement of $q_1$, $\\psi_B$ will be in either state $| 0_B \\rangle $ **or** state $| 1_B \\rangle $, each with a classical probability of occurrence of $ 1/2$. Notice we avoided using the ket notation for state $\\psi_B$ since we reserve kets only for state vectors that can be written as linear combinations in an orthonormal basis, which $\\psi_B$ is not.\n", "\n", - "In general, a mixed state consisting of an ensemble of n pure states can be expressed in the form of a list of outcome elements:\n", + "In general, a mixed state consisting of an ensemble of $n$ pure states can be expressed in the form of a list of outcome elements:\n", "\n", "$$\n", "\\left \\{ |\\psi_j \\rangle \\right \\}_{j = 1}^n = \\left \\{ | \\psi_1 \\rangle, | \\psi_2 \\rangle, \\dots, | \\psi_n \\rangle \\right \\},\n", @@ -313,7 +313,7 @@ "\\left \\{ p_j \\right \\}_{j = 1}^n = \\left \\{ p_1, p_2, \\dots, p_n \\right \\}\n", "$$\n", "\n", - "Here, $p_j$ corresponds to the classical probability of the system being in state $|\\psi_j \\rangle$, and the total number of possible states, $n$, need not be equal to the dimension of the underlying [Hilbert space](/course/ch-appendix/an-introduction-to-linear-algebra-for-quantum-computing).\n", + "Here, $p_j$ corresponds to the classical probability of the system being in state $|\\psi_j \\rangle$, and the total number of possible states, $n$, need not be equal to the dimension of the underlying [Hilbert space](/course/ch-appendix/linear_algebra).\n", "\n", "Although this way of expressing $\\psi_B$ (or any general mixed state) is perfectly valid, it turns out to be somewhat inconvenient. Since a mixed state can consist of a myriad of pure states, it can be difficult to track how the whole ensemble evolves when, for example, gates are applied to it. It is here that we turn to the density matrix representation.\n", "\n", @@ -348,7 +348,7 @@ "\n", "$$ | \\psi_1 \\rangle = \\frac{1}{\\sqrt{2}} \\left( | 0 \\rangle + | 1 \\rangle \\right) $$\n", "\n", - "The remaining 20% of the times, the pulse applied to rotate the state is either too short or too long by $\\frac{\\pi}{6}$ radians about the x-axis. This means that when we use this Hadamard gate, we could end up with following two undesired outcome states:\n", + "The remaining 20% of the times, the pulse applied to rotate the state is either too short or too long by $\\frac{\\pi}{6}$ radians about the $x$-axis. This means that when we use this Hadamard gate, we could end up with following two undesired outcome states:\n", "\n", "$$ | \\psi_2 \\rangle = \\frac{\\sqrt{3}}{2}| 0 \\rangle + \\frac{1}{2} | 1 \\rangle, \\quad \\quad | \\psi_3 \\rangle = \\frac{1}{2} | 0 \\rangle + \\frac{\\sqrt{3}}{2} | 1 \\rangle $$\n", "\n", @@ -356,13 +356,13 @@ "\n", "\n", "\n", - "Since we do not know the outcome of our qubit everytime we prepare it, we can represent it as a mixed state of the form:\n", + "Since we do not know the outcome of our qubit every time we prepare it, we can represent it as a mixed state of the form:\n", "\n", "$$ \\rho_H = \\frac{4}{5} | \\psi_1 \\rangle \\langle \\psi_1 | + \\frac{1}{10} | \\psi_2 \\rangle \\langle \\psi_2 | + \\frac{1}{10} | \\psi_3 \\rangle \\langle \\psi_3 | $$\n", "\n", "Here, the factors $\\frac{4}{5}, \\frac{1}{10}$ and $\\frac{1}{10}$ correspond to the classical probabilities of obtaining the states `{latex} | \\psi_1 \\rangle, | \\psi_2 \\rangle` and $| \\psi_3 \\rangle$, respectively. \n", "\n", - "By replacing each of these three possible state vectors into $\\rho$, we can find the density matrix that represents this mixture:\n", + "By substituting each of these three possible state vectors into $\\rho_H$, we can find the density matrix that represents this mixture:\n", "\n", "$$\n", "\\begin{aligned}\n", @@ -437,7 +437,7 @@ "\n", "### Unitary Evolution \n", "\n", - "A very natural question to ask at this point is: How do mixed states evolve under [unitary operations](../ch-gates/proving-universality.ipynb#2.2-Unitary-and-Hermitian-matrices-)? It can be shown, with little effort, that if an initial arbitrary state $|\\psi_j \\rangle$ with probability of occurrence $p_j$ evolves into the state $\\hat U|\\psi_j \\rangle$ after a unitary evolution, then the evolution of a density matrix, consisting of an essemble of normalized states `{latex} \\{|\\psi_j \\rangle \\}_{j = 1}^{n}` with probabilities `{latex} \\{p_j\\}_{j = 1}^{n}`, is given by:\n", + "A very natural question to ask at this point is: How do mixed states evolve under [unitary operations](../ch-gates/proving-universality.ipynb#2.2-Unitary-and-Hermitian-matrices-)? It can be shown, with little effort, that if an initial arbitrary state $|\\psi_j \\rangle$ with probability of occurrence $p_j$ evolves into the state $\\hat U|\\psi_j \\rangle$ after a unitary evolution, then the evolution of a density matrix, consisting of an ensemble of normalized states `{latex} \\{|\\psi_j \\rangle \\}_{j = 1}^{n}` with probabilities `{latex} \\{p_j\\}_{j = 1}^{n}`, is given by:\n", "\n", "$$ \n", "\\rho = \\sum_{j} p_j |\\psi_j \\rangle \\langle \\psi_j | \\enspace \\xrightarrow[]{\\enspace \\hat U \\enspace} \\enspace \\rho' = \\sum_{j} p_j \\hat U |\\psi_j \\rangle \\langle \\psi_j | \\hat U^{\\dagger} = \\hat U \\rho \\hat U^{\\dagger}\n", @@ -457,7 +457,7 @@ "\\end{aligned}\n", "$$\n", "\n", - "If we are interested in knowing what will be the resulting state $\\rho_{0}'$ after a [Y Pauli gate](../ch-states/single-qubit-gates.ipynb#ynzgatez) is applied, we then have:\n", + "If we are interested in knowing what the resulting state $\\rho_{0}'$ will be after a [Pauli Y gate](../ch-states/single-qubit-gates.ipynb#ynzgatez) is applied, we then have:\n", "\n", "$$\n", "\\begin{aligned}\n", @@ -615,7 +615,7 @@ "\\rho = \\begin{bmatrix} \\rho_{11} & \\rho_{12} & \\dots & \\rho_{1m} \\\\ \\rho_{21} & \\rho_{22} & \\dots & \\rho_{2m} \\\\ \\vdots & \\vdots & \\ddots & \\vdots \\\\ \\rho_{m1} & \\rho_{m2} & \\dots & \\rho_{mm} \\end{bmatrix}\n", "$$\n", "\n", - "It's worth noticing that, in $\\rho_{uv}$, the diagonal terms $\\rho_{kk}$ actually correspond to the probability of finding the system in a particular basis state $|\\phi_k \\rangle$:\n", + "It's worth noticing that, in $\\rho_{uv}$, the diagonal terms $\\rho_{kk}$ actually correspond to the probability of finding the system in a particular basis state $|\\phi_k \\rangle$ upon measurement:\n", "\n", "$$\n", "\\rho_{kk} = \\sum_{j} p_j \\alpha_{k}^{(j)} \\left ( \\alpha_{k}^{(j)} \\right )^* = \\sum_{j} p_j |\\alpha_{k}^{(j)} |^{2}\n", @@ -792,7 +792,7 @@ "\\text{Tr}_B \\left (| \\xi_u \\rangle \\langle \\xi_v | \\otimes | \\chi_u \\rangle \\langle \\chi_v | \\right ) \\equiv | \\xi_u \\rangle \\langle \\xi_v | \\text{ Tr} \\left ( | \\chi_u \\rangle \\langle \\chi_v | \\right )\n", "$$\n", "\n", - "$| \\xi_u \\rangle $ and $| \\xi_v \\rangle $ are arbitrary states in the subspace of $A$, and $| \\chi_u \\rangle $ and $| \\chi_v \\rangle $ arbitrary states in the subspace of $B$. $\\text{Tr}$ is the standard trace operation, which for two arbitrary states `{latex} \\text{Tr} \\left ( | \\chi_u \\rangle \\langle \\chi_v | \\right ) = \\langle \\chi_v |\\chi_u \\rangle `. Similarly, we can calculate the reduced density matrix of subsystem $B$ using the partial trace over $A$:\n", + "$| \\xi_u \\rangle $ and $| \\xi_v \\rangle $ are arbitrary states in the subspace of $A$, and $| \\chi_u \\rangle $ and $| \\chi_v \\rangle $ arbitrary states in the subspace of $B$. $\\text{Tr}$ is the standard trace operation, which for two arbitrary states satisfies `{latex} \\text{Tr} \\left ( | \\chi_u \\rangle \\langle \\chi_v | \\right ) = \\langle \\chi_v |\\chi_u \\rangle `. Similarly, we can calculate the reduced density matrix of subsystem $B$ using the partial trace over $A$:\n", "\n", "$$\n", "\\text{Tr}_A \\left (| \\xi_u \\rangle \\langle \\xi_v | \\otimes | \\chi_u \\rangle \\langle \\chi_v | \\right ) \\equiv \\text{Tr} \\left ( | \\xi_u \\rangle \\langle \\xi_v | \\right ) | \\chi_u \\rangle \\langle \\chi_v | \n", @@ -886,8 +886,8 @@ } ], "source": [ - "rho_B = qi.partial_trace(rho_AB,[0])\n", - "rho_A = qi.partial_trace(rho_AB,[1])\n", + "rho_B = qi.partial_trace(rho_AB,[1])\n", + "rho_A = qi.partial_trace(rho_AB,[0])\n", "\n", "display(rho_B.draw('latex', prefix=\" \\\\rho_{B} = \"),\n", " rho_A.draw('latex', prefix=\" \\\\rho_{A} = \"))" @@ -948,7 +948,7 @@ "\\hat \\sigma_z = \\begin{bmatrix} 1 & 0 \\\\ 0 & -1 \\end{bmatrix}\n", "$$\n", "\n", - "The $r_x$, $r_y$ and $r_z$ coefficients correspond to the components of what is known as the Bloch vector $\\vec r$. This is in fact the vector that represents our mixed state inside the Bloch sphere. Replacing the matrices into the expression for $\\rho$ and simplifying:\n", + "The $r_x$, $r_y$ and $r_z$ coefficients correspond to the components of what is known as the Bloch vector $\\vec r$. This is in fact the vector that represents our mixed state inside the Bloch sphere. Substituting the matrices into the expression for $\\rho$ and simplifying:\n", "\n", "$$\n", "\\rho = \\frac{1}{2} \\begin{bmatrix} 1 + r_z & r_x - i r_y \\\\ r_x + i r_y & 1 - r_z \\end{bmatrix} \n", @@ -964,7 +964,7 @@ "\n", "$$ r_x = 2 \\left(\\frac{\\sqrt{3}}{20} + \\frac{2}{5} \\right), \\quad r_y = 0, \\quad r_z = 0 $$\n", "\n", - "This means that, in the bloch sphere, $\\rho_H$ is represented by a vector $\\vec r$ extending from the origin in the positive x direction, with length $ r_x \\approx 0.973 $.\n", + "This means that, in the bloch sphere, $\\rho_H$ is represented by a vector $\\vec r$ extending from the origin in the positive $x$ direction, with length $ r_x \\approx 0.973 $.\n", "\n", "In Qiskit, we can use the `plot_bloch_multivector()` function to plot the density matrix of our mixed state in the Bloch sphere:" ] @@ -1168,7 +1168,7 @@ "\n", "$$ r_x \\approx 0.86602, \\quad r_y = 0, \\quad r_z = 0 $$\n", "\n", - "So, if now we use the `plot_bloch_multivector()` function in Qiskit to plot the composite state $\\rho_{CD}$, we see we get two Bloch vectors that correctly represent each of these reduced density matrices $\\rho_C$ and $\\rho_D$:" + "So, if we now use the `plot_bloch_multivector()` function in Qiskit to plot the composite state $\\rho_{CD}$, we see we get two Bloch vectors that correctly represent each of these reduced density matrices $\\rho_C$ and $\\rho_D$:" ] }, { diff --git a/notebooks/v2/quantum-machine-learning/introduction.ipynb b/notebooks/v2/quantum-machine-learning/introduction.ipynb index 71309377c..ee72f4615 100644 --- a/notebooks/v2/quantum-machine-learning/introduction.ipynb +++ b/notebooks/v2/quantum-machine-learning/introduction.ipynb @@ -1,6 +1,7 @@ { "cells": [ { + "attachments": {}, "cell_type": "markdown", "metadata": { "gloss": { @@ -13,10 +14,11 @@ "source": [ "# Introduction\n", "\n", - "Machine learning has established itself as a successful interdisciplinary field which seeks to find patterns in data. Throwing in quantum computing gives rise to interesting areas of research that aim to use the principles of quantum mechanics to augment machine learning, or vice-versa. In this page, we aim to give you a glimpse into the exciting and rapidly changing field of near-term quantum machine learning." + "Machine learning has established itself as a successful interdisciplinary field which seeks to find patterns in data. Throwing in quantum computing gives rise to interesting areas of research that aim to use the principles of quantum mechanics to augment machine learning, or vice-versa. On this page, we aim to give you a glimpse into the exciting and rapidly changing field of near-term quantum machine learning." ] }, { + "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ @@ -52,7 +54,7 @@ "\n", "\n", "\n", - "Given a collection of unlabeled data $(x_i)$, we aim to learn some structure of the data; for example, grouping a set of viewers based their movie viewing history in order to recommend new movies.\n", + "Given a collection of unlabeled data $(x_i)$, we aim to learn some structure of the data; for example, grouping a set of viewers based on their movie viewing history in order to recommend new movies.\n", "\n", "\n", "\n", @@ -76,6 +78,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ @@ -83,7 +86,7 @@ "\n", "There are four different approaches to combining quantum computing and machine learning, differentiated by whether the data is classical _(**C**)_ or quantum _(**Q**)_, or whether the algorithm runs on a classical _(**C**)_ or quantum _(**Q**)_ computer. This is illustrated below from Reference 1.\n", "\n", - "In this context, a quantum dataset consists of observations from a natural or artificial quantum system, such as measurements of qubit interactions, while a classical dataset consists of observations from a classical system, such as times series, text, or images.\n", + "In this context, a quantum dataset consists of observations from a natural or artificial quantum system, such as measurements of qubit interactions, while a classical dataset consists of observations from a classical system, such as time series, text, or images.\n", "\n", "\n", "\n", @@ -122,6 +125,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ @@ -170,17 +174,19 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "There are two distinct categories of **QC** algorithms: those that require quantum random access memory ([qRAM](gloss:qram)), where data can be accessed in superposition, and those that don't. The various proposed qRAM-based QML algorithms, e.g. [qPCA](https://doi.org/10.1038/nphys3029), [qSVM](https://doi.org/10.1103/PhysRevLett.113.130503) and [qClustering](https://arxiv.org/abs/1307.0411), boast exponential speedups compared to their classical algorithms, however there are currently no viable hardware candidates for realizing qRAM. \n", "\n", - "Recently, most of the focus of **CQ** approaches to machine learning have been on near-term algorithms that can be executed on the current quantum devices. Classical machine learning techniques have made great strides in the past decade, enabled in large part by the availability of sufficiently powerful hardware. Maybe the existence of quantum hardware might enable further advances in the field.\n", + "Recently, most of the focus of **CQ** approaches to machine learning has been on near-term algorithms that can be executed on the current quantum devices. Classical machine learning techniques have made great strides in the past decade, enabled in large part by the availability of sufficiently powerful hardware. Maybe the existence of quantum hardware might enable further advances in the field.\n", "\n", "Note that this is a very dynamic area of current investigation by multiple research teams worldwide, and there are still many open questions, as well as confusing terminology and notation. We will try and be as consistent as possible in this course, but also point out when concepts have been referred to by different names, or how different concepts relate to each other." ] }, { + "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ diff --git a/notebooks/v2/quantum-machine-learning/qgan.ipynb b/notebooks/v2/quantum-machine-learning/qgan.ipynb index d198087ce..1bdce66a0 100644 --- a/notebooks/v2/quantum-machine-learning/qgan.ipynb +++ b/notebooks/v2/quantum-machine-learning/qgan.ipynb @@ -1,6 +1,7 @@ { "cells": [ { + "attachments": {}, "cell_type": "markdown", "id": "35533bd4", "metadata": { @@ -122,23 +123,24 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "id": "dc364349", "metadata": {}, "source": [ "## Introduction\n", "\n", - "Generative [adversarial](gloss:adversarial) networks (GANs) [[1]](https://arxiv.org/abs/1406.2661) have swiftly risen to prominence as one of the most widely-adopted methods for unsupervised learning, with showcased abilities in photo-realistic image generation. Given the success of classical GANs, a natural question is whether this success will translate into a quantum computing GAN. In this page, we explore the theory behind quantum generative adversarial networks (QGANs), as well as the practice of implementing one in Qiskit to learn a [Gaussian distribution](gloss:gaussian-distribution). Lastly, we end off with a discussion around the potential use cases of quantum generative adversarial networks and link to relevant research for those who want to read further.\n", + "Generative [adversarial](gloss:adversarial) networks (GANs) [[1]](https://arxiv.org/abs/1406.2661) have swiftly risen to prominence as one of the most widely-adopted methods for unsupervised learning, with showcased abilities in photo-realistic image generation. Given the success of classical GANs, a natural question is whether this success will translate into a quantum computing GAN. In this page, we explore the theory behind quantum generative adversarial networks (QGANs), as well as the practice of implementing one in Qiskit to learn a [Gaussian distribution](gloss:gaussian-distribution). Lastly, we end off with a discussion around the potential use cases of quantum generative adversarial networks and links to relevant research for those who want to read further.\n", "\n", "## Classical generative models (theory)\n", "\n", "### Generative models\n", "\n", - "Until recently, the success of supervised learning models has completely overshadowed their generative counterparts. So much so, that the popularity of these supervised models might make it difficult to even conceptualize another approach to machine learning.\n", + "Until recently, the success of supervised learning models has completely overshadowed their generative counterparts. So much so that the popularity of these supervised models might make it difficult to even conceptualize another approach to machine learning.\n", "\n", - "The supervised approach, which feels intuitive to us by now, tries to make accurate predictions on new data, demonstrating that it has learned some underlying relations of the dataset. Generative models are different. Instead of focusing on key relationships between input data and labels, they learn to model the underlying distribution holistically, allowing it to generate new data samples. It's the difference between telling apart cats and dogs, and generating completely new images of cats and dogs. The latter is a richer, but also more difficult task.\n", + "The supervised approach, which feels intuitive to us by now, tries to make accurate predictions on new data, demonstrating that it has learned some underlying relations of the dataset. Generative models are different. Instead of focusing on key relationships between input data and labels, they learn to model the underlying distribution holistically, allowing it to generate new data samples. It's the difference between telling apart cats and dogs, and generating completely new images of cats and dogs. The latter is a richer but more difficult task.\n", "\n", - "Why is it more difficult? Adequately discriminating between given data can often be achieved through picking up on a few tell-tale features (like whiskers don't belong on eyes) which help form the strong decision boundaries in the high dimensional space. Consequently, machine learning researchers take great interest in generative models as these learning tasks seem to stab at a deeper notion of learningโ€”trying to reproduce the underlying *creator* function.\n", + "Why is it more difficult? Adequately discriminating between given data can often be achieved through picking up on a few tell-tale features (like whiskers don't belong on eyes) to help form strong decision boundaries in the high dimensional space. Consequently, machine learning researchers take great interest in generative models as these learning tasks seem to stab at a deeper notion of learningโ€”trying to reproduce the underlying *creator* function.\n", "\n", "So given a pool of training data, the goal of a generative model is to learn/reproduce the probability distribution that generated them. A particularly eye-catching application of GANs is generating [high-resolution visuals](https://thispersondoesnotexist.com/) or [composing music](https://magenta.tensorflow.org/gansynth). Below is a generated image of a fake cat.\n", "\n", @@ -186,6 +188,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "id": "cdb1f887", "metadata": { @@ -264,6 +267,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "id": "b13a292e", "metadata": { @@ -279,7 +283,7 @@ "\n", "There are many analogous concepts, specifically with the adversarial training, between GANs and QGANs. Most importantly, the training structure of GANs largely persists to QGANs. We alternately train the generator & discriminator circuit parameters, while freezing the other's parameters. Through this, the quantum generator learns the target quantum state by proxy of the discriminator's signals, similar to GANs. It's proven that the [stable equilibrium](https://en.wikipedia.org/wiki/Nash_equilibrium) of the quantum adversarial game also occurs when the generator produces data identical to a target distribution [[3]](https://journals.aps.org/prl/abstract/10.1103/PhysRevLett.121.040502).\n", "\n", - "The objective with a fully quantum QGAN is for the quantum generator to reproduce a desired state $|\\psi\\rangle$, using of course an adversarial training strategy. Similar to other variational quantum algorithms, the quantum generator moves towards this through an iterative update to its parameters directed by a classical optimizer. However, in the case of a QGAN, the generator's cost function landscape itself evolves and becomes better as the discriminator improves at recognizing real samples. Let's look at the general circuit schematics of what we will be building.\n", + "The objective of a fully quantum QGAN is for the quantum generator to reproduce a desired state $|\\psi\\rangle$, of course using an adversarial training strategy. Similar to other variational quantum algorithms, the quantum generator moves towards this through an iterative update to its parameters directed by a classical optimizer. However, in the case of a QGAN, the generator's cost function landscape evolves and becomes better as the discriminator improves at recognizing real samples. Let's look at the general circuit schematics of what we will be building.\n", "\n", "![real_rig](images/qgan/real_rig.svg)\n", "\n", @@ -289,13 +293,14 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "id": "c293984e", "metadata": {}, "source": [ "The two circuits illustrated above show the generator concatenated with the discriminator and the unitary loading the target data concatenated with the discriminator.\n", "\n", - "The discriminator acts on the output from the generator, respectively, the target data unitary, as well as an additional qubit $|0\\rangle$. Finally, the discriminator classification takes place by measuring the last qubit. If the outcome corresponds to $|0\\rangle$ respectively $|1\\rangle$ the input data is being classified as real or fake respectively.\n", + "The discriminator acts on the output from the generator, respectively, the target data unitary, as well as an additional qubit $|0\\rangle$. Finally, the discriminator classification takes place by measuring the last qubit. If the outcome corresponds to $|0\\rangle$ or $|1\\rangle$, the input data is being classified as real or fake respectively.\n", "\n", "Looking at the first circuit diagram shows us how real data samples are fed into the discriminator. Since we are dealing with a fully quantum QGAN, we need to somehow encode this data of ours into a quantum state to feed into the discriminator. To that end, we prepare the real data through a unitary $\\class{u-sub-r}{U_R}$ such that we define:\n", "\n", @@ -363,6 +368,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "id": "951faa09", "metadata": { @@ -391,6 +397,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "id": "e2b5d880", "metadata": {}, @@ -417,6 +424,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "id": "8efc46f6", "metadata": {}, @@ -444,6 +452,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "id": "c7804cea", "metadata": {}, @@ -486,6 +495,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "id": "9af80d19", "metadata": {}, @@ -538,6 +548,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "id": "3315ed20", "metadata": {}, @@ -578,6 +589,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "id": "4c492e03", "metadata": {}, @@ -617,6 +629,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "id": "30613b6d", "metadata": {}, @@ -684,6 +697,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "id": "179962d2", "metadata": {}, @@ -715,6 +729,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "id": "6fe9bf55", "metadata": { @@ -766,6 +781,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "id": "6537d4bf", "metadata": {}, @@ -796,6 +812,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "id": "d5659e5d", "metadata": {}, @@ -847,6 +864,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "id": "6e18b4bd", "metadata": { @@ -871,6 +889,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "id": "f922c9d1", "metadata": {}, @@ -1029,6 +1048,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "id": "c8740474", "metadata": { @@ -1113,6 +1133,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "id": "1bfb97a9", "metadata": {}, @@ -1125,6 +1146,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "id": "530fc1f1", "metadata": { @@ -1174,6 +1196,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "id": "eb8fe912-2b4a-46a8-a1f7-b38e8350db5d", "metadata": {}, @@ -1215,6 +1238,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "id": "5fad5646", "metadata": {}, @@ -1267,6 +1291,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "id": "505b825d", "metadata": {}, @@ -1286,6 +1311,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "id": "f18b385b-d700-46a0-b3f4-f6c3a39dd1eb", "metadata": {}, @@ -1348,6 +1374,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "id": "c60f6b9e", "metadata": {}, @@ -1420,6 +1447,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "id": "8dcb4bb7", "metadata": {}, @@ -1448,6 +1476,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "id": "9951c8da", "metadata": {}, @@ -1622,6 +1651,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "id": "8b6e28ff-799e-4423-a492-f5640f554fd4", "metadata": {}, @@ -1703,6 +1733,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "id": "5a46142e", "metadata": {}, @@ -1711,6 +1742,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "id": "680ea277", "metadata": {}, @@ -1737,6 +1769,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "id": "eb8c2c33", "metadata": { @@ -1766,6 +1799,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "id": "97580477", "metadata": { diff --git a/notebooks/v2/quantum-machine-learning/unsupervised.ipynb b/notebooks/v2/quantum-machine-learning/unsupervised.ipynb index 421b592d0..b56216bd8 100644 --- a/notebooks/v2/quantum-machine-learning/unsupervised.ipynb +++ b/notebooks/v2/quantum-machine-learning/unsupervised.ipynb @@ -1,6 +1,7 @@ { "cells": [ { + "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ @@ -8,6 +9,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ @@ -23,7 +25,7 @@ "\n", "![](images/qgan/gan_general_flow.svg)\n", "\n", - "Given an a set of data (either classical or quantum) from the probability distribution $P_\\text{real}$, generative adversarial networks train a generator, $G_\\theta$, and discriminator, $D_\\phi$, simultaneously to create samples from $P_G$ that are indistinguishable from $P_\\text{real}$. The GAN optimization problem is formalized as:\n", + "Given a set of data (either classical or quantum) from the probability distribution $P_\\text{real}$, generative adversarial networks train a generator, $G_\\theta$, and discriminator, $D_\\phi$, simultaneously to create samples from $P_G$ that are indistinguishable from $P_\\text{real}$. The GAN optimization problem is formalized as:\n", "\n", "$$\\min_G \\max_D \\vec{E}_{x \\sim P_\\text{real}} \\left [ \\log D(x) \\right ] + \\vec{E}_{z \\sim P_G} [\\log ( 1- D(G(z)))] $$\n", "\n", @@ -33,6 +35,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ diff --git a/notebooks/v2/quantum-machine-learning/vqc.ipynb b/notebooks/v2/quantum-machine-learning/vqc.ipynb index e165d653c..16489a4f3 100644 --- a/notebooks/v2/quantum-machine-learning/vqc.ipynb +++ b/notebooks/v2/quantum-machine-learning/vqc.ipynb @@ -1,6 +1,7 @@ { "cells": [ { + "attachments": {}, "cell_type": "markdown", "metadata": { "formulas": { @@ -53,12 +54,13 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "## Variational algorithms\n", "\n", - "Variational algorithms were introduced in 2014, with the variational [eigensolver](gloss:eigensolver) in Reference 1 and the quantum approximate optimization algorithm in Reference 2. They are [near-term algorithm](gloss:near-term-algorithm)s, that can be executed on current quantum computers in concert with classical computers. \n", + "Variational algorithms were introduced in 2014, with the variational [eigensolver](gloss:eigensolver) in Reference 1 and the quantum approximate optimization algorithm in Reference 2. A variational algorithm is a [near-term algorithm](gloss:near-term-algorithm) that can be executed on current quantum computers in concert with classical computers. \n", "\n", "Using a parameterized quantum circuit, or ansatz, $U(\\theta)$, we prepare a state $|\\psi(\\theta) \\rangle = U(\\theta) |0 \\rangle$, and measure the expectation value using a quantum computer. We define a cost function $C(\\theta)$, that determines how good $\\theta$ is for the problem we are trying to solve. We then use a classical computer to calculate the cost function and provide updated circuit parameters using an optimization algorithm. The goal of the algorithm is to find the circuit parameters $\\theta$ for the parameterized quantum circuit $U(\\theta)$ that minimizes the cost function $C(\\theta)$. \n", "\n", @@ -66,6 +68,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ @@ -83,6 +86,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ @@ -118,6 +122,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ @@ -154,6 +159,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ @@ -184,6 +190,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ @@ -203,6 +210,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ @@ -227,6 +235,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ @@ -259,6 +268,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ @@ -308,10 +318,11 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ - "8. We set up our classical optimizer, using [`SPSA`](https://qiskit.org/documentation/stubs/qiskit.algorithms.optimizers.SPSA.html) (as per Reference 3), initialize our variational circuit parameters for reproducibility, and optimize our cost function modifying the variational circuit parameters, using our 40 training data points. Note that the optimization will take a while to run. " + "8. We set up our classical optimizer, using [`SPSA`](https://qiskit.org/documentation/stubs/qiskit.algorithms.optimizers.SPSA.html) (as per Reference 3), initialize our variational circuit parameters for reproducibility, and optimize our cost function using our 40 training data points. This optimization process modifies the variational circuit parameters based on the output of the cost function. Note that the optimization will take a while to run. " ] }, { @@ -377,6 +388,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ @@ -485,6 +497,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ @@ -492,6 +505,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ @@ -517,6 +531,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ @@ -585,6 +600,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ @@ -668,6 +684,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ @@ -681,7 +698,7 @@ "\n", "Our optimal circuit parameters, $\\vec{\\theta}^*$ are found when we find the minimum of the loss function, $f(\\vec{\\theta})$. However, there isn't a simple relationship between the loss function and the circuit parameters.\n", "\n", - "In fact, the loss landscape can be quite complicated, as shown in hills and valleys of the example below. The optimization method navigates us around the loss landscape, searching for the minimum, as shown by the black points and lines. we can see that two of the three searches end up in a local landscape minimum, rather than a global one. \n", + "As a result, the loss landscape can be complicated, as shown in the hills and valleys of the example below. The optimization method navigates us around the loss landscape, searching for the minimum, as shown by the black points and lines. We observe that two-thirds of the searches end up in a local landscape minimum, rather than a global one. \n", "\n", "![](images/vqc/loss-landscape.png)\n", "\n", @@ -697,6 +714,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ @@ -705,7 +723,7 @@ "1. Alberto Peruzzo, Jarrod McClean, Peter Shadbolt, Man-Hong Yung, Xiao-Qi Zhou, Peter J. Love, Alรกn Aspuru-Guzik and Jeremy L. O'Brien, *A variational eigenvalue solver on a quantum processor*, Nature Communications, 5:4213 (2014), [doi.org:10.1038/ncomms5213](https://doi.org/10.1038/ncomms5213), [arXiv:1304.3061](https://arxiv.org/abs/1304.3061).\n", "1. Edward Farhi, Jeffrey Goldstone and Sam Gutmann, *A Quantum Approximate Optimization Algorithm* (2014), [arXiv:1411.4028](https://arxiv.org/abs/1411.4028).\n", "1. Vojtech Havlicek, Antonio D. Cรณrcoles, Kristan Temme, Aram W. Harrow, Abhinav Kandala, Jerry M. Chow and Jay M. Gambetta, *Supervised learning with quantum enhanced feature spaces*, Nature 567, 209-212 (2019), [doi.org:10.1038/s41586-019-0980-2](https://doi.org/10.1038/s41586-019-0980-2), [arXiv:1804.11326](https://arxiv.org/abs/1804.11326).\n", - "1. Jarrod R. McClean, Sergio Boixo, Vadim N. Smelyanskiy, Ryan Babbush and Hartmut Neven, *Barren plateaus in quantum neural network training landscapes*, Nature Communications volume 9, Article number: 4812 (2018), [doi.org:10.1038/s41467-018-07090-4](https://www.nature.com/articles/s41467-018-07090-4) [arXiv:1803.1117](https://arxiv.org/abs/1803.11173)" + "1. Jarrod R. McClean, Sergio Boixo, Vadim N. Smelyanskiy, Ryan Babbush and Hartmut Neven, *Barren plateaus in quantum neural network training landscapes*, Nature Communications volume 9, Article number: 4812 (2018), [doi.org:10.1038/s41467-018-07090-4](https://www.nature.com/articles/s41467-018-07090-4) [arXiv:1803.1117](https://arxiv.org/abs/1803.11173)." ] }, { diff --git a/notebooks/v2/toc.yaml b/notebooks/v2/toc.yaml index 9245e9f2f..b397f2eac 100644 --- a/notebooks/v2/toc.yaml +++ b/notebooks/v2/toc.yaml @@ -169,7 +169,15 @@ - title: Quantum query algorithms id: query-algorithms uuid: f236ed68-91f2-470a-8152-29f09e60a30c - url: /algorithms/quantum-query-algorithms + url: /algorithms/01.query-algorithms/quantum-query-algorithms + - title: Algorithmic foundations + id: algorithmic-foundations + uuid: 00b26932-7d64-436c-86a9-56091c0419ac + url: /algorithms/02.algorithmic-foundations/algorithmic-foundations + - title: Phase estimation + id: phase-estimation + uuid: b49f2ca0-240d-417a-8f51-a6288d504ca3 + url: /algorithms/03.phase-estimation/phase-estimation-and-factoring - title: Introduction to Quantum Computing id: introduction-course diff --git a/package-lock.json b/package-lock.json index 8369711d0..804e5595c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,24 +13,24 @@ "@carbon/colors": "^10.37.1", "@carbon/icons-vue": "~10.48.0", "@carbon/themes": "^11.15.0", - "@carbon/vue": "^2.45.0", + "@carbon/vue": "^2.45.1", "@ckeditor/ckeditor5-build-classic": "^34.2.0", "@ckeditor/ckeditor5-vue": "^4.0.1", - "@codemirror/lang-python": "^6.1.2", + "@codemirror/lang-python": "^6.1.3", "@github/clipboard-copy-element": "^1.1.2", "@ibm/plex": "^6.1.1", "@jupyter-widgets/html-manager": "^0.20.5", - "@jupyter-widgets/jupyterlab-manager": "^3.1.4", + "@jupyter-widgets/jupyterlab-manager": "^3.1.5", "@jupyterlab/mathjax2": "^3.5.2", "@jupyterlab/outputarea": "^3.5.2", "@jupyterlab/rendermime": "^3.5.2", "@jupyterlab/services": "^6.5.2", "@lumino/widgets": "^1.36.0", "@mathigon/boost": "^1.1.1", - "@mathigon/euclid": "^1.1.10", + "@mathigon/euclid": "^1.1.12", "@mathigon/studio": "0.1.18", "@qiskit-community/qiskit-vue": "^3.4.0", - "@qiskit/web-components": "^0.10.3", + "@qiskit/web-components": "^0.15.3", "@webcomponents/webcomponentsjs": "^2.6.0", "carbon-components": "~10.58.3", "carbon-web-components": "^1.21.0", @@ -59,11 +59,11 @@ "devDependencies": { "@nuxtjs/eslint-config-typescript": "^10.0.0", "@types/bcryptjs": "2.4.2", - "@types/codemirror": "^5.60.6", + "@types/codemirror": "^5.60.8", "@types/express-flash": "0.0.2", "@types/fs-extra": "^9.0.13", "@types/jsdom": "^16.2.15", - "@types/lodash": "^4.14.195", + "@types/lodash": "^4.14.197", "@types/markdown-it": "^12.2.3", "@types/node-fetch": "^2.6.4", "@types/pug": "2.0.6", @@ -82,7 +82,7 @@ "jsdom": "^19.0.0", "nano-staged": "^0.8.0", "node-sass": "^6.0.1", - "nodemon": "^2.0.20", + "nodemon": "^2.0.22", "npm-run-all": "^4.1.5", "rimraf": "^3.0.2", "sass-loader": "^10.2.1", @@ -111,23 +111,89 @@ } }, "node_modules/@babel/code-frame": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.16.7.tgz", - "integrity": "sha512-iAXqUn8IIeBTNd72xsFlgaXHkMBMt6y4HJp1tIaK465CWLT/fG1aqB7ykr95gHHmlBdGbFeWWfyB4NJJ0nmeIg==", + "version": "7.22.13", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.13.tgz", + "integrity": "sha512-XktuhWlJ5g+3TJXc5upd9Ks1HutSArik6jf2eAjYFyIOf4ej3RN+184cZbzDvbPnuTJIUhPKKJE3cIsYTiAT3w==", "dependencies": { - "@babel/highlight": "^7.16.7" + "@babel/highlight": "^7.22.13", + "chalk": "^2.4.2" }, "engines": { "node": ">=6.9.0" } }, + "node_modules/@babel/code-frame/node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/code-frame/node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/code-frame/node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/@babel/code-frame/node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==" + }, + "node_modules/@babel/code-frame/node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/@babel/code-frame/node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/code-frame/node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/@babel/generator": { - "version": "7.18.2", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.18.2.tgz", - "integrity": "sha512-W1lG5vUwFvfMd8HVXqdfbuG7RuaSrTCCD8cl8fP8wOivdbtbIg2Db3IWUcgvfxKbbn6ZBGYRW/Zk1MIwK49mgw==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.23.0.tgz", + "integrity": "sha512-lN85QRR+5IbYrMWM6Y4pE/noaQtg4pNiqeNGX60eqOfo6gtEj6uw/JagelB8vVztSd7R6M5n1+PQkDbHbBRU4g==", "dependencies": { - "@babel/types": "^7.18.2", - "@jridgewell/gen-mapping": "^0.3.0", + "@babel/types": "^7.23.0", + "@jridgewell/gen-mapping": "^0.3.2", + "@jridgewell/trace-mapping": "^0.3.17", "jsesc": "^2.5.1" }, "engines": { @@ -135,62 +201,70 @@ } }, "node_modules/@babel/helper-environment-visitor": { - "version": "7.18.2", - "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.18.2.tgz", - "integrity": "sha512-14GQKWkX9oJzPiQQ7/J36FTXcD4kSp8egKjO9nINlSKiHITRA9q/R74qu8S9xlc/b/yjsJItQUeeh3xnGN0voQ==", + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz", + "integrity": "sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA==", "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-function-name": { - "version": "7.17.9", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.17.9.tgz", - "integrity": "sha512-7cRisGlVtiVqZ0MW0/yFB4atgpGLWEHUVYnb448hZK4x+vih0YO5UoS11XIYtZYqHd0dIPMdUSv8q5K4LdMnIg==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz", + "integrity": "sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw==", "dependencies": { - "@babel/template": "^7.16.7", - "@babel/types": "^7.17.0" + "@babel/template": "^7.22.15", + "@babel/types": "^7.23.0" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-hoist-variables": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.16.7.tgz", - "integrity": "sha512-m04d/0Op34H5v7pbZw6pSKP7weA6lsMvfiIAMeIvkY/R4xQtBSMFEigu9QTZ2qB/9l22vsxtM8a+Q8CzD255fg==", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz", + "integrity": "sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==", "dependencies": { - "@babel/types": "^7.16.7" + "@babel/types": "^7.22.5" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-split-export-declaration": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.16.7.tgz", - "integrity": "sha512-xbWoy/PFoxSWazIToT9Sif+jJTlrMcndIsaOKvTA6u7QEo7ilkRZpjew18/W3c7nm8fXdUDXh02VXTbZ0pGDNw==", + "version": "7.22.6", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz", + "integrity": "sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==", "dependencies": { - "@babel/types": "^7.16.7" + "@babel/types": "^7.22.5" }, "engines": { "node": ">=6.9.0" } }, + "node_modules/@babel/helper-string-parser": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.22.5.tgz", + "integrity": "sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw==", + "engines": { + "node": ">=6.9.0" + } + }, "node_modules/@babel/helper-validator-identifier": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.16.7.tgz", - "integrity": "sha512-hsEnFemeiW4D08A5gUAZxLBTXpZ39P+a+DGDsHw1yxqyQ/jzFEnxf5uTEGp+3bzAbNOxU1paTgYS4ECU/IgfDw==", + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz", + "integrity": "sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==", "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/highlight": { - "version": "7.17.12", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.17.12.tgz", - "integrity": "sha512-7yykMVF3hfZY2jsHZEEgLc+3x4o1O+fYyULu11GynEUQNwB6lua+IIQn1FiJxNucd5UlyJryrwsOh8PL9Sn8Qg==", + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.20.tgz", + "integrity": "sha512-dkdMCN3py0+ksCgYmGG8jKeGA/8Tk+gJwSYYlFGxG5lmhfKNoAy004YpLxpS1W2J8m/EK2Ew+yOs9pVRwO89mg==", "dependencies": { - "@babel/helper-validator-identifier": "^7.16.7", - "chalk": "^2.0.0", + "@babel/helper-validator-identifier": "^7.22.20", + "chalk": "^2.4.2", "js-tokens": "^4.0.0" }, "engines": { @@ -267,9 +341,9 @@ } }, "node_modules/@babel/parser": { - "version": "7.18.4", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.18.4.tgz", - "integrity": "sha512-FDge0dFazETFcxGw/EXzOkN8uJp0PC7Qbm+Pe9T+av2zlBpOgunFHkQPPn+eRuClU73JF+98D531UgayY89tow==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.23.0.tgz", + "integrity": "sha512-vvPKKdMemU85V9WE/l5wZEmImpCtLqbnTvqDS2U1fJ96KrxoW7KrXhNsNCblQlg8Ck4b85yxdTyelsMUgFUXiw==", "bin": { "parser": "bin/babel-parser.js" }, @@ -289,31 +363,31 @@ } }, "node_modules/@babel/template": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.16.7.tgz", - "integrity": "sha512-I8j/x8kHUrbYRTUxXrrMbfCa7jxkE7tZre39x3kjr9hvI82cK1FfqLygotcWN5kdPGWcLdWMHpSBavse5tWw3w==", + "version": "7.22.15", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.22.15.tgz", + "integrity": "sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w==", "dependencies": { - "@babel/code-frame": "^7.16.7", - "@babel/parser": "^7.16.7", - "@babel/types": "^7.16.7" + "@babel/code-frame": "^7.22.13", + "@babel/parser": "^7.22.15", + "@babel/types": "^7.22.15" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/traverse": { - "version": "7.18.2", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.18.2.tgz", - "integrity": "sha512-9eNwoeovJ6KH9zcCNnENY7DMFwTU9JdGCFtqNLfUAqtUHRCOsTOqWoffosP8vKmNYeSBUv3yVJXjfd8ucwOjUA==", - "dependencies": { - "@babel/code-frame": "^7.16.7", - "@babel/generator": "^7.18.2", - "@babel/helper-environment-visitor": "^7.18.2", - "@babel/helper-function-name": "^7.17.9", - "@babel/helper-hoist-variables": "^7.16.7", - "@babel/helper-split-export-declaration": "^7.16.7", - "@babel/parser": "^7.18.0", - "@babel/types": "^7.18.2", + "version": "7.23.2", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.23.2.tgz", + "integrity": "sha512-azpe59SQ48qG6nu2CzcMLbxUudtN+dOM9kDbUqGq3HXUJRlo7i8fvPoxQUzYgLZ4cMVmuZgm8vvBpNeRhd6XSw==", + "dependencies": { + "@babel/code-frame": "^7.22.13", + "@babel/generator": "^7.23.0", + "@babel/helper-environment-visitor": "^7.22.20", + "@babel/helper-function-name": "^7.23.0", + "@babel/helper-hoist-variables": "^7.22.5", + "@babel/helper-split-export-declaration": "^7.22.6", + "@babel/parser": "^7.23.0", + "@babel/types": "^7.23.0", "debug": "^4.1.0", "globals": "^11.1.0" }, @@ -330,11 +404,12 @@ } }, "node_modules/@babel/types": { - "version": "7.18.4", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.18.4.tgz", - "integrity": "sha512-ThN1mBcMq5pG/Vm2IcBmPPfyPXbd8S02rS+OBIDENdufvqC7Z/jHPCv9IcP01277aKtDI8g/2XysBN4hA8niiw==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.23.0.tgz", + "integrity": "sha512-0oIyUfKoI3mSqMvsxBdclDwxXKXAUA8v/apZbc+iSyARYou1o8ZGDxbUYyLFoW2arqS2jDGqJuZvv1d/io1axg==", "dependencies": { - "@babel/helper-validator-identifier": "^7.16.7", + "@babel/helper-string-parser": "^7.22.5", + "@babel/helper-validator-identifier": "^7.22.20", "to-fast-properties": "^2.0.0" }, "engines": { @@ -430,9 +505,9 @@ "integrity": "sha512-YXed2JUSCGddp3UnY5OffR3W8Pl+dy9a+vfUtYhSLH9TbIEBR6EvYIfvruFMhA8JIVMCUClUqgyMQXM5oMFQ0g==" }, "node_modules/@carbon/icons": { - "version": "11.5.0", - "resolved": "https://registry.npmjs.org/@carbon/icons/-/icons-11.5.0.tgz", - "integrity": "sha512-2k6TGPsqxQunVsWK6b/zWUQ2tjVFBBxCWRI2shJcgu016XsslMWs+zAa0ASZ7MYxOrhgisDmGvXQDVRU7MF68A==" + "version": "11.26.0", + "resolved": "https://registry.npmjs.org/@carbon/icons/-/icons-11.26.0.tgz", + "integrity": "sha512-YRYSnbZ3yBkH7i/Ne7VOwaf8ytL+bLed5ZWyjsdpagJyvG3g1CXQRvEub2vvXGis089s1z42rgU4pgLoyKjwVw==" }, "node_modules/@carbon/icons-vue": { "version": "10.48.0", @@ -498,9 +573,9 @@ } }, "node_modules/@carbon/vue": { - "version": "2.45.0", - "resolved": "https://registry.npmjs.org/@carbon/vue/-/vue-2.45.0.tgz", - "integrity": "sha512-2qDtc21aB2D/GySq2C1/BJewFZPJKOZeznapTgFh2N2V3ad1d7/l5MzewdCdGwQsmhTBNDIqmn7nyO6Gye/zlQ==", + "version": "2.45.1", + "resolved": "https://registry.npmjs.org/@carbon/vue/-/vue-2.45.1.tgz", + "integrity": "sha512-REvHUw2VTt5xwuJe8iijURo11LO3FPDQrmqV0PQRyfznM9LqvZROW+LBKAbjoTgBN9I2dbHO7rFJngTmo44BNg==", "hasInstallScript": true, "dependencies": { "@carbon/icons-vue": "10.63.0", @@ -532,9 +607,9 @@ } }, "node_modules/@carbon/vue/node_modules/csstype": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.1.tgz", - "integrity": "sha512-DJR/VvkAvSZW9bTouZue2sSxDwdTN92uHjqeKVm+0dAqdfNykRzQ95tay8aXMBAAPpUiq4Qcug2L7neoRh2Egw==" + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.2.tgz", + "integrity": "sha512-I7K1Uu0MBPzaFKg4nI5Q7Vs2t+3gWWW648spaF+Rg7pI9ds18Ugn+lvg4SHczUdKlHI5LWBXyqfS8+DufyBsgQ==" }, "node_modules/@carbon/vue/node_modules/flatpickr": { "version": "4.6.13", @@ -542,9 +617,9 @@ "integrity": "sha512-97PMG/aywoYpB4IvbvUJi0RQi8vearvU0oov1WW3k0WZPBMrTQVqekSX5CjSG/M4Q3i6A/0FKXC7RyAoAUUSPw==" }, "node_modules/@carbon/vue/node_modules/postcss": { - "version": "8.4.21", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.21.tgz", - "integrity": "sha512-tP7u/Sn/dVxK2NnruI4H9BG+x+Wxz6oeZ1cJ8P6G/PZY0IKk4k/63TDsQf2kQq3+qoJeLm2kIBUNlZe3zgb4Zg==", + "version": "8.4.24", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.24.tgz", + "integrity": "sha512-M0RzbcI0sO/XJNucsGjvWU9ERWxb/ytp1w6dKtxTKgixdtQDq4rmx/g8W1hnaheq9jgwL/oyEdH5Bc4WwJKMqg==", "funding": [ { "type": "opencollective", @@ -553,10 +628,14 @@ { "type": "tidelift", "url": "https://tidelift.com/funding/github/npm/postcss" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" } ], "dependencies": { - "nanoid": "^3.3.4", + "nanoid": "^3.3.6", "picocolors": "^1.0.0", "source-map-js": "^1.0.2" }, @@ -573,6 +652,41 @@ "csstype": "^3.1.0" } }, + "node_modules/@carbon/web-components": { + "version": "1.31.0", + "resolved": "https://registry.npmjs.org/@carbon/web-components/-/web-components-1.31.0.tgz", + "integrity": "sha512-VW+B24snyYnt7PSwpT3qhmtKcQW1+KlzfED3jN9ubuOYmUzbOsTqzMFay0zKB7e0Ublrlv+utkgvN6EUxd4CUg==", + "dependencies": { + "@babel/runtime": "^7.16.3", + "carbon-components": "10.58.3", + "flatpickr": "4.6.13", + "lit-element": "^2.5.1", + "lit-html": "^1.4.1", + "lodash-es": "^4.17.21" + } + }, + "node_modules/@carbon/web-components/node_modules/carbon-components": { + "version": "10.58.3", + "resolved": "https://registry.npmjs.org/carbon-components/-/carbon-components-10.58.3.tgz", + "integrity": "sha512-RjTnrWCGStsIZ7nErw97AZI9sQWxQ8oIgo3QMdV0FWFcpTOECA4I9Dy4WPpRRdSMBcQpLetTxqjDGourM4u8Tw==", + "hasInstallScript": true, + "dependencies": { + "@carbon/telemetry": "0.1.0", + "flatpickr": "4.6.1", + "lodash.debounce": "^4.0.8", + "warning": "^3.0.0" + } + }, + "node_modules/@carbon/web-components/node_modules/carbon-components/node_modules/flatpickr": { + "version": "4.6.1", + "resolved": "https://registry.npmjs.org/flatpickr/-/flatpickr-4.6.1.tgz", + "integrity": "sha512-3ULSxbXmcMIRzer/2jLNweoqHpwDvsjEawO2FUd9UFR8uPwLM+LruZcPDpuZStcEgbQKhuFOfXo4nYdGladSNw==" + }, + "node_modules/@carbon/web-components/node_modules/flatpickr": { + "version": "4.6.13", + "resolved": "https://registry.npmjs.org/flatpickr/-/flatpickr-4.6.13.tgz", + "integrity": "sha512-97PMG/aywoYpB4IvbvUJi0RQi8vearvU0oov1WW3k0WZPBMrTQVqekSX5CjSG/M4Q3i6A/0FKXC7RyAoAUUSPw==" + }, "node_modules/@ckeditor/ckeditor5-adapter-ckfinder": { "version": "34.2.0", "resolved": "https://registry.npmjs.org/@ckeditor/ckeditor5-adapter-ckfinder/-/ckeditor5-adapter-ckfinder-34.2.0.tgz", @@ -1039,19 +1153,19 @@ } }, "node_modules/@codemirror/lang-python": { - "version": "6.1.2", - "resolved": "https://registry.npmjs.org/@codemirror/lang-python/-/lang-python-6.1.2.tgz", - "integrity": "sha512-nbQfifLBZstpt6Oo4XxA2LOzlSp4b/7Bc5cmodG1R+Cs5PLLCTUvsMNWDnziiCfTOG/SW1rVzXq/GbIr6WXlcw==", + "version": "6.1.3", + "resolved": "https://registry.npmjs.org/@codemirror/lang-python/-/lang-python-6.1.3.tgz", + "integrity": "sha512-S9w2Jl74hFlD5nqtUMIaXAq9t5WlM0acCkyuQWUUSvZclk1sV+UfnpFiZzuZSG+hfEaOmxKR5UxY/Uxswn7EhQ==", "dependencies": { "@codemirror/autocomplete": "^6.3.2", - "@codemirror/language": "^6.0.0", - "@lezer/python": "^1.0.0" + "@codemirror/language": "^6.8.0", + "@lezer/python": "^1.1.4" } }, "node_modules/@codemirror/language": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/@codemirror/language/-/language-6.2.0.tgz", - "integrity": "sha512-tabB0Ef/BflwoEmTB4a//WZ9P90UQyne9qWB9YFsmeS4bnEqSys7UpGk/da1URMXhyfuzWCwp+AQNMhvu8SfnA==", + "version": "6.8.0", + "resolved": "https://registry.npmjs.org/@codemirror/language/-/language-6.8.0.tgz", + "integrity": "sha512-r1paAyWOZkfY0RaYEZj3Kul+MiQTEbDvYqf8gPGaRvNneHXCmfSaAVFjwRUPlgxS8yflMxw2CTu6uCMp8R8A2g==", "dependencies": { "@codemirror/state": "^6.0.0", "@codemirror/view": "^6.0.0", @@ -1546,11 +1660,11 @@ } }, "node_modules/@jridgewell/gen-mapping": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.1.tgz", - "integrity": "sha512-GcHwniMlA2z+WFPWuY8lp3fsza0I8xPFMWL5+n8LYyP6PSvPrXf4+n8stDHZY2DM0zy9sVkRDy1jDI4XGzYVqg==", + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz", + "integrity": "sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==", "dependencies": { - "@jridgewell/set-array": "^1.0.0", + "@jridgewell/set-array": "^1.0.1", "@jridgewell/sourcemap-codec": "^1.4.10", "@jridgewell/trace-mapping": "^0.3.9" }, @@ -1559,33 +1673,33 @@ } }, "node_modules/@jridgewell/resolve-uri": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.0.7.tgz", - "integrity": "sha512-8cXDaBBHOr2pQ7j77Y6Vp5VDT2sIqWyWQ56TjEq4ih/a4iST3dItRe8Q9fp0rrIl9DoKhWQtUQz/YpOxLkXbNA==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz", + "integrity": "sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==", "engines": { "node": ">=6.0.0" } }, "node_modules/@jridgewell/set-array": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.1.tgz", - "integrity": "sha512-Ct5MqZkLGEXTVmQYbGtx9SVqD2fqwvdubdps5D3djjAkgkKwT918VNOz65pEHFaYTeWcukmJmH5SwsA9Tn2ObQ==", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", + "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", "engines": { "node": ">=6.0.0" } }, "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.4.13", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.13.tgz", - "integrity": "sha512-GryiOJmNcWbovBxTfZSF71V/mXbgcV3MewDe3kIMCLyIh5e7SKAeUZs+rMnJ8jkMolZ/4/VsdBmMrw3l+VdZ3w==" + "version": "1.4.15", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", + "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==" }, "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.13", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.13.tgz", - "integrity": "sha512-o1xbKhp9qnIAoHJSWd6KlCZfqslL4valSF81H8ImioOAxluWYWOpWkpyktY2vnt4tbrX9XYaxovq6cgowaJp2w==", + "version": "0.3.20", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.20.tgz", + "integrity": "sha512-R8LcPeWZol2zR8mmH3JeKQ6QRCFb7XgUhV9ZlGhHLGyg4wpPiPZNQOOWhFZhxKw8u//yTbNGI42Bx/3paXEQ+Q==", "dependencies": { - "@jridgewell/resolve-uri": "^3.0.3", - "@jridgewell/sourcemap-codec": "^1.4.10" + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" } }, "node_modules/@juggle/resize-observer": { @@ -1646,9 +1760,9 @@ } }, "node_modules/@jupyter-widgets/jupyterlab-manager": { - "version": "3.1.4", - "resolved": "https://registry.npmjs.org/@jupyter-widgets/jupyterlab-manager/-/jupyterlab-manager-3.1.4.tgz", - "integrity": "sha512-MfGSNskDmq7E5jtWrE+qyPnkFJkMDuAxKsIwaB+hGqWn7tERIFjaM5hfOBWhUy/AU7kQibFeviF9OKmi/0A/Tg==", + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/@jupyter-widgets/jupyterlab-manager/-/jupyterlab-manager-3.1.5.tgz", + "integrity": "sha512-flXl4807yf2UxBYwUOewGzyryqrGpbrgjU6oG9HbqNxnpbLrQg/R//2O4ggChuBLtsAB2Tfori9fCmR6y4Az6Q==", "dependencies": { "@jupyter-widgets/base": "^4.1.4", "@jupyter-widgets/controls": "^3.1.4", @@ -2239,18 +2353,26 @@ } }, "node_modules/@lezer/python": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@lezer/python/-/python-1.0.0.tgz", - "integrity": "sha512-UQtDPmNhXxQZ7/Uoh8mR6sckrFzeyrjCkTIy7WQY8Sjdfi8wmr49iPbgsThy1Jy0DDBTnqZRULDngXNJ5AWVqg==", + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/@lezer/python/-/python-1.1.7.tgz", + "integrity": "sha512-RbhKQ9+Y/r/Xv6OcJmETEM5tBFdpdAJRqrgi3akJkWBLCuiAaLP/jKdYzu+ICljaSXPCQeznrv+r9HUEnjq3HQ==", "dependencies": { "@lezer/highlight": "^1.0.0", "@lezer/lr": "^1.0.0" } }, + "node_modules/@lit-labs/ssr-dom-shim": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@lit-labs/ssr-dom-shim/-/ssr-dom-shim-1.1.1.tgz", + "integrity": "sha512-kXOeFbfCm4fFf2A3WwVEeQj55tMZa8c8/f9AKHMobQMkzNUfUj+antR3fRPaZJawsa1aZiP/Da3ndpZrwEe4rQ==" + }, "node_modules/@lit/reactive-element": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/@lit/reactive-element/-/reactive-element-1.4.1.tgz", - "integrity": "sha512-qDv4851VFSaBWzpS02cXHclo40jsbAjRXnebNXpm0uVg32kCneZPo9RYVQtrTNICtZ+1wAYHu1ZtxWSWMbKrBw==" + "version": "1.6.3", + "resolved": "https://registry.npmjs.org/@lit/reactive-element/-/reactive-element-1.6.3.tgz", + "integrity": "sha512-QuTgnG52Poic7uM1AN5yJ09QMe0O28e10XzSvWDz02TJiiKee4stsiownEIadWm8nYzyDAyT+gKzUoZmiWQtsQ==", + "dependencies": { + "@lit-labs/ssr-dom-shim": "^1.0.0" + } }, "node_modules/@lumino/algorithm": { "version": "1.9.2", @@ -2418,31 +2540,31 @@ } }, "node_modules/@mathigon/euclid": { - "version": "1.1.10", - "resolved": "https://registry.npmjs.org/@mathigon/euclid/-/euclid-1.1.10.tgz", - "integrity": "sha512-aJ1a/TtDl05JCmLBuhCC8Ln4zDNTVc0YziLPdH0bcbFrwUYCRAFP8mhGNtM7A3T7lWdW2nuQ5oci8UNMAA7CgA==", + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/@mathigon/euclid/-/euclid-1.1.12.tgz", + "integrity": "sha512-bEVDyQyBgbQ83RTdX8UpWGQpVHw40UKK2u/zu0pDas5wFhlrCo9rMGsRHWTFf8DcOjYOAZKEhsGs4klp1uNY6A==", "dependencies": { - "@mathigon/core": "1.1.7", - "@mathigon/fermat": "1.1.7" + "@mathigon/core": "1.1.10", + "@mathigon/fermat": "1.1.9" }, "engines": { "node": ">=14" } }, "node_modules/@mathigon/euclid/node_modules/@mathigon/core": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/@mathigon/core/-/core-1.1.7.tgz", - "integrity": "sha512-evgsJ0RslmP02m2KzzhkKcAQUQhqzyMue4tuFQqGgEYxm8gRCNS+jyUXM5YcPnx+xio4lQBCE030x0yM4ztrCA==", + "version": "1.1.10", + "resolved": "https://registry.npmjs.org/@mathigon/core/-/core-1.1.10.tgz", + "integrity": "sha512-/8dUkB6rVubnFyUnj86hFaRkR+darhcIazukUhTu/XW8oeQcnev6ayBVbO/9lJL19h4pwfjliyUT/X7PHyjWgg==", "engines": { "node": ">=14" } }, "node_modules/@mathigon/euclid/node_modules/@mathigon/fermat": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/@mathigon/fermat/-/fermat-1.1.7.tgz", - "integrity": "sha512-4stVFT0jZCyYMOkT4iYVjD0P0pd0wWiNOas1Dunk1IOmDD90wUz17Oq+FnT+YCiKBpVndNF3le8hw0jKNfMKVQ==", + "version": "1.1.9", + "resolved": "https://registry.npmjs.org/@mathigon/fermat/-/fermat-1.1.9.tgz", + "integrity": "sha512-QhYCRpjD8W4jYZdGtl91L+qf8/MDjil8aBVbm7INXprWXcQbkBDOfIVyi3wKKxwqMJb/gUMoX4ZlD0T/vBzDDA==", "dependencies": { - "@mathigon/core": "1.1.7" + "@mathigon/core": "1.1.10" }, "engines": { "node": ">=14" @@ -2842,58 +2964,59 @@ } }, "node_modules/@qiskit/web-components": { - "version": "0.10.3", - "resolved": "https://registry.npmjs.org/@qiskit/web-components/-/web-components-0.10.3.tgz", - "integrity": "sha512-Y7dVqBipkwElkSK0AjplAZ4sCeL1jTSieG9GXpK5EOYGg6l9O6eAAGP1wixGwiILUjXQVBhMgrtd+BBIoqNOrw==", + "version": "0.15.3", + "resolved": "https://registry.npmjs.org/@qiskit/web-components/-/web-components-0.15.3.tgz", + "integrity": "sha512-FrILLujBDEefCbx6+mfbs2NB6yS5w5dcjBj9PW3fkSGcCV5bhlhWr6tm4Ee5c0BBfJLbOKf7W+Spr8Myo3lGMQ==", "dependencies": { "@carbon/colors": "^10.37.1", "@carbon/icon-helpers": "^10.30.0", "@carbon/icons": "^11.3.0", "@carbon/layout": "^10.37.1", - "@carbon/type": "^10.45.0", - "carbon-web-components": "^1.21.0", - "lit": "^2.4.1", + "@carbon/type": "^10.45.1", + "@carbon/web-components": "^1.25.0", + "lit": "^2.6.1", "lit-element": "^3.2.2", - "lit-html": "^2.4.0", - "tslib": "^2.4.1" + "lit-html": "^2.6.1", + "tslib": "^2.5.0" } }, "node_modules/@qiskit/web-components/node_modules/@carbon/grid": { - "version": "10.43.1", - "resolved": "https://registry.npmjs.org/@carbon/grid/-/grid-10.43.1.tgz", - "integrity": "sha512-gBfAEIfso5GjYPB1+BHjpNIfzDzBHb8xz9GRBhdrTlDVw9RJ4KH4MfYDeObiFQ/I7/6YCOE+LjjLv/BTm9iWBQ==", + "version": "10.43.2", + "resolved": "https://registry.npmjs.org/@carbon/grid/-/grid-10.43.2.tgz", + "integrity": "sha512-chhjz7cNl7TdKJ1MVhpXlNwtuKmdgWYygQFLShv1FnY9atMYv42hguGG289TZgPOuMpgYLyA9VOCS4IDVjC/1A==", "dependencies": { "@carbon/import-once": "^10.7.0", - "@carbon/layout": "^10.37.1" + "@carbon/layout": "^10.37.2" } }, "node_modules/@qiskit/web-components/node_modules/@carbon/layout": { - "version": "10.37.1", - "resolved": "https://registry.npmjs.org/@carbon/layout/-/layout-10.37.1.tgz", - "integrity": "sha512-iX8rWc2CkFB7W7wi5NLa3pVRVb/jRI2KrVDna3FO3X3DgNz3zoRCgN+r2c+8FEhpJWeUwds5aDzTWUuTtlOT3w==" + "version": "10.37.2", + "resolved": "https://registry.npmjs.org/@carbon/layout/-/layout-10.37.2.tgz", + "integrity": "sha512-PRw9yxbMWy2ovAkIkIDxSkVVR7lYfXUBIRO8lD/nw+X+jLDh+cIIIsB5YHA5VpOYCx9iQr2g9dRmoNgCmOVkrg==" }, "node_modules/@qiskit/web-components/node_modules/@carbon/type": { - "version": "10.45.1", - "resolved": "https://registry.npmjs.org/@carbon/type/-/type-10.45.1.tgz", - "integrity": "sha512-c7+5xDu6VXrseC578ED/qiZkoxCPZCRrgXE/ruFFQSsW2URLUGV6naxIbNewUnJ/pyIliGBCUKzQP8FDvGSvWA==", + "version": "10.45.3", + "resolved": "https://registry.npmjs.org/@carbon/type/-/type-10.45.3.tgz", + "integrity": "sha512-o/1vy59+IMjNCSyfS58Z5zQT10IuSt9SP/r631UbPLuVgotWWjACe57M5gxyCJHv2ZTIoTkP6dWFoomVSOPDjg==", "dependencies": { - "@carbon/grid": "^10.43.0", + "@carbon/grid": "^10.43.2", "@carbon/import-once": "^10.7.0" } }, "node_modules/@qiskit/web-components/node_modules/lit-element": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/lit-element/-/lit-element-3.2.2.tgz", - "integrity": "sha512-6ZgxBR9KNroqKb6+htkyBwD90XGRiqKDHVrW/Eh0EZ+l+iC+u+v+w3/BA5NGi4nizAVHGYvQBHUDuSmLjPp7NQ==", + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/lit-element/-/lit-element-3.3.3.tgz", + "integrity": "sha512-XbeRxmTHubXENkV4h8RIPyr8lXc+Ff28rkcQzw3G6up2xg5E8Zu1IgOWIwBLEQsu3cOVFqdYwiVi0hv0SlpqUA==", "dependencies": { + "@lit-labs/ssr-dom-shim": "^1.1.0", "@lit/reactive-element": "^1.3.0", - "lit-html": "^2.2.0" + "lit-html": "^2.8.0" } }, "node_modules/@qiskit/web-components/node_modules/lit-html": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/lit-html/-/lit-html-2.4.0.tgz", - "integrity": "sha512-G6qXu4JNUpY6aaF2VMfaszhO9hlWw0hOTRFDmuMheg/nDYGB+2RztUSOyrzALAbr8Nh0Y7qjhYkReh3rPnplVg==", + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/lit-html/-/lit-html-2.8.0.tgz", + "integrity": "sha512-o9t+MQM3P4y7M7yNzqAyjp7z+mQGa4NS4CxiyLqFPyFWyc4O+nodLrkrxSaCTrla6M5YOLaT3RpbbqjszB5g3Q==", "dependencies": { "@types/trusted-types": "^2.0.2" } @@ -3080,9 +3203,9 @@ } }, "node_modules/@types/codemirror": { - "version": "5.60.6", - "resolved": "https://registry.npmjs.org/@types/codemirror/-/codemirror-5.60.6.tgz", - "integrity": "sha512-JIDPSvkYRlcv/2F0erqD+de2ni/Mz6FJMEGb0vwF6ByQOcHIKfiEfwrO4d6dSRwYeHyNUMpGjev0PyjX2M0XWw==", + "version": "5.60.8", + "resolved": "https://registry.npmjs.org/@types/codemirror/-/codemirror-5.60.8.tgz", + "integrity": "sha512-VjFgDF/eB+Aklcy15TtOTLQeMjTo07k7KAjql8OK5Dirr7a6sJY4T1uVBDuTVG9VEmn1uUsohOpYnVfgC6/jyw==", "dev": true, "dependencies": { "@types/tern": "*" @@ -3259,9 +3382,9 @@ "dev": true }, "node_modules/@types/lodash": { - "version": "4.14.195", - "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.195.tgz", - "integrity": "sha512-Hwx9EUgdwf2GLarOjQp5ZH8ZmblzcbTBC2wtQWNKARBSxM9ezRIAUpeDTgoQRAFB0+8CNWXVA9+MaSOzOF3nPg==" + "version": "4.14.197", + "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.197.tgz", + "integrity": "sha512-BMVOiWs0uNxHVlHBgzTIqJYmj+PgCo4euloGF+5m4okL3rEYzM2EEv78mw8zWSMM57dM7kVIgJ2QDvwHSoCI5g==" }, "node_modules/@types/long": { "version": "4.0.2", @@ -3447,9 +3570,9 @@ "dev": true }, "node_modules/@types/trusted-types": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/@types/trusted-types/-/trusted-types-2.0.2.tgz", - "integrity": "sha512-F5DIZ36YVLE+PN+Zwws4kJogq47hNgX3Nx6WyDJ3kcplxyke3XIzB8uK5n/Lpm1HBsbGzd6nmGehL8cPekP+Tg==" + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@types/trusted-types/-/trusted-types-2.0.3.tgz", + "integrity": "sha512-NfQ4gyz38SL8sDNrSixxU2Os1a5xcdFxipAFxYEuLUlvU2uDwS4NUpsImcf1//SlWItCVMMLiylsxbmNMToV/g==" }, "node_modules/@types/uglify-js": { "version": "3.13.3", @@ -3593,9 +3716,9 @@ } }, "node_modules/@typescript-eslint/eslint-plugin/node_modules/semver": { - "version": "7.3.7", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz", - "integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==", + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", "dev": true, "dependencies": { "lru-cache": "^6.0.0" @@ -3736,9 +3859,9 @@ } }, "node_modules/@typescript-eslint/typescript-estree/node_modules/semver": { - "version": "7.3.7", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz", - "integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==", + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", "dev": true, "dependencies": { "lru-cache": "^6.0.0" @@ -6332,9 +6455,9 @@ } }, "node_modules/builtins/node_modules/semver": { - "version": "7.3.7", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz", - "integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==", + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", "dev": true, "dependencies": { "lru-cache": "^6.0.0" @@ -6712,9 +6835,9 @@ } }, "node_modules/carbon-web-components/node_modules/semver": { - "version": "7.3.7", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz", - "integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==", + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", "dependencies": { "lru-cache": "^6.0.0" }, @@ -7963,9 +8086,9 @@ } }, "node_modules/copy-webpack-plugin/node_modules/semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", "dev": true, "bin": { "semver": "bin/semver" @@ -9252,9 +9375,9 @@ } }, "node_modules/cypress/node_modules/semver": { - "version": "7.3.7", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz", - "integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==", + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", "dev": true, "dependencies": { "lru-cache": "^6.0.0" @@ -10642,9 +10765,9 @@ } }, "node_modules/eslint-plugin-n/node_modules/semver": { - "version": "7.3.7", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz", - "integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==", + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", "dev": true, "dependencies": { "lru-cache": "^6.0.0" @@ -10781,9 +10904,9 @@ } }, "node_modules/eslint-plugin-unicorn/node_modules/semver": { - "version": "7.3.7", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz", - "integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==", + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", "dev": true, "dependencies": { "lru-cache": "^6.0.0" @@ -10834,9 +10957,9 @@ } }, "node_modules/eslint-plugin-vue/node_modules/semver": { - "version": "7.3.7", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz", - "integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==", + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", "dev": true, "dependencies": { "lru-cache": "^6.0.0" @@ -11188,9 +11311,9 @@ } }, "node_modules/execa/node_modules/semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", "dev": true, "bin": { "semver": "bin/semver" @@ -12151,9 +12274,9 @@ } }, "node_modules/fork-ts-checker-webpack-plugin-v5/node_modules/semver": { - "version": "7.3.7", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz", - "integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==", + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", "dev": true, "optional": true, "dependencies": { @@ -12233,9 +12356,9 @@ } }, "node_modules/fork-ts-checker-webpack-plugin/node_modules/semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", "dev": true, "bin": { "semver": "bin/semver" @@ -15327,9 +15450,9 @@ } }, "node_modules/license-checker/node_modules/semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", "optional": true, "bin": { "semver": "bin/semver" @@ -15414,13 +15537,13 @@ } }, "node_modules/lit": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/lit/-/lit-2.4.1.tgz", - "integrity": "sha512-qohSgLiyN1cFnJG26dIiY03S4F49857A0AHQfnS0zYtnUVnD2MFvx+UT52rtXsIuNFQrnUupX+zyGSATlk1f/A==", + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/lit/-/lit-2.8.0.tgz", + "integrity": "sha512-4Sc3OFX9QHOJaHbmTMk28SYgVxLN3ePDjg7hofEft2zWlehFL3LiAuapWc4U/kYwMYJSh2hTCPZ6/LIC7ii0MA==", "dependencies": { - "@lit/reactive-element": "^1.4.0", - "lit-element": "^3.2.0", - "lit-html": "^2.4.0" + "@lit/reactive-element": "^1.6.0", + "lit-element": "^3.3.0", + "lit-html": "^2.8.0" } }, "node_modules/lit-element": { @@ -15437,18 +15560,19 @@ "integrity": "sha512-B9btcSgPYb1q4oSOb/PrOT6Z/H+r6xuNzfH4lFli/AWhYwdtrgQkQWBbIc6mdnf6E2IL3gDXdkkqNktpU0OZQA==" }, "node_modules/lit/node_modules/lit-element": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/lit-element/-/lit-element-3.2.2.tgz", - "integrity": "sha512-6ZgxBR9KNroqKb6+htkyBwD90XGRiqKDHVrW/Eh0EZ+l+iC+u+v+w3/BA5NGi4nizAVHGYvQBHUDuSmLjPp7NQ==", + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/lit-element/-/lit-element-3.3.3.tgz", + "integrity": "sha512-XbeRxmTHubXENkV4h8RIPyr8lXc+Ff28rkcQzw3G6up2xg5E8Zu1IgOWIwBLEQsu3cOVFqdYwiVi0hv0SlpqUA==", "dependencies": { + "@lit-labs/ssr-dom-shim": "^1.1.0", "@lit/reactive-element": "^1.3.0", - "lit-html": "^2.2.0" + "lit-html": "^2.8.0" } }, "node_modules/lit/node_modules/lit-html": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/lit-html/-/lit-html-2.4.0.tgz", - "integrity": "sha512-G6qXu4JNUpY6aaF2VMfaszhO9hlWw0hOTRFDmuMheg/nDYGB+2RztUSOyrzALAbr8Nh0Y7qjhYkReh3rPnplVg==", + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/lit-html/-/lit-html-2.8.0.tgz", + "integrity": "sha512-o9t+MQM3P4y7M7yNzqAyjp7z+mQGa4NS4CxiyLqFPyFWyc4O+nodLrkrxSaCTrla6M5YOLaT3RpbbqjszB5g3Q==", "dependencies": { "@types/trusted-types": "^2.0.2" } @@ -16587,9 +16711,9 @@ } }, "node_modules/mongodb-memory-server-core/node_modules/semver": { - "version": "7.3.8", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz", - "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==", + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", "dependencies": { "lru-cache": "^6.0.0" }, @@ -16958,9 +17082,9 @@ } }, "node_modules/node-gyp/node_modules/semver": { - "version": "7.3.7", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz", - "integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==", + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", "dev": true, "dependencies": { "lru-cache": "^6.0.0" @@ -17150,9 +17274,9 @@ } }, "node_modules/nodemon": { - "version": "2.0.20", - "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-2.0.20.tgz", - "integrity": "sha512-Km2mWHKKY5GzRg6i1j5OxOHQtuvVsgskLfigG25yTtbyfRGn/GNvIbRyOf1PSCKJ2aT/58TiuUsuOU5UToVViw==", + "version": "2.0.22", + "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-2.0.22.tgz", + "integrity": "sha512-B8YqaKMmyuCO7BowF1Z1/mkPqLk6cs/l63Ojtd6otKjMx47Dq1utxfRxcavH1I7VSaL8n5BUaoutadnsX3AAVQ==", "dev": true, "dependencies": { "chokidar": "^3.5.2", @@ -17196,9 +17320,9 @@ } }, "node_modules/nodemon/node_modules/semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", "dev": true, "bin": { "semver": "bin/semver" @@ -17257,9 +17381,9 @@ } }, "node_modules/normalize-package-data/node_modules/semver": { - "version": "7.3.7", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz", - "integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==", + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", "dev": true, "dependencies": { "lru-cache": "^6.0.0" @@ -17482,9 +17606,9 @@ } }, "node_modules/npm-run-all/node_modules/semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", "dev": true, "bin": { "semver": "bin/semver" @@ -18554,9 +18678,9 @@ } }, "node_modules/patch-package/node_modules/semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", "bin": { "semver": "bin/semver" } @@ -21259,9 +21383,9 @@ } }, "node_modules/read-installed/node_modules/semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", "optional": true, "bin": { "semver": "bin/semver" @@ -21298,9 +21422,9 @@ } }, "node_modules/read-package-json/node_modules/semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", "optional": true, "bin": { "semver": "bin/semver" @@ -21412,9 +21536,9 @@ } }, "node_modules/read-pkg/node_modules/semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", "dev": true, "bin": { "semver": "bin/semver" @@ -22478,9 +22602,9 @@ } }, "node_modules/sass-loader/node_modules/semver": { - "version": "7.3.7", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz", - "integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==", + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", "dev": true, "dependencies": { "lru-cache": "^6.0.0" @@ -22604,9 +22728,9 @@ } }, "node_modules/semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", "bin": { "semver": "bin/semver.js" } @@ -24523,9 +24647,9 @@ } }, "node_modules/terser-webpack-plugin/node_modules/semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", "dev": true, "bin": { "semver": "bin/semver" @@ -25072,9 +25196,9 @@ } }, "node_modules/tslib": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.1.tgz", - "integrity": "sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA==" + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" }, "node_modules/tslint": { "version": "5.20.1", @@ -25203,9 +25327,9 @@ } }, "node_modules/tslint/node_modules/semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", "dev": true, "bin": { "semver": "bin/semver" @@ -25998,9 +26122,9 @@ } }, "node_modules/vue-eslint-parser/node_modules/semver": { - "version": "7.3.7", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz", - "integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==", + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", "dev": true, "dependencies": { "lru-cache": "^6.0.0" @@ -27665,9 +27789,9 @@ } }, "node_modules/word-wrap": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", - "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.4.tgz", + "integrity": "sha512-2V81OA4ugVo5pRo46hAoD2ivUJx8jXmWXfUkY4KFNw0hEptvN0QfH3K4nHiwzGeKl5rFKedV48QVoqYavy4YpA==", "engines": { "node": ">=0.10.0" } @@ -28161,65 +28285,123 @@ } }, "@babel/code-frame": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.16.7.tgz", - "integrity": "sha512-iAXqUn8IIeBTNd72xsFlgaXHkMBMt6y4HJp1tIaK465CWLT/fG1aqB7ykr95gHHmlBdGbFeWWfyB4NJJ0nmeIg==", + "version": "7.22.13", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.13.tgz", + "integrity": "sha512-XktuhWlJ5g+3TJXc5upd9Ks1HutSArik6jf2eAjYFyIOf4ej3RN+184cZbzDvbPnuTJIUhPKKJE3cIsYTiAT3w==", "requires": { - "@babel/highlight": "^7.16.7" + "@babel/highlight": "^7.22.13", + "chalk": "^2.4.2" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==" + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==" + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==" + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "requires": { + "has-flag": "^3.0.0" + } + } } }, "@babel/generator": { - "version": "7.18.2", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.18.2.tgz", - "integrity": "sha512-W1lG5vUwFvfMd8HVXqdfbuG7RuaSrTCCD8cl8fP8wOivdbtbIg2Db3IWUcgvfxKbbn6ZBGYRW/Zk1MIwK49mgw==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.23.0.tgz", + "integrity": "sha512-lN85QRR+5IbYrMWM6Y4pE/noaQtg4pNiqeNGX60eqOfo6gtEj6uw/JagelB8vVztSd7R6M5n1+PQkDbHbBRU4g==", "requires": { - "@babel/types": "^7.18.2", - "@jridgewell/gen-mapping": "^0.3.0", + "@babel/types": "^7.23.0", + "@jridgewell/gen-mapping": "^0.3.2", + "@jridgewell/trace-mapping": "^0.3.17", "jsesc": "^2.5.1" } }, "@babel/helper-environment-visitor": { - "version": "7.18.2", - "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.18.2.tgz", - "integrity": "sha512-14GQKWkX9oJzPiQQ7/J36FTXcD4kSp8egKjO9nINlSKiHITRA9q/R74qu8S9xlc/b/yjsJItQUeeh3xnGN0voQ==" + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz", + "integrity": "sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA==" }, "@babel/helper-function-name": { - "version": "7.17.9", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.17.9.tgz", - "integrity": "sha512-7cRisGlVtiVqZ0MW0/yFB4atgpGLWEHUVYnb448hZK4x+vih0YO5UoS11XIYtZYqHd0dIPMdUSv8q5K4LdMnIg==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz", + "integrity": "sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw==", "requires": { - "@babel/template": "^7.16.7", - "@babel/types": "^7.17.0" + "@babel/template": "^7.22.15", + "@babel/types": "^7.23.0" } }, "@babel/helper-hoist-variables": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.16.7.tgz", - "integrity": "sha512-m04d/0Op34H5v7pbZw6pSKP7weA6lsMvfiIAMeIvkY/R4xQtBSMFEigu9QTZ2qB/9l22vsxtM8a+Q8CzD255fg==", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz", + "integrity": "sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==", "requires": { - "@babel/types": "^7.16.7" + "@babel/types": "^7.22.5" } }, "@babel/helper-split-export-declaration": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.16.7.tgz", - "integrity": "sha512-xbWoy/PFoxSWazIToT9Sif+jJTlrMcndIsaOKvTA6u7QEo7ilkRZpjew18/W3c7nm8fXdUDXh02VXTbZ0pGDNw==", + "version": "7.22.6", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz", + "integrity": "sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==", "requires": { - "@babel/types": "^7.16.7" + "@babel/types": "^7.22.5" } }, + "@babel/helper-string-parser": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.22.5.tgz", + "integrity": "sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw==" + }, "@babel/helper-validator-identifier": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.16.7.tgz", - "integrity": "sha512-hsEnFemeiW4D08A5gUAZxLBTXpZ39P+a+DGDsHw1yxqyQ/jzFEnxf5uTEGp+3bzAbNOxU1paTgYS4ECU/IgfDw==" + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz", + "integrity": "sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==" }, "@babel/highlight": { - "version": "7.17.12", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.17.12.tgz", - "integrity": "sha512-7yykMVF3hfZY2jsHZEEgLc+3x4o1O+fYyULu11GynEUQNwB6lua+IIQn1FiJxNucd5UlyJryrwsOh8PL9Sn8Qg==", + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.20.tgz", + "integrity": "sha512-dkdMCN3py0+ksCgYmGG8jKeGA/8Tk+gJwSYYlFGxG5lmhfKNoAy004YpLxpS1W2J8m/EK2Ew+yOs9pVRwO89mg==", "requires": { - "@babel/helper-validator-identifier": "^7.16.7", - "chalk": "^2.0.0", + "@babel/helper-validator-identifier": "^7.22.20", + "chalk": "^2.4.2", "js-tokens": "^4.0.0" }, "dependencies": { @@ -28280,9 +28462,9 @@ } }, "@babel/parser": { - "version": "7.18.4", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.18.4.tgz", - "integrity": "sha512-FDge0dFazETFcxGw/EXzOkN8uJp0PC7Qbm+Pe9T+av2zlBpOgunFHkQPPn+eRuClU73JF+98D531UgayY89tow==" + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.23.0.tgz", + "integrity": "sha512-vvPKKdMemU85V9WE/l5wZEmImpCtLqbnTvqDS2U1fJ96KrxoW7KrXhNsNCblQlg8Ck4b85yxdTyelsMUgFUXiw==" }, "@babel/runtime": { "version": "7.18.9", @@ -28293,28 +28475,28 @@ } }, "@babel/template": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.16.7.tgz", - "integrity": "sha512-I8j/x8kHUrbYRTUxXrrMbfCa7jxkE7tZre39x3kjr9hvI82cK1FfqLygotcWN5kdPGWcLdWMHpSBavse5tWw3w==", + "version": "7.22.15", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.22.15.tgz", + "integrity": "sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w==", "requires": { - "@babel/code-frame": "^7.16.7", - "@babel/parser": "^7.16.7", - "@babel/types": "^7.16.7" + "@babel/code-frame": "^7.22.13", + "@babel/parser": "^7.22.15", + "@babel/types": "^7.22.15" } }, "@babel/traverse": { - "version": "7.18.2", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.18.2.tgz", - "integrity": "sha512-9eNwoeovJ6KH9zcCNnENY7DMFwTU9JdGCFtqNLfUAqtUHRCOsTOqWoffosP8vKmNYeSBUv3yVJXjfd8ucwOjUA==", - "requires": { - "@babel/code-frame": "^7.16.7", - "@babel/generator": "^7.18.2", - "@babel/helper-environment-visitor": "^7.18.2", - "@babel/helper-function-name": "^7.17.9", - "@babel/helper-hoist-variables": "^7.16.7", - "@babel/helper-split-export-declaration": "^7.16.7", - "@babel/parser": "^7.18.0", - "@babel/types": "^7.18.2", + "version": "7.23.2", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.23.2.tgz", + "integrity": "sha512-azpe59SQ48qG6nu2CzcMLbxUudtN+dOM9kDbUqGq3HXUJRlo7i8fvPoxQUzYgLZ4cMVmuZgm8vvBpNeRhd6XSw==", + "requires": { + "@babel/code-frame": "^7.22.13", + "@babel/generator": "^7.23.0", + "@babel/helper-environment-visitor": "^7.22.20", + "@babel/helper-function-name": "^7.23.0", + "@babel/helper-hoist-variables": "^7.22.5", + "@babel/helper-split-export-declaration": "^7.22.6", + "@babel/parser": "^7.23.0", + "@babel/types": "^7.23.0", "debug": "^4.1.0", "globals": "^11.1.0" }, @@ -28327,11 +28509,12 @@ } }, "@babel/types": { - "version": "7.18.4", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.18.4.tgz", - "integrity": "sha512-ThN1mBcMq5pG/Vm2IcBmPPfyPXbd8S02rS+OBIDENdufvqC7Z/jHPCv9IcP01277aKtDI8g/2XysBN4hA8niiw==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.23.0.tgz", + "integrity": "sha512-0oIyUfKoI3mSqMvsxBdclDwxXKXAUA8v/apZbc+iSyARYou1o8ZGDxbUYyLFoW2arqS2jDGqJuZvv1d/io1axg==", "requires": { - "@babel/helper-validator-identifier": "^7.16.7", + "@babel/helper-string-parser": "^7.22.5", + "@babel/helper-validator-identifier": "^7.22.20", "to-fast-properties": "^2.0.0" } }, @@ -28418,9 +28601,9 @@ "integrity": "sha512-YXed2JUSCGddp3UnY5OffR3W8Pl+dy9a+vfUtYhSLH9TbIEBR6EvYIfvruFMhA8JIVMCUClUqgyMQXM5oMFQ0g==" }, "@carbon/icons": { - "version": "11.5.0", - "resolved": "https://registry.npmjs.org/@carbon/icons/-/icons-11.5.0.tgz", - "integrity": "sha512-2k6TGPsqxQunVsWK6b/zWUQ2tjVFBBxCWRI2shJcgu016XsslMWs+zAa0ASZ7MYxOrhgisDmGvXQDVRU7MF68A==" + "version": "11.26.0", + "resolved": "https://registry.npmjs.org/@carbon/icons/-/icons-11.26.0.tgz", + "integrity": "sha512-YRYSnbZ3yBkH7i/Ne7VOwaf8ytL+bLed5ZWyjsdpagJyvG3g1CXQRvEub2vvXGis089s1z42rgU4pgLoyKjwVw==" }, "@carbon/icons-vue": { "version": "10.48.0", @@ -28482,9 +28665,9 @@ } }, "@carbon/vue": { - "version": "2.45.0", - "resolved": "https://registry.npmjs.org/@carbon/vue/-/vue-2.45.0.tgz", - "integrity": "sha512-2qDtc21aB2D/GySq2C1/BJewFZPJKOZeznapTgFh2N2V3ad1d7/l5MzewdCdGwQsmhTBNDIqmn7nyO6Gye/zlQ==", + "version": "2.45.1", + "resolved": "https://registry.npmjs.org/@carbon/vue/-/vue-2.45.1.tgz", + "integrity": "sha512-REvHUw2VTt5xwuJe8iijURo11LO3FPDQrmqV0PQRyfznM9LqvZROW+LBKAbjoTgBN9I2dbHO7rFJngTmo44BNg==", "requires": { "@carbon/icons-vue": "10.63.0", "@carbon/telemetry": "^0.1.0", @@ -28512,9 +28695,9 @@ } }, "csstype": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.1.tgz", - "integrity": "sha512-DJR/VvkAvSZW9bTouZue2sSxDwdTN92uHjqeKVm+0dAqdfNykRzQ95tay8aXMBAAPpUiq4Qcug2L7neoRh2Egw==" + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.2.tgz", + "integrity": "sha512-I7K1Uu0MBPzaFKg4nI5Q7Vs2t+3gWWW648spaF+Rg7pI9ds18Ugn+lvg4SHczUdKlHI5LWBXyqfS8+DufyBsgQ==" }, "flatpickr": { "version": "4.6.13", @@ -28522,11 +28705,11 @@ "integrity": "sha512-97PMG/aywoYpB4IvbvUJi0RQi8vearvU0oov1WW3k0WZPBMrTQVqekSX5CjSG/M4Q3i6A/0FKXC7RyAoAUUSPw==" }, "postcss": { - "version": "8.4.21", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.21.tgz", - "integrity": "sha512-tP7u/Sn/dVxK2NnruI4H9BG+x+Wxz6oeZ1cJ8P6G/PZY0IKk4k/63TDsQf2kQq3+qoJeLm2kIBUNlZe3zgb4Zg==", + "version": "8.4.24", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.24.tgz", + "integrity": "sha512-M0RzbcI0sO/XJNucsGjvWU9ERWxb/ytp1w6dKtxTKgixdtQDq4rmx/g8W1hnaheq9jgwL/oyEdH5Bc4WwJKMqg==", "requires": { - "nanoid": "^3.3.4", + "nanoid": "^3.3.6", "picocolors": "^1.0.0", "source-map-js": "^1.0.2" } @@ -28542,6 +28725,44 @@ } } }, + "@carbon/web-components": { + "version": "1.31.0", + "resolved": "https://registry.npmjs.org/@carbon/web-components/-/web-components-1.31.0.tgz", + "integrity": "sha512-VW+B24snyYnt7PSwpT3qhmtKcQW1+KlzfED3jN9ubuOYmUzbOsTqzMFay0zKB7e0Ublrlv+utkgvN6EUxd4CUg==", + "requires": { + "@babel/runtime": "^7.16.3", + "carbon-components": "10.58.3", + "flatpickr": "4.6.13", + "lit-element": "^2.5.1", + "lit-html": "^1.4.1", + "lodash-es": "^4.17.21" + }, + "dependencies": { + "carbon-components": { + "version": "10.58.3", + "resolved": "https://registry.npmjs.org/carbon-components/-/carbon-components-10.58.3.tgz", + "integrity": "sha512-RjTnrWCGStsIZ7nErw97AZI9sQWxQ8oIgo3QMdV0FWFcpTOECA4I9Dy4WPpRRdSMBcQpLetTxqjDGourM4u8Tw==", + "requires": { + "@carbon/telemetry": "0.1.0", + "flatpickr": "4.6.1", + "lodash.debounce": "^4.0.8", + "warning": "^3.0.0" + }, + "dependencies": { + "flatpickr": { + "version": "4.6.1", + "resolved": "https://registry.npmjs.org/flatpickr/-/flatpickr-4.6.1.tgz", + "integrity": "sha512-3ULSxbXmcMIRzer/2jLNweoqHpwDvsjEawO2FUd9UFR8uPwLM+LruZcPDpuZStcEgbQKhuFOfXo4nYdGladSNw==" + } + } + }, + "flatpickr": { + "version": "4.6.13", + "resolved": "https://registry.npmjs.org/flatpickr/-/flatpickr-4.6.13.tgz", + "integrity": "sha512-97PMG/aywoYpB4IvbvUJi0RQi8vearvU0oov1WW3k0WZPBMrTQVqekSX5CjSG/M4Q3i6A/0FKXC7RyAoAUUSPw==" + } + } + }, "@ckeditor/ckeditor5-adapter-ckfinder": { "version": "34.2.0", "resolved": "https://registry.npmjs.org/@ckeditor/ckeditor5-adapter-ckfinder/-/ckeditor5-adapter-ckfinder-34.2.0.tgz", @@ -28874,19 +29095,19 @@ } }, "@codemirror/lang-python": { - "version": "6.1.2", - "resolved": "https://registry.npmjs.org/@codemirror/lang-python/-/lang-python-6.1.2.tgz", - "integrity": "sha512-nbQfifLBZstpt6Oo4XxA2LOzlSp4b/7Bc5cmodG1R+Cs5PLLCTUvsMNWDnziiCfTOG/SW1rVzXq/GbIr6WXlcw==", + "version": "6.1.3", + "resolved": "https://registry.npmjs.org/@codemirror/lang-python/-/lang-python-6.1.3.tgz", + "integrity": "sha512-S9w2Jl74hFlD5nqtUMIaXAq9t5WlM0acCkyuQWUUSvZclk1sV+UfnpFiZzuZSG+hfEaOmxKR5UxY/Uxswn7EhQ==", "requires": { "@codemirror/autocomplete": "^6.3.2", - "@codemirror/language": "^6.0.0", - "@lezer/python": "^1.0.0" + "@codemirror/language": "^6.8.0", + "@lezer/python": "^1.1.4" } }, "@codemirror/language": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/@codemirror/language/-/language-6.2.0.tgz", - "integrity": "sha512-tabB0Ef/BflwoEmTB4a//WZ9P90UQyne9qWB9YFsmeS4bnEqSys7UpGk/da1URMXhyfuzWCwp+AQNMhvu8SfnA==", + "version": "6.8.0", + "resolved": "https://registry.npmjs.org/@codemirror/language/-/language-6.8.0.tgz", + "integrity": "sha512-r1paAyWOZkfY0RaYEZj3Kul+MiQTEbDvYqf8gPGaRvNneHXCmfSaAVFjwRUPlgxS8yflMxw2CTu6uCMp8R8A2g==", "requires": { "@codemirror/state": "^6.0.0", "@codemirror/view": "^6.0.0", @@ -29303,37 +29524,37 @@ } }, "@jridgewell/gen-mapping": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.1.tgz", - "integrity": "sha512-GcHwniMlA2z+WFPWuY8lp3fsza0I8xPFMWL5+n8LYyP6PSvPrXf4+n8stDHZY2DM0zy9sVkRDy1jDI4XGzYVqg==", + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz", + "integrity": "sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==", "requires": { - "@jridgewell/set-array": "^1.0.0", + "@jridgewell/set-array": "^1.0.1", "@jridgewell/sourcemap-codec": "^1.4.10", "@jridgewell/trace-mapping": "^0.3.9" } }, "@jridgewell/resolve-uri": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.0.7.tgz", - "integrity": "sha512-8cXDaBBHOr2pQ7j77Y6Vp5VDT2sIqWyWQ56TjEq4ih/a4iST3dItRe8Q9fp0rrIl9DoKhWQtUQz/YpOxLkXbNA==" + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz", + "integrity": "sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==" }, "@jridgewell/set-array": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.1.tgz", - "integrity": "sha512-Ct5MqZkLGEXTVmQYbGtx9SVqD2fqwvdubdps5D3djjAkgkKwT918VNOz65pEHFaYTeWcukmJmH5SwsA9Tn2ObQ==" + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", + "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==" }, "@jridgewell/sourcemap-codec": { - "version": "1.4.13", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.13.tgz", - "integrity": "sha512-GryiOJmNcWbovBxTfZSF71V/mXbgcV3MewDe3kIMCLyIh5e7SKAeUZs+rMnJ8jkMolZ/4/VsdBmMrw3l+VdZ3w==" + "version": "1.4.15", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", + "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==" }, "@jridgewell/trace-mapping": { - "version": "0.3.13", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.13.tgz", - "integrity": "sha512-o1xbKhp9qnIAoHJSWd6KlCZfqslL4valSF81H8ImioOAxluWYWOpWkpyktY2vnt4tbrX9XYaxovq6cgowaJp2w==", + "version": "0.3.20", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.20.tgz", + "integrity": "sha512-R8LcPeWZol2zR8mmH3JeKQ6QRCFb7XgUhV9ZlGhHLGyg4wpPiPZNQOOWhFZhxKw8u//yTbNGI42Bx/3paXEQ+Q==", "requires": { - "@jridgewell/resolve-uri": "^3.0.3", - "@jridgewell/sourcemap-codec": "^1.4.10" + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" } }, "@juggle/resize-observer": { @@ -29394,9 +29615,9 @@ } }, "@jupyter-widgets/jupyterlab-manager": { - "version": "3.1.4", - "resolved": "https://registry.npmjs.org/@jupyter-widgets/jupyterlab-manager/-/jupyterlab-manager-3.1.4.tgz", - "integrity": "sha512-MfGSNskDmq7E5jtWrE+qyPnkFJkMDuAxKsIwaB+hGqWn7tERIFjaM5hfOBWhUy/AU7kQibFeviF9OKmi/0A/Tg==", + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/@jupyter-widgets/jupyterlab-manager/-/jupyterlab-manager-3.1.5.tgz", + "integrity": "sha512-flXl4807yf2UxBYwUOewGzyryqrGpbrgjU6oG9HbqNxnpbLrQg/R//2O4ggChuBLtsAB2Tfori9fCmR6y4Az6Q==", "requires": { "@jupyter-widgets/base": "^4.1.4", "@jupyter-widgets/controls": "^3.1.4", @@ -29978,18 +30199,26 @@ } }, "@lezer/python": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@lezer/python/-/python-1.0.0.tgz", - "integrity": "sha512-UQtDPmNhXxQZ7/Uoh8mR6sckrFzeyrjCkTIy7WQY8Sjdfi8wmr49iPbgsThy1Jy0DDBTnqZRULDngXNJ5AWVqg==", + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/@lezer/python/-/python-1.1.7.tgz", + "integrity": "sha512-RbhKQ9+Y/r/Xv6OcJmETEM5tBFdpdAJRqrgi3akJkWBLCuiAaLP/jKdYzu+ICljaSXPCQeznrv+r9HUEnjq3HQ==", "requires": { "@lezer/highlight": "^1.0.0", "@lezer/lr": "^1.0.0" } }, + "@lit-labs/ssr-dom-shim": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@lit-labs/ssr-dom-shim/-/ssr-dom-shim-1.1.1.tgz", + "integrity": "sha512-kXOeFbfCm4fFf2A3WwVEeQj55tMZa8c8/f9AKHMobQMkzNUfUj+antR3fRPaZJawsa1aZiP/Da3ndpZrwEe4rQ==" + }, "@lit/reactive-element": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/@lit/reactive-element/-/reactive-element-1.4.1.tgz", - "integrity": "sha512-qDv4851VFSaBWzpS02cXHclo40jsbAjRXnebNXpm0uVg32kCneZPo9RYVQtrTNICtZ+1wAYHu1ZtxWSWMbKrBw==" + "version": "1.6.3", + "resolved": "https://registry.npmjs.org/@lit/reactive-element/-/reactive-element-1.6.3.tgz", + "integrity": "sha512-QuTgnG52Poic7uM1AN5yJ09QMe0O28e10XzSvWDz02TJiiKee4stsiownEIadWm8nYzyDAyT+gKzUoZmiWQtsQ==", + "requires": { + "@lit-labs/ssr-dom-shim": "^1.0.0" + } }, "@lumino/algorithm": { "version": "1.9.2", @@ -30148,25 +30377,25 @@ "integrity": "sha512-uWH/N2L37I9TkTvde8mFhV/2Sqyd9dqgpHu8FIOm23+nHHyN4WMhVmrkM56bFhxYYN8k+N4gJuSvJ9tBSUEa6A==" }, "@mathigon/euclid": { - "version": "1.1.10", - "resolved": "https://registry.npmjs.org/@mathigon/euclid/-/euclid-1.1.10.tgz", - "integrity": "sha512-aJ1a/TtDl05JCmLBuhCC8Ln4zDNTVc0YziLPdH0bcbFrwUYCRAFP8mhGNtM7A3T7lWdW2nuQ5oci8UNMAA7CgA==", + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/@mathigon/euclid/-/euclid-1.1.12.tgz", + "integrity": "sha512-bEVDyQyBgbQ83RTdX8UpWGQpVHw40UKK2u/zu0pDas5wFhlrCo9rMGsRHWTFf8DcOjYOAZKEhsGs4klp1uNY6A==", "requires": { - "@mathigon/core": "1.1.7", - "@mathigon/fermat": "1.1.7" + "@mathigon/core": "1.1.10", + "@mathigon/fermat": "1.1.9" }, "dependencies": { "@mathigon/core": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/@mathigon/core/-/core-1.1.7.tgz", - "integrity": "sha512-evgsJ0RslmP02m2KzzhkKcAQUQhqzyMue4tuFQqGgEYxm8gRCNS+jyUXM5YcPnx+xio4lQBCE030x0yM4ztrCA==" + "version": "1.1.10", + "resolved": "https://registry.npmjs.org/@mathigon/core/-/core-1.1.10.tgz", + "integrity": "sha512-/8dUkB6rVubnFyUnj86hFaRkR+darhcIazukUhTu/XW8oeQcnev6ayBVbO/9lJL19h4pwfjliyUT/X7PHyjWgg==" }, "@mathigon/fermat": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/@mathigon/fermat/-/fermat-1.1.7.tgz", - "integrity": "sha512-4stVFT0jZCyYMOkT4iYVjD0P0pd0wWiNOas1Dunk1IOmDD90wUz17Oq+FnT+YCiKBpVndNF3le8hw0jKNfMKVQ==", + "version": "1.1.9", + "resolved": "https://registry.npmjs.org/@mathigon/fermat/-/fermat-1.1.9.tgz", + "integrity": "sha512-QhYCRpjD8W4jYZdGtl91L+qf8/MDjil8aBVbm7INXprWXcQbkBDOfIVyi3wKKxwqMJb/gUMoX4ZlD0T/vBzDDA==", "requires": { - "@mathigon/core": "1.1.7" + "@mathigon/core": "1.1.10" } } } @@ -30487,58 +30716,59 @@ } }, "@qiskit/web-components": { - "version": "0.10.3", - "resolved": "https://registry.npmjs.org/@qiskit/web-components/-/web-components-0.10.3.tgz", - "integrity": "sha512-Y7dVqBipkwElkSK0AjplAZ4sCeL1jTSieG9GXpK5EOYGg6l9O6eAAGP1wixGwiILUjXQVBhMgrtd+BBIoqNOrw==", + "version": "0.15.3", + "resolved": "https://registry.npmjs.org/@qiskit/web-components/-/web-components-0.15.3.tgz", + "integrity": "sha512-FrILLujBDEefCbx6+mfbs2NB6yS5w5dcjBj9PW3fkSGcCV5bhlhWr6tm4Ee5c0BBfJLbOKf7W+Spr8Myo3lGMQ==", "requires": { "@carbon/colors": "^10.37.1", "@carbon/icon-helpers": "^10.30.0", "@carbon/icons": "^11.3.0", "@carbon/layout": "^10.37.1", - "@carbon/type": "^10.45.0", - "carbon-web-components": "^1.21.0", - "lit": "^2.4.1", + "@carbon/type": "^10.45.1", + "@carbon/web-components": "^1.25.0", + "lit": "^2.6.1", "lit-element": "^3.2.2", - "lit-html": "^2.4.0", - "tslib": "^2.4.1" + "lit-html": "^2.6.1", + "tslib": "^2.5.0" }, "dependencies": { "@carbon/grid": { - "version": "10.43.1", - "resolved": "https://registry.npmjs.org/@carbon/grid/-/grid-10.43.1.tgz", - "integrity": "sha512-gBfAEIfso5GjYPB1+BHjpNIfzDzBHb8xz9GRBhdrTlDVw9RJ4KH4MfYDeObiFQ/I7/6YCOE+LjjLv/BTm9iWBQ==", + "version": "10.43.2", + "resolved": "https://registry.npmjs.org/@carbon/grid/-/grid-10.43.2.tgz", + "integrity": "sha512-chhjz7cNl7TdKJ1MVhpXlNwtuKmdgWYygQFLShv1FnY9atMYv42hguGG289TZgPOuMpgYLyA9VOCS4IDVjC/1A==", "requires": { "@carbon/import-once": "^10.7.0", - "@carbon/layout": "^10.37.1" + "@carbon/layout": "^10.37.2" } }, "@carbon/layout": { - "version": "10.37.1", - "resolved": "https://registry.npmjs.org/@carbon/layout/-/layout-10.37.1.tgz", - "integrity": "sha512-iX8rWc2CkFB7W7wi5NLa3pVRVb/jRI2KrVDna3FO3X3DgNz3zoRCgN+r2c+8FEhpJWeUwds5aDzTWUuTtlOT3w==" + "version": "10.37.2", + "resolved": "https://registry.npmjs.org/@carbon/layout/-/layout-10.37.2.tgz", + "integrity": "sha512-PRw9yxbMWy2ovAkIkIDxSkVVR7lYfXUBIRO8lD/nw+X+jLDh+cIIIsB5YHA5VpOYCx9iQr2g9dRmoNgCmOVkrg==" }, "@carbon/type": { - "version": "10.45.1", - "resolved": "https://registry.npmjs.org/@carbon/type/-/type-10.45.1.tgz", - "integrity": "sha512-c7+5xDu6VXrseC578ED/qiZkoxCPZCRrgXE/ruFFQSsW2URLUGV6naxIbNewUnJ/pyIliGBCUKzQP8FDvGSvWA==", + "version": "10.45.3", + "resolved": "https://registry.npmjs.org/@carbon/type/-/type-10.45.3.tgz", + "integrity": "sha512-o/1vy59+IMjNCSyfS58Z5zQT10IuSt9SP/r631UbPLuVgotWWjACe57M5gxyCJHv2ZTIoTkP6dWFoomVSOPDjg==", "requires": { - "@carbon/grid": "^10.43.0", + "@carbon/grid": "^10.43.2", "@carbon/import-once": "^10.7.0" } }, "lit-element": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/lit-element/-/lit-element-3.2.2.tgz", - "integrity": "sha512-6ZgxBR9KNroqKb6+htkyBwD90XGRiqKDHVrW/Eh0EZ+l+iC+u+v+w3/BA5NGi4nizAVHGYvQBHUDuSmLjPp7NQ==", + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/lit-element/-/lit-element-3.3.3.tgz", + "integrity": "sha512-XbeRxmTHubXENkV4h8RIPyr8lXc+Ff28rkcQzw3G6up2xg5E8Zu1IgOWIwBLEQsu3cOVFqdYwiVi0hv0SlpqUA==", "requires": { + "@lit-labs/ssr-dom-shim": "^1.1.0", "@lit/reactive-element": "^1.3.0", - "lit-html": "^2.2.0" + "lit-html": "^2.8.0" } }, "lit-html": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/lit-html/-/lit-html-2.4.0.tgz", - "integrity": "sha512-G6qXu4JNUpY6aaF2VMfaszhO9hlWw0hOTRFDmuMheg/nDYGB+2RztUSOyrzALAbr8Nh0Y7qjhYkReh3rPnplVg==", + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/lit-html/-/lit-html-2.8.0.tgz", + "integrity": "sha512-o9t+MQM3P4y7M7yNzqAyjp7z+mQGa4NS4CxiyLqFPyFWyc4O+nodLrkrxSaCTrla6M5YOLaT3RpbbqjszB5g3Q==", "requires": { "@types/trusted-types": "^2.0.2" } @@ -30693,9 +30923,9 @@ } }, "@types/codemirror": { - "version": "5.60.6", - "resolved": "https://registry.npmjs.org/@types/codemirror/-/codemirror-5.60.6.tgz", - "integrity": "sha512-JIDPSvkYRlcv/2F0erqD+de2ni/Mz6FJMEGb0vwF6ByQOcHIKfiEfwrO4d6dSRwYeHyNUMpGjev0PyjX2M0XWw==", + "version": "5.60.8", + "resolved": "https://registry.npmjs.org/@types/codemirror/-/codemirror-5.60.8.tgz", + "integrity": "sha512-VjFgDF/eB+Aklcy15TtOTLQeMjTo07k7KAjql8OK5Dirr7a6sJY4T1uVBDuTVG9VEmn1uUsohOpYnVfgC6/jyw==", "dev": true, "requires": { "@types/tern": "*" @@ -30872,9 +31102,9 @@ "dev": true }, "@types/lodash": { - "version": "4.14.195", - "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.195.tgz", - "integrity": "sha512-Hwx9EUgdwf2GLarOjQp5ZH8ZmblzcbTBC2wtQWNKARBSxM9ezRIAUpeDTgoQRAFB0+8CNWXVA9+MaSOzOF3nPg==" + "version": "4.14.197", + "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.197.tgz", + "integrity": "sha512-BMVOiWs0uNxHVlHBgzTIqJYmj+PgCo4euloGF+5m4okL3rEYzM2EEv78mw8zWSMM57dM7kVIgJ2QDvwHSoCI5g==" }, "@types/long": { "version": "4.0.2", @@ -31060,9 +31290,9 @@ "dev": true }, "@types/trusted-types": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/@types/trusted-types/-/trusted-types-2.0.2.tgz", - "integrity": "sha512-F5DIZ36YVLE+PN+Zwws4kJogq47hNgX3Nx6WyDJ3kcplxyke3XIzB8uK5n/Lpm1HBsbGzd6nmGehL8cPekP+Tg==" + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@types/trusted-types/-/trusted-types-2.0.3.tgz", + "integrity": "sha512-NfQ4gyz38SL8sDNrSixxU2Os1a5xcdFxipAFxYEuLUlvU2uDwS4NUpsImcf1//SlWItCVMMLiylsxbmNMToV/g==" }, "@types/uglify-js": { "version": "3.13.3", @@ -31186,9 +31416,9 @@ } }, "semver": { - "version": "7.3.7", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz", - "integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==", + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", "dev": true, "requires": { "lru-cache": "^6.0.0" @@ -31266,9 +31496,9 @@ } }, "semver": { - "version": "7.3.7", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz", - "integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==", + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", "dev": true, "requires": { "lru-cache": "^6.0.0" @@ -33346,9 +33576,9 @@ } }, "semver": { - "version": "7.3.7", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz", - "integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==", + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", "dev": true, "requires": { "lru-cache": "^6.0.0" @@ -33647,9 +33877,9 @@ } }, "semver": { - "version": "7.3.7", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz", - "integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==", + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", "requires": { "lru-cache": "^6.0.0" } @@ -34657,9 +34887,9 @@ } }, "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", "dev": true }, "slash": { @@ -35565,9 +35795,9 @@ } }, "semver": { - "version": "7.3.7", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz", - "integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==", + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", "dev": true, "requires": { "lru-cache": "^6.0.0" @@ -36690,9 +36920,9 @@ } }, "semver": { - "version": "7.3.7", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz", - "integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==", + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", "dev": true, "requires": { "lru-cache": "^6.0.0" @@ -36786,9 +37016,9 @@ } }, "semver": { - "version": "7.3.7", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz", - "integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==", + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", "dev": true, "requires": { "lru-cache": "^6.0.0" @@ -36826,9 +37056,9 @@ } }, "semver": { - "version": "7.3.7", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz", - "integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==", + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", "dev": true, "requires": { "lru-cache": "^6.0.0" @@ -37055,9 +37285,9 @@ "dev": true }, "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", "dev": true }, "shebang-command": { @@ -37796,9 +38026,9 @@ "dev": true }, "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", "dev": true }, "supports-color": { @@ -37879,9 +38109,9 @@ } }, "semver": { - "version": "7.3.7", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz", - "integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==", + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", "dev": true, "optional": true, "requires": { @@ -40284,9 +40514,9 @@ "optional": true }, "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", "optional": true }, "supports-color": { @@ -40349,28 +40579,29 @@ } }, "lit": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/lit/-/lit-2.4.1.tgz", - "integrity": "sha512-qohSgLiyN1cFnJG26dIiY03S4F49857A0AHQfnS0zYtnUVnD2MFvx+UT52rtXsIuNFQrnUupX+zyGSATlk1f/A==", + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/lit/-/lit-2.8.0.tgz", + "integrity": "sha512-4Sc3OFX9QHOJaHbmTMk28SYgVxLN3ePDjg7hofEft2zWlehFL3LiAuapWc4U/kYwMYJSh2hTCPZ6/LIC7ii0MA==", "requires": { - "@lit/reactive-element": "^1.4.0", - "lit-element": "^3.2.0", - "lit-html": "^2.4.0" + "@lit/reactive-element": "^1.6.0", + "lit-element": "^3.3.0", + "lit-html": "^2.8.0" }, "dependencies": { "lit-element": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/lit-element/-/lit-element-3.2.2.tgz", - "integrity": "sha512-6ZgxBR9KNroqKb6+htkyBwD90XGRiqKDHVrW/Eh0EZ+l+iC+u+v+w3/BA5NGi4nizAVHGYvQBHUDuSmLjPp7NQ==", + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/lit-element/-/lit-element-3.3.3.tgz", + "integrity": "sha512-XbeRxmTHubXENkV4h8RIPyr8lXc+Ff28rkcQzw3G6up2xg5E8Zu1IgOWIwBLEQsu3cOVFqdYwiVi0hv0SlpqUA==", "requires": { + "@lit-labs/ssr-dom-shim": "^1.1.0", "@lit/reactive-element": "^1.3.0", - "lit-html": "^2.2.0" + "lit-html": "^2.8.0" } }, "lit-html": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/lit-html/-/lit-html-2.4.0.tgz", - "integrity": "sha512-G6qXu4JNUpY6aaF2VMfaszhO9hlWw0hOTRFDmuMheg/nDYGB+2RztUSOyrzALAbr8Nh0Y7qjhYkReh3rPnplVg==", + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/lit-html/-/lit-html-2.8.0.tgz", + "integrity": "sha512-o9t+MQM3P4y7M7yNzqAyjp7z+mQGa4NS4CxiyLqFPyFWyc4O+nodLrkrxSaCTrla6M5YOLaT3RpbbqjszB5g3Q==", "requires": { "@types/trusted-types": "^2.0.2" } @@ -41313,9 +41544,9 @@ } }, "semver": { - "version": "7.3.8", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz", - "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==", + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", "requires": { "lru-cache": "^6.0.0" } @@ -41592,9 +41823,9 @@ } }, "semver": { - "version": "7.3.7", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz", - "integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==", + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", "dev": true, "requires": { "lru-cache": "^6.0.0" @@ -41765,9 +41996,9 @@ } }, "nodemon": { - "version": "2.0.20", - "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-2.0.20.tgz", - "integrity": "sha512-Km2mWHKKY5GzRg6i1j5OxOHQtuvVsgskLfigG25yTtbyfRGn/GNvIbRyOf1PSCKJ2aT/58TiuUsuOU5UToVViw==", + "version": "2.0.22", + "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-2.0.22.tgz", + "integrity": "sha512-B8YqaKMmyuCO7BowF1Z1/mkPqLk6cs/l63Ojtd6otKjMx47Dq1utxfRxcavH1I7VSaL8n5BUaoutadnsX3AAVQ==", "dev": true, "requires": { "chokidar": "^3.5.2", @@ -41798,9 +42029,9 @@ "dev": true }, "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", "dev": true }, "supports-color": { @@ -41846,9 +42077,9 @@ } }, "semver": { - "version": "7.3.7", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz", - "integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==", + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", "dev": true, "requires": { "lru-cache": "^6.0.0" @@ -42023,9 +42254,9 @@ } }, "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", "dev": true }, "shebang-command": { @@ -42860,9 +43091,9 @@ } }, "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==" }, "shebang-command": { "version": "1.2.0", @@ -45025,9 +45256,9 @@ }, "dependencies": { "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", "optional": true } } @@ -45063,9 +45294,9 @@ } }, "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", "optional": true } } @@ -45101,9 +45332,9 @@ } }, "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", "dev": true }, "type-fest": { @@ -45963,9 +46194,9 @@ } }, "semver": { - "version": "7.3.7", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz", - "integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==", + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", "dev": true, "requires": { "lru-cache": "^6.0.0" @@ -46073,9 +46304,9 @@ } }, "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==" + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==" }, "send": { "version": "0.17.2", @@ -47668,9 +47899,9 @@ } }, "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", "dev": true } } @@ -48110,9 +48341,9 @@ } }, "tslib": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.1.tgz", - "integrity": "sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA==" + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" }, "tslint": { "version": "5.20.1", @@ -48214,9 +48445,9 @@ } }, "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", "dev": true }, "supports-color": { @@ -48835,9 +49066,9 @@ } }, "semver": { - "version": "7.3.7", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz", - "integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==", + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", "dev": true, "requires": { "lru-cache": "^6.0.0" @@ -50208,9 +50439,9 @@ } }, "word-wrap": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", - "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==" + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.4.tgz", + "integrity": "sha512-2V81OA4ugVo5pRo46hAoD2ivUJx8jXmWXfUkY4KFNw0hEptvN0QfH3K4nHiwzGeKl5rFKedV48QVoqYavy4YpA==" }, "worker-farm": { "version": "1.7.0", diff --git a/package.json b/package.json index ef7d7f59f..d3e9ad895 100644 --- a/package.json +++ b/package.json @@ -49,24 +49,24 @@ "@carbon/colors": "^10.37.1", "@carbon/icons-vue": "~10.48.0", "@carbon/themes": "^11.15.0", - "@carbon/vue": "^2.45.0", + "@carbon/vue": "^2.45.1", "@ckeditor/ckeditor5-build-classic": "^34.2.0", "@ckeditor/ckeditor5-vue": "^4.0.1", - "@codemirror/lang-python": "^6.1.2", + "@codemirror/lang-python": "^6.1.3", "@github/clipboard-copy-element": "^1.1.2", "@ibm/plex": "^6.1.1", "@jupyter-widgets/html-manager": "^0.20.5", - "@jupyter-widgets/jupyterlab-manager": "^3.1.4", + "@jupyter-widgets/jupyterlab-manager": "^3.1.5", "@jupyterlab/mathjax2": "^3.5.2", "@jupyterlab/outputarea": "^3.5.2", "@jupyterlab/rendermime": "^3.5.2", "@jupyterlab/services": "^6.5.2", "@lumino/widgets": "^1.36.0", "@mathigon/boost": "^1.1.1", - "@mathigon/euclid": "^1.1.10", + "@mathigon/euclid": "^1.1.12", "@mathigon/studio": "0.1.18", "@qiskit-community/qiskit-vue": "^3.4.0", - "@qiskit/web-components": "^0.10.3", + "@qiskit/web-components": "^0.15.3", "@webcomponents/webcomponentsjs": "^2.6.0", "carbon-components": "~10.58.3", "carbon-web-components": "^1.21.0", @@ -95,11 +95,11 @@ "devDependencies": { "@nuxtjs/eslint-config-typescript": "^10.0.0", "@types/bcryptjs": "2.4.2", - "@types/codemirror": "^5.60.6", + "@types/codemirror": "^5.60.8", "@types/express-flash": "0.0.2", "@types/fs-extra": "^9.0.13", "@types/jsdom": "^16.2.15", - "@types/lodash": "^4.14.195", + "@types/lodash": "^4.14.197", "@types/markdown-it": "^12.2.3", "@types/node-fetch": "^2.6.4", "@types/pug": "2.0.6", @@ -118,7 +118,7 @@ "jsdom": "^19.0.0", "nano-staged": "^0.8.0", "node-sass": "^6.0.1", - "nodemon": "^2.0.20", + "nodemon": "^2.0.22", "npm-run-all": "^4.1.5", "rimraf": "^3.0.2", "sass-loader": "^10.2.1", diff --git a/scripts/content_checks/missing_nb_check.sh b/scripts/content_checks/missing_nb_check.sh deleted file mode 100755 index 09f6f7f46..000000000 --- a/scripts/content_checks/missing_nb_check.sh +++ /dev/null @@ -1,36 +0,0 @@ -#!/usr/bin/env bash - -# this script creates a `notebooks.txt` containing list of notebooks that -# are present in qiskit-community/qiskit-textbook but are not in -# Qiskit/platypus. -# -# this script is run from the `Check for Textbook notebooks` GitHub action -# which should contain a copy of the qiskit-textbook and platypus repos - - -# diff the notebooks directory of the two repos and add all notebooks found -# in qiskit-textbook but not found in platypus into a `notebooks.txt` file -diff -aqr platypus/notebooks qiskit-textbook/content | sort | grep 'Only in qiskit-textbook' | grep -E '\.ipynb$' > notebooks.txt - -# count the number of lines (notebooks found) in qiskit-textbook but not in -# platypus -NUM_NB=$(cat notebooks.txt | wc -l) - -echo 'found $NUM_NB new notebooks' - -# set GitHub action variable to be checked by next step/task to determine -# if an issue should be created -echo '::set-output name=NUM_NB::$NUM_NB' - -# replace all newline characters with `\n` so the list used in a JSON object -NB_LIST=$(sed -e :a -e '$!N;s/\n/\\n/;ta' notebooks.txt) - -# create the JSON that will be used as payload for the create issue REST API -echo '{' > issue.txt -echo ' "title": "Missing notebooks",' >> issue.txt -echo ' "labels": ["bug"],' >> issue.txt -echo ' "assignees": ["vabarbosa", "frankharkins"],' >> issue.txt -echo ' "body": "'$NB_LIST'"' >> issue.txt -echo '}' >> issue.txt - -exit 0 diff --git a/server/app.ts b/server/app.ts index 6b9a578d0..729f76114 100644 --- a/server/app.ts +++ b/server/app.ts @@ -14,7 +14,7 @@ import { LOCALES, translate } from '@mathigon/studio/server/utilities/i18n' import { generateMockData } from './populate-database' import { - CONFIG, NOTATIONS, TEXTBOOK_HOME, LATEST_TEXTBOOK_VERSION, TRANSLATIONS, UNIVERSAL_NOTATIONS, + CONFIG, NOTATIONS, TEXTBOOK_HOME, LATEST_TEXTBOOK_VERSION, TRANSLATIONS, UNIVERSAL_NOTATIONS, LEARNING_REDIRECTS, findNextSection, findPrevSection, getSectionIndex, isLearningPath, updateGlossary, loadLocaleRawFile, tocFilterByType, removeVersionPrefix } from './utilities' @@ -138,7 +138,8 @@ const start = () => { .accounts() .redirects({ '/': TEXTBOOK_HOME, - '/textbook': TEXTBOOK_HOME + '/textbook': TEXTBOOK_HOME, + ...LEARNING_REDIRECTS }) .get('/locales/:locale', (req, res) => { const translations = TRANSLATIONS[req.params.locale || 'en'] || {} diff --git a/server/templates/error.pug b/server/templates/error.pug index 2b522081f..cb56e21ee 100644 --- a/server/templates/error.pug +++ b/server/templates/error.pug @@ -12,6 +12,7 @@ html(lang=`${req.locale.id}` dir=dir) body div.qiskit__navbar#qiskit-navbar q-the-menu + q-one-xp-banner .body article.c-textbook__page.c-textbook__page__error diff --git a/server/templates/signIn.pug b/server/templates/signIn.pug index defaaa155..499afedb5 100644 --- a/server/templates/signIn.pug +++ b/server/templates/signIn.pug @@ -8,6 +8,8 @@ html(lang=lang dir=dir) body#app div.qiskit__navbar#qiskit-navbar q-the-menu + q-one-xp-banner + .body q-sign-in diff --git a/server/templates/textbook.pug b/server/templates/textbook.pug index f17fc04e6..0f6c6919a 100644 --- a/server/templates/textbook.pug +++ b/server/templates/textbook.pug @@ -14,6 +14,8 @@ html(lang=course.locale dir=dir) q-the-menu main.body + q-one-xp-banner + x-course.c-textbook(id=course.id data-section=section.id data-goals=section.goals data-reveal='true') include sidebar diff --git a/server/templates/userAccount.pug b/server/templates/userAccount.pug index d6113cffb..d07b4482b 100644 --- a/server/templates/userAccount.pug +++ b/server/templates/userAccount.pug @@ -8,6 +8,7 @@ html(lang=lang dir=dir) body div.qiskit__navbar#qiskit-navbar q-the-menu + q-one-xp-banner .body q-user-account-layout(first-name=userData.firstName, last-name=userData.lastName email=userData.email user-id=userData.userId) diff --git a/server/utilities.ts b/server/utilities.ts index 7e4fddc3c..12a332df8 100644 --- a/server/utilities.ts +++ b/server/utilities.ts @@ -24,7 +24,18 @@ import { import { IS_PRODUCTION } from './configuration' const TEXTBOOK_HOME = 'https://qiskit.org/learn' +const LEARNING_HOME = 'https://learning.quantum-computing.ibm.com' + +const LEARNING_REDIRECTS = { + '/course/algorithm-design': `${LEARNING_HOME}/course/variational-algorithm-design`, + '/course/algorithm-design/*': `${LEARNING_HOME}/course/variational-algorithm-design`, + '/course/basics': `${LEARNING_HOME}/course/basics-of-quantum-information`, + '/course/basics/*': `${LEARNING_HOME}/course/basics-of-quantum-information`, + '/course/algorithms': `${LEARNING_HOME}/course/fundamentals-of-quantum-algorithms`, + '/course/algorithms/*': `${LEARNING_HOME}/course/fundamentals-of-quantum-algorithms` +} +// NOTE: if changing this also update the same variable in 'converter/common.ts' const LATEST_TEXTBOOK_VERSION = 'v2' const DEFAULT_SHARED_FOLDER = path.join(CONTENT_DIR, 'shared') @@ -181,6 +192,7 @@ export { TRANSLATIONS, UNIVERSAL_NOTATIONS, TOC, + LEARNING_REDIRECTS, findNextSection, findPrevSection, getSectionIndex, diff --git a/translations/es/toc.yaml b/translations/es/toc.yaml index ad6be4d53..df28e4288 100644 --- a/translations/es/toc.yaml +++ b/translations/es/toc.yaml @@ -1,92 +1,5 @@ -#---- Below was added by machine --- - -- sections: - - id: introduction - url: v2/ch-states/introduction - uuid: afcc559e-b519-11ec-b909-0242ac120002 - - id: the-atoms-of-computation - url: v2/ch-states/atoms-computation - uuid: b31c20ee-b519-11ec-b909-0242ac120002 - - id: representing-qubit-states - url: v2/ch-states/representing-qubit-states - uuid: b81717ca-b519-11ec-b909-0242ac120002 - - id: single-qubit-gates - url: v2/ch-states/single-qubit-gates - uuid: bd4334a4-b519-11ec-b909-0242ac120002 - - id: the-case-for-quantum-computers - url: v2/ch-states/case-for-quantum - uuid: c0bbff62-b519-11ec-b909-0242ac120002 - title: "Estados cu\xE1nticos y Qubits" - url: /v2_ch-states -- sections: - - id: introduction - url: v2/ch-gates/introduction - uuid: c50f4c90-b519-11ec-b909-0242ac120002 - - id: multiple-qubits-and-entangled-states - url: v2/ch-gates/multiple-qubits-entangled-states - uuid: c7cfe502-b519-11ec-b909-0242ac120002 - - id: basic-circuit-identities - url: v2/ch-gates/more-circuit-identities - uuid: ce8ce75a-b519-11ec-b909-0242ac120002 - - id: proving-universality - url: v2/ch-gates/proving-universality - uuid: d15d3548-b519-11ec-b909-0242ac120002 - - id: classical-computation-on-a-quantum-computer - url: v2/ch-gates/oracles - uuid: d4f6e424-b519-11ec-b909-0242ac120002 - title: "M\xFAltiples Qubits y entrelazamiento" - url: /v2_ch-gates -- sections: - - id: quantum-circuits - url: v2/ch-algorithms/defining-quantum-circuits - uuid: d90cbfb6-b519-11ec-b909-0242ac120002 - - id: deutsch-jozsa-algorithm - url: v2/ch-algorithms/deutsch-jozsa - uuid: dc9d3aa2-b519-11ec-b909-0242ac120002 - - id: bernstein-vazirani-algorithm - url: v2/ch-algorithms/bernstein-vazirani - uuid: df6e5a40-b519-11ec-b909-0242ac120002 - title: "Protocolos cu\xE1nticos y algoritmos cu\xE1nticos" - url: /v2_ch-algorithms -- sections: - - id: simulating-molecules-using-vqe - url: v2/ch-applications/vqe-molecules - uuid: 041df288-b51a-11ec-b909-0242ac120002 - - id: solving-combinatorial-optimization-problems-using-qaoa - url: v2/ch-applications/qaoa - uuid: 06ff7ada-b51a-11ec-b909-0242ac120002 - title: "Algoritmos cu\xE1nticos para aplicaciones" - url: /v2_ch-applications -- sections: - - id: lab-9-quantum-simulation-as-a-search-algorithm - url: v2/ch-labs/Lab09_QuantumSimulationSearchAlgorithm - uuid: 59a076f4-b51a-11ec-b909-0242ac120002 - title: "Laboratorios de computaci\xF3n cu\xE1ntica" - url: /v2_ch-labs -- sections: - - id: estimating-pi-using-quantum-phase-estimation-algorithm - url: v2/ch-demos/piday-code - uuid: 69b9707c-b51a-11ec-b909-0242ac120002 - title: Juegos y demostraciones - url: /v2_ch-demos -- sections: - - id: phase-kickback - url: v2/algorithms/phase-kickback - uuid: 976e9da6-6c33-4e2f-b7eb-f9588f700f07 - title: "Algoritmos cu\xE1nticos" - type: learning-path - url: /v2_algorithms -- sections: - - id: why-quantum-computing - url: v2/intro/why-quantum-computing - uuid: bdb1d662-e0f6-428a-8830-befe6b47f320 - title: "Introducci\xF3n a la Computaci\xF3n Cu\xE1ntica" - type: learning-path - url: /v2_introduction - - #---- Below was added by machine --- - sections: diff --git a/translations/ja/algorithm-design/optimization/optimization.ipynb b/translations/ja/algorithm-design/optimization/optimization.ipynb new file mode 100644 index 000000000..fad5e1af5 --- /dev/null +++ b/translations/ja/algorithm-design/optimization/optimization.ipynb @@ -0,0 +1,256 @@ +{ + "cells": [ + { + "attachments": { + }, + "cell_type": "markdown", + "metadata": { + }, + "source": [ + "## ๆœ€้ฉๅŒ–ใƒซใƒผใƒ—\n", + "\n", + "ใ“ใฎใƒฌใƒƒใ‚นใƒณใงใฏใ€*ใ‚ชใƒ—ใƒ†ใ‚ฃใƒžใ‚คใ‚ถใƒผ*ใ‚’ไฝฟ็”จใ—ใฆใ€ansatz ใฎใƒ‘ใƒฉใƒกใƒผใ‚ฟๅŒ–ใ•ใ‚ŒใŸ้‡ๅญ็Šถๆ…‹ใ‚’็นฐใ‚Š่ฟ”ใ—ๆŽข็ดขใ™ใ‚‹ๆ–นๆณ•ใ‚’ๅญฆ็ฟ’ใ—ใพใ™ใ€‚\n", + "\n", + "- ๆœ€้ฉๅŒ–ใƒซใƒผใƒ—ใฎใƒ–ใƒผใƒˆใ‚นใƒˆใƒฉใƒƒใƒ—\n", + "- ใƒญใƒผใ‚ซใƒซใŠใ‚ˆใณใ‚ฐใƒญใƒผใƒใƒซใ‚ชใƒ—ใƒ†ใ‚ฃใƒžใ‚คใ‚ถใƒผใ‚’ไฝฟ็”จใ™ใ‚‹้š›ใฎใƒˆใƒฌใƒผใƒ‰ใ‚ชใƒ•ใฎ็†่งฃ\n", + "- ใ€Œไธๆฏ›ใชๅฐๅœฐใ€ใฎๆŽข็ดขใจๅ›ž้ฟใฎๆ–นๆณ•\n", + "\n", + "ๅคงใพใ‹ใซ่จ€ใˆใฐใ€ใ‚ชใƒ—ใƒ†ใ‚ฃใƒžใ‚คใ‚ถใƒผใฏๆŽข็ดข็ฉบ้–“ใ‚’ๆŽข็ดขใ™ใ‚‹ไธญๅฟƒใงใ™ใ€‚ใ‚ชใƒ—ใƒ†ใ‚ฃใƒžใ‚คใ‚ถใƒผใฏใ€ใ‚ณใ‚นใƒˆ้–ขๆ•ฐใฎ่ฉ•ไพกใ‚’ไฝฟ็”จใ—ใฆใ€ๅค‰ๅˆ†ใƒซใƒผใƒ—ใงๆฌกใฎใƒ‘ใƒฉใƒกใƒผใ‚ฟใƒผใ‚ปใƒƒใƒˆใ‚’้ธๆŠžใ—ใ€ๅฎ‰ๅฎšใ—ใŸ็Šถๆ…‹ใซ้”ใ™ใ‚‹ใพใงๅ‡ฆ็†ใ‚’็นฐใ‚Š่ฟ”ใ—ใพใ™ใ€‚ใ“ใฎๆฎต้šŽใงใ€ใƒ‘ใƒฉใƒกใƒผใ‚ฟใƒผๅ€ค $\\vec\\theta^*$ ใฎๆœ€้ฉใชใ‚ปใƒƒใƒˆใŒ่ฟ”ใ•ใ‚Œใพใ™ใ€‚\n", + "\n", + "![ๆœ€้ฉๅŒ–ใƒฏใƒผใ‚ฏใƒ•ใƒญใƒผ](images/optimization_workflow.png)" + ] + }, + { + "attachments": { + }, + "cell_type": "markdown", + "metadata": { + }, + "source": [ + "## ใƒญใƒผใ‚ซใƒซใŠใ‚ˆใณใ‚ฐใƒญใƒผใƒใƒซใ‚ชใƒ—ใƒ†ใ‚ฃใƒžใ‚คใ‚ถใƒผ\n", + "\n", + "### ใƒญใƒผใ‚ซใƒซใ‚ชใƒ—ใƒ†ใ‚ฃใƒžใ‚คใ‚ถใƒผ\n", + "\n", + "ใƒญใƒผใ‚ซใƒซใ‚ชใƒ—ใƒ†ใ‚ฃใƒžใ‚คใ‚ถใƒผใฏใ€ๅˆๆœŸ็‚น $C(\\vec{\\theta_0})$ ใ‹ใ‚‰ๅง‹ใพใ‚‹ใ‚ณใ‚นใƒˆ้–ขๆ•ฐใ‚’ๆœ€ๅฐๅŒ–ใ™ใ‚‹็‚นใ‚’ๆŽข็ดขใ—ใ€้€ฃ็ถšใ™ใ‚‹็นฐใ‚Š่ฟ”ใ—ใซใŠใ„ใฆ็พๅœจ่ฉ•ไพกใ—ใฆใ„ใ‚‹้ ˜ๅŸŸใง่ฆณๆธฌใ—ใŸใ‚‚ใฎใซๅŸบใฅใ„ใฆๅˆฅใฎ็‚นใซ็งปๅ‹•ใ—ใพใ™ใ€‚ใ“ใ‚Œใ‚‰ใฎใ‚ขใƒซใ‚ดใƒชใ‚บใƒ ใฎๅŽๆŸใฏ้€šๅธธ้ซ˜้€Ÿใงใ™ใŒใ€ๅˆๆœŸ็‚นใซๅคงใใไพๅญ˜ใ™ใ‚‹ๅฏ่ƒฝๆ€งใŒใ‚ใ‚Šใพใ™ใ€‚ใƒญใƒผใ‚ซใƒซใ‚ชใƒ—ใƒ†ใ‚ฃใƒžใ‚คใ‚ถใƒผใฏใ€็พๅœจ่ฉ•ไพกใ—ใฆใ„ใ‚‹้ ˜ๅŸŸใ‚’่ถ…ใˆใŸ้ ˜ๅŸŸใ‚’่ฆ‹ใ‚‹ใ“ใจใฏใงใใšใ€ๆฅตๅฐๅ€คใซๅฏพใ—ใฆใจใ‚Šใ‚ใ‘่„†ใ„ๅฏ่ƒฝๆ€งใŒใ‚ใ‚Šใ€ๆฅตๅฐๅ€คใ‚’่ฆ‹ใคใ‘ใ‚‹ใจใ€ใ‚ˆใ‚Šๆœ›ใพใ—ใ„่ฉ•ไพก็ตๆžœใงใ‚ใ‚‹ไป–ใฎ็Šถๆ…‹ใ‚’็„ก่ฆ–ใ—ใฆๅŽๆŸใ—ใŸใจใฟใชใ—ใฆใ—ใพใ„ใพใ™ใ€‚\n", + "\n", + "### ใ‚ฐใƒญใƒผใƒใƒซใ‚ชใƒ—ใƒ†ใ‚ฃใƒžใ‚คใ‚ถใƒผ\n", + "\n", + "ใ‚ฐใƒญใƒผใƒใƒซใ‚ชใƒ—ใƒ†ใ‚ฃใƒžใ‚คใ‚ถใƒผใฏใ€ใƒ‰ใƒกใ‚คใƒณใฎใ„ใใคใ‹ใฎ้ ˜ๅŸŸ (ใคใพใ‚Šใƒญใƒผใ‚ซใƒซใงใฏใชใ„) ใงใ‚ณใ‚นใƒˆ้–ขๆ•ฐใ‚’ๆœ€ๅฐๅŒ–ใ™ใ‚‹็‚นใ‚’ๆŽข็ดขใ—ใ€ใ‚ชใƒ—ใƒ†ใ‚ฃใƒžใ‚คใ‚ถใƒผใซใ‚ˆใฃใฆๆฑบๅฎšใ•ใ‚ŒใŸ $\\Theta_i := \\{{\\vec\\theta_{i,j} | j \\in \\mathcal{J}_\\text{opt}^i} \\}$ ใƒ‘ใƒฉใƒกใƒผใ‚ฟใƒ™ใ‚ฏใƒˆใƒซใงๅๅพฉ็š„ใซ (็นฐใ‚Š่ฟ”ใ— $i$ ) ่ฉ•ไพกใ—ใพใ™ใ€‚ใ“ใ‚Œใซใ‚ˆใ‚Šๆฅตๅฐๅ€คใฎๅฝฑ้Ÿฟใ‚’ๅ—ใ‘ใซใใใชใ‚Šใ€ใ‚ใ‚‹็จ‹ๅบฆๅˆๆœŸๅŒ–ใซไพๅญ˜ใ—ใชใใชใ‚‹ไธ€ๆ–นใงใ€ๆ็คบใ•ใ‚Œใ‚‹่งฃใธใฎๅŽๆŸใ‚‚ๅคงๅน…ใซ้…ใใชใ‚Šใพใ™ใ€‚\n", + "\n", + "### ใƒ–ใƒผใƒˆใ‚นใƒˆใƒฉใƒƒใƒ—ๆœ€้ฉๅŒ–\n", + "\n", + "*ใƒ–ใƒผใƒˆใ‚นใƒˆใƒฉใƒƒใƒ—*ใ€ใพใŸใฏไบ‹ๅ‰ใฎๆœ€้ฉๅŒ–ใซๅŸบใฅใ„ใฆใƒ‘ใƒฉใƒกใƒผใ‚ฟใƒผ $\\vec\\theta$ ใฎๅˆๆœŸๅ€คใ‚’่จญๅฎšใ™ใ‚‹ใจใ€ใ‚ชใƒ—ใƒ†ใ‚ฃใƒžใ‚คใ‚ถใƒผใŒใ‚ˆใ‚Š้€Ÿใ่งฃใซๅŽๆŸใ™ใ‚‹ใฎใซๅฝน็ซ‹ใกใพใ™ใ€‚ ใ“ใ‚Œใ‚’ๅˆๆœŸ็‚น $\\vec\\theta_0$ ใจๅ‘ผใณใ€ $|\\psi(\\vec\\theta_0)\\rangle = U_V(\\vec\\theta_0)|\\rho\\rangle$ ใ‚’ๅˆๆœŸ็Šถๆ…‹ใจๅ‘ผใณใพใ™ใ€‚ ใ“ใฎๅˆๆœŸ็Šถๆ…‹ใฏๅ‚็…ง็Šถๆ…‹ $|\\rho\\rangle$ ใจใฏ็•ฐใชใ‚Šใพใ™ใ€‚ๅ‰่€…ใฏๆœ€้ฉๅŒ–ใƒซใƒผใƒ—ไธญใซ่จญๅฎšใ•ใ‚ŒใŸๅˆๆœŸใƒ‘ใƒฉใƒกใƒผใ‚ฟใƒผใซ็„ฆ็‚นใ‚’ๅฝ“ใฆใฆใ„ใ‚‹ใฎใซๅฏพใ—ใ€ๅพŒ่€…ใฏๆ—ข็Ÿฅใฎใ€Œๅ‚็…งใ€่งฃใฎไฝฟ็”จใซ็„ฆ็‚นใ‚’ๅฝ“ใฆใฆใ„ใ‚‹ใŸใ‚ใงใ™ใ€‚ $U_V(\\vec\\theta_0) \\equiv I$ (ใคใพใ‚Šใ€ๆ’็ญ‰ๆผ”็ฎ—) ใฎๅ ดๅˆใ€ใ“ใ‚Œใ‚‰ใฏไธ€่‡ดใ™ใ‚‹ๅฏ่ƒฝๆ€งใŒใ‚ใ‚Šใพใ™ใ€‚\n", + "\n", + "ใƒญใƒผใ‚ซใƒซใ‚ชใƒ—ใƒ†ใ‚ฃใƒžใ‚คใ‚ถใƒผใŒๆœ€้ฉใงใชใ„ๆฅตๅฐๅ€คใซๅŽๆŸใ™ใ‚‹ๅ ดๅˆใ€ๆœ€้ฉๅŒ–ใ‚’ใ‚ฐใƒญใƒผใƒใƒซใซใƒ–ใƒผใƒˆใ‚นใƒˆใƒฉใƒƒใƒ—ใ—ใ€ใƒญใƒผใ‚ซใƒซใงๅŽๆŸใ‚’ๆด—็ทดใ™ใ‚‹ใ“ใจใ‚’่ฉฆใฟใ‚‹ใ“ใจใŒใงใใพใ™ใ€‚ใ“ใ‚Œใซใฏ2ใคใฎๅค‰ๅˆ†ใƒฏใƒผใ‚ฏใƒญใƒผใƒ‰ใ‚’่จญๅฎšใ™ใ‚‹ๅฟ…่ฆใŒใ‚ใ‚Šใพใ™ใŒใ€ใ‚ชใƒ—ใƒ†ใ‚ฃใƒžใ‚คใ‚ถใƒผใŒใƒญใƒผใ‚ซใƒซใ‚ชใƒ—ใƒ†ใ‚ฃใƒžใ‚คใ‚ถใƒผใ ใ‘ใ‚ˆใ‚Šใ‚‚ๆœ€้ฉใช่งฃใ‚’่ฆ‹ใคใ‘ใ‚‹ใ“ใจใŒใงใใ‚‹ใ‚ˆใ†ใซใชใ‚Šใพใ™ใ€‚" + ] + }, + { + "attachments": { + }, + "cell_type": "markdown", + "metadata": { + "gloss": { + "hyperparameter": { + "text": "ใƒใ‚คใƒ‘ใƒผใƒ‘ใƒฉใƒกใƒผใ‚ฟใจใฏใ€ใ‚ขใƒซใ‚ดใƒชใ‚บใƒ ใ‚’ๅˆถๅพกใ™ใ‚‹ใŸใ‚ใซไฝฟ็”จใ™ใ‚‹ใƒ‘ใƒฉใƒกใƒผใ‚ฟใงใ™ใ€‚ใ€Œใƒใ‚คใƒ‘ใƒผใ€ใฏใ€ใ‚ขใƒซใ‚ดใƒชใ‚บใƒ ใŒ่ฆ‹ใคใ‘ใ‚ˆใ†ใจใ™ใ‚‹ใƒ‘ใƒฉใƒกใƒผใ‚ฟ๏ผˆฮธ๏ผ‰ใจๅŒบๅˆฅใ•ใ‚Œใฆใ„ใพใ™ใ€‚", + "title": "ใƒใ‚คใƒ‘ใƒผใƒ‘ใƒฉใƒกใƒผใ‚ฟ" + }, + "local-minimum": { + "text": "ๆฅตๅฐๅ€คใฏใ€$theta$ ใฎๅ€คใฎๅฐใ•ใช็ฏ„ๅ›ฒใซๅฏพใ™ใ‚‹ใ€้–ขๆ•ฐใฎๆœ€ไฝŽ็‚นใงใ™ใ€‚ไธ€ๆ–นใ€ๆœ€ๅฐๅ€คใฏใ€้–ขๆ•ฐใฎใฉใ“ใซใŠใ„ใฆใ‚‚๏ผˆใคใพใ‚Šใ€ใฉใฎใ‚ˆใ†ใช $theta$ ใฎๅ€คใซๅฏพใ—ใฆใ‚‚๏ผ‰ๆœ€ไฝŽใฎ็‚นใงใ™ใ€‚Read more.", + "title": "ๆœ€ๅฐๅ€ค" + } + } + }, + "source": [ + "## ๅ‹พ้…ใ‚ใ‚Šใจๅ‹พ้…ใชใ—ใฎใ‚ชใƒ—ใƒ†ใ‚ฃใƒžใ‚คใ‚ถใƒผ\n", + "\n", + "### ๅ‹พ้…ใ‚ใ‚Š\n", + "\n", + "ใ‚ณใ‚นใƒˆ้–ขๆ•ฐ $C(\\vec\\theta)$ ใซใŠใ„ใฆใ€ๅˆๆœŸ็‚นใ‹ใ‚‰้–ขๆ•ฐ $\\vec{\\nabla} C(\\vec\\theta)$ ใฎๅ‹พ้…ใซใ‚ขใ‚ฏใ‚ปใ‚นใงใใ‚‹ๅ ดๅˆใ€้–ขๆ•ฐใ‚’ๆœ€ๅฐๅŒ–ใ™ใ‚‹ๆœ€ใ‚‚็ฐกๅ˜ใชๆ–นๆณ•ใฏใ€ใƒ‘ใƒฉใƒกใƒผใ‚ฟใ‚’้–ขๆ•ฐใฎๆœ€ๆ€ฅ้™ไธ‹ใฎๆ–นๅ‘ใซๆ›ดๆ–ฐใ™ใ‚‹ใ“ใจใงใ™ใ€‚ ใคใพใ‚Šใ€ใƒ‘ใƒฉใƒกใƒผใ‚ฟใ‚’ $\\vec\\theta_{n+1} = \\vec\\theta_n - \\eta \\vec{\\nabla} C(\\vec\\theta)$ ใจใ—ใฆๆ›ดๆ–ฐใ—ใพใ™ใ€‚ใ“ใ“ใงใ€ $\\eta$ ใฏๅญฆ็ฟ’็Ž‡ (ๆ›ดๆ–ฐใฎใ‚ตใ‚คใ‚บใ‚’ๅˆถๅพกใ™ใ‚‹ๅฐใ•ใชๆญฃใฎ[ใƒใ‚คใƒ‘ใƒผใƒ‘ใƒฉใƒกใƒผใ‚ฟ](gloss:hyperparameter) ) ใงใ™ใ€‚ ใ“ใ‚Œใ‚’ใ‚ณใ‚นใƒˆ้–ขๆ•ฐใฎๆฅตๅฐๅ€ค $C({\\vec\\theta^*})$ ใซๅŽๆŸใ™ใ‚‹ใพใง็ถšใ‘ใพใ™ใ€‚[`qiskit.algorithms`](https://qiskit.org/documentation/stubs/qiskit.algorithms.gradients.html) ใฏใ€ๅ‹พ้…ใ‚’่จˆ็ฎ—ใ™ใ‚‹ใŸใ‚ใฎใ„ใใคใ‹ใฎ็•ฐใชใ‚‹ๆ–นๆณ•ใ‚’ๆไพ›ใ—ใพใ™ใ€‚่ฉณ็ดฐใซใคใ„ใฆใฏใ€[ใ“ใกใ‚‰](https://learn.qiskit.org/course/machine-learning/training-quantum-circuits#training-2-0)ใ‚’ใ”่ฆงใใ ใ•ใ„ใ€‚" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + }, + "outputs": [ + + ], + "source": [ + "from qiskit.circuit.library import TwoLocal\n", + "from qiskit.quantum_info import SparsePauliOp\n", + "from qiskit import QuantumCircuit\n", + "from qiskit_ibm_runtime import QiskitRuntimeService, Estimator\n", + "import numpy as np\n", + "\n", + "# Add your token below\n", + "service = QiskitRuntimeService(\n", + " channel=\"ibm_quantum\",\n", + ")\n", + "\n", + "def cost_function_vqe(theta):\n", + " observable = SparsePauliOp.from_list([(\"II\", 2), (\"XX\", -2), (\"YY\", 3), (\"ZZ\", -3)])\n", + " reference_circuit = QuantumCircuit(2)\n", + " reference_circuit.x(0)\n", + "\n", + " variational_form = TwoLocal(\n", + " 2,\n", + " rotation_blocks=[\"rz\", \"ry\"],\n", + " entanglement_blocks=\"cx\",\n", + " entanglement=\"linear\",\n", + " reps=1,\n", + " )\n", + " ansatz = reference_circuit.compose(variational_form)\n", + "\n", + " backend = service.backend(\"ibmq_qasm_simulator\")\n", + " \n", + " # Use estimator to get the expected values corresponding to each ansatz\n", + " estimator = Estimator(session=backend)\n", + " job = estimator.run(ansatz, observable, theta)\n", + " values = job.result().values\n", + "\n", + " return values" + ] + }, + { + "attachments": { + }, + "cell_type": "markdown", + "metadata": { + }, + "source": [ + "ใ“ใฎใ‚ณใ‚นใƒˆ้–ขๆ•ฐใจใ‚ชใƒ—ใƒ†ใ‚ฃใƒžใ‚คใ‚ถใƒผใ‚’ไฝฟใฃใฆใ€ๆœ€้ฉใชใƒ‘ใƒฉใƒกใƒผใ‚ฟใƒผใ‚’็ฎ—ๅ‡บใ™ใ‚‹ใ“ใจใŒใงใใพใ™" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + }, + "outputs": [ + + ], + "source": [ + "from qiskit.algorithms.optimizers import SPSA\n", + "\n", + "initial_theta = np.ones(8)\n", + "optimizer = SPSA()\n", + "\n", + "optimizer_result = optimizer.minimize(fun=cost_function_vqe, x0=initial_theta)\n", + "\n", + "optimal_parameters = optimizer_result.x\n", + "print(optimal_parameters)" + ] + }, + { + "attachments": { + }, + "cell_type": "markdown", + "metadata": { + }, + "source": [ + "ใ“ใฎใ‚ฟใ‚คใƒ—ใฎๆœ€้ฉๅŒ–ใฎไธปใชๆฌ ็‚นใฏใ€ๅŽๆŸ้€ŸๅบฆใŒ้žๅธธใซ้…ใใชใ‚‹ใ“ใจใจใ€ๆœ€้ฉ่งฃใ‚’้”ๆˆใ™ใ‚‹ไฟ่จผใŒใชใ„ใ“ใจใงใ™ใ€‚\n", + "\n", + "![theta ใซๅฏพใ™ใ‚‹ f(theta) ใฎใ‚ฐใƒฉใƒ•ใ€‚่ค‡ๆ•ฐใฎ็‚นใฏใ€ๆ›ฒ็ทšใฎๆœ€ๅฐๅ€คใ‚’่ฆ‹ใคใ‘ใ‚‹ๅ‹พ้…้™ไธ‹ๆณ•ใ‚ขใƒซใ‚ดใƒชใ‚บใƒ ใฎใ•ใพใ–ใพใช็Šถๆ…‹ใ‚’็คบใ—ใพใ™ใ€‚](images/optimization_gradient_descent.png)\n", + "\n", + "### ๅ‹พ้…ใชใ—\n", + "\n", + "ๅ‹พ้…ใ‚’ๅฟ…่ฆใจใ—ใชใ„ๆœ€้ฉๅŒ–ใ‚ขใƒซใ‚ดใƒชใ‚บใƒ ใฏใ€ๅ‹พ้…ๆƒ…ๅ ฑใ‚’ๅฟ…่ฆใจใ—ใชใ„ใŸใ‚ใ€ๅ‹พ้…ใฎ่จˆ็ฎ—ใŒๅ›ฐ้›ฃใงใ‚ใฃใŸใ‚Šใ€ใ‚ณใ‚นใƒˆใŒใ‹ใ‹ใฃใŸใ‚Šใ€ใƒŽใ‚คใ‚บใŒๅคšใ™ใŽใŸใ‚Šใ™ใ‚‹ๅ ดๅˆใซๆœ‰ๅŠนใงใ™ใ€‚ใพใŸใ€ๅ‹พ้…ใ‚’ๅˆฉ็”จใ—ใŸๆ‰‹ๆณ•ใŒๅฑ€ๆ‰€ๆœ€้ฉๅ€คใซๅŽๆŸใ™ใ‚‹ๅ‚พๅ‘ใŒใ‚ใ‚‹ใฎใซๅฏพใ—ใฆใ€ๅคงๅŸŸๆœ€้ฉๅ€คใ‚’่ฆ‹ใคใ‘ใ‚‹ไธŠใงใ‚ˆใ‚Š้ ‘ๅฅใงใ‚ใ‚‹ๅ‚พๅ‘ใŒใ‚ใ‚Šใพใ™ใ€‚ใ“ใ“ใงใฏใ€ๅ‹พ้…ใชใ—ใ‚ชใƒ—ใƒ†ใ‚ฃใƒžใ‚คใ‚ถใƒผใŒไธๆฏ›ใชๅฐๅœฐใ‚’ๅ›ž้ฟใ™ใ‚‹ใฎใซๅฝน็ซ‹ใคใ„ใใคใ‹ใฎไพ‹ใ‚’็ดนไป‹ใ—ใพใ™ใ€‚ใ—ใ‹ใ—ใ€ๅ‹พ้…ใชใ—ๆ‰‹ๆณ•ใฏใ€็‰นใซ้ซ˜ๆฌกๅ…ƒใฎๆŽข็ดข็ฉบ้–“ใ‚’ๆŒใคๅ•้กŒใซๅฏพใ—ใฆใ‚ˆใ‚Š้ซ˜ใ„่จˆ็ฎ—ใƒชใ‚ฝใƒผใ‚นใ‚’ๅฟ…่ฆใจใ—ใพใ™ใ€‚\n", + "\n", + "ใ“ใ“ใงใฏใ€ไปฃใ‚ใ‚Šใซ [`COBYLA`](https://qiskit.org/documentation/stubs/qiskit.algorithms.optimizers.COBYLA.html#qiskit.algorithms.optimizers.COBYLA) ใ‚ชใƒ—ใƒ†ใ‚ฃใƒžใ‚คใ‚ถใƒผใ‚’ไฝฟ็”จใ™ใ‚‹ไพ‹ใ‚’็ดนไป‹ใ—ใพใ™๏ผš" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + }, + "outputs": [ + + ], + "source": [ + "from qiskit.algorithms.optimizers import COBYLA\n", + "\n", + "initial_theta = np.ones(8)\n", + "optimizer = COBYLA()\n", + "\n", + "optimizer_result = optimizer.minimize(fun=cost_function_vqe, x0=initial_theta)\n", + "\n", + "optimal_parameters = optimizer_result.x\n", + "print(optimal_parameters)" + ] + }, + { + "attachments": { + }, + "cell_type": "markdown", + "metadata": { + "gloss": { + "barren-plateaus": { + "text": "ใƒ‘ใƒฉใƒกใƒผใ‚ฟๅŒ–ใ•ใ‚ŒใŸ้‡ๅญๅ›ž่ทฏใฎๅ‹พ้…ใŒ้‡ๅญใƒ“ใƒƒใƒˆๆ•ฐใซๅฏพใ—ใฆๆŒ‡ๆ•ฐ้–ขๆ•ฐ็š„ใซๅฐใ•ใใชใ‚‹ใจใ€ๆœ€้ฉๅŒ–ใŒ้›ฃใ—ใใชใ‚Šใ€ๆœ€้ฉๅŒ–่จˆ็ฎ—ใŒไธ่ƒฝใซใชใ‚‹ๅฏ่ƒฝๆ€งใŒใ‚ใ‚Šใพใ™ใ€‚", + "title": "ไธๆฏ›ใชๅฐๅœฐ" + } + } + }, + "source": [ + "## ไธๆฏ›ใชๅฐๅœฐ\n", + "\n", + "ๅฎŸ้š›ใ€ใ‚ณใ‚นใƒˆใฎ่ตทไผใฏใ€ไธ‹ใฎไพ‹ใฎใ‚ˆใ†ใซไธ˜ใจ่ฐทใฎใ‚ˆใ†ใซ้žๅธธใซ่ค‡้›‘ใซใชใ‚‹ใ“ใจใŒใ‚ใ‚Šใพใ™ใ€‚ๆœ€้ฉๅŒ–ๆ‰‹ๆณ•ใฏใ€้ป’ใ„็‚นใจ็ทšใง็คบใ•ใ‚Œใ‚‹ใ‚ˆใ†ใซใ€ใ‚ณใ‚นใƒˆใฎ่ตทไผใ‚’ใƒŠใƒ“ใ‚ฒใƒผใƒˆใ—ใ€ๆœ€ๅฐๅ€คใ‚’ๆŽขใ—ใพใ™ใ€‚3ใคใฎๆŽข็ดขใฎใ†ใก2ใคใฏใ€ใ‚ฐใƒญใƒผใƒใƒซใชๆœ€ๅฐๅ€คใงใฏใชใใ€ใƒญใƒผใ‚ซใƒซใชๆœ€ๅฐๅ€คใง็ต‚ใ‚ใฃใฆใ„ใ‚‹ใ“ใจใŒใ‚ใ‹ใ‚Šใพใ™ใ€‚\n", + "\n", + "![ใ‚ณใ‚นใƒˆใฎ่ตทไผ](images/optimization_loss_landscape.png)\n", + "\n", + "ๆœ€้ฉๅŒ–ๆ‰‹ๆณ•ใฎ็จฎ้กžใซใ‹ใ‹ใ‚ใ‚‰ใšใ€ใ‚ณใ‚นใƒˆใฎ่ตทไผใŒๆฏ”่ผƒ็š„ๅนณๅฆใงใ‚ใ‚‹ๅ ดๅˆใ€ใใฎๆ‰‹ๆณ•ใŒ้ฉๅˆ‡ใชๆŽข็ดขๆ–นๅ‘ใ‚’ๆฑบๅฎšใ™ใ‚‹ใ“ใจใฏๅ›ฐ้›ฃใชๅ ดๅˆใŒใ‚ใ‚Šใพใ™ใ€‚ใ“ใฎใ‚ˆใ†ใชใ‚ทใƒŠใƒชใ‚ชใฏ[ไธๆฏ›ใชๅฐๅœฐ](gloss:barren-plateaus)ใจๅ‘ผใฐใ‚Œใ€ใ‚ณใ‚นใƒˆใฎ่ตทไผใŒๅพใ€…ใซๅนณๅฆใซใ‚Šใพใ™๏ผˆใ—ใŸใŒใฃใฆใ€ๆœ€ๅฐๅ€คใธใฎๆ–นๅ‘ๆ€งใ‚’ๆฑบๅฎšใ™ใ‚‹ใฎใŒใ‚ˆใ‚Šๅ›ฐ้›ฃใซใชใ‚Šใพใ™๏ผ‰ใ€‚ใƒ‘ใƒฉใƒกใƒผใ‚ฟๅŒ–ใ•ใ‚ŒใŸๅน…ๅบƒใ„้‡ๅญๅ›ž่ทฏใซใŠใ„ใฆใ€ๅˆ็†็š„ใชๆ–นๅ‘ใซๆฒฟใฃใŸๅ‹พ้…ใŒไธ€ๅฎšใฎ็ฒพๅบฆใงใ‚ผใƒญใงใชใ„็ขบ็Ž‡ใฏใ€้‡ๅญใƒ“ใƒƒใƒˆใฎๆ•ฐใŒๅข—ใˆใ‚‹ใซใคใ‚ŒใฆๆŒ‡ๆ•ฐ้–ขๆ•ฐ็š„ใซๆธ›ๅฐ‘ใ™ใ‚‹ใ“ใจใŒๅˆ†ใ‹ใฃใฆใ„ใพใ™ใ€‚\n", + "\n", + "![Barren Plateaus](images/optimization_barren_plateaus.png)\n", + "\n", + "ใ“ใฎๅˆ†้‡Žใฏใพใ ๆดป็™บใช็ ”็ฉถใŒ่กŒใ‚ใ‚Œใฆใ„ใพใ™ใŒใ€ๆœ€้ฉๅŒ–ๆ€ง่ƒฝใ‚’ๅ‘ไธŠใ•ใ›ใ‚‹ใŸใ‚ใฎใ„ใใคใ‹ใฎๆŽจๅฅจไบ‹้ …ใŒใ‚ใ‚Šใพใ™๏ผš\n", + "\n", + "- **ใƒ–ใƒผใƒˆใ‚นใƒˆใƒฉใƒƒใƒ—** ใฏใ€ๆœ€้ฉๅŒ–ใƒซใƒผใƒ—ใŒๅ‹พ้…ใŒๅฐใ•ใ„ใƒ‘ใƒฉใƒกใƒผใ‚ฟ็ฉบ้–“ใง็ซ‹ใกๅพ€็”Ÿใ™ใ‚‹ใฎใ‚’้ฟใ‘ใ‚‹ใฎใซๅฝน็ซ‹ใกใพใ™ใ€‚\n", + "- **ใƒใƒผใƒ‰ใ‚ฆใ‚งใ‚ขๅŠน็Ž‡ใฎ่‰ฏใ„ansatzใฎๅฎŸ้จ“**: ใƒ–ใƒฉใƒƒใ‚ฏใƒœใƒƒใ‚ฏใ‚นใ‚ชใƒฉใ‚ฏใƒซใจใ—ใฆใƒŽใ‚คใ‚บใฎๅคšใ„้‡ๅญ็ณปใ‚’ไฝฟ็”จใ—ใฆใ„ใ‚‹ใŸใ‚ใ€ใใฎ่ฉ•ไพกใฎ่ณชใฏใ‚ชใƒ—ใƒ†ใ‚ฃใƒžใ‚คใ‚ถใƒผใฎๆ€ง่ƒฝใซๅฝฑ้Ÿฟใ‚’ไธŽใˆใ‚‹ใ“ใจใŒใ‚ใ‚Šใพใ™ใ€‚[`EfficientSU2`](https://qiskit.org/documentation/stubs/qiskit.circuit.library.EfficientSU2.html) ใฎใ‚ˆใ†ใชใƒใƒผใƒ‰ใ‚ฆใ‚งใ‚ขๅŠน็Ž‡ใฎ่‰ฏใ„ansatzใ‚’ไฝฟ็”จใ™ใ‚‹ใ“ใจใงใ€ๆŒ‡ๆ•ฐ้–ขๆ•ฐ็š„ใซๅฐใ•ใชๅ‹พ้…ใŒ็™บ็”Ÿใ™ใ‚‹ใ“ใจใ‚’ๅ›ž้ฟใงใใ‚‹ๅฏ่ƒฝๆ€งใŒใ‚ใ‚Šใพใ™ใ€‚\n", + "- **ใ‚จใƒฉใƒผๆŠ‘ๅˆถใจใ‚จใƒฉใƒผ็ทฉๅ’ŒใฎๅฎŸ้จ“**: Qiskit Runtime Primitiveใฏใ€ๆง˜ใ€…ใช `optimization_level`ใจ `resilience_setting` ใ‚’ใใ‚Œใžใ‚ŒๅฎŸ้จ“ใ™ใ‚‹ใŸใ‚ใฎใ‚ทใƒณใƒ—ใƒซใชใ‚คใƒณใ‚ฟใƒผใƒ•ใ‚งใƒผใ‚นใ‚’ๆไพ›ใ—ใพใ™ใ€‚ใ“ใ‚Œใซใ‚ˆใ‚Šใ€ใƒŽใ‚คใ‚บใฎๅฝฑ้Ÿฟใ‚’่ปฝๆธ›ใ—ใ€ๆœ€้ฉๅŒ–ใƒ—ใƒญใ‚ปใ‚นใ‚’ใ‚ˆใ‚ŠๅŠน็Ž‡็š„ใซ่กŒใ†ใ“ใจใŒใงใใพใ™ใ€‚\n", + "- **ๅ‹พ้…ใชใ—ใ‚ชใƒ—ใƒ†ใ‚ฃใƒžใ‚คใ‚ถใƒผใ‚’ไฝฟใฃใŸๅฎŸ้จ“**: `COBYLA`ใฎใ‚ˆใ†ใชใ‚ชใƒ—ใƒ†ใ‚ฃใƒžใ‚คใ‚ถใƒผใฏใ€ๅ‹พ้…ใƒ™ใƒผใ‚นใฎๆœ€้ฉๅŒ–ใ‚ขใƒซใ‚ดใƒชใ‚บใƒ ใจใฏ็•ฐใชใ‚Šใ€ๅ‹พ้…ๆƒ…ๅ ฑใซ้ ผใ‚‰ใšใซใƒ‘ใƒฉใƒกใƒผใ‚ฟใ‚’ๆœ€้ฉๅŒ–ใ™ใ‚‹ใŸใ‚ใ€ไธๆฏ›ใชๅฐๅœฐใฎๅฝฑ้Ÿฟใ‚’ๅ—ใ‘ใซใใ„ใงใ™ใ€‚" + ] + }, + { + "attachments": { + }, + "cell_type": "markdown", + "metadata": { + }, + "source": [ + "ใ“ใฎใƒฌใƒƒใ‚นใƒณใงใ€ใ‚ใชใŸใฏๆœ€้ฉๅŒ–ใƒซใƒผใƒ—ใ‚’ๅฎš็พฉใ™ใ‚‹ๆ–นๆณ•ใ‚’ๅญฆใณใพใ—ใŸ๏ผš\n", + "\n", + "- ๆœ€้ฉๅŒ–ใƒซใƒผใƒ—ใ‚’ใƒ–ใƒผใƒˆใ‚นใƒˆใƒฉใƒƒใƒ—ใ™ใ‚‹ใ€‚\n", + "- ใƒญใƒผใ‚ซใƒซใ‚ชใƒ—ใƒ†ใ‚ฃใƒžใ‚คใ‚ถใƒผใจใ‚ฐใƒญใƒผใƒใƒซใ‚ชใƒ—ใƒ†ใ‚ฃใƒžใ‚คใ‚ถใƒผใ‚’ไฝฟใ„ๅˆ†ใ‘ใชใŒใ‚‰ใ€ใƒˆใƒฌใƒผใƒ‰ใ‚ชใƒ•ใ‚’็†่งฃใ™ใ‚‹ใ€‚\n", + "- ไธๆฏ›ใฎๅฐๅœฐใจใใ‚Œใ‚’้ฟใ‘ใ‚‹ๆ–นๆณ•ใ‚’ๆŽขใ‚‹\n", + "\n", + "ใƒใ‚คใƒฌใƒ™ใƒซใฎๅค‰ๅˆ†ใƒฏใƒผใ‚ฏใƒญใƒผใƒ‰ใฏๅฎŒไบ†ใงใ™๏ผš\n", + "\n", + "![ๆœ€้ฉๅŒ–ๅ›ž่ทฏ](images/optimization_circuit.png)\n", + "\n", + "ๆฌกใซใ€ใ“ใฎใƒ•ใƒฌใƒผใƒ ใƒฏใƒผใ‚ฏใ‚’ๆ„่ญ˜ใ—ใฆใ€ๅ…ทไฝ“็š„ใชๅค‰ๅˆ†ใ‚ขใƒซใ‚ดใƒชใ‚บใƒ ใ‚’ๆŽขใฃใฆใ„ใใพใ™ใ€‚" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.9" + } + }, + "nbformat": 4, + "nbformat_minor": 2 +} diff --git a/translations/ja/algorithm-design/reference/reference.ipynb b/translations/ja/algorithm-design/reference/reference.ipynb new file mode 100644 index 000000000..593838003 --- /dev/null +++ b/translations/ja/algorithm-design/reference/reference.ipynb @@ -0,0 +1,301 @@ +{ + "cells": [ + { + "attachments": { + }, + "cell_type": "markdown", + "metadata": { + "gloss": { + "reference": { + "text": "ๅ•้กŒใฎๅˆๆœŸ็Šถๆ…‹ใ€ๆฑบใพใฃใŸ้–‹ๅง‹็Šถๆ…‹ใ€‚้€šๅธธ $|0\\rangle$ ใ‚’ๆŒ‡ใ—ใพใ™ใŒใ€ๅ•้กŒใ‚’้ฉๅˆ‡ใซ่กจ็พใ™ใ‚‹ๆง˜ใ€…ใช็Šถๆ…‹ใซ่จญๅฎšใ™ใ‚‹ใ“ใจใŒใงใใพใ™ใ€‚", + "title": "ๅ‚็…ง็Šถๆ…‹" + } + } + }, + "source": [ + "## ๅ‚็…ง็Šถๆ…‹\n", + "\n", + "ใ“ใฎใƒฌใƒƒใ‚นใƒณใงใฏใ€ๅค‰ๅˆ†ใ‚ขใƒซใ‚ดใƒชใ‚บใƒ ใ‚’ใ‚ˆใ‚Š้€ŸใๅŽๆŸใ•ใ›ใ‚‹ใŸใ‚ใซใ€ๅ‚็…ง็Šถๆ…‹ใง็ณปใ‚’ๅˆๆœŸๅŒ–ใ™ใ‚‹ๆ–นๆณ•ใซใคใ„ใฆๅญฆใณใพใ™ใ€‚ใพใšใ€ [*ๅ‚็…ง็Šถๆ…‹*](gloss:reference) ใ‚’ๆ‰‹ๅ‹•ใงๆง‹็ฏ‰ใ™ใ‚‹ๆ–นๆณ•ใ‚’ๅญฆใณใ€ๆฌกใซๅค‰ๅˆ†ใ‚ขใƒซใ‚ดใƒชใ‚บใƒ ใงไฝฟ็”จๅฏ่ƒฝใชใ„ใใคใ‹ใฎๆจ™ๆบ–็š„ใช้ธๆŠž่‚ขใ‚’ๆŽขใ‚Šใพใ™ใ€‚\n", + "\n", + "![Reference Workflow](images/reference_workflow.png)" + ] + }, + { + "attachments": { + }, + "cell_type": "markdown", + "metadata": { + }, + "source": [ + "## ใƒ‡ใƒ•ใ‚ฉใƒซใƒˆ็Šถๆ…‹\n", + "\n", + "*ๅ‚็…ง็Šถๆ…‹* ใจใฏใ€ๅ•้กŒใซๅฏพใ™ใ‚‹ๆœ€ๅˆใฎๅ›บๅฎš้–‹ๅง‹็Šถๆ…‹ใ‚’ๆ„ๅ‘ณใ—ใพใ™ใ€‚ๅ‚็…ง็Šถๆ…‹ใ‚’ๆบ–ๅ‚™ใ™ใ‚‹ใŸใ‚ใซใ€้‡ๅญๅ›ž่ทฏใฎ้–‹ๅง‹ๆ™‚ใซ้ฉๅˆ‡ใชใƒ‘ใƒฉใƒกใƒผใ‚ฟๅŒ–ใ•ใ‚Œใฆใ„ใชใ„ใƒฆใƒ‹ใ‚ฟใƒชใƒผๅ›ž่ทฏ $U_R$ ใ‚’้ฉ็”จใ—ใ€ $|\\rho\\rangle = U_R |0\\rangle$ ใจใชใ‚‹ใ‚ˆใ†ใซใ™ใ‚‹ๅฟ…่ฆใŒใ‚ใ‚Šใพใ™ใ€‚ๆ—ขๅญ˜ใฎๆœ€้ฉ่งฃใ‹ใ‚‰ใฎๆŽจๆธฌใ‚„ใƒ‡ใƒผใ‚ฟ็‚นใŒใ‚ใ‚‹ๅ ดๅˆใ€ใใ‚Œใ‚’ๅ‡บ็™บ็‚นใจใ—ใฆไฝฟ็”จใ™ใ‚‹ใจๅค‰ๅˆ†ใ‚ขใƒซใ‚ดใƒชใ‚บใƒ ใŒๆ—ฉใๅŽๆŸใ™ใ‚‹ๅฏ่ƒฝๆ€งใŒใ‚ใ‚Šใพใ™ใ€‚\n", + "\n", + "ๆœ€ใ‚‚ๅ˜็ด”ใชๅ‚็…ง็Šถๆ…‹ใฏใƒ‡ใƒ•ใ‚ฉใƒซใƒˆ็Šถๆ…‹ใงใ‚ใ‚Šใ€ $n$ ้‡ๅญใƒ“ใƒƒใƒˆๅ›ž่ทฏใฎ้–‹ๅง‹็Šถๆ…‹ $|0\\rangle^{\\otimes n}$ ใ‚’ไฝฟ็”จใ—ใพใ™ใ€‚ ใƒ‡ใƒ•ใ‚ฉใƒซใƒˆ็Šถๆ…‹ใฎๅ ดๅˆใ€ใƒฆใƒ‹ใ‚ฟใƒชใƒผๆผ”็ฎ—ๅญ $U_R \\equiv I$ ใŒไฝฟใ‚ใ‚Œใพใ™ใ€‚ใใฎๅ˜็ด”ใ•ใ‚†ใˆใซใ€ใƒ‡ใƒ•ใ‚ฉใƒซใƒˆ็Šถๆ…‹ใฏๅคšใใฎใ‚ทใƒŠใƒชใ‚ชใงไฝฟ็”จใ•ใ‚Œใ‚‹ๆœ‰ๅŠนใชๅ‚็…ง็Šถๆ…‹ใงใ™ใ€‚" + ] + }, + { + "attachments": { + }, + "cell_type": "markdown", + "metadata": { + }, + "source": [ + "## ๅคๅ…ธ็š„ใชๅ‚็…ง็Šถๆ…‹\n", + "\n", + "$3$ ้‡ๅญใƒ“ใƒƒใƒˆ็ณปใงใ€ใƒ‡ใƒ•ใ‚ฉใƒซใƒˆใฎ็Šถๆ…‹ $|000\\rangle$ ใฎไปฃใ‚ใ‚Šใซ็Šถๆ…‹ $|001\\rangle$ ใงๅง‹ใ‚ใŸใ„ใจใ—ใพใ™ใ€‚ใ“ใ‚Œใฏ็ด”็ฒ‹ใซๅคๅ…ธ็š„ใชๅ‚็…ง็Šถๆ…‹ใฎไพ‹ใงใ€ใ“ใ‚Œใ‚’ๆง‹็ฏ‰ใ™ใ‚‹ใซใฏใ€(Qiskitใฎ้‡ๅญใƒ“ใƒƒใƒˆ้ †ๅบใซๅพ“ใฃใฆ)้‡ๅญใƒ“ใƒƒใƒˆ $0$ ใซ [X ใ‚ฒใƒผใƒˆ](https://qiskit.org/documentation/stubs/qiskit.circuit.library.XGate.html) ใ‚’้ฉ็”จใ™ใ‚‹ใ ใ‘ใงใ€ $|001\\rangle = X_0 |000\\rangle$ ใจใชใ‚Šใพใ™ใ€‚\n", + "\n", + "ใ“ใฎๅ ดๅˆใ€ใƒฆใƒ‹ใ‚ฟใƒชใƒผๆผ”็ฎ—ๅญใฏ $U_R \\equiv X_0$ ใจใชใ‚Šใ€ๅ‚็…ง็Šถๆ…‹ $|\\rho\\rangle \\equiv |001\\rangle$ ใ‚’ไฝœใ‚Šใพใ™ใ€‚" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + }, + "outputs": [ + + ], + "source": [ + "from qiskit import QuantumCircuit\n", + "\n", + "qc = QuantumCircuit(3)\n", + "qc.x(0)\n", + "\n", + "qc.draw(\"mpl\")" + ] + }, + { + "attachments": { + }, + "cell_type": "markdown", + "metadata": { + }, + "source": [ + "## ้‡ๅญ็š„ใชๅ‚็…ง็Šถๆ…‹\n", + "\n", + "ไพ‹ใˆใฐใ€ $\\frac{1}{\\sqrt{2}}(|100\\rangle+|111\\rangle)$ ใฎใ‚ˆใ†ใช้‡ใญๅˆใ‚ใ›ใ‚„ใ‚จใƒณใ‚ฟใƒณใ‚ฐใƒซใƒกใƒณใƒˆใ‚’ๅซใ‚€ใ‚ˆใ‚Š่ค‡้›‘ใช็Šถๆ…‹ใ‹ใ‚‰ๅง‹ใ‚ใŸใ„ใจใ—ใพใ™ใ€‚\n", + "\n", + "ใ“ใฎ็Šถๆ…‹ใ‚’ $|000\\rangle$ ใ‹ใ‚‰ๅพ—ใ‚‹ๆ–นๆณ•ใฎไธ€ใคใซใ€้‡ๅญใƒ“ใƒƒใƒˆ $0$ ใซๅฏพใ—ใฆ [ใ‚ขใƒ€ใƒžใƒผใƒซใ‚ฒใƒผใƒˆ](https://qiskit.org/documentation/stubs/qiskit.circuit.library.HGate.html)๏ผˆ $H_0$ ๏ผ‰ใ€้‡ๅญใƒ“ใƒƒใƒˆ $0$ ใ‚’ๅˆถๅพก้‡ๅญใƒ“ใƒƒใƒˆใ€้‡ๅญใƒ“ใƒƒใƒˆ $1$ ใ‚’ใ‚ฟใƒผใ‚ฒใƒƒใƒˆ้‡ๅญใƒ“ใƒƒใƒˆใจใ™ใ‚‹ [CNOT๏ผˆCX๏ผ‰](https://qiskit.org/documentation/stubs/qiskit.circuit.library.CXGate.html)ใ‚ฒใƒผใƒˆ๏ผˆ $CNOT_{01}$ ๏ผ‰ใ€ๆœ€ๅพŒใซ้‡ๅญใƒ“ใƒƒใƒˆ $2$ ใซๅฏพใ™ใ‚‹ $X$ ใ‚ฒใƒผใƒˆ๏ผˆ $X_2$ ๏ผ‰ใ‚’้ฉ็”จใ™ใ‚‹ๆ–นๆณ•ใŒใ‚ใ‚Šใพใ™ใ€‚\n", + "\n", + "ใ“ใฎใจใใ€ใƒฆใƒ‹ใ‚ฟใƒชใƒผๆผ”็ฎ—ๅญใฏ $U_{R} \\equiv X_2CNOT_{01}H_0|000\\rangle$ ใ€ๅ‚็…ง็Šถๆ…‹ใฏ $|\\rho\\rangle \\equiv \\frac{1}{\\sqrt{2}}(|100\\rangle+|111\\rangle)$ ใงใ™ใ€‚" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + }, + "outputs": [ + + ], + "source": [ + "qc = QuantumCircuit(3)\n", + "qc.h(0)\n", + "qc.cx(0, 1)\n", + "qc.x(2)\n", + "\n", + "qc.draw(\"mpl\")" + ] + }, + { + "attachments": { + }, + "cell_type": "markdown", + "metadata": { + }, + "source": [ + "## ใƒ†ใƒณใƒ—ใƒฌใƒผใƒˆๅ›ž่ทฏใ‚’็”จใ„ใŸๅ‚็…ง็Šถๆ…‹ใฎๆง‹็ฏ‰\n", + "\n", + "ใพใŸใ€่ค‡ๆ•ฐใฎ่ชฟๆ•ดๅฏ่ƒฝใชใƒ‘ใƒฉใƒกใƒผใ‚ฟใ‚„ใ‚จใƒณใ‚ฟใƒณใ‚ฐใƒซใƒกใƒณใƒˆใ‚’็ฐกๅ˜ใซ่กจ็พใงใใ‚‹ [`TwoLocal`](https://qiskit.org/documentation/stubs/qiskit.circuit.library.TwoLocal.html) ใชใฉใ€ๆง˜ใ€…ใชใƒ†ใƒณใƒ—ใƒฌใƒผใƒˆๅ›ž่ทฏใ‚’ๅˆฉ็”จใ™ใ‚‹ใ“ใจใŒใงใใพใ™ใ€‚ใ“ใ‚Œใ‚‰ใฎใƒ†ใƒณใƒ—ใƒฌใƒผใƒˆๅ›ž่ทฏใซใคใ„ใฆใฏใ€ๆฌกๅ›žใฎใƒฌใƒƒใ‚นใƒณใง่ฉณใ—ใ่ชฌๆ˜Žใ—ใพใ™ใŒใ€ใƒ‘ใƒฉใƒกใƒผใ‚ฟใ‚’ใƒใ‚คใƒณใƒ‰ใ—ใŸ *ๅ ดๅˆ* ใ€ๅ‚็…ง็Šถๆ…‹ใซๅˆฉ็”จใ™ใ‚‹ใ“ใจใŒใงใใพใ™ใ€‚" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + }, + "outputs": [ + + ], + "source": [ + "from qiskit.circuit.library import TwoLocal\n", + "from math import pi\n", + "\n", + "reference_circuit = TwoLocal(2, \"rx\", \"cz\", entanglement=\"linear\", reps=1)\n", + "theta_list = [pi / 2, pi / 3, pi / 3, pi / 2]\n", + "\n", + "reference_circuit = reference_circuit.bind_parameters(theta_list)\n", + "\n", + "reference_circuit.decompose().draw(\"mpl\")" + ] + }, + { + "attachments": { + }, + "cell_type": "markdown", + "metadata": { + }, + "source": [ + "## ใ‚ขใƒ—ใƒชใ‚ฑใƒผใ‚ทใƒงใƒณๅ›บๆœ‰ใฎๅ‚็…ง็Šถๆ…‹" + ] + }, + { + "attachments": { + }, + "cell_type": "markdown", + "metadata": { + }, + "source": [ + "### ้‡ๅญๅŒ–ๅญฆ\n", + "\n", + "้‡ๅญๅŒ–ๅญฆใงใฏใ€ *Hartree-Fock* ็Šถๆ…‹ใฏๅŽŸๅญใ‚„ๅˆ†ๅญใฎๅŸบๅบ•็Šถๆ…‹ใฎ่ฟ‘ไผผๅ€คใงใ™ใ€‚ๆญฃ็ขบใชๅŸบๅบ•็Šถๆ…‹ใ‚’ๆฑ‚ใ‚ใ‚‹ๅค‰ๅˆ†ใ‚ขใƒซใ‚ดใƒชใ‚บใƒ ใ‚’ไฝœๆˆใ™ใ‚‹ใ“ใจใŒ็›ฎ็š„ใงใ‚ใ‚Œใฐใ€ใ“ใฎๆ—ข็Ÿฅใฎๅคๅ…ธ็š„่ฟ‘ไผผใ‚’ๅ‚็…ง็Šถๆ…‹ใจใ—ใฆไฝฟ็”จใ™ใ‚‹ใ“ใจใงใ€ใ‚ขใƒซใ‚ดใƒชใ‚บใƒ ใฎๅŽๆŸใ‚’ๆ—ฉใใ™ใ‚‹ใ“ใจใŒใงใใพใ™ใ€‚\n", + "\n", + "ใ“ใฎไพ‹ใงใฏใ€2ใคใฎ็ฉบ้–“่ปŒ้“ใจ2ใคใฎ้›ปๅญ๏ผˆ1ใคใฎใ‚ขใƒซใƒ•ใ‚กใƒปใ‚นใƒ”ใƒณใ€1ใคใฎใƒ™ใƒผใ‚ฟใƒปใ‚นใƒ”ใƒณ๏ผ‰ใ‚’ๆŒใคๅ•้กŒใซๅฏพใ—ใฆใ€ๆฌกใฎใ‚ˆใ†ใซ้›ปๅญๆง‹้€ ใฎๅ•้กŒใ‚’็”Ÿๆˆใ™ใ‚‹ใ“ใจใŒใงใใพใ™ใ€‚" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + }, + "outputs": [ + + ], + "source": [ + "from qiskit_nature.second_q.circuit.library import HartreeFock\n", + "from qiskit_nature.second_q.mappers import JordanWignerMapper\n", + "\n", + "num_spatial_orbitals = 2\n", + "num_particles = (1, 1)\n", + "\n", + "mapper = JordanWignerMapper()\n", + "\n", + "h2_reference_state = HartreeFock(\n", + " num_spatial_orbitals=num_spatial_orbitals,\n", + " num_particles=num_particles,\n", + " qubit_mapper=mapper,\n", + ")\n", + "\n", + "h2_reference_state.decompose().draw(\"mpl\")" + ] + }, + { + "attachments": { + }, + "cell_type": "markdown", + "metadata": { + }, + "source": [ + "ใพใŸใ€ๆฐด็ด ๅŒ–ใƒชใƒใ‚ฆใƒ ๏ผˆLiH๏ผ‰ใฎใ‚ˆใ†ใช็‰นๅฎšใฎๅˆ†ๅญใ‚’ๆง‹ๆˆใ™ใ‚‹ใ“ใจใ‚‚ๅฏ่ƒฝใงใ™ใ€‚" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + }, + "outputs": [ + + ], + "source": [ + "from qiskit_nature.second_q.drivers import PySCFDriver\n", + "from qiskit_nature.second_q.circuit.library import HartreeFock\n", + "from qiskit_nature.second_q.mappers import JordanWignerMapper\n", + "from qiskit_nature.second_q.formats.molecule_info import MoleculeInfo\n", + "\n", + "molecule = MoleculeInfo(\n", + " # Coordinates in Angstrom\n", + " symbols=[\"Li\", \"H\"],\n", + " coords=([0.0, 0.0, 0.0], [0.2, 0.0, 0.0]),\n", + " multiplicity=1, # = 2*spin + 1\n", + " charge=0,\n", + ")\n", + "\n", + "driver = PySCFDriver.from_molecule(molecule)\n", + "LiH_problem = driver.run()\n", + "\n", + "mapper = JordanWignerMapper()\n", + "LiH_reference_state = HartreeFock(\n", + " num_spatial_orbitals=LiH_problem.num_spatial_orbitals,\n", + " num_particles=LiH_problem.num_particles,\n", + " qubit_mapper=mapper,\n", + ")\n", + "\n", + "LiH_reference_state.decompose().draw(\"mpl\")" + ] + }, + { + "attachments": { + }, + "cell_type": "markdown", + "metadata": { + }, + "source": [ + "### ้‡ๅญๆฉŸๆขฐๅญฆ็ฟ’\n", + "\n", + "[ๅค‰ๅˆ†้‡ๅญๅˆ†้กžๅ™จ๏ผˆVQC๏ผ‰](https://learn.qiskit.org/course/machine-learning/variational-classification) ใฎๆ–‡่„ˆใงใฏใ€่จ“็ทดใƒ‡ใƒผใ‚ฟใฏใ€ *็‰นๅพด้‡ใƒžใƒƒใƒ—* ใจใ—ใฆ็Ÿฅใ‚‰ใ‚Œใ‚‹ใƒ‘ใƒฉใƒกใƒผใ‚ฟๅŒ–ใ•ใ‚ŒใŸๅ›ž่ทฏใง้‡ๅญ็Šถๆ…‹ใซ็ฌฆๅทๅŒ–ใ•ใ‚Œใ€ๅ„ใƒ‘ใƒฉใƒกใƒผใ‚ฟใฎๅ€คใฏ่จ“็ทดใƒ‡ใƒผใ‚ฟใ‚ปใƒƒใƒˆใฎใƒ‡ใƒผใ‚ฟ็‚นใ‚’่กจใ—ใพใ™ใ€‚ [ZZFeatureMap](https://qiskit.org/documentation/stubs/qiskit.circuit.library.ZZFeatureMap.html) ใฏใ€ใ“ใฎ็‰นๅพด้‡ใƒžใƒƒใƒ—ใซใƒ‡ใƒผใ‚ฟ็‚น($x$) ใ‚’ๆธกใ™ใƒ‘ใƒฉใƒกใƒผใ‚ฟๅŒ–ๅ›ž่ทฏใฎไธ€็จฎใงใ™ใ€‚" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + }, + "outputs": [ + + ], + "source": [ + "from qiskit.circuit.library import ZZFeatureMap\n", + "\n", + "data = [0.1, 0.2]\n", + "\n", + "zz_feature_map_reference = ZZFeatureMap(feature_dimension=2, reps=2)\n", + "zz_feature_map_reference = zz_feature_map_reference.bind_parameters(data)\n", + "zz_feature_map_reference.decompose().draw(\"mpl\")" + ] + }, + { + "attachments": { + }, + "cell_type": "markdown", + "metadata": { + }, + "source": [ + "ใ“ใฎใƒฌใƒƒใ‚นใƒณใงใ€ใ‚ใชใŸใฏใ€ไปฅไธ‹ใ‚’ไฝฟใฃใฆใ‚ทใ‚นใƒ†ใƒ ใ‚’ๅˆๆœŸๅŒ–ใ™ใ‚‹ๆ–นๆณ•ใ‚’ๅญฆใณใพใ—ใŸ๏ผš\n", + "\n", + "- ใƒ‡ใƒ•ใ‚ฉใƒซใƒˆใฎๅ‚็…ง็Šถๆ…‹\n", + "- ๅคๅ…ธ็š„ใชๅ‚็…ง็Šถๆ…‹\n", + "- ้‡ๅญ็š„ใชๅ‚็…ง็Šถๆ…‹\n", + "- ใ‚ขใƒ—ใƒชใ‚ฑใƒผใ‚ทใƒงใƒณๅ›บๆœ‰ใฎๅ‚็…ง็Šถๆ…‹\n", + "\n", + "ใ“ใฎใƒใ‚คใƒฌใƒ™ใƒซใชๅค‰ๅˆ†ใƒฏใƒผใ‚ฏใƒญใƒผใƒ‰ใฏๆฌกใฎใ‚ˆใ†ใซใชใ‚Šใพใ™ใ€‚\n", + "\n", + "![Reference Circuit](images/reference_circuit.png)\n", + "\n", + "ๅ‚็…ง็Šถๆ…‹ใฏๅ›บๅฎšใ•ใ‚ŒใŸๆœ€ๅˆใฎๅ‡บ็™บ็‚นใงใ‚ใ‚‹ใฎใซๅฏพใ—ใ€ *ๅค‰ๅˆ†ๅฝขๅผ* ใ‚’ไฝฟใฃใฆใ€ๅค‰ๅˆ†ใ‚ขใƒซใ‚ดใƒชใ‚บใƒ ใŒๆŽข็ดขใ™ใ‚‹ใŸใ‚ใฎใƒ‘ใƒฉใƒกใƒผใ‚ฟๅŒ–ใ•ใ‚ŒใŸ็Šถๆ…‹ใฎ้›†ๅˆใ‚’่กจใ™ *ansatz* ใ‚’ๅฎš็พฉใ™ใ‚‹ใ“ใจใŒใงใใพใ™ใ€‚" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.9" + } + }, + "nbformat": 4, + "nbformat_minor": 2 +} diff --git a/translations/ja/toc.yaml b/translations/ja/toc.yaml index b3eb33dda..1eac8b5b4 100644 --- a/translations/ja/toc.yaml +++ b/translations/ja/toc.yaml @@ -113,10 +113,10 @@ #---- Below was added by machine --- - sections: - - id: environment-setup-guide-to-work-with-qiskit-textbook + - id: setting-the-environment url: v1/ch-prerequisites/setting-the-environment uuid: a5a86ddc-b519-11ec-b909-0242ac120002 - - id: introduction-to-python-and-jupyter-notebooks + - id: python-and-jupyter-notebooks url: v1/ch-prerequisites/python-and-jupyter-notebooks uuid: a9f5ea68-b519-11ec-b909-0242ac120002 title: "\u524D\u63D0\u6761\u4EF6" @@ -134,7 +134,7 @@ - id: single-qubit-gates url: v1/ch-states/single-qubit-gates uuid: bd4334a4-b519-11ec-b909-0242ac120002 - - id: the-case-for-quantum-computers + - id: case-for-quantum url: v1/ch-states/case-for-quantum uuid: c0bbff62-b519-11ec-b909-0242ac120002 title: "\u91CF\u5B50\u72B6\u614B\u3068\u91CF\u5B50\u30D3\u30C3\u30C8" @@ -149,29 +149,29 @@ - id: phase-kickback url: v1/ch-gates/phase-kickback uuid: cb7353ec-b519-11ec-b909-0242ac120002 - - id: basic-circuit-identities + - id: more-circuit-identities url: v1/ch-gates/more-circuit-identities uuid: ce8ce75a-b519-11ec-b909-0242ac120002 - id: proving-universality url: v1/ch-gates/proving-universality uuid: d15d3548-b519-11ec-b909-0242ac120002 - - id: classical-computation-on-a-quantum-computer + - id: oracles url: v1/ch-gates/oracles uuid: d4f6e424-b519-11ec-b909-0242ac120002 title: "\u8907\u6570\u91CF\u5B50\u30D3\u30C3\u30C8\u3068\u3082\u3064\u308C\u72B6\ \u614B" url: /v1_ch-gates - sections: - - id: quantum-circuits + - id: defining-quantum-circuits url: v1/ch-algorithms/defining-quantum-circuits uuid: d90cbfb6-b519-11ec-b909-0242ac120002 - - id: deutsch-jozsa-algorithm + - id: deutsch-jozsa url: v1/ch-algorithms/deutsch-jozsa uuid: dc9d3aa2-b519-11ec-b909-0242ac120002 - - id: bernstein-vazirani-algorithm + - id: bernstein-vazirani url: v1/ch-algorithms/bernstein-vazirani uuid: df6e5a40-b519-11ec-b909-0242ac120002 - - id: simons-algorithm + - id: simon url: v1/ch-algorithms/simon uuid: e2714126-b519-11ec-b909-0242ac120002 - id: quantum-fourier-transform @@ -180,16 +180,19 @@ - id: quantum-phase-estimation url: v1/ch-algorithms/quantum-phase-estimation uuid: e8ac9ec8-b519-11ec-b909-0242ac120002 - - id: shors-algorithm + - id: shor url: v1/ch-algorithms/shor uuid: ec157cd8-b519-11ec-b909-0242ac120002 - - id: grovers-algorithm + - id: grover url: v1/ch-algorithms/grover uuid: eebb7488-b519-11ec-b909-0242ac120002 - id: quantum-counting url: v1/ch-algorithms/quantum-counting uuid: f1a9942c-b519-11ec-b909-0242ac120002 - - id: quantum-teleportation + - id: quantum-walk-search-algorithm + url: v1/ch-algorithms/quantum-walk-search-algorithm + uuid: 9a061c81-d490-4fff-bb71-727408234082 + - id: teleportation url: v1/ch-algorithms/teleportation uuid: f4f4a090-b519-11ec-b909-0242ac120002 - id: superdense-coding @@ -202,32 +205,32 @@ \u30B4\u30EA\u30BA\u30E0" url: /v1_ch-algorithms - sections: - - id: solving-linear-systems-of-equations-using-hhl-and-its-qiskit-implementation + - id: hhl_tutorial url: v1/ch-applications/hhl_tutorial uuid: 01484810-b51a-11ec-b909-0242ac120002 - - id: simulating-molecules-using-vqe + - id: vqe-molecules url: v1/ch-applications/vqe-molecules uuid: 041df288-b51a-11ec-b909-0242ac120002 - - id: solving-combinatorial-optimization-problems-using-qaoa + - id: qaoa url: v1/ch-applications/qaoa uuid: 06ff7ada-b51a-11ec-b909-0242ac120002 - - id: solving-satisfiability-problems-using-grovers-algorithm + - id: satisfiability-grover url: v1/ch-applications/satisfiability-grover uuid: 09d1529c-b51a-11ec-b909-0242ac120002 - - id: hybrid-quantum-classical-neural-networks-with-pytorch-and-qiskit + - id: machine-learning-qiskit-pytorch url: v1/ch-machine-learning/machine-learning-qiskit-pytorch uuid: 0cac4d14-b51a-11ec-b909-0242ac120002 - - id: the-variational-quantum-linear-solver + - id: vqls url: v1/ch-paper-implementations/vqls uuid: 1163f456-b51a-11ec-b909-0242ac120002 - - id: flexible-representation-of-quantum-images-frqi + - id: image-processing-frqi-neqr url: v1/ch-applications/image-processing-frqi-neqr uuid: 14acf6a8-b51a-11ec-b909-0242ac120002 title: "\u91CF\u5B50\u30A2\u30D7\u30EA\u30B1\u30FC\u30B7\u30E7\u30F3\u306E\u30A2\ \u30EB\u30B4\u30EA\u30BA\u30E0" url: /v1_ch-applications - sections: - - id: introduction-to-quantum-error-correction-via-the-repetition-code + - id: error-correction-repetition-code url: v1/ch-quantum-hardware/error-correction-repetition-code uuid: 197f7f66-b51a-11ec-b909-0242ac120002 - id: measurement-error-mitigation @@ -243,45 +246,45 @@ \u30A6\u30A7\u30A2\u306E\u63A2\u7A76" url: /v1_quantum-hardware - sections: - - id: calibrating-qubits-using-qiskit-pulse + - id: calibrating-qubits-pulse url: v1/ch-quantum-hardware/calibrating-qubits-pulse uuid: 292100ca-b51a-11ec-b909-0242ac120002 - - id: accessing-higher-energy-states-with-qiskit-pulse + - id: accessing_higher_energy_states url: v1/ch-quantum-hardware/accessing_higher_energy_states uuid: 2bf0d316-b51a-11ec-b909-0242ac120002 - - id: introduction-to-transmon-physics + - id: transmon-physics url: v1/ch-quantum-hardware/transmon-physics uuid: 2e944e0e-b51a-11ec-b909-0242ac120002 - - id: circuit-quantum-electrodynamics + - id: cQED-JC-SW url: v1/ch-quantum-hardware/cQED-JC-SW uuid: 31b2ccdc-b51a-11ec-b909-0242ac120002 title: "\u30DE\u30A4\u30AF\u30ED\u6CE2\u30D1\u30EB\u30B9\u306B\u3088\u308B\u91CF\ \u5B50\u30CF\u30FC\u30C9\u30A6\u30A7\u30A2\u306E\u63A2\u7A76" url: /v1_quantum-hardware-pulses - sections: - - id: lab-1-quantum-circuits + - id: Lab01_QuantumCircuits url: v1/ch-labs/Lab01_QuantumCircuits uuid: 3ff5a7ec-b51a-11ec-b909-0242ac120002 - - id: lab-2-quantum-measurement + - id: Lab02_QuantumMeasurement url: v1/ch-labs/Lab02_QuantumMeasurement uuid: 82eb9557-1420-487b-a3a5-72fdf38878e8 title: "\u91CF\u5B50\u30B3\u30F3\u30D4\u30E5\u30FC\u30C6\u30A3\u30F3\u30B0\u30FB\ \u30E9\u30DC" url: /v1_ch-labs - sections: - - id: an-introduction-to-linear-algebra-for-quantum-computing + - id: linear_algebra url: v1/ch-appendix/linear_algebra uuid: 5d2bb2ca-b51a-11ec-b909-0242ac120002 - - id: basic-qiskit-syntax + - id: qiskit url: v1/ch-appendix/qiskit uuid: 5fd6b79a-b51a-11ec-b909-0242ac120002 title: "Appendix(\u4ED8\u9332)" url: /v1_ch-appendix - sections: - - id: bonus-level-sandbox + - id: hello-qiskit url: v1/ch-ex/hello-qiskit uuid: 63a85f0e-b51a-11ec-b909-0242ac120002 - - id: estimating-pi-using-quantum-phase-estimation-algorithm + - id: piday-code url: v1/ch-demos/piday-code uuid: 69b9707c-b51a-11ec-b909-0242ac120002 title: "\u30B2\u30FC\u30E0\u3068\u30C7\u30E2" @@ -382,331 +385,18 @@ - id: quantum-counting url: v2/ch-algorithms/quantum-counting uuid: f1a9942c-b519-11ec-b909-0242ac120002 - - id: quantum-teleportation - url: v2/ch-algorithms/teleportation - uuid: f4f4a090-b519-11ec-b909-0242ac120002 - - id: superdense-coding - url: v2/ch-algorithms/superdense-coding - uuid: f87cbd42-b519-11ec-b909-0242ac120002 + - id: quantum-walk-search-algorithm + url: v2/ch-algorithms/quantum-walk-search-algorithm + uuid: b2ef52cf-0ce4-494a-8142-fd00e0e8330d - id: quantum-key-distribution url: v2/ch-algorithms/quantum-key-distribution uuid: fbafa8c6-b519-11ec-b909-0242ac120002 - title: "\u91CF\u5B50\u30D7\u30ED\u30C8\u30B3\u30EB\u3068\u91CF\u5B50\u30A2\u30EB\ - \u30B4\u30EA\u30BA\u30E0" - url: /v2_ch-algorithms -- sections: - - id: solving-linear-systems-of-equations-using-hhl-and-its-qiskit-implementation - url: v2/ch-applications/hhl_tutorial - uuid: 01484810-b51a-11ec-b909-0242ac120002 - - id: simulating-molecules-using-vqe - url: v2/ch-applications/vqe-molecules - uuid: 041df288-b51a-11ec-b909-0242ac120002 - - id: solving-combinatorial-optimization-problems-using-qaoa - url: v2/ch-applications/qaoa - uuid: 06ff7ada-b51a-11ec-b909-0242ac120002 - - id: solving-satisfiability-problems-using-grovers-algorithm - url: v2/ch-applications/satisfiability-grover - uuid: 09d1529c-b51a-11ec-b909-0242ac120002 - - id: hybrid-quantum-classical-neural-networks-with-pytorch-and-qiskit - url: v2/ch-machine-learning/machine-learning-qiskit-pytorch - uuid: 0cac4d14-b51a-11ec-b909-0242ac120002 - - id: the-variational-quantum-linear-solver - url: v2/ch-paper-implementations/vqls - uuid: 1163f456-b51a-11ec-b909-0242ac120002 - - id: flexible-representation-of-quantum-images-frqi - url: v2/ch-applications/image-processing-frqi-neqr - uuid: 14acf6a8-b51a-11ec-b909-0242ac120002 - - id: facial-expression-recognition - url: v2/ch-applications/facial-expression-recognition - uuid: 22cb8bf2-cae9-11ec-9d64-0242ac120002 - title: "\u91CF\u5B50\u30A2\u30D7\u30EA\u30B1\u30FC\u30B7\u30E7\u30F3\u306E\u30A2\ - \u30EB\u30B4\u30EA\u30BA\u30E0" - url: /v2_ch-applications -- sections: - - id: introduction-to-quantum-error-correction-via-the-repetition-code - url: v2/quantum-hardware/error-correction-repetition-code - uuid: 197f7f66-b51a-11ec-b909-0242ac120002 - - id: measurement-error-mitigation - url: v2/quantum-hardware/measurement-error-mitigation - uuid: 1c5bd31a-b51a-11ec-b909-0242ac120002 - - id: randomized-benchmarking - url: v2/quantum-hardware/randomized-benchmarking - uuid: 1fa1d22c-b51a-11ec-b909-0242ac120002 - - id: measuring-quantum-volume - url: v2/quantum-hardware/measuring-quantum-volume - uuid: 22ab0bd2-b51a-11ec-b909-0242ac120002 - - id: density-matrix - url: v2/quantum-hardware/density-matrix - uuid: 498dce44-cae9-11ec-9d64-0242ac120002 - title: "\u91CF\u5B50\u56DE\u8DEF\u306B\u3088\u308B\u91CF\u5B50\u30CF\u30FC\u30C9\ - \u30A6\u30A7\u30A2\u306E\u63A2\u7A76" - url: /v2_quantum-hardware -- sections: - - id: calibrating-qubits-using-qiskit-pulse - url: v2/ch-quantum-hardware/calibrating-qubits-pulse - uuid: 292100ca-b51a-11ec-b909-0242ac120002 - - id: accessing-higher-energy-states-with-qiskit-pulse - url: v2/ch-quantum-hardware/accessing_higher_energy_states - uuid: 2bf0d316-b51a-11ec-b909-0242ac120002 - - id: introduction-to-transmon-physics - url: v2/ch-quantum-hardware/transmon-physics - uuid: 2e944e0e-b51a-11ec-b909-0242ac120002 - - id: circuit-quantum-electrodynamics - url: v2/ch-quantum-hardware/cQED-JC-SW - uuid: 31b2ccdc-b51a-11ec-b909-0242ac120002 - - id: exploring-the-jaynes-cummings-hamiltonian-with-qiskit-pulse - url: v2/ch-quantum-hardware/Jaynes-Cummings-model - uuid: 346d7eea-b51a-11ec-b909-0242ac120002 - title: "\u30DE\u30A4\u30AF\u30ED\u6CE2\u30D1\u30EB\u30B9\u306B\u3088\u308B\u91CF\ - \u5B50\u30CF\u30FC\u30C9\u30A6\u30A7\u30A2\u306E\u63A2\u7A76" - url: /v2_quantum-hardware-pulses -- sections: - - id: lab-1-quantum-circuits - url: v2/ch-labs/Lab01_QuantumCircuits - uuid: 3ff5a7ec-b51a-11ec-b909-0242ac120002 - - id: lab-2-single-qubit-gates - url: v2/ch-labs/Lab02_Single_Qubit_Gates - uuid: 43418a88-b51a-11ec-b909-0242ac120002 - - id: lab-3-quantum-measurements - url: v2/ch-labs/Lab03_QuantumMeasurement - uuid: 45aa5412-b51a-11ec-b909-0242ac120002 - - id: lab-4-bell-ghz-circuit - url: v2/ch-labs/Lab04_Bell_GHZ_Circuit - uuid: 4a04a0f8-b51a-11ec-b909-0242ac120002 - - id: lab-9-quantum-simulation-as-a-search-algorithm - url: v2/ch-labs/Lab09_QuantumSimulationSearchAlgorithm - uuid: 59a076f4-b51a-11ec-b909-0242ac120002 - title: "\u91CF\u5B50\u30B3\u30F3\u30D4\u30E5\u30FC\u30C6\u30A3\u30F3\u30B0\u30FB\ - \u30E9\u30DC" - url: /v2_ch-labs -- sections: - - id: an-introduction-to-linear-algebra-for-quantum-computing - url: v2/ch-appendix/linear_algebra - uuid: 5d2bb2ca-b51a-11ec-b909-0242ac120002 - - id: basic-qiskit-syntax - url: v2/ch-appendix/qiskit - uuid: 5fd6b79a-b51a-11ec-b909-0242ac120002 - title: "Appendix(\u4ED8\u9332)" - url: /v2_ch-appendix -- sections: - - id: bonus-level-sandbox - url: v2/ch-ex/hello-qiskit - uuid: 63a85f0e-b51a-11ec-b909-0242ac120002 - - id: estimating-pi-using-quantum-phase-estimation-algorithm - url: v2/ch-demos/piday-code - uuid: 69b9707c-b51a-11ec-b909-0242ac120002 - - id: local-reality-and-the-chsh-inequality - url: v2/ch-demos/chsh - uuid: 6c507826-b51a-11ec-b909-0242ac120002 - - id: widgets-demonstration - url: v2/ch-demos/widgets-index - uuid: 6f1f26ce-b51a-11ec-b909-0242ac120002 - - id: first-quantum-game - url: v2/ch-demos/first-quantum-game - uuid: 53a49e62-cae9-11ec-9d64-0242ac120002 - title: "\u30B2\u30FC\u30E0\u3068\u30C7\u30E2" - url: /v2_ch-demos -- sections: - - id: annotations - url: v2/examples/annotations - uuid: 745440a2-b51a-11ec-b909-0242ac120002 - - id: blocks - url: v2/examples/blocks - uuid: 771a4f16-b51a-11ec-b909-0242ac120002 - - id: widgets - url: v2/examples/widgets - uuid: 79da872a-b51a-11ec-b909-0242ac120002 - - id: locale - url: v2/examples/locale - uuid: 7cbf7978-b51a-11ec-b909-0242ac120002 - title: "\u4F8B" - type: docs - url: /v2_examples -- sections: - - id: phase-kickback - url: v2/algorithms/phase-kickback - uuid: 976e9da6-6c33-4e2f-b7eb-f9588f700f07 - title: "\u91CF\u5B50\u30A2\u30EB\u30B4\u30EA\u30BA\u30E0" - type: learning-path - url: /v2_algorithms -- sections: - - id: why-quantum-computing - url: v2/intro/why-quantum-computing - uuid: bdb1d662-e0f6-428a-8830-befe6b47f320 - - id: the-atoms-of-computation - url: v2/intro/atoms-of-computation - uuid: 37ef477e-ab8d-11ec-b909-0242ac120002 - - id: what-is-quantum - url: v2/intro/what-is-quantum - uuid: 7c765036-aebc-11ec-b909-0242ac120002 - - id: describing-quantum-computers - url: v2/intro/describing-quantum-computers - uuid: 9260a554-aebc-11ec-b909-0242ac120002 - - id: entangled-states - url: v2/intro/entangled-states - uuid: 98aa9032-aebc-11ec-b909-0242ac120002 - - id: visualizing-entanglement - url: v2/intro/visualizing-entanglement - uuid: 9e8ceb9e-aebc-11ec-b909-0242ac120002 - - id: grovers-search-algorithm - url: v2/intro/grover-intro - uuid: a2e6f7a2-aebc-11ec-b909-0242ac120002 - - id: project - url: v2/intro/project - uuid: e25c3f90-aebd-11ec-b909-0242ac120002 - title: "\u91CF\u5B50\u30B3\u30F3\u30D4\u30E5\u30FC\u30BF\u30FC\u5165\u9580" - type: learning-path - url: /v2_introduction -- sections: - - id: introduction - url: v2/quantum-machine-learning/introduction - uuid: 16e935fc-b51b-11ec-b909-0242ac120002 - - id: parameterized-quantum-circuits - url: v2/quantum-machine-learning/pqc - uuid: 19a9f4de-b51b-11ec-b909-0242ac120002 - - id: data-encoding - url: v2/quantum-machine-learning/encoding - uuid: 1d09af66-b51b-11ec-b909-0242ac120002 - - id: training-quantum-circuits - url: v2/quantum-machine-learning/training - uuid: 1fb38444-b51b-11ec-b909-0242ac120002 - - id: supervised-learning - url: v2/quantum-machine-learning/supervised - uuid: 22cf51bc-b51b-11ec-b909-0242ac120002 - - id: variational-classification - url: v2/quantum-machine-learning/vqc - uuid: 26951034-b51b-11ec-b909-0242ac120002 - - id: quantum-feature-maps-kernels - url: v2/quantum-machine-learning/kernel - uuid: 29b0fda0-b51b-11ec-b909-0242ac120002 - - id: unsupervised-learning - url: v2/quantum-machine-learning/unsupervised - uuid: 2cc6b386-b51b-11ec-b909-0242ac120002 - - id: quantum-generative-adversarial-networks - url: v2/quantum-machine-learning/qgan - uuid: 2ff2a3e4-b51b-11ec-b909-0242ac120002 - - id: project - url: v2/quantum-machine-learning/project - uuid: 345f0c2e-b51b-11ec-b909-0242ac120002 - title: "\u91CF\u5B50\u6A5F\u68B0\u5B66\u7FD2" - type: learning-path - url: /v2_machine-learning - -- title: Variational Algorithm Design - url: /algorithm-design - type: learning-path - sections: - - id: variational - uuid: 4fbef8a1-f8c0-4f08-af4f-5b8d723bd274 - url: /algorithm-design/variational/variational - - id: badge - uuid: c6038861-dcf9-4089-bf6f-03843ed52cb2 - url: /algorithm-design/badge/badge - - -#---- Below was added by machine --- - -- sections: - - id: single-systems - url: v2/basics/single-systems - uuid: dd5680be-7490-401e-9e68-c1ec7d0f5d61 - - id: multiple-systems - url: v2/basics/multiple-systems - uuid: 327b128f-4fec-410a-a3f9-079939002bf2 - - id: quantum-circuits - url: v2/basics/quantum-circuits - uuid: 57d5452e-85cd-40f8-a290-11466213c1a6 - - id: entanglement-in-action - url: v2/basics/entanglement-in-action - uuid: 366f7150-4c04-4763-8269-ae6180812b73 - title: "\u91CF\u5B50\u60C5\u5831\u306E\u57FA\u790E" - url: /v2_basics -- sections: - - id: environment-setup-guide-to-work-with-qiskit-textbook - url: v2/ch-prerequisites/setting-the-environment - uuid: a5a86ddc-b519-11ec-b909-0242ac120002 - - id: introduction-to-python-and-jupyter-notebooks - url: v2/ch-prerequisites/python-and-jupyter-notebooks - uuid: a9f5ea68-b519-11ec-b909-0242ac120002 - title: "\u524D\u63D0\u6761\u4EF6" - url: /v2_ch-prerequisites -- sections: - - id: introduction - url: v2/ch-states/introduction - uuid: afcc559e-b519-11ec-b909-0242ac120002 - - id: the-atoms-of-computation - url: v2/ch-states/atoms-computation - uuid: b31c20ee-b519-11ec-b909-0242ac120002 - - id: representing-qubit-states - url: v2/ch-states/representing-qubit-states - uuid: b81717ca-b519-11ec-b909-0242ac120002 - - id: single-qubit-gates - url: v2/ch-states/single-qubit-gates - uuid: bd4334a4-b519-11ec-b909-0242ac120002 - - id: the-case-for-quantum-computers - url: v2/ch-states/case-for-quantum - uuid: c0bbff62-b519-11ec-b909-0242ac120002 - title: "\u91CF\u5B50\u72B6\u614B\u3068\u91CF\u5B50\u30D3\u30C3\u30C8" - url: /v2_ch-states -- sections: - - id: introduction - url: v2/ch-gates/introduction - uuid: c50f4c90-b519-11ec-b909-0242ac120002 - - id: multiple-qubits-and-entangled-states - url: v2/ch-gates/multiple-qubits-entangled-states - uuid: c7cfe502-b519-11ec-b909-0242ac120002 - - id: phase-kickback - url: v2/algorithms/phase-kickback - uuid: cb7353ec-b519-11ec-b909-0242ac120002 - - id: basic-circuit-identities - url: v2/ch-gates/more-circuit-identities - uuid: ce8ce75a-b519-11ec-b909-0242ac120002 - - id: proving-universality - url: v2/ch-gates/proving-universality - uuid: d15d3548-b519-11ec-b909-0242ac120002 - - id: classical-computation-on-a-quantum-computer - url: v2/ch-gates/oracles - uuid: d4f6e424-b519-11ec-b909-0242ac120002 - title: "\u8907\u6570\u91CF\u5B50\u30D3\u30C3\u30C8\u3068\u3082\u3064\u308C\u72B6\ - \u614B" - url: /v2_ch-gates -- sections: - - id: quantum-circuits - url: v2/ch-algorithms/defining-quantum-circuits - uuid: d90cbfb6-b519-11ec-b909-0242ac120002 - - id: deutsch-jozsa-algorithm - url: v2/ch-algorithms/deutsch-jozsa - uuid: dc9d3aa2-b519-11ec-b909-0242ac120002 - - id: bernstein-vazirani-algorithm - url: v2/ch-algorithms/bernstein-vazirani - uuid: df6e5a40-b519-11ec-b909-0242ac120002 - - id: simons-algorithm - url: v2/ch-algorithms/simon - uuid: e2714126-b519-11ec-b909-0242ac120002 - - id: quantum-fourier-transform - url: v2/ch-algorithms/quantum-fourier-transform - uuid: e59ba472-b519-11ec-b909-0242ac120002 - - id: quantum-phase-estimation - url: v2/ch-algorithms/quantum-phase-estimation - uuid: e8ac9ec8-b519-11ec-b909-0242ac120002 - - id: shors-algorithm - url: v2/ch-algorithms/shor - uuid: ec157cd8-b519-11ec-b909-0242ac120002 - - id: grovers-algorithm - url: v2/ch-algorithms/grover - uuid: eebb7488-b519-11ec-b909-0242ac120002 - - id: quantum-counting - url: v2/ch-algorithms/quantum-counting - uuid: f1a9942c-b519-11ec-b909-0242ac120002 - - id: quantum-teleportation - url: v2/ch-algorithms/teleportation - uuid: f4f4a090-b519-11ec-b909-0242ac120002 - id: superdense-coding url: v2/ch-algorithms/superdense-coding uuid: f87cbd42-b519-11ec-b909-0242ac120002 - - id: quantum-key-distribution - url: v2/ch-algorithms/quantum-key-distribution - uuid: fbafa8c6-b519-11ec-b909-0242ac120002 + - id: quantum-teleportation + url: v2/ch-algorithms/teleportation + uuid: f4f4a090-b519-11ec-b909-0242ac120002 title: "\u91CF\u5B50\u30D7\u30ED\u30C8\u30B3\u30EB\u3068\u91CF\u5B50\u30A2\u30EB\ \u30B4\u30EA\u30BA\u30E0" url: /v2_ch-algorithms @@ -796,16 +486,16 @@ \u30E9\u30DC" url: /v2_ch-labs - sections: - - id: an-introduction-to-linear-algebra-for-quantum-computing + - id: linear_algebra url: v2/ch-appendix/linear_algebra uuid: 5d2bb2ca-b51a-11ec-b909-0242ac120002 - - id: basic-qiskit-syntax + - id: qiskit url: v2/ch-appendix/qiskit uuid: 5fd6b79a-b51a-11ec-b909-0242ac120002 title: "Appendix(\u4ED8\u9332)" url: /v2_ch-appendix - sections: - - id: bonus-level-sandbox + - id: hello-qiskit url: v2/ch-ex/hello-qiskit uuid: 63a85f0e-b51a-11ec-b909-0242ac120002 - id: estimating-pi-using-quantum-phase-estimation-algorithm diff --git a/translations/ja/v1/ch-algorithms/quantum-walk-search-algorithm.ipynb b/translations/ja/v1/ch-algorithms/quantum-walk-search-algorithm.ipynb index 41f3e802e..c7a437c26 100644 --- a/translations/ja/v1/ch-algorithms/quantum-walk-search-algorithm.ipynb +++ b/translations/ja/v1/ch-algorithms/quantum-walk-search-algorithm.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "ba9d6e23", + "id": "a97639dd", "metadata": { "tags": [ "remove_cell" @@ -14,153 +14,142 @@ }, { "cell_type": "markdown", - "id": "fb9cec4d", + "id": "17f20a60", "metadata": {}, "source": [ "้‡ๅญใ‚ฆใ‚ฉใƒผใ‚ฏใฏๅคๅ…ธใฎใƒžใƒซใ‚ณใƒ•้€ฃ้Ž–ใฎ้‡ๅญ็‰ˆใงใ‚ใ‚Šใ€ๅคšใใฎ้‡ๅญใ‚ขใƒซใ‚ดใƒชใ‚บใƒ ใซใจใฃใฆ้‡่ฆใชใ‚‚ใฎใงใ™ใ€‚ใ“ใฎ็ซ ใงใฏใ‚ฐใƒฉใƒ•ไธŠใซใƒžใƒผใ‚ฏใ—ใŸ่ฆ็ด ใ‚’่ฆ‹ใคใ‘ใ‚‹้‡ๅญใ‚ฆใ‚ฉใƒผใ‚ฏใซใ‚ˆใ‚‹ๆŽข็ดขใ‚ขใƒซใ‚ดใƒชใ‚บใƒ ใ‚’ๅฎŸ่ฃ…ใ—ใพใ™ใ€‚ใ“ใฎใ‚ขใƒซใ‚ดใƒชใ‚บใƒ ใฏๅคๅ…ธใซๆฏ”ในใฆไบŒๆฌกๅŠ ้€Ÿใ‚’ๆŒใกใพใ™ใ€‚\n", - "## ็›ฎๆฌก\n", - "1. [ๅคๅ…ธใƒžใƒซใ‚ณใƒ•้€ฃ้Ž–](#markov)\n", - "2. [้‡ๅญใ‚ฆใ‚ฉใƒผใ‚ฏ](#qwalks)\n", - " 1. [ใ‚ณใ‚คใƒณ้‡ๅญใ‚ฆใ‚ฉใƒผใ‚ฏ](#coined)\n", - " 2. [ใ‚ปใ‚ฒใƒ‡ใ‚ฃ้‡ๅญใ‚ฆใ‚ฉใƒผใ‚ฏ](#szegedy)\n", - " 3. [ใ‚ณใ‚คใƒณใจใ‚ปใ‚ฒใƒ‡ใ‚ฃ้‡ๅญใ‚ฆใ‚ฉใƒผใ‚ฏใฎ็ญ‰ไพกๆ€ง](#equivalence)\n", - "3. [ไพ‹: ่ถ…็ซ‹ๆ–นไฝ“ไธŠใฎ้‡ๅญใ‚ฆใ‚ฉใƒผใ‚ฏ](#example1)\n", - "4. [้‡ๅญใ‚ฆใ‚ฉใƒผใ‚ฏใซใ‚ˆใ‚‹ๆŽข็ดขใ‚ขใƒซใ‚ดใƒชใ‚บใƒ ](#qwalkalgo)\n", - "5. [ไพ‹: 4ๆฌกๅ…ƒ่ถ…็ซ‹ๆ–นไฝ“ไธŠใฎ้‡ๅญใ‚ฆใ‚ฉใƒผใ‚ฏใซใ‚ˆใ‚‹ๆŽข็ดข](#qiskiti)\n", - "6. [ใƒชใƒ•ใ‚กใƒฌใƒณใ‚น](#references)\n", + "\n", "\n", "## 1. ๅคๅ…ธใƒžใƒซใ‚ณใƒ•้€ฃ้Ž– \n", "ใƒžใƒซใ‚ณใƒ•้€ฃ้Ž–ใฏ็พๅฎŸใฎใƒ—ใƒญใ‚ปใ‚นใ‚’ใƒขใƒ‡ใƒซๅŒ–ใ™ใ‚‹ใŸใ‚ใซใ‚ˆใไฝฟใ‚ใ‚Œใ‚‹็ขบ็Ž‡้Ž็จ‹ใงใ™ใ€‚็Šถๆ…‹ใจ้ท็งป็ขบ็Ž‡ใ‹ใ‚‰ใชใ‚Šใ€ๅ„ๆ™‚้–“ใ‚นใƒ†ใƒƒใƒ—ใงใฎ็Šถๆ…‹้–“ใฎ็ขบ็Ž‡ใฎ็งปๅ‹•ใ‚’่จ˜่ฟฐใ—ใพใ™ใ€‚ใ“ใ“ใง็ดนไป‹ใ™ใ‚‹้›ขๆ•ฃๆ™‚้–“ใƒžใƒซใ‚ณใƒ•้€ฃ้Ž–ใงใฏใ€ๆ™‚้–“ใ‚นใƒ†ใƒƒใƒ—ใฏ้›ขๆ•ฃ็š„ใงใ™ใ€‚ใƒžใƒซใ‚ณใƒ•้€ฃ้Ž–ใฏใƒžใƒซใ‚ณใƒ•ๆ€งใ‚’ๆบ€ใŸใ—ใพใ™ใ€ใคใพใ‚Šๆฌกใฎใ‚นใƒ†ใƒƒใƒ—ใงใฎ็ขบ็Ž‡้Ž็จ‹ใฏ็พๅœจใฎใ‚นใƒ†ใƒƒใƒ—ใฎใฟใซไพๅญ˜ใ—ใฆใ€ใใ‚Œไปฅๅ‰ใซใฏไพๅญ˜ใ—ใพใ›ใ‚“ใ€‚ใƒžใƒซใ‚ณใƒ•้€ฃ้Ž–ใฏ็Šถๆ…‹้–“ใฎ็ขบ็Ž‡ใฎ็งปๅ‹•ใ‚’่กจ็พใ™ใ‚‹้ท็งป่กŒๅˆ— P ใ‚’ๆŒใกใพใ™ใ€‚ใ“ใ“ใงใ€ใƒžใƒซใ‚ณใƒ•้€ฃ้Ž–ใฎไพ‹ใจใ€ใใฎ้ท็งป่กŒๅˆ— $P$ ใ‚’็คบใ—ใพใ™ใ€‚\n", - "\\begin{equation}\n", - "P=\n", - "\\begin{pmatrix}\n", - "0.1 & 0.3 & 0.3\\\\\n", - "0.1 & 0.1 & 0.2 \\\\\n", - "0.8 & 0.6 & 0.5\n", - "\\end{pmatrix}\n", - "\\label{eq:matrix_example}\n", - "\\end{equation}\n", + "\n", + "\n", + " $$\n", + " P\n", + " = \\begin{pmatrix}\n", + " 0.1 & 0.3 & 0.3\\\\\n", + " 0.1 & 0.1 & 0.2 \\\\\n", + " 0.8 & 0.6 & 0.5\n", + " \\end{pmatrix}.\n", + " $$\n", + " \n", "\n", "\n", - "้ท็งป่กŒๅˆ— $P$ ใŒไธŽใˆใ‚‰ใ‚Œใ‚‹ใจใ€$t$ ๆ™‚้–“ใ‚นใƒ†ใƒƒใƒ—ๅพŒใฎ็ขบ็Ž‡ๅˆ†ๅธƒใ‚’ $P^t$ ใซใ‚ˆใ‚Š่จˆ็ฎ—ใงใใพใ™ใ€‚\n", + "้ท็งป่กŒๅˆ— $P$ ใŒไธŽใˆใ‚‰ใ‚Œใ‚‹ใจใ€ $t$ ๆ™‚้–“ใ‚นใƒ†ใƒƒใƒ—ๅพŒใฎ็ขบ็Ž‡ๅˆ†ๅธƒใ‚’ $P^t$ ใซใ‚ˆใ‚Š่จˆ็ฎ—ใงใใพใ™ใ€‚\n", "\n", "## 2. ้‡ๅญใ‚ฆใ‚ฉใƒผใ‚ฏ \n", "้‡ๅญใ‚ฆใ‚ฉใƒผใ‚ฏใฏๅคๅ…ธใฎใƒžใƒซใ‚ณใƒ•้€ฃ้Ž–ใฎ้‡ๅญ็‰ˆใงใ™ใ€‚ๆธฌๅฎšใ™ใ‚‹ใพใงใฏใ€้‡ๅญใ‚ฆใ‚ฉใƒผใ‚ฏใฏๅ…จใฆใฎๅฏ่ƒฝใช็ตŒ่ทฏใฎ้‡ใญๅˆใ‚ใ›ใ‚’ๅ–ใ‚Šใพใ™ใ€‚ใพใŸใ€้‡ๅญๅนฒๆธ‰ใซใ‚ˆใ‚Šใ‚ใ‚‹็Šถๆ…‹ใฏๆ‰“ใกๆถˆใ—ใ‚ใ„ใพใ™ใ€‚ใ“ใฎ็พ่ฑกใ‚’ใ€้–“้•ใˆใŸ็ญ”ใˆใ‚’ๆถˆๅŽปใ™ใ‚‹ใ‚ˆใ†ใช่จญ่จˆใซๅˆฉ็”จใ™ใ‚‹ใ“ใจใงใ€้‡ๅญใ‚ฆใ‚ฉใƒผใ‚ฏใ‚ขใƒซใ‚ดใƒชใ‚บใƒ ใ‚’ใƒฉใƒณใƒ€ใƒ ใ‚ฆใ‚ฉใƒผใ‚ฏใ‚ˆใ‚Šใ‚‚้€Ÿใใ—ใพใ™ใ€‚ใ‚ณใ‚คใƒณ้‡ๅญใ‚ฆใ‚ฉใƒผใ‚ฏใจใ‚ปใ‚ฒใƒ‡ใ‚ฃ้‡ๅญใ‚ฆใ‚ฉใƒผใ‚ฏใŒใ‚ˆใ็”จใ„ใ‚‰ใ‚Œใ€ใ“ใ‚Œใ‚‰ใฏใ‚ใ‚‹ๆกไปถไธ‹ใงใฏ็ญ‰ไพกใซใชใ‚Šใพใ™ใ€‚ใ‚ณใ‚คใƒณ้‡ๅญใ‚ฆใ‚ฉใƒผใ‚ฏใฏใ‚ฐใƒฉใƒ•ไธŠใฎ้ ‚็‚นใ‚’ใ€ใ‚ปใ‚ฒใƒ‡ใ‚ฃ้‡ๅญใ‚ฆใ‚ฉใƒผใ‚ฏใฏ่พบใ‚’ๅ‹•ใใพใ™ใ€‚้‡ๅญใ‚ฆใ‚ฉใƒผใ‚ฏใฎๅฎŸ่ฃ…ใฎๅ‰ใซใ“ใฎไบŒใคใฎใƒขใƒ‡ใƒซใ‚’็ดนไป‹ใ—ใพใ™ใ€‚\n", "\n", " $\\newcommand{\\ket}[1]{\\left|{#1}\\right\\rangle}$\n", " $\\newcommand{\\bra}[1]{\\left\\langle{#1}\\right|}$\n", - "### 2.1 ใ‚ณใ‚คใƒณ้‡ๅญใ‚ฆใ‚ฉใƒผใ‚ฏ \n", + "### 2.A ใ‚ณใ‚คใƒณ้‡ๅญใ‚ฆใ‚ฉใƒผใ‚ฏ \n", "ใ€€ใ‚ณใ‚คใƒณ้‡ๅญใ‚ฆใ‚ฉใƒผใ‚ฏใฎ็ฐกๅ˜ใชไพ‹ใฏใ€็„ก้™้•ทใฎๆ•ดๆ•ฐไธŠใฎ้‹ๅ‹•ใงใ™ใ€‚ใ“ใฎๅ ดๅˆใ€ๆ•ดๆ•ฐ $\\mathbb{Z}$ ไธŠใงใฎไฝ็ฝฎใ‚’ $\\{\\ket{j} : j \\in \\mathbb{Z} \\}$ ใจใ—ใพใ™ใ€‚ใใ—ใฆใ€ใ‚ณใ‚คใƒณใฎ่จˆ็ฎ—ๅŸบๅบ•ใฏ $\\{\\ket{0}, \\ket{1}\\}$ ใจใ—ใ€ใ‚ณใ‚คใƒณใŒ $\\ket{0}$ ใฎๅ ดๅˆใฏใ‚ใ‚‹ๆ–นๅ‘ใซๅ‹•ใใ€ใ‚ณใ‚คใƒณใŒ $\\ket{1}$ ใฎๅ ดๅˆใฏใ‚‚ใ†ไธ€ๆ–นใซๅ‹•ใใพใ™ใ€‚\n", "\n", "ใ‚ณใ‚คใƒณ้‡ๅญใ‚ฆใ‚ฉใƒผใ‚ฏใฏใ‚ฐใƒฉใƒ•ใฎ้ ‚็‚นไธŠใ‚’ๅ‹•ใใฎใงใ€้ ‚็‚นใ‚’็Šถๆ…‹ใจใ—ใพใ™ใ€‚่พบใง็น‹ใŒใฃใฆใ„ใ‚‹็Šถๆ…‹้–“ใฎใฟๅ‹•ใใ“ใจใŒใงใใพใ™ใ€‚ใ‚ณใ‚คใƒณใƒขใƒ‡ใƒซใงใฏใ€ไบŒใคใฎ้‡ๅญ็Šถๆ…‹็ฉบ้–“ใจไบŒใคใฎๆผ”็ฎ—ๅญใ‚’ไฝฟใ„ใพใ™ใ€‚ไธ€ใค็›ฎใฎ็Šถๆ…‹็ฉบ้–“ใฏไฝ็ฝฎใ‚’่กจใ™ไฝ็ฝฎ็Šถๆ…‹ใงใ™ใ€‚ไธŠ่จ˜ใฎ้‹ๅ‹•ใงใฏใ€ๆ•ดๆ•ฐไธŠใฎใฉใ“ใงใ‚‚็งปๅ‹•ใงใใ‚‹ใฎใงใ€ๆ•ดๆ•ฐใจใชใ‚Šใพใ™ใ€‚ใ‚‚ใ†ไธ€ๆ–นใฏใ€ใ‚ณใ‚คใƒณ็Šถๆ…‹ใงใ™ใ€‚ใ‚ณใ‚คใƒณ็Šถๆ…‹ใฏๆฌกใฎใ‚นใƒ†ใƒƒใƒ—ใงใฉใฎใ‚ˆใ†ใซๅ‹•ใใ‹ใ‚’ๆฑบๅฎšใ—ใพใ™ใ€‚ใ“ใฎใ‚ณใ‚คใƒณ็Šถๆ…‹ใจไฝ็ฝฎ็Šถๆ…‹ใจใ‚’ๅˆใ‚ใ›ใฆใ€ใƒ’ใƒซใƒ™ใƒซใƒˆ็ฉบ้–“ไธŠใฎใƒ™ใ‚ฏใƒˆใƒซใจใ—ใฆ่กจ็พใงใใพใ™ใ€‚ใ‚ณใ‚คใƒณ็Šถๆ…‹ใ‚’ $\\mathcal{H}_C$ ใฎใƒ™ใ‚ฏใƒˆใƒซใจใ—ใฆ่กจใ—ใ€ไฝ็ฝฎ็Šถๆ…‹ใ‚’ $\\mathcal{H}_P$ ใฎใƒ™ใ‚ฏใƒˆใƒซใจใ—ใฆ่กจใ™ใจใ€้‹ๅ‹•ใฎใ™ในใฆใฎ้‡ๅญ็Šถๆ…‹็ฉบ้–“ใฏ $\\mathcal{H} = \\mathcal{H}_C \\otimes \\mathcal{H}_P$ ใจใชใ‚Šใพใ™ใ€‚\n", "\n", "ใ™ใงใซ่ฟฐในใŸใ‚ˆใ†ใซใ€ใƒขใƒ‡ใƒซใซใฏไบŒใคใฎๆผ”็ฎ—ๅญใŒใ‚ใ‚Šใ‚ณใ‚คใƒณๆผ”็ฎ—ๅญ $C$ ใจใ‚ทใƒ•ใƒˆๆผ”็ฎ—ๅญ $S$ ใงใ™ใ€‚ใ‚ณใ‚คใƒณๆผ”็ฎ—ๅญใฏๆ™‚้–“ใ‚นใƒ†ใƒƒใƒ—ๆฏŽใซ $\\mathcal{H}_C$ ใซไฝœ็”จใ—ใฆ้‡ใญๅˆใ‚ใ›็Šถๆ…‹ใ‚’ไฝœใ‚‹ใŸใ‚ใ€ๅ…จใฆใฎๅฏ่ƒฝใช็ตŒ่ทฏใ‚’ๅŒๆ™‚ใซๅ‹•ใใพใ™ใ€‚ๆ•ดๆ•ฐไธŠใฎ้‹ๅ‹•ใงใฏใ€ๆ™‚้–“ใ‚นใƒ†ใƒƒใƒ—ๆฏŽใซๅทฆใจๅณใฎไธกๆ–นใซๅ‹•ใใ“ใจใซใชใ‚Šใพใ™ใ€‚ใ„ใ‚ใ„ใ‚ใชใ‚ณใ‚คใƒณๆผ”็ฎ—ๅญใŒใ‚ใ‚Šใพใ™ใŒใ€ใ‚ˆใ็”จใ„ใ‚‰ใ‚Œใ‚‹ใฎใฏใ‚ขใƒ€ใƒžใƒผใƒซใ‚ณใ‚คใƒณใจใ‚ฐใƒญใƒผใƒใƒผใ‚ณใ‚คใƒณใงใ™ใ€‚ใ‚ขใƒ€ใƒžใƒผใƒซใ‚ณใ‚คใƒณใฏใ‚ขใƒ€ใƒžใƒผใƒซใ‚ฒใƒผใƒˆใซใ‚ˆใ‚Š็ญ‰็ขบ็Ž‡ใงใฎ้‡ใญๅˆใ‚ใ›็Šถๆ…‹ใ‚’ไฝœใ‚Šใพใ™: \n", "\n", - "\\begin{equation}\n", - " H = \\frac{1}{\\sqrt{2}}\n", - "\\begin{bmatrix}\n", - "1 & 1 \\\\\n", - "1 & -1 \n", - "\\end{bmatrix}\n", - "\\end{equation}\n", + " $$\n", + " H\n", + " = \\frac{1}{\\sqrt{2}}\n", + " \\begin{bmatrix}\n", + " 1 & 1 \\\\\n", + " 1 & -1 \n", + " \\end{bmatrix}.\n", + " $$\n", "\n", "ใ‚ฐใƒญใƒผใƒใƒผใ‚ณใ‚คใƒณใฏใ‚ฐใƒญใƒผใƒใƒผใฎใ‚ขใƒซใ‚ดใƒชใ‚บใƒ ใซใ‚ใ‚‹ใ‚ฐใƒญใƒผใƒใƒผใฎๆ‹กๆ•ฃๆผ”็ฎ—ๅญใ‚’็”จใ„ใ€ไปฅไธ‹ใฎใ‚ˆใ†ใซๅฎš็พฉใ—ใพใ™\n", "\n", - "\\begin{equation}\n", - " G = \n", - " \\begin{bmatrix}\n", - "\\frac{2}{n} -1 & \\frac{2}{n} & \\ldots & \\frac{2}{n}\\\\\n", - "\\frac{2}{n} & \\frac{2}{n} - 1 & \\ldots & \\frac{2}{n} \\\\\n", - "\\vdots & \\vdots & \\ddots & \\vdots \\\\\n", - "\\frac{2}{n} & \\frac{2}{n} & \\ldots & \\frac{2}{n} -1\n", - "\\end{bmatrix}\n", - "\\end{equation}\n", + " $$\n", + " G\n", + " = \\begin{bmatrix}\n", + " \\frac{2}{n} -1 & \\frac{2}{n} & \\ldots & \\frac{2}{n}\\\\\n", + " \\frac{2}{n} & \\frac{2}{n} - 1 & \\ldots & \\frac{2}{n} \\\\\n", + " \\vdots & \\vdots & \\ddots & \\vdots \\\\\n", + " \\frac{2}{n} & \\frac{2}{n} & \\ldots & \\frac{2}{n} -1\n", + " \\end{bmatrix}.\n", + " $$\n", "\n", - "ใ‚ขใƒ€ใƒžใƒผใƒซใ‚ณใ‚คใƒณใฎใ‚ˆใ†ใซใ‚ฐใƒญใƒผใƒใƒผใ‚ณใ‚คใƒณใ‚‚้‡ใญๅˆใ‚ใ›็Šถๆ…‹ใ‚’ไฝœใ‚Šใพใ™ใ€‚ใ—ใ‹ใ—ใ€ๆŒฏใ‚‹่ˆžใ„ใฏๅฐ‘ใ—็•ฐใชใ‚Šใพใ™ใ€‚ไฝ็ฝฎ $\\ket{000}$ ใซใ‚ฐใƒญใƒผใƒใƒผใ‚ณใ‚คใƒณใ‚’ไฝœ็”จใ•ใ›ใ‚‹ใจใ€ไธ‹ๅ›ณใฎใ‚ˆใ†ใช็Šถๆ…‹ใƒ™ใ‚ฏใƒˆใƒซใฎ็ขบ็Ž‡ๅˆ†ๅธƒใ‚’ๅพ—ใพใ™ใ€‚ใ“ใฎใ‚ˆใ†ใซใ€ใ‚ขใƒ€ใƒžใƒผใƒซใ‚ณใ‚คใƒณใฎใ‚ˆใ†ใช็ญ‰็ขบ็Ž‡ใฎ้‡ใญๅˆใ‚ใ›็Šถๆ…‹ใ‚’ไฝœใ‚Šใพใ›ใ‚“ใ€‚ไป–ใฎ็Šถๆ…‹ใซๆฏ”ในใฆใ€$\\ket{000}$ ใซใ‚ˆใ‚Šๅคงใใช็ขบ็Ž‡ใ‚’ๆŒใกใพใ™ใ€‚\n", + "ใ‚ขใƒ€ใƒžใƒผใƒซใ‚ณใ‚คใƒณใฎใ‚ˆใ†ใซใ‚ฐใƒญใƒผใƒใƒผใ‚ณใ‚คใƒณใ‚‚้‡ใญๅˆใ‚ใ›็Šถๆ…‹ใ‚’ไฝœใ‚Šใพใ™ใ€‚ใ—ใ‹ใ—ใ€ๆŒฏใ‚‹่ˆžใ„ใฏๅฐ‘ใ—็•ฐใชใ‚Šใพใ™ใ€‚ไฝ็ฝฎ $\\ket{000}$ ใซใ‚ฐใƒญใƒผใƒใƒผใ‚ณใ‚คใƒณใ‚’ไฝœ็”จใ•ใ›ใ‚‹ใจใ€ไธ‹ๅ›ณใฎใ‚ˆใ†ใช็Šถๆ…‹ใƒ™ใ‚ฏใƒˆใƒซใฎ็ขบ็Ž‡ๅˆ†ๅธƒใ‚’ๅพ—ใพใ™ใ€‚ใ“ใฎใ‚ˆใ†ใซใ€ใ‚ขใƒ€ใƒžใƒผใƒซใ‚ณใ‚คใƒณใฎใ‚ˆใ†ใช็ญ‰็ขบ็Ž‡ใฎ้‡ใญๅˆใ‚ใ›็Šถๆ…‹ใ‚’ไฝœใ‚Šใพใ›ใ‚“ใ€‚ไป–ใฎ็Šถๆ…‹ใซๆฏ”ในใฆใ€ $\\ket{000}$ ใซใ‚ˆใ‚Šๅคงใใช็ขบ็Ž‡ใ‚’ๆŒใกใพใ™ใ€‚\n", "\n", "\n", "\n", "ใƒขใƒ‡ใƒซใฎใ‚‚ใ†ไธ€ใคใฎๆผ”็ฎ—ๅญใฎใ‚ทใƒ•ใƒˆๆผ”็ฎ—ๅญใฏ $\\mathcal{H}_P$ ใซไฝœ็”จใ—ใฆใ€ๆฌกใฎไฝ็ฝฎใซ็งปๅ‹•ใ•ใ›ใพใ™ใ€‚ๆ•ดๆ•ฐไธŠใฎ้‹ๅ‹•ใงใฏใ€ใ‚ทใƒ•ใƒˆๆผ”็ฎ—ๅญใซใ‚ˆใ‚Šใ€ใ‚ณใ‚คใƒณใŒ $\\ket{0}$ ใฎๆ™‚ใฏๅทฆใซๅ‹•ใใ€ใ‚ณใ‚คใƒณใŒ $\\ket{1}$ ใฎๆ™‚ใฏๅณใซๅ‹•ใใพใ™: \n", "\n", - "\\begin{equation}\n", - " S \\ket{0}\\ket{j} = \\ket{0}\\ket{j+1}\n", - "\\end{equation}\n", - "\n", - "\\begin{equation}\n", - " S \\ket{1}\\ket{j} = \\ket{1}\\ket{j-1}\n", - "\\end{equation}\n", - "\n", + "$$\n", + "\\begin{aligned}\n", + " S \\vert 0 \\rangle \\vert j \\rangle & = \\vert 0 \\rangle \\vert j+1 \\rangle \\\\[1mm]\n", + " S \\vert 1 \\rangle \\vert j \\rangle & = \\vert 1 \\rangle \\vert j-1 \\rangle\n", + "\\end{aligned}\n", + "$$\n", "\n", "ไธŠ่จ˜ใงๅฎš็พฉใ•ใ‚ŒใŸใ‚ทใƒ•ใƒˆๆผ”็ฎ—ๅญใงใ€ไธ€ใ‚นใƒ†ใƒƒใƒ—ๅˆ†ใฎใ‚ณใ‚คใƒณ้‡ๅญใ‚ฆใ‚ฉใƒผใ‚ฏใ‚’ไปฅไธ‹ใฎใƒฆใƒ‹ใ‚ฟใƒชๆผ”็ฎ—ๅญใจใ—ใฆ่กจ็พใงใใพใ™\n", - "\\begin{equation}\n", + "$$\n", " U = SC,\n", - "\\end{equation}\n", + "$$\n", "\n", "ใ“ใ“ใง C ใฏใ‚ณใ‚คใƒณๆผ”็ฎ—ๅญใงใ™ใ€‚ๆ•ดๆ•ฐไธŠใฎ้‡ๅญใ‚ฆใ‚ฉใƒผใ‚ฏใงใ‚ขใƒ€ใƒžใƒผใƒซใ‚ณใ‚คใƒณใ‚’็”จใ„ใพใ—ใŸใŒใ€C ใฏใ‚ขใƒ€ใƒžใƒผใƒซใ‚ณใ‚คใƒณใงใ‚‚ใ€ใ‚ฐใƒญใƒผใƒใƒผใ‚ณใ‚คใƒณใงใ‚‚ใ€ใใฎไป–ใฎใ‚ณใ‚คใƒณๆผ”็ฎ—ๅญใงใ‚‚็”จใ„ใ‚‹ใ“ใจใŒใงใใพใ™ใ€‚\n", "\n", "\n", "ๅ…ˆใซ้€ฒใฟใพใ—ใ‚‡ใ†ใ€‚$t$ ๆ™‚้–“ใ‚นใƒ†ใƒƒใƒ—ๅพŒใฎ้‡ๅญ็Šถๆ…‹ $\\ket{\\psi}$ ใฏไปฅไธ‹ใง่กจใ™ใ“ใจใŒใงใใพใ™\n", - "\\begin{equation}\n", + "$$\n", " \\ket{\\psi (t)} = U^t \\ket{\\psi(0)},\n", - "\\end{equation}\n", - "ใ“ใ“ใงใ€$\\ket{\\psi(0)}$ ใฏๅˆๆœŸ็Šถๆ…‹ใงใ€U ใฏไธ€ใ‚นใƒ†ใƒƒใƒ—ๅˆ†ใฎๆผ”็ฎ—ๅญใงใ™[1]ใ€‚\n", + "$$\n", + "ใ“ใ“ใงใ€ $\\ket{\\psi(0)}$ ใฏๅˆๆœŸ็Šถๆ…‹ใงใ€U ใฏไธ€ใ‚นใƒ†ใƒƒใƒ—ๅˆ†ใฎๆผ”็ฎ—ๅญใงใ™[1]ใ€‚\n", "\n", "ใ‚ณใ‚คใƒณ้‡ๅญใ‚ฆใ‚ฉใƒผใ‚ฏใฏๅคšใใฎๆญฃๅ‰‡ใ‚ฐใƒฉใƒ•(ๅ…จใฆใฎ้ ‚็‚นใง้šฃๆŽฅใ™ใ‚‹้ ‚็‚นใฎๆ•ฐใŒๅŒใ˜ใ‚ฐใƒฉใƒ•)ใงๅฎ‰ๅฎšใ—ใฆใ„ใพใ™[2]ใ€‚ ใ‚‚ใ†ไธ€ใคใฎใƒขใƒ‡ใƒซใงใ‚ใ‚‹ใ‚ปใ‚ฒใƒ‡ใ‚ฃ้‡ๅญใ‚ฆใ‚ฉใƒผใ‚ฏใฏ้žๆญฃๅ‰‡ใ‚ฐใƒฉใƒ•ใซ้ฉใ—ใฆใŠใ‚Šใ€ๆฌกใฎ็ซ ใง่งฃ่ชฌใ—ใพใ™ใ€‚\n", "\n", - "### 2.2 ใ‚ปใ‚ฒใƒ‡ใ‚ฃ้‡ๅญใ‚ฆใ‚ฉใƒผใ‚ฏ \n", - "ใ‚ณใ‚คใƒณ้‡ๅญใ‚ฆใ‚ฉใƒผใ‚ฏใฏใ‚ฐใƒฉใƒ•ใฎ้ ‚็‚นใ‚’ๅ‹•ใใพใ—ใŸใŒใ€ใ‚ปใ‚ฒใƒ‡ใ‚ฃ้‡ๅญใ‚ฆใ‚ฉใƒผใ‚ฏใฏๅ…ƒใฎใ‚ฐใƒฉใƒ•ใฎไบŒ้ƒจไบŒ้‡่ขซ่ฆ†ใ‚ฐใƒฉใƒ•ไธŠใฎ่พบใ‚’ๅ‹•ใใพใ™ใ€‚ไบŒ้‡่ขซ่ฆ†ใ‚ฐใƒฉใƒ•ใจใฏๅ…ƒใฎใ‚ฐใƒฉใƒ•ใฎไบŒๅ€ใฎ้ ‚็‚นใ‚’ๆŒใคใ‚ฐใƒฉใƒ•ใงใ™ใ€‚ไบŒ้ƒจไบŒ้‡่ขซ่ฆ†ใ‚ฐใƒฉใƒ•ใฎไบŒใคใฎ้ ‚็‚นใฏใ€ๅ…ƒใฎใ‚ฐใƒฉใƒ•ใงใใฎ้ ‚็‚นใŒ็น‹ใŒใฃใฆใ„ใ‚‹ๅ ดๅˆใซใฎใฟใ€่พบใง็น‹ใŒใ‚Šใพใ™ใ€‚ใ“ใฎใƒขใƒ‡ใƒซใ‚’ไฝœใ‚‹ใซใฏใ€ๅคๅ…ธใฎใƒฉใƒณใƒ€ใƒ ใ‚ฆใ‚ฉใƒผใ‚ฏใฎ้ท็งป็ขบ็Ž‡่กŒๅˆ— P ใ‹ใ‚‰ๅง‹ใ‚ใพใ™ใ€‚1 ็ซ ใง็คบใ—ใŸใ‚ˆใ†ใซใ€ๅคๅ…ธใฎ้›ขๆ•ฃๆ™‚้–“ใƒฉใƒณใƒ€ใƒ ใ‚ฆใ‚ฉใƒผใ‚ฏใฏ้ท็งป่กŒๅˆ— P ใง่จ˜่ฟฐใ•ใ‚Œใพใ™ใ€‚ไปปๆ„ใฎ $N \\times N$ ใฎ้ท็งป่กŒๅˆ— $P$ ใ‚’ๆŒใค $N$-้ ‚็‚นใ‚ฐใƒฉใƒ•ใซๅฏพใ—ใฆใ€้›ขๆ•ฃๆ™‚้–“้‡ๅญใ‚ฆใ‚ฉใƒผใ‚ฏใ‚’ใƒ’ใƒซใƒ™ใƒซใƒˆ็ฉบ้–“ $\\mathcal{H}^N \\otimes \\mathcal{H}^N$ ไธŠใฎใƒฆใƒ‹ใ‚ฟใƒชๆผ”็ฎ—ๅญใจใ—ใฆๅฎš็พฉใงใใพใ™ใ€‚$P_{jk}$ ใ‚’ $j$ ใ‹ใ‚‰ $k$ ใธ้ท็งปใ™ใ‚‹็ขบ็Ž‡ใจๅฎš็พฉใ—ใพใ—ใ‚‡ใ†ใ€‚้‹ๅ‹•ใ‚’ๅฎš็พฉใ™ใ‚‹ๅ‰ใซใ€ๆญฃ่ฆๅŒ–ใ•ใ‚ŒใŸ็Šถๆ…‹ใ‚’ๅฎš็พฉใ—ใพใ™\n", + "### 2.B ใ‚ปใ‚ฒใƒ‡ใ‚ฃ้‡ๅญใ‚ฆใ‚ฉใƒผใ‚ฏ \n", + "ใ‚ณใ‚คใƒณ้‡ๅญใ‚ฆใ‚ฉใƒผใ‚ฏใฏใ‚ฐใƒฉใƒ•ใฎ้ ‚็‚นใ‚’ๅ‹•ใใพใ—ใŸใŒใ€ใ‚ปใ‚ฒใƒ‡ใ‚ฃ้‡ๅญใ‚ฆใ‚ฉใƒผใ‚ฏใฏๅ…ƒใฎใ‚ฐใƒฉใƒ•ใฎไบŒ้ƒจไบŒ้‡่ขซ่ฆ†ใ‚ฐใƒฉใƒ•ไธŠใฎ่พบใ‚’ๅ‹•ใใพใ™ใ€‚ไบŒ้‡่ขซ่ฆ†ใ‚ฐใƒฉใƒ•ใจใฏๅ…ƒใฎใ‚ฐใƒฉใƒ•ใฎไบŒๅ€ใฎ้ ‚็‚นใ‚’ๆŒใคใ‚ฐใƒฉใƒ•ใงใ™ใ€‚ไบŒ้ƒจไบŒ้‡่ขซ่ฆ†ใ‚ฐใƒฉใƒ•ใฎไบŒใคใฎ้ ‚็‚นใฏใ€ๅ…ƒใฎใ‚ฐใƒฉใƒ•ใงใใฎ้ ‚็‚นใŒ็น‹ใŒใฃใฆใ„ใ‚‹ๅ ดๅˆใซใฎใฟใ€่พบใง็น‹ใŒใ‚Šใพใ™ใ€‚ใ“ใฎใƒขใƒ‡ใƒซใ‚’ไฝœใ‚‹ใซใฏใ€ๅคๅ…ธใฎใƒฉใƒณใƒ€ใƒ ใ‚ฆใ‚ฉใƒผใ‚ฏใฎ้ท็งป็ขบ็Ž‡่กŒๅˆ— P ใ‹ใ‚‰ๅง‹ใ‚ใพใ™ใ€‚1 ็ซ ใง็คบใ—ใŸใ‚ˆใ†ใซใ€ๅคๅ…ธใฎ้›ขๆ•ฃๆ™‚้–“ใƒฉใƒณใƒ€ใƒ ใ‚ฆใ‚ฉใƒผใ‚ฏใฏ้ท็งป่กŒๅˆ— P ใง่จ˜่ฟฐใ•ใ‚Œใพใ™ใ€‚ไปปๆ„ใฎ $N \\times N$ ใฎ้ท็งป่กŒๅˆ— $P$ ใ‚’ๆŒใค $N$-้ ‚็‚นใ‚ฐใƒฉใƒ•ใซๅฏพใ—ใฆใ€้›ขๆ•ฃๆ™‚้–“้‡ๅญใ‚ฆใ‚ฉใƒผใ‚ฏใ‚’ใƒ’ใƒซใƒ™ใƒซใƒˆ็ฉบ้–“ $\\mathcal{H}^N \\otimes \\mathcal{H}^N$ ไธŠใฎใƒฆใƒ‹ใ‚ฟใƒชๆผ”็ฎ—ๅญใจใ—ใฆๅฎš็พฉใงใใพใ™ใ€‚ $P_{jk}$ ใ‚’ $j$ ใ‹ใ‚‰ $k$ ใธ้ท็งปใ™ใ‚‹็ขบ็Ž‡ใจๅฎš็พฉใ—ใพใ—ใ‚‡ใ†ใ€‚้‹ๅ‹•ใ‚’ๅฎš็พฉใ™ใ‚‹ๅ‰ใซใ€ๆญฃ่ฆๅŒ–ใ•ใ‚ŒใŸ็Šถๆ…‹ใ‚’ๅฎš็พฉใ—ใพใ™\n", "\n", - "\\begin{equation}\n", + "$$\n", " \\ket{\\psi_j} := \\sum_{k=1}^N \\sqrt{P_{kj}} \\ket{j,k}, \\; j=1,...,N\n", - "\\end{equation}\n", + "$$\n", "\n", - "ใใ—ใฆใ€${\\ket{\\psi_j}}:j=1,...,N$ ใธใฎๅฐ„ๅฝฑใฏ\n", + "ใใ—ใฆใ€ $\\vert \\psi_j \\rangle :j=1,...,N$ ใธใฎๅฐ„ๅฝฑใฏ\n", "\n", - "\\begin{equation}\n", + "$$\n", " \\Pi := \\sum_{j=1}^N \\ket{\\psi_j} \\bra{\\psi_j}\n", - "\\label{eq:sz_pi}\n", - "\\end{equation}\n", + "$$\n", "\n", "ใ‚ทใƒ•ใƒˆๆผ”็ฎ—ๅญใ‚’ๅฐŽๅ…ฅใ—ใพใ™:\n", "\n", - "\\begin{equation}\n", + "$$\n", " S := \\sum_{j,k=1}^N \\ket{j,k} \\bra{k,j}\n", - "\\label{eq:sz_s}\n", - "\\end{equation}\n", + "$$\n", "\n", "ไธŠใงๅฎš็พฉใ—ใŸ $S$ ใจ $\\Pi$ ใ‚’็”จใ„ใฆไธ€ใ‚นใƒ†ใƒƒใƒ—ๅˆ†ใฎ้›ขๆ•ฃๆ™‚้–“้‡ๅญใ‚ฆใ‚ฉใƒผใ‚ฏใ‚’ๅฎš็พฉใ—ใพใ™:\n", "\n", - "\\begin{equation}\n", + "$$\n", " U := S(2 \\Pi - 1),\n", - "\\label{eq:sz_op}\n", - "\\end{equation}\n", + "$$\n", "\n", - "ใ“ใ“ใงใ€$(2 \\Pi - 1)$ ใฏๅๅฐ„ๆผ”็ฎ—ๅญใงใ™ใ€‚ใพใŸใ€$t$ ใ‚นใƒ†ใƒƒใƒ—ๅพŒใฎ็Šถๆ…‹ใฏ $U^t$ ใซใ‚ˆใ‚Šๅฎš็พฉใงใใพใ™[2]ใ€‚\n", + "ใ“ใ“ใงใ€ $(2 \\Pi - 1)$ ใฏๅๅฐ„ๆผ”็ฎ—ๅญใงใ™ใ€‚ใพใŸใ€ $t$ ใ‚นใƒ†ใƒƒใƒ—ๅพŒใฎ็Šถๆ…‹ใฏ $U^t$ ใซใ‚ˆใ‚Šๅฎš็พฉใงใใพใ™[2]ใ€‚\n", "\n", - "### 2.3 ใ‚ณใ‚คใƒณใจใ‚ปใ‚ฒใƒ‡ใ‚ฃ้‡ๅญใ‚ฆใ‚ฉใƒผใ‚ฏใฎ็ญ‰ไพกๆ€ง \n", + "### 2.C ใ‚ณใ‚คใƒณใจใ‚ปใ‚ฒใƒ‡ใ‚ฃ้‡ๅญใ‚ฆใ‚ฉใƒผใ‚ฏใฎ็ญ‰ไพกๆ€ง \n", "ใ‚ฐใƒญใƒผใƒใƒผใ‚ณใ‚คใƒณใซใ‚ˆใ‚‹ใ‚ณใ‚คใƒณ้‡ๅญใ‚ฆใ‚ฉใƒผใ‚ฏใฏใ‚ปใ‚ฒใƒ‡ใ‚ฃ้‡ๅญใ‚ฆใ‚ฉใƒผใ‚ฏใจ็ญ‰ไพกใงใ‚ใ‚‹ใ“ใจใŒ็Ÿฅใ‚‰ใ‚Œใฆใ„ใพใ™ใ€‚่ฉณ็ดฐใฏ Thomas G. Wong ใซใ‚ˆใ‚‹ๆ–‡็Œฎ[3]ใ‚’ๅ‚็…งใใ ใ•ใ„ใ€ๆ–‡็Œฎใงใฏๆผ”็ฎ—ๅญใฎ็ญ‰ไพกๆ€งใซใคใ„ใฆใ‚‚็คบใ•ใ‚Œใฆใ„ใพใ™ใ€‚\n", "\n", "\n", "## 3. ไพ‹: ่ถ…็ซ‹ๆ–นไฝ“ไธŠใฎ้‡ๅญใ‚ฆใ‚ฉใƒผใ‚ฏ \n", - "่ถ…็ซ‹ๆ–นไฝ“ใฏ $3$ๆฌกๅ…ƒใฎ็ซ‹ๆ–นไฝ“ใ‚’ $n$ๆฌกๅ…ƒๅŒ–ใ—ใŸใ‚‚ใฎใงใ™ใ€‚ๅ…จใฆใฎ้ ‚็‚นใฎๆฌกๆ•ฐใฏ $n$ ใงใ€่ถ…็ซ‹ๆ–นไฝ“ใฏ $N=2^n$ๅ€‹ใฎ้ ‚็‚นใ‚’ๆŒใกใพใ™ใ€‚ไบŒๅ€คใฎ $n$ใ‚ฟใƒ—ใƒซใ‚’็”จใ„ใฆ่ถ…็ซ‹ๆ–นไฝ“ใฎ้ ‚็‚นใ‚’่กจ็พใงใใพใ™ใ€‚้šฃๆŽฅใ™ใ‚‹้ ‚็‚นใฎไบŒๅ€ค่กจ็พใฏไธ€ใคใฎไบŒๅ€คใฎใฟใŒ็•ฐใชใ‚Šใพใ™ใ€‚ไพ‹ใˆใฐ4ๆฌกๅ…ƒ่ถ…็ซ‹ๆ–นไฝ“ใฎๅ ดๅˆใ€้ ‚็‚น $0000$ ใฎ้šฃๆŽฅ้ ‚็‚นใฏ $0001$, $0010$, $0100$, $1000$ ใงใ™ใ€‚ใ—ใŸใŒใฃใฆใ€ใƒใƒŸใƒณใ‚ฐ่ท้›ขใŒ1ใฎๅ…จใฆใฎ้ ‚็‚นใจๆŽฅ็ถšใ—ใฆใ„ใพใ™ใ€‚่พบใ‚‚ๅŒๆ™‚ใซใƒฉใƒ™ใƒซใงใใพใ™ใ€‚ไบŒใคใฎ้šฃๆŽฅใ™ใ‚‹้ ‚็‚นใฎa็•ช็›ฎใฎใƒ“ใƒƒใƒˆใŒ็•ฐใชใ‚‹ๅ ดๅˆใ€$a$ใจใƒฉใƒ™ใƒซใ•ใ‚ŒใŸ่พบใง็น‹ใŒใ‚Šใพใ™ใ€‚\n", + "่ถ…็ซ‹ๆ–นไฝ“ใฏ $3$ ๆฌกๅ…ƒใฎ็ซ‹ๆ–นไฝ“ใ‚’ $n$ ๆฌกๅ…ƒๅŒ–ใ—ใŸใ‚‚ใฎใงใ™ใ€‚ๅ…จใฆใฎ้ ‚็‚นใฎๆฌกๆ•ฐใฏ $n$ ใงใ€่ถ…็ซ‹ๆ–นไฝ“ใฏ $N=2^n$ ๅ€‹ใฎ้ ‚็‚นใ‚’ๆŒใกใพใ™ใ€‚ไบŒๅ€คใฎ $n$ ใ‚ฟใƒ—ใƒซใ‚’็”จใ„ใฆ่ถ…็ซ‹ๆ–นไฝ“ใฎ้ ‚็‚นใ‚’่กจ็พใงใใพใ™ใ€‚้šฃๆŽฅใ™ใ‚‹้ ‚็‚นใฎไบŒๅ€ค่กจ็พใฏไธ€ใคใฎไบŒๅ€คใฎใฟใŒ็•ฐใชใ‚Šใพใ™ใ€‚ไพ‹ใˆใฐ4ๆฌกๅ…ƒ่ถ…็ซ‹ๆ–นไฝ“ใฎๅ ดๅˆใ€้ ‚็‚น $0000$ ใฎ้šฃๆŽฅ้ ‚็‚นใฏ $0001$, $0010$, $0100$, $1000$ ใงใ™ใ€‚ใ—ใŸใŒใฃใฆใ€ใƒใƒŸใƒณใ‚ฐ่ท้›ขใŒ1ใฎๅ…จใฆใฎ้ ‚็‚นใจๆŽฅ็ถšใ—ใฆใ„ใพใ™ใ€‚่พบใ‚‚ๅŒๆ™‚ใซใƒฉใƒ™ใƒซใงใใพใ™ใ€‚ไบŒใคใฎ้šฃๆŽฅใ™ใ‚‹้ ‚็‚นใฎa็•ช็›ฎใฎใƒ“ใƒƒใƒˆใŒ็•ฐใชใ‚‹ๅ ดๅˆใ€ $a$ ใจใƒฉใƒ™ใƒซใ•ใ‚ŒใŸ่พบใง็น‹ใŒใ‚Šใพใ™ใ€‚\n", "\n", - "่ถ…็ซ‹ๆ–นไฝ“ใฎใ‚ณใ‚คใƒณ้‡ๅญใ‚ฆใ‚ฉใƒผใ‚ฏใ‚’่กจ็พใ™ใ‚‹ใƒ’ใƒซใƒ™ใƒซใƒˆ็ฉบ้–“ใฏ $\\mathcal{H} = \\mathcal{H}^n \\otimes \\mathcal{H}^{2^n}$ ใงใ™ใ€ใ“ใ“ใงใ€$\\mathcal{H}^n$ ใฏใ‚ณใ‚คใƒณ็ฉบ้–“ใงใ€$\\mathcal{H}^{2^n}$ ใฏไฝ็ฝฎใงใ™ใ€‚่จˆ็ฎ—ๅŸบๅบ•ใงใฏ\n", + "่ถ…็ซ‹ๆ–นไฝ“ใฎใ‚ณใ‚คใƒณ้‡ๅญใ‚ฆใ‚ฉใƒผใ‚ฏใ‚’่กจ็พใ™ใ‚‹ใƒ’ใƒซใƒ™ใƒซใƒˆ็ฉบ้–“ใฏ $\\mathcal{H} = \\mathcal{H}^n \\otimes \\mathcal{H}^{2^n}$ ใงใ™ใ€‚ใ“ใ“ใงใ€ใ€€$\\mathcal{H}^n$ ใฏใ‚ณใ‚คใƒณ็ฉบ้–“ใงใ€ใ€€$\\mathcal{H}^{2^n}$ ใฏไฝ็ฝฎใงใ™ใ€‚่จˆ็ฎ—ๅŸบๅบ•ใงใฏ\n", "\n", - "\\begin{equation}\n", + "$$\n", " \\big\\{ \\ket{a,\\vec{v}}, 0 \\leq a \\leq n-1, \\vec{v} \\in \\{(00...00), (00...01), ....., (11...11 )\\} \\big\\}. \n", - "\\end{equation}\n", + "$$\n", "\n", - "่พบ $a$ ใ‚’่กจใ™ใ‚ณใ‚คใƒณ่จˆ็ฎ—ๅŸบๅบ• $a$ ใฏใ€็งปๅ‹•ใฎๆ–นๅ‘ใ‚’่กจใ—ใพใ™ใ€‚$a=0$ ใฎๅ ดๅˆใ€็พๅœจใฎ่พบใจใฏไธ€็•ช็›ฎใฎไบŒๅ€คใŒ็•ฐใชใ‚‹่พบใธ็งปๅ‹•ใ—ใพใ™ใ€‚ใพใŸใ€$a=1$ ใฎๅ ดๅˆใ€็พๅœจใฎ่พบใจใฏไบŒ็•ช็›ฎใฎไบŒๅ€คใŒ็•ฐใชใ‚‹่พบใธ็งปๅ‹•ใ—ใพใ™ใ€‚$\\vec{e}_a$ ใ‚’ $a$ ไปฅๅค–ใฏๅ…จใฆ $0$ ใ‚’ใจใ‚‹ไบŒๅ€คใฎ n ใ‚ฟใƒ—ใƒซใจใ—ใพใ™ใ€‚ใใ—ใฆใ€ใ‚ทใƒ•ใƒˆๆผ”็ฎ—ๅญ $S$ ใฏ ็Šถๆ…‹ $\\ket{a} \\ket{\\vec{v}}$ ใ‚’ $\\ket{a} \\ket{\\vec{v} \\oplus \\vec{e}_a}$ ใธ็งปๅ‹•ใ—ใพใ™ใ€‚\n", + "่พบ $a$ ใ‚’่กจใ™ใ‚ณใ‚คใƒณ่จˆ็ฎ—ๅŸบๅบ• $a$ ใฏใ€็งปๅ‹•ใฎๆ–นๅ‘ใ‚’่กจใ—ใพใ™ใ€‚ใ€€$a=0$ ใฎๅ ดๅˆใ€็พๅœจใฎ่พบใจใฏไธ€็•ช็›ฎใฎไบŒๅ€คใŒ็•ฐใชใ‚‹่พบใธ็งปๅ‹•ใ—ใพใ™ใ€‚ใพใŸใ€ใ€€$a=1$ ใฎๅ ดๅˆใ€็พๅœจใฎ่พบใจใฏไบŒ็•ช็›ฎใฎไบŒๅ€คใŒ็•ฐใชใ‚‹่พบใธ็งปๅ‹•ใ—ใพใ™ใ€‚ใ€€$\\vec{e}_a$ ใ‚’ $a$ ไปฅๅค–ใฏๅ…จใฆ $0$ ใ‚’ใจใ‚‹ไบŒๅ€คใฎ n ใ‚ฟใƒ—ใƒซใจใ—ใพใ™ใ€‚ใใ—ใฆใ€ใ‚ทใƒ•ใƒˆๆผ”็ฎ—ๅญ $S$ ใฏ ็Šถๆ…‹ $\\ket{a} \\ket{\\vec{v}}$ ใ‚’ $\\ket{a} \\ket{\\vec{v} \\oplus \\vec{e}_a}$ ใธ็งปๅ‹•ใ—ใพใ™ใ€‚\n", "\n", - "\\begin{equation}\n", + "$$\n", " S \\ket{a} \\ket{\\vec{v}} = \\ket{a} \\ket{\\vec{v} \\oplus \\vec{e}_a}.\n", - "\\end{equation}\n", + "$$\n", "\n", "ใ“ใ“ใงใฏใ€ใ‚ฐใƒญใƒผใƒใƒผใ‚ณใ‚คใƒณ $G$ ใ‚’็”จใ„ใพใ™ใ€‚ใใ—ใฆ็™บๅฑ•ๆผ”็ฎ—ๅญใฏ\n", "\n", - "\\begin{equation}\n", + "$$\n", " U = SG.\n", - "\\end{equation}\n", + "$$\n", "\n", "ๆฌกใซใ€4ๆฌกๅ…ƒ่ถ…็ซ‹ๆ–นไฝ“ใฎ้‡ๅญใ‚ฆใ‚ฉใƒผใ‚ฏใ‚’ใฉใฎใ‚ˆใ†ใซๅฎŸ่ฃ…ใ™ใ‚‹ใฎใ‹ใ‚’็ดนไป‹ใ—ใพใ™ใ€‚ใ‚ณใ‚คใƒณๆผ”็ฎ—ๅญใจใ‚ทใƒ•ใƒˆๆผ”็ฎ—ๅญใฎๅฎŸ่ฃ…ใŒๅฟ…่ฆใจใชใ‚Šใพใ™ใ€‚Qiskitใ‹ใ‚‰ๅฟ…่ฆใชใƒฉใ‚คใƒ–ใƒฉใƒชใ‚’ใ‚คใƒณใƒใƒผใƒˆใ™ใ‚‹ใจใ“ใ‚ใ‹ใ‚‰ๅง‹ใ‚ใพใ™ใ€‚" ] @@ -168,7 +157,7 @@ { "cell_type": "code", "execution_count": 2, - "id": "de5e4475", + "id": "6592de64", "metadata": {}, "outputs": [], "source": [ @@ -188,7 +177,7 @@ }, { "cell_type": "markdown", - "id": "5f13edaa", + "id": "fa16553e", "metadata": {}, "source": [ "ๅ›ž่ทฏใฏไฝ็ฝฎใซ4ๅ€‹ใ€ใ‚ณใ‚คใƒณใซ2ๅ€‹็”จใ„ใฆใ€6้‡ๅญใƒ“ใƒƒใƒˆใ‹ใ‚‰ใชใ‚Šใพใ™ใ€‚ๅ‰ใซ่ฟฐในใŸใ‚ˆใ†ใซใ‚ณใ‚คใƒณใฏใ‚ฐใƒญใƒผใƒใƒผใ‚ณใ‚คใƒณใงใ€ใ‚ฐใƒญใƒผใƒใƒผใฎใ‚ขใƒซใ‚ดใƒชใ‚บใƒ ใฎๆ‹กๆ•ฃๆผ”็ฎ—ๅญใงใ™ใ€‚ใ“ใฎๅฎŸ่ฃ…ใ‹ใ‚‰ใฏใ˜ใ‚ใพใ™ใ€‚" @@ -197,7 +186,7 @@ { "cell_type": "code", "execution_count": 3, - "id": "427c1f4a", + "id": "872212b3", "metadata": {}, "outputs": [ { @@ -226,7 +215,7 @@ }, { "cell_type": "markdown", - "id": "ef61d782", + "id": "06243b9e", "metadata": {}, "source": [ "ๆฌกใซใ‚ทใƒ•ใƒˆๆผ”็ฎ—ๅญใ‚’ๅฎŸ่ฃ…ใ—ใพใ™ใ€‚้šฃๆŽฅใ™ใ‚‹้ ‚็‚นใซใ ใ‘็งปๅ‹•ใ—ใพใ™ใ€ใพใŸใ€ๅ…จใฆใฎ้šฃๆŽฅใ™ใ‚‹้ ‚็‚นใฏไธ€ใƒ“ใƒƒใƒˆใ ใ‘็•ฐใชใ‚Šใพใ™ใ€‚ใ‚ณใ‚คใƒณใซๅพ“ใฃใฆ็งปๅ‹•ใ™ใ‚‹ใŸใ‚ใ€้ ‚็‚นใฎ้‡ๅญใƒ“ใƒƒใƒˆใฎไธ€ใคใซๅฏพใ—ใฆNOTใ‚ฒใƒผใƒˆใ‚’ไฝœ็”จใ—ใพใ™ใ€‚ใ‚ณใ‚คใƒณใŒ $\\ket{11}$ ็Šถๆ…‹ใฎๆ™‚ใฏใ€ไธ€็•ช็›ฎใฎ้ ‚็‚นใฎ้‡ๅญใƒ“ใƒƒใƒˆใŒ็•ฐใชใ‚‹็Šถๆ…‹ใซ็งปๅ‹•ใ—ใพใ™ใ€‚ใ‚ณใ‚คใƒณใŒ $\\ket{10}$ ใพใŸใฏ $\\ket{01}$ ็Šถๆ…‹ใฎๆ™‚ใฏใ€ใใ‚Œใžใ‚ŒไบŒ็•ช็›ฎใ€ไธ‰็•ช็›ฎใฎ้‡ๅญใƒ“ใƒƒใƒˆใŒ็•ฐใชใ‚‹็Šถๆ…‹ใซ็งปๅ‹•ใ—ใพใ™ใ€‚ๆœ€ๅพŒใซใ‚ฐใƒญใƒผใƒใƒผใ‚ณใ‚คใƒณใŒ $\\ket{00}$ ใฎๆ™‚ใฏใ€4็•ช็›ฎใฎ้‡ๅญใƒ“ใƒƒใƒˆใ‚’ๅ่ปขใ—ใพใ™ใ€‚ใ“ใ‚Œใฏใ€ใ‚ฐใƒญใƒผใƒใƒผใ‚ณใ‚คใƒณใฎๅพŒใซใ€CCNOTใ‚ฒใƒผใƒˆใจNOTใ‚ฒใƒผใƒˆใซใ‚ˆใ‚ŠๅฎŸ่ฃ…ใ—ใพใ™ใ€‚ใ“ใ‚Œใ‚‰ๅ…จใฆใง4ๆฌกๅ…ƒ่ถ…็ซ‹ๆ–นไฝ“ใฎ้‡ๅญใ‚ฆใ‚ฉใƒผใ‚ฏใฎไธ€ใ‚นใƒ†ใƒƒใƒ—ๅˆ†ใซใชใ‚Šใพใ™ใ€‚" @@ -235,7 +224,7 @@ { "cell_type": "code", "execution_count": 4, - "id": "d3ab5492", + "id": "34cd6edb", "metadata": {}, "outputs": [ { @@ -269,18 +258,18 @@ }, { "cell_type": "markdown", - "id": "159bca03", + "id": "44c7294b", "metadata": {}, "source": [ "## 4. ้‡ๅญใ‚ฆใ‚ฉใƒผใ‚ฏใซใ‚ˆใ‚‹ๆŽข็ดขใ‚ขใƒซใ‚ดใƒชใ‚บใƒ  \n", - "ๆฌกใซใ‚ฐใƒฉใƒ•ไธŠใซใƒžใƒผใ‚ฏใ—ใŸ่ฆ็ด ใ‚’่ฆ‹ใคใ‘ใ‚‹้‡ๅญใ‚ฆใ‚ฉใƒผใ‚ฏใซใ‚ˆใ‚‹ๆŽข็ดขใ‚ขใƒซใ‚ดใƒชใ‚บใƒ ใ‚’ๅฎŸ่ฃ…ใ—ใพใ™ใ€‚ใฏใ˜ใ‚ใซใ‚ขใƒซใ‚ดใƒชใ‚บใƒ ใ‚’็ดนไป‹ใ—ใ€ใใฎๅพŒใงๅฎŸ่ฃ…ใ—ใพใ™ใ€‚้‡ๅญใ‚ฆใ‚ฉใƒผใ‚ฏใซใ‚ˆใ‚‹ๆŽข็ดขใ‚ขใƒซใ‚ดใƒชใ‚บใƒ ใฏใ€้‡ๅญใ‚ฆใ‚ฉใƒผใ‚ฏใ‚’็”จใ„ใฆใ€ใ‚ฐใƒฉใƒ•ไธŠใซใƒžใƒผใ‚ฏใ—ใŸ่ฆ็ด ใ‚’่ฆ‹ใคใ‘ใ‚‹ๅ•้กŒใ‚’่งฃใใพใ™ใ€‚ใคใพใ‚Šใ€ใ‚ใ‚‹้ ‚็‚น้›†ๅˆ $|M|$ ใ‚’ใƒžใƒผใ‚ฏใ—ใฆใ€ใ‚ฐใƒฉใƒ•ไธŠใฎไปปๆ„ใฎ้ ‚็‚นใ‹ใ‚‰ๅง‹ใ‚ใ€ใƒžใƒผใ‚ฏใ—ใŸ่ค‡ๆ•ฐใฎ้ ‚็‚นใ‚’่ฆ‹ใคใ‘ใ‚‹ใพใง็งปๅ‹•ใ—ใพใ™ใ€‚้‡ๅญใ‚ฆใ‚ฉใƒผใ‚ฏใซใ‚ˆใ‚‹ๆŽข็ดขใงใฏๅŸบๅบ•ใจใ—ใฆใ€็พๅœจใฎ้ ‚็‚นใจ็›ดๅ‰ใฎ้ ‚็‚นใซๅฏพๅฟœใ™ใ‚‹ไบŒใคใฎใƒฌใ‚ธใ‚นใ‚ฟใ‚’ๅฟ…่ฆใจใ—ใพใ™ใ€‚ใคใพใ‚Šใ‚ฐใƒฉใƒ•ใฎ่พบใซๅฏพๅฟœใ—ใพใ™ใ€‚้ท็งป่กŒๅˆ— $P$ ใซใ‚ˆใ‚‹ๅคๅ…ธใƒžใƒซใ‚ณใƒ•้€ฃ้Ž–ใ‚’ๅŸบใซใ—ใฆใ€$\\mathcal{H}$ ไธŠใฎใƒฆใƒ‹ใ‚ฟใƒชๆผ”็ฎ—ๅญ $W(P)$ ใซใ‚ˆใ‚Š้‡ๅญใ‚ฆใ‚ฉใƒผใ‚ฏใ‚’่จ˜่ฟฐใ—ใพใ™ใ€‚ใพใŸใ€้ ‚็‚น $x$ ใซ้šฃๆŽฅใ™ใ‚‹้ ‚็‚นใฎไธ€ๆง˜ใช้‡ใญๅˆใ‚ใ›็Šถๆ…‹ใจใ—ใฆ $\\ket{p_x} = \\sum_y \\sqrt{P_{xy}}\\ket{y}$ ใ‚’ๅฎš็พฉใ—ใพใ™ใ€‚$\\ket{x}\\ket{y}$ ใ‚’ไธ€ใคใฎๅŸบๅบ•ใจใ—ใพใ™ใ€‚ใ‚‚ใ— $x$ ใŒใƒžใƒผใ‚ฏใ—ใŸ้ ‚็‚นใฎๅ ดๅˆใ€ๅŸบๅบ• $\\ket{x}\\ket{y}$ ใ‚’ ''good'' ใจๅฎš็พฉใ—ใพใ™ใ€‚ใใ‚Œไปฅๅค–ใ‚’ ''bad'' ใจใ—ใพใ™ใ€‚ใใ—ใฆใ€''good'' ใจ ''bad'' ็Šถๆ…‹ใฏ: \n", + "ๆฌกใซใ‚ฐใƒฉใƒ•ไธŠใซใƒžใƒผใ‚ฏใ—ใŸ่ฆ็ด ใ‚’่ฆ‹ใคใ‘ใ‚‹้‡ๅญใ‚ฆใ‚ฉใƒผใ‚ฏใซใ‚ˆใ‚‹ๆŽข็ดขใ‚ขใƒซใ‚ดใƒชใ‚บใƒ ใ‚’ๅฎŸ่ฃ…ใ—ใพใ™ใ€‚ใฏใ˜ใ‚ใซใ‚ขใƒซใ‚ดใƒชใ‚บใƒ ใ‚’็ดนไป‹ใ—ใ€ใใฎๅพŒใงๅฎŸ่ฃ…ใ—ใพใ™ใ€‚้‡ๅญใ‚ฆใ‚ฉใƒผใ‚ฏใซใ‚ˆใ‚‹ๆŽข็ดขใ‚ขใƒซใ‚ดใƒชใ‚บใƒ ใฏใ€้‡ๅญใ‚ฆใ‚ฉใƒผใ‚ฏใ‚’็”จใ„ใฆใ€ใ‚ฐใƒฉใƒ•ไธŠใซใƒžใƒผใ‚ฏใ—ใŸ่ฆ็ด ใ‚’่ฆ‹ใคใ‘ใ‚‹ๅ•้กŒใ‚’่งฃใใพใ™ใ€‚ใคใพใ‚Šใ€ใ‚ใ‚‹้ ‚็‚น้›†ๅˆ $|M|$ ใ‚’ใƒžใƒผใ‚ฏใ—ใฆใ€ใ‚ฐใƒฉใƒ•ไธŠใฎไปปๆ„ใฎ้ ‚็‚นใ‹ใ‚‰ๅง‹ใ‚ใ€ใƒžใƒผใ‚ฏใ—ใŸ่ค‡ๆ•ฐใฎ้ ‚็‚นใ‚’่ฆ‹ใคใ‘ใ‚‹ใพใง็งปๅ‹•ใ—ใพใ™ใ€‚้‡ๅญใ‚ฆใ‚ฉใƒผใ‚ฏใซใ‚ˆใ‚‹ๆŽข็ดขใงใฏๅŸบๅบ•ใจใ—ใฆใ€็พๅœจใฎ้ ‚็‚นใจ็›ดๅ‰ใฎ้ ‚็‚นใซๅฏพๅฟœใ™ใ‚‹ไบŒใคใฎใƒฌใ‚ธใ‚นใ‚ฟใ‚’ๅฟ…่ฆใจใ—ใพใ™ใ€‚ใคใพใ‚Šใ‚ฐใƒฉใƒ•ใฎ่พบใซๅฏพๅฟœใ—ใพใ™ใ€‚้ท็งป่กŒๅˆ— $P$ ใซใ‚ˆใ‚‹ๅคๅ…ธใƒžใƒซใ‚ณใƒ•้€ฃ้Ž–ใ‚’ๅŸบใซใ—ใฆใ€ใ€€$\\mathcal{H}$ ไธŠใฎใƒฆใƒ‹ใ‚ฟใƒชๆผ”็ฎ—ๅญ $W(P)$ ใซใ‚ˆใ‚Š้‡ๅญใ‚ฆใ‚ฉใƒผใ‚ฏใ‚’่จ˜่ฟฐใ—ใพใ™ใ€‚ใพใŸใ€้ ‚็‚น $x$ ใซ้šฃๆŽฅใ™ใ‚‹้ ‚็‚นใฎไธ€ๆง˜ใช้‡ใญๅˆใ‚ใ›็Šถๆ…‹ใจใ—ใฆ $\\ket{p_x} = \\sum_y \\sqrt{P_{xy}}\\ket{y}$ ใ‚’ๅฎš็พฉใ—ใพใ™ใ€‚ $\\ket{x}\\ket{y}$ ใ‚’ไธ€ใคใฎๅŸบๅบ•ใจใ—ใพใ™ใ€‚ใ‚‚ใ— $x$ ใŒใƒžใƒผใ‚ฏใ—ใŸ้ ‚็‚นใฎๅ ดๅˆใ€ๅŸบๅบ• $\\ket{x}\\ket{y}$ ใ‚’ ''good'' ใจๅฎš็พฉใ—ใพใ™ใ€‚ใใ‚Œไปฅๅค–ใ‚’ ''bad'' ใจใ—ใพใ™ใ€‚ใใ—ใฆใ€''good'' ใจ ''bad'' ็Šถๆ…‹ใฏ: \n", "\n", - "\\begin{equation}\n", + "$$\n", " \\ket{G} = \\frac{1}{\\sqrt{|M|}} \\sum_{x \\in M} \\ket{x} \\ket{p_x}, \\;\n", " \\ket{B} = \\frac{1}{\\sqrt{N-|M|}} \\sum_{x \\notin M} \\ket{x} \\ket{p_x},\n", - "\\end{equation}\n", + "$$\n", "\n", - "ใ“ใ‚Œใ‚‰ใฏ good ใŠใ‚ˆใณ bad ใฎๅŸบๅบ•ใฎ้‡ใญๅˆใ‚ใ›็Šถๆ…‹ใงใ™ใ€‚ๆฌกใซใ€$\\epsilon = |M|/N$ ใจ $\\theta = \\arcsin(\\sqrt{\\epsilon})$ ใ‚’ๅฎš็พฉใ—ใพใ™ใ€‚\n", + "ใ“ใ‚Œใ‚‰ใฏ good ใŠใ‚ˆใณ bad ใฎๅŸบๅบ•ใฎ้‡ใญๅˆใ‚ใ›็Šถๆ…‹ใงใ™ใ€‚ๆฌกใซใ€ $\\epsilon = |M|/N$ ใจ $\\theta = \\arcsin(\\sqrt{\\epsilon})$ ใ‚’ๅฎš็พฉใ—ใพใ™ใ€‚\n", "\n", "\n", "ใพใจใ‚ใ‚‹ใจใ€ใ‚ขใƒซใ‚ดใƒชใ‚บใƒ ใฏไปฅไธ‹ใฎไธ‰ใคใฎใ‚นใƒ†ใƒƒใƒ—ใ‹ใ‚‰ใชใ‚Šใพใ™:\n", @@ -296,37 +285,37 @@ "3. ่จˆ็ฎ—ๅŸบๅบ•ใงใฎๆธฌๅฎšใ‚’ๅฎŸๆ–ฝ\n", "\n", "\n", - "ใ‚นใƒ†ใƒƒใƒ— $1$ ใฏใ€ใ‚ขใƒ€ใƒžใƒผใƒซใ‚ฒใƒผใƒˆใจใ€$x$ ใŒไธ€ใค็›ฎใฎใƒฌใ‚ธใ‚นใ‚ฟใจ็ญ‰ใ—ใ„ๆ™‚ใซใ ใ‘ไฝ็›ธใ‚’ใ‚ทใƒ•ใƒˆใ™ใ‚‹ไฝ็›ธใ‚ชใƒฉใ‚ฏใƒซใ‚’็”จใ„ใฆๅๅฐ„ใ‚’่กŒใ†ใ“ใจใง็ฐกๅ˜ใซๅฎŸ่ฃ…ใงใใพใ™ใ€‚\n", + "ใ‚นใƒ†ใƒƒใƒ— $1$ ใฏใ€ใ‚ขใƒ€ใƒžใƒผใƒซใ‚ฒใƒผใƒˆใจใ€ $x$ ใŒไธ€ใค็›ฎใฎใƒฌใ‚ธใ‚นใ‚ฟใจ็ญ‰ใ—ใ„ๆ™‚ใซใ ใ‘ไฝ็›ธใ‚’ใ‚ทใƒ•ใƒˆใ™ใ‚‹ไฝ็›ธใ‚ชใƒฉใ‚ฏใƒซใ‚’็”จใ„ใฆๅๅฐ„ใ‚’่กŒใ†ใ“ใจใง็ฐกๅ˜ใซๅฎŸ่ฃ…ใงใใพใ™ใ€‚\n", "\n", "\n", "ใ‚นใƒ†ใƒƒใƒ— 2(b) ใฏไปฅไธ‹ใฎๅ†™ๅƒใ‚’่กŒใ†ใƒฆใƒ‹ใ‚ฟใƒชๅค‰ๆ› $R(P)$ ใ‚’ๆŽขใ™ใ“ใจใจ็ญ‰ไพกใงใ™:\n", - "\\begin{align}\n", + "$$\n", "\\label{eq:mapping_1}\n", " \\ket{U} &\\mapsto \\ket{U}, \\: \\text{ใจ} \\\\\n", " \\ket{\\psi} &\\mapsto -\\ket{\\psi}, \\: \\forall \\ket{\\psi} \\text{$\\ket{U}$ ใซ็›ดไบคใ™ใ‚‹ $W(P)$ ใฎๅ›บๆœ‰ใƒ™ใ‚ฏใƒˆใƒซใซๅซใพใ‚Œใ‚‹ๅ ดๅˆ}\n", "\\label{eq:mapping_2}\n", - "\\end{align}\n", + "$$\n", "\n", - "ใ“ใฎๆผ”็ฎ—ๅญใ‚’ๆŽขใ™ใŸใ‚ใซใ€$W(P)$ ใฎไฝ็›ธๆŽจๅฎšใ‚’่กŒใ„ใพใ™ใ€‚ไธŠ่จ˜ใง $W(P)$ ใ‚’ใƒฉใƒณใƒ€ใƒ ใ‚ฆใ‚ฉใƒผใ‚ฏใฎ็™บๅฑ•ๆผ”็ฎ—ๅญใจใ—ใฆๅฎš็พฉใ—ใพใ—ใŸใ€‚2.1 ็ซ ใง่ฆ‹ใŸใ‚ˆใ†ใซใ€ใ“ใ‚Œใฏใƒฆใƒ‹ใ‚ฟใƒชๆผ”็ฎ—ๅญใงใ™ใ€‚ๅพ“ใฃใฆใ€$W(P)$ ใฎๅ›บๆœ‰ๅ€คใฎใƒŽใƒซใƒ ใฏ $1$ ใจใชใ‚Šใพใ™ใ€‚ใใ“ใงใ€$W(P)$ ใฎๅ›บๆœ‰ๅ€คใ‚’ $e^{\\pm 2i\\theta_j}$ ใจๆ›ธใ็›ดใ—ใพใ™ใ€‚ใƒฆใƒ‹ใ‚ฟใƒชๆผ”็ฎ—ๅญ $W(P)$ ใฏๅ›บๆœ‰ๅ€คใŒ $1$ ใฎๅ›บๆœ‰ใƒ™ใ‚ฏใƒˆใƒซ $\\ket{U}$ ใ‚’ๆŒใกใพใ™ใ€‚ใ“ใ‚Œใฏใ€$\\theta_1=0$ ใซใ‚ˆใ‚Šๅพ—ใ‚‰ใ‚Œใพใ™ใ€‚$R(P)$ ใฏ่ฃœๅŠฉ้‡ๅญใƒ“ใƒƒใƒˆใ‚’ๅŠ ใˆใฆ $O(1/\\sqrt{\\delta})$ ใฎ็ฒพๅบฆใงไฝ็›ธๆŽจๅฎšใ‚’่กŒใ†ใ“ใจใง $\\ket{U}$ ใ‚’่ฆ‹ใคใ‘ใพใ™ใ€ใ“ใ“ใงใ€$\\delta$ ใฏ $P$ ใฎใ‚นใƒšใ‚ฏใƒˆใƒซใ‚ฎใƒฃใƒƒใƒ—ใงใ™ใ€‚ใ“ใ‚Œใ‚’่กŒใ†ใซใฏใ€$W(P)$ ใ‚’ $O(1/\\sqrt{\\delta})$ ๅ›žไฝœ็”จใ™ใ‚‹ๅฟ…่ฆใŒใ‚ใ‚Šใพใ™ใ€‚$\\ket{w}$ ใ‚’ $W(P)$ ใฎๅ›บๆœ‰ใƒ™ใ‚ฏใƒˆใƒซใงใ€ๅ›บๆœ‰ๅ€ค $e^{\\pm 2i\\theta_j}$ ใ‚’ๆŒใคใจใ—ใพใ—ใ‚‡ใ†ใ€‚ $\\tilde{\\theta_j}$ ใ‚’ไฝ็›ธๆŽจๅฎšใซใ‚ˆใ‚‹ $\\theta_j$ ใฎใ‚‚ใฃใจใ‚‚่‰ฏใ„ๆŽจๅฎšๅ€คใจไปฎๅฎšใ—ใพใ™ใ€‚ใ‚นใƒ†ใƒƒใƒ— 2(b) ใฎ $\\ket{w}$ ใฎๅ†™ๅƒใ‚’ไธŽใˆใ‚‹ๆผ”็ฎ—ๅญ $R(P)$ ใฏๆ–‡็Œฎ[4]ใงไธŽใˆใ‚‰ใ‚Œใฆใ„ใพใ™ใ€‚\n", + "ใ“ใฎๆผ”็ฎ—ๅญใ‚’ๆŽขใ™ใŸใ‚ใซใ€ $W(P)$ ใฎไฝ็›ธๆŽจๅฎšใ‚’่กŒใ„ใพใ™ใ€‚ไธŠ่จ˜ใง $W(P)$ ใ‚’ใƒฉใƒณใƒ€ใƒ ใ‚ฆใ‚ฉใƒผใ‚ฏใฎ็™บๅฑ•ๆผ”็ฎ—ๅญใจใ—ใฆๅฎš็พฉใ—ใพใ—ใŸใ€‚2.1 ็ซ ใง่ฆ‹ใŸใ‚ˆใ†ใซใ€ใ“ใ‚Œใฏใƒฆใƒ‹ใ‚ฟใƒชๆผ”็ฎ—ๅญใงใ™ใ€‚ๅพ“ใฃใฆใ€ $W(P)$ ใฎๅ›บๆœ‰ๅ€คใฎใƒŽใƒซใƒ ใฏ $1$ ใจใชใ‚Šใพใ™ใ€‚ใใ“ใงใ€ $W(P)$ ใฎๅ›บๆœ‰ๅ€คใ‚’ $e^{\\pm 2i\\theta_j}$ ใจๆ›ธใ็›ดใ—ใพใ™ใ€‚ใƒฆใƒ‹ใ‚ฟใƒชๆผ”็ฎ—ๅญ $W(P)$ ใฏๅ›บๆœ‰ๅ€คใŒ $1$ ใฎๅ›บๆœ‰ใƒ™ใ‚ฏใƒˆใƒซ $\\ket{U}$ ใ‚’ๆŒใกใพใ™ใ€‚ใ“ใ‚Œใฏใ€ $\\theta_1=0$ ใซใ‚ˆใ‚Šๅพ—ใ‚‰ใ‚Œใพใ™ใ€‚ใ€€$R(P)$ ใฏ่ฃœๅŠฉ้‡ๅญใƒ“ใƒƒใƒˆใ‚’ๅŠ ใˆใฆ $O(1/\\sqrt{\\delta})$ ใฎ็ฒพๅบฆใงไฝ็›ธๆŽจๅฎšใ‚’่กŒใ†ใ“ใจใง $\\ket{U}$ ใ‚’่ฆ‹ใคใ‘ใพใ™ใ€ใ“ใ“ใงใ€ $\\delta$ ใฏ $P$ ใฎใ‚นใƒšใ‚ฏใƒˆใƒซใ‚ฎใƒฃใƒƒใƒ—ใงใ™ใ€‚ใ“ใ‚Œใ‚’่กŒใ†ใซใฏใ€ $W(P)$ ใ‚’ $O(1/\\sqrt{\\delta})$ ๅ›žไฝœ็”จใ™ใ‚‹ๅฟ…่ฆใŒใ‚ใ‚Šใพใ™ใ€‚ $\\ket{w}$ ใ‚’ $W(P)$ ใฎๅ›บๆœ‰ใƒ™ใ‚ฏใƒˆใƒซใงใ€ๅ›บๆœ‰ๅ€ค $e^{\\pm 2i\\theta_j}$ ใ‚’ๆŒใคใจใ—ใพใ—ใ‚‡ใ†ใ€‚ $\\tilde{\\theta_j}$ ใ‚’ไฝ็›ธๆŽจๅฎšใซใ‚ˆใ‚‹ $\\theta_j$ ใฎใ‚‚ใฃใจใ‚‚่‰ฏใ„ๆŽจๅฎšๅ€คใจไปฎๅฎšใ—ใพใ™ใ€‚ใ‚นใƒ†ใƒƒใƒ— 2(b) ใฎ $\\ket{w}$ ใฎๅ†™ๅƒใ‚’ไธŽใˆใ‚‹ๆผ”็ฎ—ๅญ $R(P)$ ใฏๆ–‡็Œฎ[4]ใงไธŽใˆใ‚‰ใ‚Œใฆใ„ใพใ™ใ€‚\n", "\n", - "\\begin{equation}\n", + "$$\n", " \\ket{w} \\ket{0} \\mapsto \\ket{w} \\ket{\\tilde{\\theta_j}} \\mapsto (-1)^{|\\tilde{\\theta_j} \\neq 0|} \\ket{w} \\ket{\\tilde{\\theta_j}} \\mapsto (-1)^{|\\tilde{\\theta_j} \\neq 0|} \\ket{w} \\ket{0}\n", - "\\end{equation}\n", + "$$\n", "\n", "\n", "## 5.ไพ‹: 4ๆฌกๅ…ƒ่ถ…็ซ‹ๆ–นไฝ“ไธŠใฎ้‡ๅญใ‚ฆใ‚ฉใƒผใ‚ฏใซใ‚ˆใ‚‹ๆŽข็ดข \n", "\n", "\n", - "้‡ๅญใ‚ฆใ‚ฉใƒผใ‚ฏใซใ‚ˆใ‚‹ๆŽข็ดขใ‚ขใƒซใ‚ดใƒชใ‚บใƒ ใฏ $O(1/\\sqrt{\\epsilon})$ ใ‚นใƒ†ใƒƒใƒ—ใงใƒžใƒผใ‚ฏใ•ใ‚ŒใŸ้ ‚็‚นใฎ้›†ๅˆใ‚’ๆŽขใ™ใ“ใจใŒใงใใพใ™ใ€ใ“ใ“ใง $\\epsilon = |M|/N$ใ€$M$ ใฏใƒžใƒผใ‚ฏใ—ใŸ้ ‚็‚นๆ•ฐใ€$N$ ใฏๅ…จใฆใฎ้ ‚็‚นๆ•ฐใงใ™ใ€‚ใ“ใฎใ‚ขใƒซใ‚ดใƒชใ‚บใƒ ใฏๅ…ƒใฏใ‚ปใ‚ฒใƒ‡ใ‚ฃ้‡ๅญใ‚ฆใ‚ฉใƒผใ‚ฏใ‚’ไฝฟใ„ใ€้‡ๅญ็Šถๆ…‹ใ‚’่กจ็พใ™ใ‚‹ไบŒใคใฎ้ ‚็‚นใƒฌใ‚ธใ‚นใ‚ฟใ‚’็”จใ„ใพใ—ใŸใ€‚ใ—ใ‹ใ—ใ‚ฐใƒญใƒผใƒใƒผใ‚ณใ‚คใƒณใ‚’็”จใ„ใ‚‹ใ‚ณใ‚คใƒณ้‡ๅญใ‚ฆใ‚ฉใƒผใ‚ฏใฏใ‚ปใ‚ฒใƒ‡ใ‚ฃ้‡ๅญใ‚ฆใ‚ฉใƒผใ‚ฏใจ็ญ‰ไพกใงใ€ใ‚ณใ‚คใƒณ้‡ๅญใ‚ฆใ‚ฉใƒผใ‚ฏใฏไธ€่ˆฌ็š„ใซ็ฐก็ด ใซๅฎŸ่ฃ…ใงใใ‚‹ใŸใ‚ใ€ใ‚ณใ‚คใƒณ้‡ๅญใ‚ฆใ‚ฉใƒผใ‚ฏใซใ‚ˆใ‚‹ๅฎŸ่ฃ…ใ‚’้ธใณใพใ™ใ€‚3 ็ซ ใง็ดนไป‹ใ—ใŸ4ๆฌกๅ…ƒ่ถ…็ซ‹ๆ–นไฝ“ใ‚’็”จใ„ใพใ™ใ€‚\n", + "้‡ๅญใ‚ฆใ‚ฉใƒผใ‚ฏใซใ‚ˆใ‚‹ๆŽข็ดขใ‚ขใƒซใ‚ดใƒชใ‚บใƒ ใฏ $O(1/\\sqrt{\\epsilon})$ ใ‚นใƒ†ใƒƒใƒ—ใงใƒžใƒผใ‚ฏใ•ใ‚ŒใŸ้ ‚็‚นใฎ้›†ๅˆใ‚’ๆŽขใ™ใ“ใจใŒใงใใพใ™ใ€ใ“ใ“ใง $\\epsilon = |M|/N$ใ€ $M$ ใฏใƒžใƒผใ‚ฏใ—ใŸ้ ‚็‚นๆ•ฐใ€ $N$ ใฏๅ…จใฆใฎ้ ‚็‚นๆ•ฐใงใ™ใ€‚ใ“ใฎใ‚ขใƒซใ‚ดใƒชใ‚บใƒ ใฏๅ…ƒใฏใ‚ปใ‚ฒใƒ‡ใ‚ฃ้‡ๅญใ‚ฆใ‚ฉใƒผใ‚ฏใ‚’ไฝฟใ„ใ€้‡ๅญ็Šถๆ…‹ใ‚’่กจ็พใ™ใ‚‹ไบŒใคใฎ้ ‚็‚นใƒฌใ‚ธใ‚นใ‚ฟใ‚’็”จใ„ใพใ—ใŸใ€‚ใ—ใ‹ใ—ใ‚ฐใƒญใƒผใƒใƒผใ‚ณใ‚คใƒณใ‚’็”จใ„ใ‚‹ใ‚ณใ‚คใƒณ้‡ๅญใ‚ฆใ‚ฉใƒผใ‚ฏใฏใ‚ปใ‚ฒใƒ‡ใ‚ฃ้‡ๅญใ‚ฆใ‚ฉใƒผใ‚ฏใจ็ญ‰ไพกใงใ€ใ‚ณใ‚คใƒณ้‡ๅญใ‚ฆใ‚ฉใƒผใ‚ฏใฏไธ€่ˆฌ็š„ใซ็ฐก็ด ใซๅฎŸ่ฃ…ใงใใ‚‹ใŸใ‚ใ€ใ‚ณใ‚คใƒณ้‡ๅญใ‚ฆใ‚ฉใƒผใ‚ฏใซใ‚ˆใ‚‹ๅฎŸ่ฃ…ใ‚’้ธใณใพใ™ใ€‚3 ็ซ ใง็ดนไป‹ใ—ใŸ4ๆฌกๅ…ƒ่ถ…็ซ‹ๆ–นไฝ“ใ‚’็”จใ„ใพใ™ใ€‚\n", "\n", - "ใพใจใ‚ใ‚‹ใจใ€ไปฅไธ‹ใฎใ‚ˆใ†ใซใ‚ขใƒซใ‚ดใƒชใ‚บใƒ ใ‚’ๅฎŸ่ฃ…ใ—ใพใ™ใ€‚ใ‚นใƒ†ใƒƒใƒ— 1 ใ‚’่กŒใ†ใซใฏใ€้ ‚็‚นใƒฌใ‚ธใ‚นใ‚ฟใฎๅ…จใฆใฎ้‡ๅญใƒ“ใƒƒใƒˆใซใ‚ขใƒ€ใƒžใƒผใƒซใ‚ฒใƒผใƒˆใ‚’ไฝœ็”จใ•ใ›ใฆๅ…จใฆใฎ่พบใฎไธ€ๆง˜ใช้‡ใญๅˆใ‚ใ›็Šถๆ…‹ใ‚’ไฝœใ‚Šใพใ™ใ€‚ใ‚นใƒ†ใƒƒใƒ— 2(a) ใงใฏใ€ไฝ็›ธใ‚ชใƒฉใ‚ฏใƒซใ‚’ๅฎŸ่ฃ…ใ—ใพใ™ใ€‚ใ‚นใƒ†ใƒƒใƒ— 2(b) ใฏใ€่ถ…็ซ‹ๆ–นไฝ“ใฎ้‡ๅญใ‚ฆใ‚ฉใƒผใ‚ฏใฎไธ€ใ‚นใƒ†ใƒƒใƒ—ๅˆ†ใฎไฝ็›ธๆŽจๅฎšใจใ€$\\theta \\neq 0$ ใจใชใ‚‹ใ™ในใฆใฎ้‡ๅญ็Šถๆ…‹ใฎใƒžใƒผใ‚ฏใ‚’่กŒใ„ใพใ™ใ€‚ใ“ใ‚Œใ‚’่ฃœๅŠฉ้‡ๅญใƒ“ใƒƒใƒˆใฎๅ›ž่ปขใซใ‚ˆใ‚Š่กŒใ„ใพใ™ใ€‚ๆœ€ๅพŒใฎใ‚นใƒ†ใƒƒใƒ—ใฏใ€ไฝ็›ธๆŽจๅฎšใฎ้€†ๆผ”็ฎ—ใ‚’่กŒใ„ใพใ™ใ€‚ไฝ็›ธๆŽจๅฎšใซๅฟ…่ฆใช้‡ๅญใƒ“ใƒƒใƒˆใฏ $\\theta$ ใฎ็ฒพๅบฆใซไพๅญ˜ใ—ใพใ™ใ€‚\n", + "ใพใจใ‚ใ‚‹ใจใ€ไปฅไธ‹ใฎใ‚ˆใ†ใซใ‚ขใƒซใ‚ดใƒชใ‚บใƒ ใ‚’ๅฎŸ่ฃ…ใ—ใพใ™ใ€‚ใ‚นใƒ†ใƒƒใƒ— 1 ใ‚’่กŒใ†ใซใฏใ€้ ‚็‚นใƒฌใ‚ธใ‚นใ‚ฟใฎๅ…จใฆใฎ้‡ๅญใƒ“ใƒƒใƒˆใซใ‚ขใƒ€ใƒžใƒผใƒซใ‚ฒใƒผใƒˆใ‚’ไฝœ็”จใ•ใ›ใฆๅ…จใฆใฎ่พบใฎไธ€ๆง˜ใช้‡ใญๅˆใ‚ใ›็Šถๆ…‹ใ‚’ไฝœใ‚Šใพใ™ใ€‚ใ‚นใƒ†ใƒƒใƒ— 2(a) ใงใฏใ€ไฝ็›ธใ‚ชใƒฉใ‚ฏใƒซใ‚’ๅฎŸ่ฃ…ใ—ใพใ™ใ€‚ใ‚นใƒ†ใƒƒใƒ— 2(b) ใฏใ€่ถ…็ซ‹ๆ–นไฝ“ใฎ้‡ๅญใ‚ฆใ‚ฉใƒผใ‚ฏใฎไธ€ใ‚นใƒ†ใƒƒใƒ—ๅˆ†ใฎไฝ็›ธๆŽจๅฎšใจใ€ $\\theta \\neq 0$ ใจใชใ‚‹ใ™ในใฆใฎ้‡ๅญ็Šถๆ…‹ใฎใƒžใƒผใ‚ฏใ‚’่กŒใ„ใพใ™ใ€‚ใ“ใ‚Œใ‚’่ฃœๅŠฉ้‡ๅญใƒ“ใƒƒใƒˆใฎๅ›ž่ปขใซใ‚ˆใ‚Š่กŒใ„ใพใ™ใ€‚ๆœ€ๅพŒใฎใ‚นใƒ†ใƒƒใƒ—ใฏใ€ไฝ็›ธๆŽจๅฎšใฎ้€†ๆผ”็ฎ—ใ‚’่กŒใ„ใพใ™ใ€‚ไฝ็›ธๆŽจๅฎšใซๅฟ…่ฆใช้‡ๅญใƒ“ใƒƒใƒˆใฏ $\\theta$ ใฎ็ฒพๅบฆใซไพๅญ˜ใ—ใพใ™ใ€‚\n", "\n", "ไปฅไธ‹ใ€4ๆฌกๅ…ƒ่ถ…็ซ‹ๆ–นไฝ“ใฎ้‡ๅญใ‚ฆใ‚ฉใƒผใ‚ฏใซใ‚ˆใ‚‹ๆŽข็ดขใ‚ขใƒซใ‚ดใƒชใ‚บใƒ ใ‚’ๅฎŸ่ฃ…ใ—ใพใ™ใ€‚" ] }, { "cell_type": "markdown", - "id": "5e1296db", + "id": "b7e7a842", "metadata": {}, "source": [ "ใ“ใฎใ‚ขใƒซใ‚ดใƒชใ‚บใƒ ใงใฏใ€ไธ€ใ‚นใƒ†ใƒƒใƒ—ๅˆ†ใฎใ‚ฒใƒผใƒˆใซๅฏพใ—ใฆไปฅๅ‰ๅฎŸ่ฃ…ใ—ใŸๅ่ปขใ‚’ๅฟ…่ฆใจใ—ใพใ™ใ€‚ใ“ใ‚Œใฏใƒ“ใƒซใƒˆใ‚คใƒณ้–ขๆ•ฐ inverse() ใง่กŒใˆใพใ™ใ€‚" @@ -335,7 +324,7 @@ { "cell_type": "code", "execution_count": 5, - "id": "60fb5044", + "id": "4bb02dd5", "metadata": {}, "outputs": [ { @@ -358,7 +347,7 @@ }, { "cell_type": "markdown", - "id": "a30255e6", + "id": "64aef93a", "metadata": {}, "source": [ "ไธ€ใ‚นใƒ†ใƒƒใƒ—ๅˆ†ใฎใ‚ฒใƒผใƒˆใฎๅ่ปขใฏๅพŒใงไฝ็›ธๆŽจๅฎšใฎ้€†่จˆ็ฎ—ใซไฝฟ็”จใ—ใพใ™ใ€‚3 ็ซ ใงๅฎŸ่ฃ…ใ—ใŸไธ€ใ‚นใƒ†ใƒƒใƒ—ๅˆ†ใฎใ‚ฒใƒผใƒˆใจใใฎๅ่ปขใฎใ‚ฒใƒผใƒˆใฏใ€ๅˆถๅพกใ‚ฒใƒผใƒˆใ‚’ๅฟ…่ฆใจใ—ใพใ™ใ€‚ใ“ใ‚Œใ‚‰ใ‚’ๅพŒใซๅˆถๅพก้‡ๅญใƒ“ใƒƒใƒˆใซๅฟœใ˜ใฆไฝฟ็”จใ—ใพใ™ใ€‚" @@ -367,7 +356,7 @@ { "cell_type": "code", "execution_count": 6, - "id": "cb819da1", + "id": "c0a202d6", "metadata": {}, "outputs": [], "source": [ @@ -380,7 +369,7 @@ }, { "cell_type": "markdown", - "id": "ed43f489", + "id": "c15fdfdf", "metadata": {}, "source": [ "ๅˆถๅพกใ•ใ‚ŒใŸไธ€ใ‚นใƒ†ใƒƒใƒ—ๅˆ†ใฎใ‚ฒใƒผใƒˆใจใ€ๅˆถๅพกใ•ใ‚ŒใŸไธ€ใ‚นใƒ†ใƒƒใƒ—ๅˆ†ใฎๅ่ปขใ‚ฒใƒผใƒˆใฏไฝ็›ธๆŽจๅฎšใซ็”จใ„ใ‚‰ใ‚Œใพใ™ใ€‚ไฝ็›ธๆŽจๅฎšใซใฏ้‡ๅญใƒ•ใƒผใƒชใ‚จๅค‰ๆ›ใ‚‚็”จใ„ใพใ™ใ€‚Qiskit ใงใฏ้‡ๅญใƒ•ใƒผใƒชใ‚จๅค‰ๆ›ใ‚’ๅฎŸ่ฃ…ใ—ใŸ QFT ้–ขๆ•ฐใŒใ‚ใ‚Šใพใ™ใ€‚ไฝ็›ธๆŽจๅฎšใซใฏ้€†้‡ๅญใƒ•ใƒผใƒชใ‚จๅค‰ๆ›ใ‚’็”จใ„ใพใ™ใŒใ€ไฝ็›ธๆŽจๅฎšใฎ้€†่จˆ็ฎ—ใซใ‚‚้€šๅธธใฎ QFT ใ‚’ไฝฟ็”จใ—ใพใ™ใ€‚" @@ -389,7 +378,7 @@ { "cell_type": "code", "execution_count": 7, - "id": "e5cb4a98", + "id": "78c4f2bc", "metadata": {}, "outputs": [ { @@ -415,7 +404,7 @@ }, { "cell_type": "markdown", - "id": "253629e1", + "id": "2c545266", "metadata": {}, "source": [ "ไฝ็›ธๆŽจๅฎšใ‚’ๅฎŸ่ฃ…ใ™ใ‚‹ๅ‰ใซใ€1011 ใจ 1111 ใ‚’ใƒžใƒผใ‚ฏใ™ใ‚‹ไฝ็›ธใ‚ชใƒฉใ‚ฏใƒซใ‚’ๅฎŸ่ฃ…ใ—ใพใ™ใ€‚ใใฎๅพŒใ€ๅ›ž่ทฏใ‚’ไฝœๆˆใ—ใพใ™ใ€‚ใ“ใ‚Œใฏใ‚ขใƒซใ‚ดใƒชใ‚บใƒ ใฎใ‚นใƒ†ใƒƒใƒ— 2(a) ใงใ™ใ€‚" @@ -424,7 +413,7 @@ { "cell_type": "code", "execution_count": 8, - "id": "29d92511", + "id": "0e97be9e", "metadata": { "scrolled": true }, @@ -464,16 +453,16 @@ }, { "cell_type": "markdown", - "id": "d940c64e", + "id": "1051c836", "metadata": {}, "source": [ - "ไป–ใฎ้‡ๅญใƒ“ใƒƒใƒˆใŒใ‚ผใƒญใงใชใ„ๅ ดๅˆใซ่ฃœๅŠฉ้‡ๅญใƒ“ใƒƒใƒˆใ‚’ๅ›ž่ปขใ™ใ‚‹ใ‚ฒใƒผใƒˆใ‚’ๅฎŸ่ฃ…ใ—ใพใ™ใ€‚ใ“ใฎใ‚ฒใƒผใƒˆใฏไฝ็›ธๆŽจๅฎšใง็”จใ„ใ‚‰ใ‚Œใ€$\\theta \\neq 0$ ใฎๆ™‚ใซ่ฃœๅŠฉ้‡ๅญใƒ“ใƒƒใƒˆใ‚’ๅ›ž่ปขใ—ใพใ™ใ€‚" + "ไป–ใฎ้‡ๅญใƒ“ใƒƒใƒˆใŒใ‚ผใƒญใงใชใ„ๅ ดๅˆใซ่ฃœๅŠฉ้‡ๅญใƒ“ใƒƒใƒˆใ‚’ๅ›ž่ปขใ™ใ‚‹ใ‚ฒใƒผใƒˆใ‚’ๅฎŸ่ฃ…ใ—ใพใ™ใ€‚ใ“ใฎใ‚ฒใƒผใƒˆใฏไฝ็›ธๆŽจๅฎšใง็”จใ„ใ‚‰ใ‚Œใ€ $\\theta \\neq 0$ ใฎๆ™‚ใซ่ฃœๅŠฉ้‡ๅญใƒ“ใƒƒใƒˆใ‚’ๅ›ž่ปขใ—ใพใ™ใ€‚" ] }, { "cell_type": "code", "execution_count": 9, - "id": "e180e3cb", + "id": "67c9ba50", "metadata": {}, "outputs": [ { @@ -505,16 +494,16 @@ }, { "cell_type": "markdown", - "id": "abfa2ff1", + "id": "50f2c353", "metadata": {}, "source": [ - "ๆฌกใซใ‚ขใƒซใ‚ดใƒชใ‚บใƒ ใฎใ‚นใƒ†ใƒƒใƒ— 2(b) ใ‚’ๅฎŸ่ฃ…ใ—ใพใ™ใ€‚ใ“ใฎใ‚นใƒ†ใƒƒใƒ—ใฏใ€้‡ๅญใ‚ฆใ‚ฉใƒผใ‚ฏไธ€ใ‚นใƒ†ใƒƒใƒ—ๅˆ†ใฎไฝ็›ธๆŽจๅฎšใจใ€$\\theta \\neq 0$ ใฎๆ™‚ใฎ่ฃœๅŠฉ้‡ๅญใƒ“ใƒƒใƒˆใฎๅ›ž่ปขๆ“ไฝœใ‚’ๅซใฟใพใ™ใ€‚ใ“ใฎใŸใ‚ใซใ€็›ดๅ‰ใซไฝœๆˆใ—ใŸ mark_auxiliary_gate ใ‚’็”จใ„ใพใ™ใ€‚ใใฎๅพŒใ€ไฝ็›ธๆŽจๅฎšใฎ้€†ๆผ”็ฎ—ใ‚’่กŒใ„ใพใ™ใ€‚" + "ๆฌกใซใ‚ขใƒซใ‚ดใƒชใ‚บใƒ ใฎใ‚นใƒ†ใƒƒใƒ— 2(b) ใ‚’ๅฎŸ่ฃ…ใ—ใพใ™ใ€‚ใ“ใฎใ‚นใƒ†ใƒƒใƒ—ใฏใ€้‡ๅญใ‚ฆใ‚ฉใƒผใ‚ฏไธ€ใ‚นใƒ†ใƒƒใƒ—ๅˆ†ใฎไฝ็›ธๆŽจๅฎšใจใ€ $\\theta \\neq 0$ ใฎๆ™‚ใฎ่ฃœๅŠฉ้‡ๅญใƒ“ใƒƒใƒˆใฎๅ›ž่ปขๆ“ไฝœใ‚’ๅซใฟใพใ™ใ€‚ใ“ใฎใŸใ‚ใซใ€็›ดๅ‰ใซไฝœๆˆใ—ใŸ mark_auxiliary_gate ใ‚’็”จใ„ใพใ™ใ€‚ใใฎๅพŒใ€ไฝ็›ธๆŽจๅฎšใฎ้€†ๆผ”็ฎ—ใ‚’่กŒใ„ใพใ™ใ€‚" ] }, { "cell_type": "code", "execution_count": 11, - "id": "0b18ab93", + "id": "b074b0fa", "metadata": { "scrolled": false }, @@ -565,16 +554,16 @@ }, { "cell_type": "markdown", - "id": "101cce65", + "id": "3520d6e1", "metadata": {}, "source": [ - "ใ“ใ“ใงใ€ใ“ใ‚Œใพใงไฝœๆˆใ—ใŸใ‚ฒใƒผใƒˆใ‚’็”จใ„ใฆใ€้‡ๅญใ‚ฆใ‚ฉใƒผใ‚ฏใซใ‚ˆใ‚‹ๆŽข็ดขใ‚ขใƒซใ‚ดใƒชใ‚บใƒ ใฎๅ…จไฝ“ใ‚’ๅฎŸ่ฃ…ใ—ใพใ™ใ€‚ๆœ€ๅˆใฏใ€ใ‚นใƒ†ใƒƒใƒ— 1 ใฎ้ ‚็‚นใจใ‚ณใ‚คใƒณใฎ้‡ๅญใƒ“ใƒƒใƒˆใซใ‚ขใƒ€ใƒžใƒผใƒซใ‚ฒใƒผใƒˆใ‚’ไฝœ็”จใ•ใ›ใพใ™ใ€‚ใใฎๅพŒใ€ใ‚นใƒ†ใƒƒใƒ— 2(a) ใจ 2(b) ใฎไฝ็›ธใ‚ชใƒฉใ‚ฏใƒซใ‚ฒใƒผใƒˆใจไฝ็›ธๆŽจๅฎšใ‚ฒใƒผใƒˆใ‚’็นฐใ‚Š่ฟ”ใ—ไฝœ็”จใ•ใ›ใพใ™ใ€‚4 ็ซ ใงใ‚ขใƒซใ‚ดใƒชใ‚บใƒ ใ‚’่ชฌๆ˜Žใ—ใŸใ‚ˆใ†ใซใ€$O(1/\\sqrt{\\epsilon})$ ๅ›žใฎ็นฐใ‚Š่ฟ”ใ—ใŒๅฟ…่ฆใงใ™ใ€‚ๆœ€ๅพŒใซ้ ‚็‚น้‡ๅญใƒ“ใƒƒใƒˆใ‚’ๆธฌๅฎšใ—ใพใ™ใ€‚" + "ใ“ใ“ใงใ€ใ“ใ‚Œใพใงไฝœๆˆใ—ใŸใ‚ฒใƒผใƒˆใ‚’็”จใ„ใฆใ€้‡ๅญใ‚ฆใ‚ฉใƒผใ‚ฏใซใ‚ˆใ‚‹ๆŽข็ดขใ‚ขใƒซใ‚ดใƒชใ‚บใƒ ใฎๅ…จไฝ“ใ‚’ๅฎŸ่ฃ…ใ—ใพใ™ใ€‚ๆœ€ๅˆใฏใ€ใ‚นใƒ†ใƒƒใƒ— 1 ใฎ้ ‚็‚นใจใ‚ณใ‚คใƒณใฎ้‡ๅญใƒ“ใƒƒใƒˆใซใ‚ขใƒ€ใƒžใƒผใƒซใ‚ฒใƒผใƒˆใ‚’ไฝœ็”จใ•ใ›ใพใ™ใ€‚ใใฎๅพŒใ€ใ‚นใƒ†ใƒƒใƒ— 2(a) ใจ 2(b) ใฎไฝ็›ธใ‚ชใƒฉใ‚ฏใƒซใ‚ฒใƒผใƒˆใจไฝ็›ธๆŽจๅฎšใ‚ฒใƒผใƒˆใ‚’็นฐใ‚Š่ฟ”ใ—ไฝœ็”จใ•ใ›ใพใ™ใ€‚4 ็ซ ใงใ‚ขใƒซใ‚ดใƒชใ‚บใƒ ใ‚’่ชฌๆ˜Žใ—ใŸใ‚ˆใ†ใซใ€ $O(1/\\sqrt{\\epsilon})$ ๅ›žใฎ็นฐใ‚Š่ฟ”ใ—ใŒๅฟ…่ฆใงใ™ใ€‚ๆœ€ๅพŒใซ้ ‚็‚น้‡ๅญใƒ“ใƒƒใƒˆใ‚’ๆธฌๅฎšใ—ใพใ™ใ€‚" ] }, { "cell_type": "code", "execution_count": 12, - "id": "5573b106", + "id": "8acd737e", "metadata": {}, "outputs": [ { @@ -616,7 +605,7 @@ }, { "cell_type": "markdown", - "id": "2b4e8cdb", + "id": "d7aee277", "metadata": {}, "source": [ "ๆœ€ๅพŒใซใ€ใ“ใฎๅฎŸ่ฃ…ใ‚’ qasm ใ‚ทใƒŸใƒฅใƒฌใƒผใ‚ฟใงๅฎŸ่กŒใ—ใพใ™ใ€‚ใƒžใƒผใ‚ฏใ—ใŸ็Šถๆ…‹ใธใจใฏใฃใใ‚Šใจ้›†ใพใฃใฆใ„ใ‚‹ใ“ใจใŒๅˆ†ใ‹ใ‚Šใพใ™ใ€‚" @@ -625,7 +614,7 @@ { "cell_type": "code", "execution_count": 13, - "id": "682d2f40", + "id": "4ad3171f", "metadata": {}, "outputs": [ { @@ -651,7 +640,7 @@ }, { "cell_type": "markdown", - "id": "be8303f3", + "id": "2c421e09", "metadata": {}, "source": [ "## 6. ๅ‚่€ƒๆ–‡็Œฎ \n", @@ -665,7 +654,7 @@ { "cell_type": "code", "execution_count": 14, - "id": "7c11b1c1", + "id": "a6831f83", "metadata": {}, "outputs": [ { diff --git a/translations/ja/v1/ch-demos/piday-code.ipynb b/translations/ja/v1/ch-demos/piday-code.ipynb index e522a1490..b75a83232 100644 --- a/translations/ja/v1/ch-demos/piday-code.ipynb +++ b/translations/ja/v1/ch-demos/piday-code.ipynb @@ -8,21 +8,21 @@ ] }, "source": [ - "# [้‡ๅญไฝ็›ธๆŽจๅฎš](../ch-algorithms/quantum-phase-estimation.html)ใ‚’ไฝฟใฃใŸๅ††ๅ‘จ็Ž‡($\\pi$)ใฎๆŽจๅฎš" + "# ้‡ๅญไฝ็›ธๆŽจๅฎšใ‚’ไฝฟใฃใŸๅ††ๅ‘จ็Ž‡($\\pi$)ใฎๆŽจๅฎš" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ - "### 1.[้‡ๅญไฝ็›ธๆŽจๅฎšใ‚ขใƒซใ‚ดใƒชใ‚บใƒ ](../ch-algorithms/quantum-phase-estimation.html)ใฎๆฆ‚่ฆ\n", + "## 1.[้‡ๅญไฝ็›ธๆŽจๅฎšใ‚ขใƒซใ‚ดใƒชใ‚บใƒ ](../ch-algorithms/quantum-phase-estimation.html)ใฎๆฆ‚่ฆ\n", "\n", "้‡ๅญๆŽจๅฎšใ‚ขใƒซใ‚ดใƒชใ‚บใƒ ๏ผˆQPE๏ผ‰ใฏๅคšใใฎ้žๅธธใซ่ค‡้›‘ใช้‡ๅญใ‚ขใƒซใ‚ดใƒชใ‚บใƒ ใฎไธ€่ง’ใ‚’ๆ‹…ใ†้‡ๅญใ‚ขใƒซใ‚ดใƒชใ‚บใƒ ใฎ๏ผ‘ใคใงใ™ใ€‚ใใฎไธญๅฟƒใซใ‚ใ‚‹ใฎใฏใ€QPEใฏใ‹ใชใ‚Š็ฐกๅ˜ใชๅ•้กŒใ‚’่งฃใใพใ™ใ€‚$U\\vert\\psi\\rangle = \\exp\\left(2 \\pi i \\theta\\right)\\vert\\psi\\rangle$๏ผ‰ใจใชใฃใฆใ„ใ‚‹ๆผ”็ฎ—ๅญ$U$ใฎ้‡ๅญ็Šถๆ…‹$\\vert\\psi\\rangle$ใŒไธŽใˆใ‚‰ใ‚Œใฆใ„ใ‚‹ใจใใ€$\\theta$ใฎๆŽจๅฎšๅ€คใ‚’ๅพ—ใ‚‹ใ“ใจใŒใงใใพใ™ใ‹๏ผŸ\n", "\n", "ใ“ใฎ็ญ”ใˆใฏโ€yes\"ใงใ™ใ€‚QPEใ‚ขใƒซใ‚ดใƒชใ‚บใƒ ใ‹ใ‚‰$2^n\\theta$ใ‚’ๅพ—ใ‚‰ใ‚Œใพใ™ใ€‚ใ“ใ“ใง$n$ใจใฏ$\\theta$ใ‚’ๆŽจๅฎšใ™ใ‚‹ใŸใ‚ใซไฝฟใฃใฆใ„ใ‚‹้‡ๅญใƒ“ใƒƒใƒˆๆ•ฐใงใ™ใ€‚\n", "\n", "\n", - "### 2.ๅ††ๅ‘จ็Ž‡$\\pi$ใฎๆŽจๅฎš\n", + "## 2.ๅ††ๅ‘จ็Ž‡$\\pi$ใฎๆŽจๅฎš\n", "\n", "ใ“ใฎใƒ‡ใƒขใงใฏใ€ๆผ”็ฎ—ๅญใจ็Šถๆ…‹ใ‚’ๆฌกใฎใ‚ˆใ†ใซ้ธใณใพใ™ใ€‚\n", "\n", diff --git a/translations/ja/v1/ch-ex/hello-qiskit.ipynb b/translations/ja/v1/ch-ex/hello-qiskit.ipynb index 9ca4fd802..7e80997d2 100755 --- a/translations/ja/v1/ch-ex/hello-qiskit.ipynb +++ b/translations/ja/v1/ch-ex/hello-qiskit.ipynb @@ -8,7 +8,7 @@ ] }, "source": [ - "# ใ“ใ‚“ใซใกใฏQiskitใ‚ฒใƒผใƒ " + "## ใ“ใ‚“ใซใกใฏQiskitใ‚ฒใƒผใƒ " ] }, { @@ -17,7 +17,7 @@ "source": [ "้‡ๅญใƒ“ใƒƒใƒˆใจ้‡ๅญใ‚ฒใƒผใƒˆใ‚’ไฝฟใ„ๅง‹ใ‚ใ‚‹ใŸใ‚ใฎ็ฐกๅ˜ใชใƒ‘ใ‚บใƒซใ€‚\n", "\n", - "# ใƒฌใƒ™ใƒซ 1: ใƒ“ใƒƒใƒˆใ‹ใ‚‰ๅง‹ใ‚ใ‚‹\n", + "## ใƒฌใƒ™ใƒซ 1: ใƒ“ใƒƒใƒˆใ‹ใ‚‰ๅง‹ใ‚ใ‚‹\n", "\n", "ใ“ใฎใƒ†ใ‚ญใ‚นใƒˆใƒ–ใƒƒใ‚ฏใฎไป–ใฎ็ซ ใจๅŒๆง˜ใซใ€ใ“ใฎใƒ‰ใ‚ญใƒฅใƒกใƒณใƒˆใฏJupyter notebookใงใ™ใ€‚ใŸใ ใ—ใ€ไป–ใฎๅคšใใฎ็ซ ใจใฏ็•ฐใชใ‚Šใ€ๅฎŸ้š›ใซๅฎŸ่กŒใ—ใฆๆฉŸ่ƒฝใ•ใ›ใ‚‹ๅฟ…่ฆใŒใ‚ใ‚Šใพใ™ใ€‚\n", "\n", @@ -64,9 +64,9 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "## ใƒ‘ใ‚บใƒซ 1\n", + "### ใƒ‘ใ‚บใƒซ 1\n", "\n", - "### ๅฐŽๅ…ฅ\n", + "#### ๅฐŽๅ…ฅ\n", "้‡ๅญใ‚ณใƒณใƒ”ใƒฅใƒผใ‚ฟใƒผใฏ*้‡ๅญใƒ“ใƒƒใƒˆ*ใซๅŸบใฅใ„ใฆใ„ใพใ™๏ผšใƒ“ใƒƒใƒˆใฎ้‡ๅญๅŠ›ๅญฆใฎใƒซใƒผใƒซใซๅพ“ใ„ใพใ™ใ€‚ใ—ใ‹ใ—ใ€ๆญฃ็ขบใซใฏใƒ“ใƒƒใƒˆใจใฏไฝ•ใงใ™ใ‹๏ผŸใใ—ใฆใ€ใใ‚Œใ‚‰ใฏใ‚ณใƒณใƒ”ใƒฅใƒผใ‚ฟใƒผใงใฉใฎใ‚ˆใ†ใซไฝฟ็”จใ•ใ‚Œใฆใ„ใพใ™ใ‹๏ผŸ\n", "\n", "ใƒ“ใƒƒใƒˆใฎ็‰นๅพดใฏใ€2ใคใฎๅฏ่ƒฝใชๅ‡บๅŠ›ๅ€คใŒใ‚ใ‚‹ใ“ใจใงใ™ใ€‚ใ“ใ‚Œใ‚‰ใฏใ€`1`ใจ`0`ใ€ใพใŸใฏใ€Œใ‚ชใƒณใ€ใจใ€Œใ‚ชใƒ•ใ€ใ€ใพใŸใฏใ€Œ็œŸใ€ใจใ€Œๅฝใ€ใจๅ‘ผใถใ“ใจใŒใงใใพใ™ใ€‚็งใŸใกใŒไฝฟ็”จใ™ใ‚‹ๅๅ‰ใฏ้‡่ฆใงใฏใ‚ใ‚Šใพใ›ใ‚“ใ€‚้‡่ฆใช็‚นใฏใ€2ใคใ‚ใ‚‹ใจใ„ใ†ใ“ใจใงใ™ใ€‚\n", @@ -75,7 +75,7 @@ "\n", "ไปฅไธ‹ใง่ฉฆใ—ใฆใฟใฆใใ ใ•ใ„ใ€‚\n", "\n", - "### ็ทด็ฟ’ๅ•้กŒ\n", + "#### ็ทด็ฟ’ๅ•้กŒ\n", "*`NOT`ใ‚ฒใƒผใƒˆใ‚’3ๅ›žไฝฟ็”จใ—ใฆใฟใพใ—ใ‚‡ใ†ใ€‚" ] }, @@ -99,7 +99,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "### ็ต‚็ต\n", + "#### ็ต‚็ต\n", "ใ“ใ“ใงใฏใ€ใ‚ชใƒณ(็™ฝ)ใพใŸใฏใ‚ชใƒ•(้ป’)ใฎๅ††ใ‚’ไฝฟ็”จใ—ใฆใƒ“ใƒƒใƒˆใ‚’่ฆ–่ฆšๅŒ–ใ—ใพใ—ใŸใ€‚`NOT`ใ‚ฒใƒผใƒˆใฎๅŠนๆžœใฏใ€ใƒ“ใƒƒใƒˆใฎ2ใคใฎ็Šถๆ…‹ใ‚’ๅˆ‡ใ‚Šๆ›ฟใˆใฆใ€ใ‚ชใƒณใจใ‚ชใƒ•ใ‚’ๅˆ‡ใ‚Šๆ›ฟใˆใ‚‹ใ“ใจใงใ—ใŸใ€‚" ] }, @@ -107,12 +107,12 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "## ใƒ‘ใ‚บใƒซ 2\n", + "### ใƒ‘ใ‚บใƒซ 2\n", "\n", - "### ๅฐŽๅ…ฅ\n", + "#### ๅฐŽๅ…ฅ\n", "1ใคใ ใ‘ใงใฏใชใ2ใคใฎใƒ“ใƒƒใƒˆใง้Šใถๆ–นใŒ้ข็™ฝใ„ใงใ™ใ€‚ใ“ใ“ใซ้ŠใถใŸใ‚ใฎๅˆฅใฎใ‚‚ใฎใŒใ‚ใ‚Šใพใ™ใ€‚ไปฅๅ‰ใจๅŒใ˜ใ‚ˆใ†ใซ่ฆ‹ใˆใพใ™ใ€‚ใ—ใ‹ใ—ใ€ใใ‚Œใฏๅˆฅใฎใƒ“ใƒƒใƒˆใชใฎใงใ€ๅˆฅใฎๅ ดๆ‰€ใซใ‚ใ‚Šใพใ™ใ€‚\n", "\n", - "### ็ทด็ฟ’ๅ•้กŒ\n", + "#### ็ทด็ฟ’ๅ•้กŒ\n", "* ใ‚‚ใ†ไธ€ๆ–นใฎใƒ“ใƒƒใƒˆใ‚’ใ‚ชใƒณใซใ—ใพใ™ใ€‚" ] }, @@ -134,7 +134,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "### ็ต‚็ต\n", + "#### ็ต‚็ต\n", "ใ“ใ‚Œใงใ€ใ‚ณใƒณใƒ”ใƒฅใƒผใƒ†ใ‚ฃใƒณใ‚ฐใฎๆœ€ใ‚‚ๅŸบๆœฌ็š„ใชๆง‹ๆˆ่ฆ็ด ใงใ‚ใ‚‹`NOT`ใ‚ฒใƒผใƒˆใ‚’ใƒžใ‚นใ‚ฟใƒผใ—ใพใ—ใŸใ€‚" ] }, @@ -142,9 +142,9 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "## ใƒ‘ใ‚บใƒซ 3\n", + "### ใƒ‘ใ‚บใƒซ 3\n", "\n", - "### ๅฐŽๅ…ฅ\n", + "#### ๅฐŽๅ…ฅ\n", "ใ€Œใ‚ฒใƒผใƒˆใ€ใจใ„ใ†่จ€่‘‰ใ‚’ไฝฟ็”จใ—ใฆใ€้‡ๅญใƒ“ใƒƒใƒˆใ‚’ๆ“ไฝœใ™ใ‚‹ใŸใ‚ใซไฝฟ็”จใงใใ‚‹็ฐกๅ˜ใชใƒ„ใƒผใƒซใ‚’่ชฌๆ˜Žใ—ใพใ™ใ€‚`NOT`ใ‚ฒใƒผใƒˆใฏๆœ€ใ‚‚ๅ˜็ด”ใชไพ‹ใงใ™ใ€‚ใ—ใ‹ใ—ใ€ใƒ“ใƒƒใƒˆใ‚’ไฝฟใฃใฆ้ข็™ฝใ„ใ“ใจใ‚’ใ™ใ‚‹ใŸใ‚ใซใฏใ€ๅ˜ใซใ‚ชใƒณใจใ‚ชใƒ•ใ‚’ๅˆ‡ใ‚Šๆ›ฟใˆใ‚‹ไปฅไธŠใฎใ“ใจใ‚’ใ™ใ‚‹ๅฟ…่ฆใŒใ‚ใ‚Šใพใ™ใ€‚\n", "\n", "ใ‚‚ใ†ๅฐ‘ใ—ๆด—็ทดใ•ใ‚ŒใŸใ‚ฒใƒผใƒˆใฏ`CNOT`ใจๅ‘ผใฐใ‚Œใ€ใ€Œcontroled-NOTใ€ใฎ็•ฅใงใ™ใ€‚ใ“ใ‚Œใฏใƒ“ใƒƒใƒˆใฎใƒšใ‚ขใงไฝฟ็”จใ•ใ‚Œใพใ™ใ€‚\n", @@ -153,7 +153,7 @@ "\n", "ใ“ใ‚Œใ‚’็†่งฃใ™ใ‚‹ๆœ€่‰ฏใฎๆ–นๆณ•ใฏใ€่ฉฆใ—ใฆใฟใ‚‹ใ“ใจใงใ™ใ€‚\n", "\n", - "### ็ทด็ฟ’ๅ•้กŒ\n", + "#### ็ทด็ฟ’ๅ•้กŒ\n", "\n", "*CNOTใ‚’ไฝฟ็”จใ—ใฆใ€ๅณๅดใฎใƒ“ใƒƒใƒˆใ‚’ใ‚ชใƒณใซใ—ใพใ™ใ€‚\n", "\n", @@ -178,12 +178,12 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "## ใƒ‘ใ‚บใƒซ 4\n", + "### ใƒ‘ใ‚บใƒซ 4\n", "\n", - "### ๅฐŽๅ…ฅใƒปๅฐŽๅ…ฅ\n", + "#### ๅฐŽๅ…ฅใƒปๅฐŽๅ…ฅ\n", "็งใŸใกใŒๅฎŸ่กŒใ™ใ‚‹ใƒ—ใƒญใ‚ฐใƒฉใƒ ใฏใ™ในใฆใ€ๅคšใใฎ้‡ๅญใƒ“ใƒƒใƒˆไธŠใฎๅคšใใฎใ‚ฒใƒผใƒˆใงๆง‹ๆˆใ•ใ‚Œใฆใ„ใพใ™ใ€‚ใ“ใ‚Œใซๅ‘ใ‘ใŸใ‚นใƒ†ใƒƒใƒ—ใจใ—ใฆใ€`CNOT`ใ‚’ใ„ใใคใ‹ไฝฟ็”จใ™ใ‚‹ๅฟ…่ฆใŒใ‚ใ‚‹ใ‚‚ใฎใ‚’่ฉฆใ—ใฆใฟใพใ—ใ‚‡ใ†ใ€‚\n", "\n", - "### ็ทด็ฟ’ๅ•้กŒ\n", + "#### ็ทด็ฟ’ๅ•้กŒ\n", "\n", "* ่ค‡ๆ•ฐใฎCNOTใ‚’ไฝฟ็”จใ—ใฆใ€ๅทฆใƒ“ใƒƒใƒˆใ‚’ใ‚ชใƒ•ใซใ—ใ€ๅณใƒ“ใƒƒใƒˆใ‚’ใ‚ชใƒณใซใ—ใพใ™ใ€‚" ] @@ -206,7 +206,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "### ็ต‚็ต\n", + "#### ็ต‚็ต\n", "็ด ๆ™ดใ‚‰ใ—ใ„๏ผ\n", "\n", "ใ“ใ‚Œใ‚‰ใฎ็จฎ้กžใฎๆ“ไฝœใฏใ€ใ‚ใ‚‰ใ‚†ใ‚‹ใ‚ณใƒณใƒ”ใƒฅใƒผใƒ†ใ‚ฃใƒณใ‚ฐใŒใ‚ณใƒณใƒ‘ใ‚คใƒซใ™ใ‚‹ใ‚‚ใฎใงใ™ใ€‚ใ‚ˆใ‚Šๅคšใใฎใƒ“ใƒƒใƒˆใจๅˆถๅพกๅˆถๅพก`NOT`ใ‚ฒใƒผใƒˆใŒใ‚ใ‚Œใฐใ€ใƒ†ใƒˆใƒชใ‚นใ‹ใ‚‰่‡ชๅ‹•้‹่ปข่ปŠใพใงใ™ในใฆใ‚’ๆง‹็ฏ‰ใงใใพใ™ใ€‚" @@ -216,16 +216,16 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "## ใƒ‘ใ‚บใƒซ 5\n", + "### ใƒ‘ใ‚บใƒซ 5\n", "\n", - "### ๅฐŽๅ…ฅ\n", + "#### ๅฐŽๅ…ฅ\n", "ใŠๆฐ—ใฅใใ‹ใ‚‚ใ—ใ‚Œใพใ›ใ‚“ใŒใ€ใƒ‘ใ‚บใƒซใƒœใƒผใƒ‰ใซใฏใŸใใ•ใ‚“ใฎ็ฉบใใ‚นใƒšใƒผใ‚นใŒใ‚ใ‚Šใพใ™ใ€‚ใ“ใ‚Œใฏใ€ใƒ“ใƒƒใƒˆใซ้–ขใ™ใ‚‹ใ‚ˆใ‚Šๅคšใใฎๆƒ…ๅ ฑใ‚’่ฆ–่ฆšๅŒ–ใ™ใ‚‹ใŸใ‚ใซไฝฟ็”จใงใใ‚‹ใŸใ‚ใงใ™ใ€‚ใŸใจใˆใฐใ€ใƒ“ใƒƒใƒˆๅ€คใŒใƒฉใƒณใƒ€ใƒ ใชใƒ—ใƒญใ‚ปใ‚นใซใ‚ˆใฃใฆ็”Ÿๆˆใ•ใ‚ŒใŸๅ ดๅˆใฏใฉใ†ใชใ‚‹ใงใ—ใ‚‡ใ†ใ‹๏ผŸ\n", "\n", "0ใพใŸใฏ1ใฎใƒ“ใƒƒใƒˆๅ€คใ‚’่กจใ™ใŸใ‚ใซ้ป’ใจ็™ฝใฎๅ††ใ‚’ไฝฟ็”จใ—ใพใ—ใŸใ€‚ใ—ใŸใŒใฃใฆใ€็ญ‰็ขบ็Ž‡ใง0ใพใŸใฏ1ใŒๅพ—ใ‚‰ใ‚Œใ‚‹ใƒฉใƒณใƒ€ใƒ ใƒ“ใƒƒใƒˆใฎๅ ดๅˆใ€็ฐ่‰ฒใฎๅ††ใ‚’ไฝฟ็”จใ—ใพใ™ใ€‚\n", "\n", "ใ“ใ‚Œใงใ€ใ‚ฒใƒผใƒˆใŒใ“ใฎใƒฉใƒณใƒ€ใƒ ๆ€งใ‚’ใฉใฎใ‚ˆใ†ใซๆ“ไฝœใ™ใ‚‹ใ‹ใ‚’่ฆ‹ใ‚‹ใ“ใจใŒใงใใพใ™ใ€‚\n", "\n", - "### ็ทด็ฟ’ๅ•้กŒ\n", + "#### ็ทด็ฟ’ๅ•้กŒ\n", "* CNOTใ‚’ไฝฟ็”จใ—ใฆใ€ๅณๅดใฎใƒ“ใƒƒใƒˆใ‚’ใƒฉใƒณใƒ€ใƒ ใซใ—ใพใ™ใ€‚" ] }, @@ -247,7 +247,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "### ็ต‚็ต\n", + "#### ็ต‚็ต\n", "\n", "\n", "็ด ๆ™ดใ‚‰ใ—ใ„ใงใ—ใ‚‡ใ†๏ผ\n", @@ -264,16 +264,16 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "## ใƒ‘ใ‚บใƒซ 6\n", + "### ใƒ‘ใ‚บใƒซ 6\n", "\n", - "### ๅฐŽๅ…ฅ\n", + "#### ๅฐŽๅ…ฅ\n", "ไธ‹ใฎใƒ‘ใ‚บใƒซใงใฏใ€ๆ–ฐใ—ใ„ๅ††ใŒ่กจ็คบใ•ใ‚Œใพใ™ใ€‚\n", "\n", "ใ“ใ‚Œใพใงใซ่ฆ‹ใŸๅ††ใจใฏ็•ฐใชใ‚Šใ€ๆ–ฐใ—ใ„ใƒ“ใƒƒใƒˆใ‚’่กจใ™ใ‚‚ใฎใงใฏใ‚ใ‚Šใพใ›ใ‚“ใ€‚ไปฃใ‚ใ‚Šใซใ€2ใƒ“ใƒƒใƒˆใŒไธ€่‡ดใ™ใ‚‹ใ‹ใฉใ†ใ‹ใ‚’็คบใ—ใพใ™ใ€‚\n", "\n", "ใใ‚Œใ‚‰ใŒไธ€่‡ดใ™ใ‚‹ใ“ใจใŒ็ขบๅฎŸใงใ‚ใ‚‹ใจใใ€ใใ‚Œใฏใ‚ชใƒ•ใซใชใ‚Šใพใ™ใ€‚ใใ‚Œใ‚‰ใŒไธ€่‡ดใ—ใชใ„ใ“ใจใŒ็ขบๅฎŸใชๅ ดๅˆใ€ใใ‚Œใฏใ‚ชใƒณใซใชใ‚Šใพใ™ใ€‚ใใ‚Œใ‚‰ใฎไธ€่‡ดใจไธไธ€่‡ดใŒใƒฉใƒณใƒ€ใƒ ใงใ‚ใ‚‹ๅ ดๅˆใ€ใใ‚Œใฏ็ฐ่‰ฒใซใชใ‚Šใพใ™ใ€‚\n", "\n", - "### ็ทด็ฟ’ๅ•้กŒ\n", + "#### ็ทด็ฟ’ๅ•้กŒ\n", "\n", "* 2ใคใฎใƒ“ใƒƒใƒˆใ‚’ๅธธใซไธ€่‡ดใ•ใ›ใชใ„ใ‚ˆใ†ใซใ—ใพใ™(ใคใพใ‚Šใ€็œŸใ‚“ไธญใฎๅ††ใ‚’็™ฝใซใ—ใพใ™)ใ€‚" ] @@ -298,12 +298,12 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "## ใƒ‘ใ‚บใƒซ 7\n", + "### ใƒ‘ใ‚บใƒซ 7\n", "\n", - "### ๅฐŽๅ…ฅ\n", + "#### ๅฐŽๅ…ฅ\n", "ใ“ใ‚Œใงใ€ใƒ“ใƒƒใƒˆใซใคใ„ใฆ็Ÿฅใ‚‹ๅฟ…่ฆใŒใ‚ใ‚‹ใ™ในใฆใŒใปใผๅฟ…่ฆใงใ‚ใ‚‹ใ“ใจใŒใ‚ใ‹ใ‚Šใพใ—ใŸใ€‚ๅ…ˆใซ้€ฒใ‚€ๅ‰ใซใ€ใ‚‚ใ†1ใคๆผ”็ฟ’ใ‚’่กŒใ„ใพใ—ใ‚‡ใ†ใ€‚\n", "\n", - "### ็ทด็ฟ’ๅ•้กŒ\n", + "#### ็ทด็ฟ’ๅ•้กŒ\n", "* ๅณๅดใฎใƒ“ใƒƒใƒˆใ‚’ใ‚ชใƒณใซใ—ใพใ™ใ€‚" ] }, @@ -325,7 +325,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "### ็ต‚็ต\n", + "#### ็ต‚็ต\n", "ๆฌกใซใ€ใƒ“ใƒƒใƒˆใŒ้‡ๅญใซใชใฃใŸใจใใซไฝ•ใŒ่ตทใ“ใ‚‹ใ‹ใ‚’่ฆ‹ใฆใฟใพใ—ใ‚‡ใ†ใ€‚้‡ๅญใƒ“ใƒƒใƒˆใฎๆ™‚้–“ใงใ™๏ผ" ] }, @@ -333,19 +333,19 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "# ใƒฌใƒ™ใƒซ 2: ๅŸบๆœฌ็š„ใชๅ˜ไธ€้‡ๅญใƒ“ใƒƒใƒˆใ‚ฒใƒผใƒˆ" + "## ใƒฌใƒ™ใƒซ 2: ๅŸบๆœฌ็š„ใชๅ˜ไธ€้‡ๅญใƒ“ใƒƒใƒˆใ‚ฒใƒผใƒˆ" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ - "## ใƒ‘ใ‚บใƒซ 1\n", + "### ใƒ‘ใ‚บใƒซ 1\n", "\n", - "### ๅฐŽๅ…ฅ\n", + "#### ๅฐŽๅ…ฅ\n", "้‡ๅญๅŠ›ๅญฆใฎ่ฌ›็พฉใ‹ใ‚‰ๅง‹ใ‚ใ‚‹ไปฃใ‚ใ‚Šใซใ€ใ“ใ“ใง้ŠใถใŸใ‚ใฎ้‡ๅญใƒ“ใƒƒใƒˆใŒใ‚ใ‚Šใพใ™ใ€‚`X`ใจๅ‘ผใฐใ‚Œใ‚‹ๆœ€ใ‚‚ๅ˜็ด”ใช้‡ๅญใƒ“ใƒƒใƒˆใ‚ฒใƒผใƒˆใ‚’่ฉฆใ—ใฆใฟใฆใใ ใ•ใ„ใ€‚\n", "\n", - "### ็ทด็ฟ’ๅ•้กŒ\n", + "#### ็ทด็ฟ’ๅ•้กŒ\n", "* `X`ใ‚ฒใƒผใƒˆใ‚’3ๅ›žไฝฟ็”จใ—ใฆใ€ไฝ•ใŒ่ตทใ“ใ‚‹ใ‹ใ‚’็ขบ่ชใ—ใพใ™ใ€‚" ] }, @@ -369,7 +369,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "### ็ต‚็ต\n", + "#### ็ต‚็ต\n", "ใ“ใฎใƒ‘ใ‚บใƒซใฏใจใฆใ‚‚ใชใ˜ใฟใฎใ‚ใ‚‹ใ‚‚ใฎใซๆ€ใˆใŸใฏใšใงใ™ใ€‚ไฝ•ใ‚‚ๅค‰ๅŒ–ใ—ใชใ‹ใฃใŸๅ††ใŒใ‚ใฃใŸใ“ใจไปฅๅค–ใฏใ€ใƒ“ใƒƒใƒˆใฎๆœ€ๅˆใฎใ‚‚ใฎใจใพใฃใŸใๅŒใ˜ใงใ—ใŸใ€‚\n", "`X`ใ‚ฒใƒผใƒˆใฏ`NOT`ใ‚ฒใƒผใƒˆใจใพใฃใŸใๅŒใ˜ๅŠนๆžœใŒใ‚ใ‚Šใพใ—ใŸใ€‚" ] @@ -378,9 +378,9 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "## ใƒ‘ใ‚บใƒซ 2\n", + "### ใƒ‘ใ‚บใƒซ 2\n", "\n", - "### ๅฐŽๅ…ฅ\n", + "#### ๅฐŽๅ…ฅ\n", "ใ•ใใปใฉใฎใƒ‘ใ‚บใƒซใซใฏ2ใคใฎๅ††ใŒใ‚ใ‚Šใพใ—ใŸใ€‚ใ“ใ‚Œใ‚‰ใฏ็•ฐใชใ‚‹ใƒ“ใƒƒใƒˆใงใฏใชใใ€ไธกๆ–นใจใ‚‚ๅŒใ˜้‡ๅญใƒ“ใƒƒใƒˆใ‚’่กจใ—ใฆใ„ใพใ™ใ€‚\n", "\n", "้‡ๅญใƒ“ใƒƒใƒˆใฏใƒ“ใƒƒใƒˆใฎ้‡ๅญใƒใƒผใ‚ธใƒงใƒณใงใ™ใ€‚ใใ‚Œใ‚‰ใฏใƒ“ใƒƒใƒˆใจๅŒใ˜ใƒ—ใƒญใƒ‘ใƒ†ใ‚ฃใฎใ„ใใคใ‹ใ‚’ๆŒใฃใฆใ„ใพใ™ใŒใ€ใ„ใใคใ‹ใฎ่ฟฝๅŠ ๆฉŸ่ƒฝใ‚‚ๆŒใฃใฆใ„ใพใ™ใ€‚\n", @@ -391,7 +391,7 @@ "\n", "ๅ††ใฎ่‰ฒใฏไปฅๅ‰ใจใพใฃใŸใๅŒใ˜ใ‚ˆใ†ใซไฝฟ็”จใ•ใ‚Œใพใ™ใ€‚ๅ††ใŒ้ป’ใฎๅ ดๅˆใ€ๅฏพๅฟœใ™ใ‚‹ๅ‡บๅŠ›ใฏๅ€ค`0`ใซใชใ‚Šใพใ™ใ€‚็™ฝใ„ๅ††ใฏ`1`ใ‚’ๅ–ๅพ—ใ™ใ‚‹ใ“ใจใ‚’ๆ„ๅ‘ณใ—ใพใ™ใ€‚\n", "\n", - "### ็ทด็ฟ’ๅ•้กŒ\n", + "#### ็ทด็ฟ’ๅ•้กŒ\n", "* Zๅ‡บๅŠ›ใ‚’ใ‚ชใƒ•ใซใ—ใพใ™ใ€‚" ] }, @@ -413,7 +413,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "### ็ต‚็ต\n", + "#### ็ต‚็ต\n", "้‡ๅญใƒ“ใƒƒใƒˆใ‹ใ‚‰ใƒ“ใƒƒใƒˆใ‚’ๆŠฝๅ‡บใ™ใ‚‹ใƒ—ใƒญใ‚ปใ‚นใฏใ€ใ€Œๆธฌๅฎšใ€ใจๅ‘ผใฐใ‚Œใพใ™ใ€‚\n", "\n", "Xๅ‡บๅŠ›ใจZๅ‡บๅŠ›ใฎไธกๆ–นใ‚’ๅ€‹ๅˆฅใซๆŠฝๅ‡บใ™ใ‚‹ใ“ใจใฏใงใใพใ›ใ‚“ใ€‚1ใคใ ใ‘้ธๆŠžใ™ใ‚‹ๅฟ…่ฆใŒใ‚ใ‚Šใพใ™ใ€‚" @@ -423,12 +423,12 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "## ใƒ‘ใ‚บใƒซ 3\n", + "### ใƒ‘ใ‚บใƒซ 3\n", "\n", - "### ๅฐŽๅ…ฅ\n", + "#### ๅฐŽๅ…ฅ\n", "ใ“ใฎใƒ‘ใ‚บใƒซใงใฏใ€ๅˆฅใฎ้‡ๅญใƒ“ใƒƒใƒˆใŒ่กจ็คบใ•ใ‚Œใพใ™ใ€‚ใ“ใ‚Œใ‚‚ใพใŸใ€2ใคใฎๅ††ใง่กจใ•ใ‚Œใ‚‹ๅ†…้ƒจๅ‹•ไฝœใ‚’ๆŒใกใพใ™ใ€‚ใ“ใฎ้‡ๅญใƒ“ใƒƒใƒˆใฎๅ ดๅˆใ€ใ“ใ‚Œใ‚‰ใฎๅ††ใฏใƒ‘ใ‚บใƒซใƒœใƒผใƒ‰ใฎๅณๅดใซใ‚ใ‚Šใพใ™ใ€‚\n", "\n", - "### ็ทด็ฟ’ๅ•้กŒ\n", + "#### ็ทด็ฟ’ๅ•้กŒ\n", "* ใ‚‚ใ†็‰‡ๆ–นใฎ้‡ๅญใƒ“ใƒƒใƒˆใฎZๅ‡บๅŠ›ใ‚’ใ‚ชใƒ•ใซใ—ใพใ™ใ€‚" ] }, @@ -450,7 +450,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "### ็ต‚็ต\n", + "#### ็ต‚็ต\n", "ใ“ใ‚Œใ‹ใ‚‰ใ€ใƒ—ใƒญใ‚ฐใƒฉใƒ ใงไฝฟ็”จใ•ใ‚Œใ‚‹ๅๅ‰ใง้‡ๅญใƒ“ใƒƒใƒˆใฎๅ‘ผใณๅ‡บใ—ใ‚’้–‹ๅง‹ใ—ใพใ™ใ€‚ๅทฆๅดใฎ้‡ๅญใƒ“ใƒƒใƒˆใฏ`q[0]`ใซใชใ‚Šใ€ๅณๅดใฎ้‡ๅญใƒ“ใƒƒใƒˆใฏ`q[1]`ใซใชใ‚Šใพใ™ใ€‚\n", "\n", "ใพใŸใ€Zๅ‡บๅŠ›ใŠใ‚ˆใณXๅ‡บๅŠ›ใจใ„ใ†็”จ่ชžใฏๅบƒใไฝฟ็”จใ•ใ‚Œใฆใ„ใชใ„ใ“ใจใซๆณจๆ„ใ—ใฆใใ ใ•ใ„ใ€‚ใ€ŒZๆธฌๅฎšใฎๅ‡บๅŠ›ใ€ใชใฉใจ่จ€ใ†ใฎใŒใ‚ˆใ‚Šไธ€่ˆฌ็š„ใงใ™ใ€‚ใ—ใ‹ใ—ใ€ใใ‚Œใฏใ“ใ‚Œใ‚‰ใฎใƒ‘ใ‚บใƒซใซใจใฃใฆๅฐ‘ใ—้•ทใ„่กจ็พใงใ™ใ€‚" @@ -460,16 +460,16 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "## ใƒ‘ใ‚บใƒซ 4\n", + "### ใƒ‘ใ‚บใƒซ 4\n", "\n", - "### ๅฐŽๅ…ฅ\n", + "#### ๅฐŽๅ…ฅ\n", "ๆฌกใซใ€ๆ–ฐใ—ใ„ใ‚ฒใƒผใƒˆใงใ‚ใ‚‹Hใ‚ฒใƒผใƒˆใ‚’่ฉฆใ—ใฆใฟใพใ—ใ‚‡ใ†ใ€‚\n", "\n", "ใ“ใ‚Œใฏใ€ๅ˜็ด”ใชใƒ“ใƒƒใƒˆใงใฏไธๅฏ่ƒฝใชใ“ใจใงใ™ใ€‚ใใ‚Œใฏใ€ใใ‚ŒใŒ้ฉ็”จใ•ใ‚Œใ‚‹้‡ๅญใƒ“ใƒƒใƒˆใฎ2ใคใฎๅ††ใ‚’ไบคๆ›ใ™ใ‚‹ๅŠนๆžœใŒใ‚ใ‚Šใพใ™ใ€‚\n", "\n", "ใ“ใ‚Œใ‚’็ด ๆ•ตใชใ‚ขใƒ‹ใƒกใƒผใ‚ทใƒงใƒณๅฝขๅผใง่ฆ‹ใŸใ„ๅ ดๅˆใฏใ€[Hello Quantumใ‚ขใƒ—ใƒช](https://helloquantum.mybluemix.net/)ใ‚’ใƒใ‚งใƒƒใ‚ฏใ—ใฆใใ ใ•ใ„ใ€‚ใ—ใ‹ใ—ใ€ใ“ใ“ใงใฏใ€3ๅ›ž็นฐใ‚Š่ฟ”ใ™ใจใ„ใ†ๅคใ„ใƒˆใƒชใƒƒใ‚ฏใงใ“ใ‚Œใ‚’ใƒ†ใ‚นใƒˆใ—ใฆใใ ใ•ใ„ใ€‚\n", "\n", - "### ็ทด็ฟ’ๅ•้กŒ\n", + "#### ็ทด็ฟ’ๅ•้กŒ\n", "* `H`ใ‚ฒใƒผใƒˆใ‚’3ๅ›žไฝฟ็”จใ—ใพใ™ใ€‚" ] }, @@ -491,7 +491,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "### ็ต‚็ต\n", + "#### ็ต‚็ต\n", "ใ“ใ“ใ‹ใ‚‰ๅ…ˆใฏใ€ไธ‹ใฎใ‚ณใƒผใƒ‰ใ‚’ใƒ‘ใ‚บใƒซใฎไธ‹ใซ็ฝฎใใ€้‡ๅญใƒ—ใƒญใ‚ฐใƒฉใƒ ใ‚’่กจ็คบใ—ใพใ™ใ€‚\n", "\n", "ใ“ใ‚Œใ‚‰ใฏใ€ๅฎŸ้š›ใฎ้‡ๅญใ‚ณใƒณใƒ”ใƒฅใƒผใ‚ฟใƒผใงๅฎŸ่กŒใงใใ‚‹ๅฎŸ้š›ใฎQiskitใƒ—ใƒญใ‚ฐใƒฉใƒ ใงใ™ใ€‚ใใ‚Œใ‚‰ใฏใ€ใ„ใ‚ใ‚†ใ‚‹ๅ›ž่ทฏๅ›ณใง่กจใ™ใ“ใจใ‚‚ใงใใพใ™ใ€‚้‡ๅญใƒ—ใƒญใ‚ฐใƒฉใƒ ใฎๅ›ž่ทฏๅ›ณใ‚’่กจ็คบใ™ใ‚‹ใซใฏใ€ไปฅไธ‹ใฎใ‚ณใƒผใƒ‰ใ‚ปใƒซใ‚’ๅฎŸ่กŒใ—ใพใ™ใ€‚" @@ -510,12 +510,12 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "## ใƒ‘ใ‚บใƒซ 5\n", + "### ใƒ‘ใ‚บใƒซ 5\n", "\n", - "### ๅฐŽๅ…ฅ\n", + "#### ๅฐŽๅ…ฅ\n", "Zๅ‡บๅŠ›ใŒไธ€ๅฎšใฎๅ ดๅˆ(ๅฎŒๅ…จใซใ‚ชใƒ•ใพใŸใฏใ‚ชใƒณใฎๅ ดๅˆ)ใ€`X`ใ‚ฒใƒผใƒˆใฏๅ˜ใซๅ€คใ‚’ๅ่ปขใ—ใพใ™ใ€‚ใ—ใ‹ใ—ใ€ใ•ใใปใฉใฎใƒ‘ใ‚บใƒซใง่ฆ‹ใŸใ‚ˆใ†ใซใ€Zๅ‡บๅŠ›ใŒใƒฉใƒณใƒ€ใƒ ใงใ‚ใ‚‹ๅ ดๅˆใฏใฉใ†ใชใ‚Šใพใ™ใ‹๏ผŸใ“ใฎ็ทด็ฟ’ๅ•้กŒใงใ€ใใฎ็ญ”ใˆใŒใ‚ใ‹ใ‚Šใพใ™ใ€‚\n", "\n", - "### ็ทด็ฟ’ๅ•้กŒ\n", + "#### ็ทด็ฟ’ๅ•้กŒ\n", "* Zๅ‡บๅŠ›ใ‚’ๅฎŒๅ…จใซใ‚ชใƒ•ใซใ—ใพใ™ใ€‚ `h`ใ‚ฒใƒผใƒˆใฏใ„ใใคใงใ‚‚ไฝฟ็”จใงใใพใ™ใŒใ€`x`ใฏๆญฃ็ขบใซ3ๅ›žไฝฟ็”จใ—ใพใ™ใ€‚" ] }, @@ -546,7 +546,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "### ็ต‚็ต\n", + "#### ็ต‚็ต\n", "ใŸใจใˆใใ‚Œใ‚’ใฒใฃใใ‚Š่ฟ”ใ—ใŸใจใ—ใฆใ‚‚ใ€ใƒฉใƒณใƒ€ใƒ ใช็ตๆžœใฏใŸใ ใฎใƒฉใƒณใƒ€ใƒ ใช็ตๆžœใงใ‚ใ‚‹ใ“ใจใŒใ‚ใ‹ใ‚Šใพใ™ใ€‚" ] }, @@ -554,12 +554,12 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "## ใƒ‘ใ‚บใƒซ 6\n", + "### ใƒ‘ใ‚บใƒซ 6\n", "\n", - "### ๅฐŽๅ…ฅ\n", + "#### ๅฐŽๅ…ฅ\n", "`x`ใ‚ฒใƒผใƒˆใŒZๅ‡บๅŠ›ใ‚’ๅ่ปขใ™ใ‚‹ใ“ใจใ‚’็ขบ่ชใ—ใพใ—ใŸใŒใ€Xๅ‡บๅŠ›ใซใฏๅฝฑ้Ÿฟใ—ใพใ›ใ‚“ใ€‚ใใฎใŸใ‚ใซใฏใ€ๆ–ฐใ—ใ„ใ‚ฒใƒผใƒˆใ€`z`ใ‚ฒใƒผใƒˆใŒๅฟ…่ฆใงใ™ใ€‚\n", "\n", - "### ็ทด็ฟ’ๅ•้กŒ\n", + "#### ็ทด็ฟ’ๅ•้กŒ\n", "* Xๅ‡บๅŠ›ใ‚’ใ‚ชใƒ•ใซใ—ใพใ™ใ€‚" ] }, @@ -590,7 +590,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "### ็ต‚็ต\n", + "#### ็ต‚็ต\n", "`x`ใ‚ฒใƒผใƒˆใฏZๅ‡บๅŠ›ใ‚’ๅ่ปขใ—ใ€`z`ใ‚ฒใƒผใƒˆใฏxๅ‡บๅŠ›ใ‚’ๅ่ปขใ—ใพใ™ใ€‚ไปŠใฎใจใ“ใ‚ใ€ใ“ใ‚Œใฏ็‰ฉไบ‹ใซๅๅ‰ใ‚’ไป˜ใ‘ใ‚‹ๅฅ‡ๅฆ™ใชๆ–นๆณ•ใฎใ‚ˆใ†ใซๆ€ใˆใ‚‹ใ‹ใ‚‚ใ—ใ‚Œใพใ›ใ‚“ใ€‚ใ—ใ‹ใ—ใ€้‡ๅญใ‚ณใƒณใƒ”ใƒฅใƒผใƒ†ใ‚ฃใƒณใ‚ฐใซใคใ„ใฆใ•ใ‚‰ใซๅญฆใถใซใคใ‚Œใฆใ€ใใ‚Œใฏๆ„ๅ‘ณใ‚’ๆŒใคใ‚ˆใ†ใซใชใ‚‹ใงใ—ใ‚‡ใ†ใ€‚" ] }, @@ -598,12 +598,12 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "## ใƒ‘ใ‚บใƒซ 7\n", + "### ใƒ‘ใ‚บใƒซ 7\n", "\n", - "### ๅฐŽๅ…ฅ\n", + "#### ๅฐŽๅ…ฅ\n", "ใ‚ฒใƒผใƒˆใ‚’็ต„ใฟๅˆใ‚ใ›ใ‚‹ใ“ใจใงใ€ๆ–ฐใ—ใ„ๅŠนๆžœใ‚’ๅพ—ใ‚‹ใ“ใจใŒใงใใพใ™ใ€‚็ฐกๅ˜ใชไพ‹ใจใ—ใฆใ€`z`ใจ`h`ใ‚’็ต„ใฟๅˆใ‚ใ›ใ‚‹ใ“ใจใงใ€`x`ใฎไฝœ็”จใ‚’ใ™ใ‚‹ใ“ใจใŒใงใใพใ™ใ€‚\n", "\n", - "### ็ทด็ฟ’ๅ•้กŒ\n", + "#### ็ทด็ฟ’ๅ•้กŒ\n", "* `x`ใ‚ฒใƒผใƒˆใ‚’ไฝฟ็”จใ›ใšใซZๅ‡บๅŠ›ใ‚’ใ‚ชใƒณใซใ—ใพใ™" ] }, @@ -634,14 +634,14 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "## ใƒ‘ใ‚บใƒซ 8\n", + "### ใƒ‘ใ‚บใƒซ 8\n", "\n", - "### ๅฐŽๅ…ฅ\n", + "#### ๅฐŽๅ…ฅ\n", "Zๅ‡บๅŠ›ใŒๅฎŒๅ…จใซใ‚ชใƒณใพใŸใฏใ‚ชใƒ•ใฎๅ ดๅˆใ€Xๅ‡บๅŠ›ใฏๅธธใซใƒฉใƒณใƒ€ใƒ ใงใ‚ใ‚‹ใ“ใจใซๆฐ—ไป˜ใใ‹ใ‚‚ใ—ใ‚Œใพใ›ใ‚“ใ€‚ใ“ใ‚Œใฏใ€้‡ๅญใƒ“ใƒƒใƒˆใŒใใ‚Œใžใ‚Œใฎๅ‡บๅŠ›ใซใคใ„ใฆๅŒๆ™‚ใซ็ขบๅฎŸใซใชใ‚‹ใ“ใจใฏๆฑบใ—ใฆใชใ„ใŸใ‚ใงใ™ใ€‚ใใ‚Œใ‚‰ใŒไธ€ๆ–นใซใคใ„ใฆ็ขบๅฎŸใงใ‚ใ‚‹ๅ ดๅˆใ€ใ‚‚ใ†ไธ€ๆ–นใฏใƒฉใƒณใƒ€ใƒ ใงใชใ‘ใ‚Œใฐใชใ‚Šใพใ›ใ‚“ใ€‚\n", "\n", "ใ‚‚ใ—ไธŠ่จ˜ใงใฏใชใ„ๅ ดๅˆใ€Zๅ‡บๅŠ›ใจXๅ‡บๅŠ›ใ‚’ไฝฟ็”จใ—ใฆ2ใƒ“ใƒƒใƒˆใ‚’ๆ ผ็ดใงใใฆใ—ใพใ„ใพใ™ใ€‚ใคใพใ‚Š้‡ๅญใƒ“ใƒƒใƒˆใŒๆŒใฃใฆใ„ใ‚‹ใ‚ˆใ‚Šๅคšใใฎใƒกใƒขใƒชใƒผใ‚’ๆŒใคใ“ใจใซใชใฃใฆใ—ใพใ„ใพใ™ใ€‚่ค‡ๆ•ฐใฎๆ–นๆณ•ใงๅ‡บๅŠ›ใ‚’ๆŠฝๅ‡บใงใใ‚‹ใจใ„ใ†ไบ‹ๅฎŸใซใ‚‚ใ‹ใ‹ใ‚ใ‚‰ใšใ€ใใ‚Œใงใ‚‚ใ€้‡ๅญใƒ“ใƒƒใƒˆใซใƒ“ใƒƒใƒˆไปฅไธŠใ‚’ๆ ผ็ดใ™ใ‚‹ใ“ใจใฏ่จฑๅฏใ•ใ‚Œใฆใ„ใพใ›ใ‚“ใ€‚\n", "\n", - "### ็ทด็ฟ’ๅ•้กŒ\n", + "#### ็ทด็ฟ’ๅ•้กŒ\n", "* Xๅ‡บๅŠ›ใ‚’ใ‚ชใƒ•ใซใ—ใ€Zๅ‡บๅŠ›ใ‚’ใƒฉใƒณใƒ€ใƒ ใซใ—ใพใ™ใ€‚" ] }, @@ -674,15 +674,15 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "## ใƒ‘ใ‚บใƒซ 9\n", + "### ใƒ‘ใ‚บใƒซ 9\n", "\n", - "## ๅฐŽๅ…ฅ\n", + "### ๅฐŽๅ…ฅ\n", "้‡ๅญใƒ“ใƒƒใƒˆใฎ้™ใ‚‰ใ‚ŒใŸ็ขบๅฎŸๆ€งใฏใ€2ใคใฎๅ‡บๅŠ›้–“ใงๅ…ฑๆœ‰ใ™ใ‚‹ใ“ใจใ‚‚ใงใใพใ™ใ€‚ใŸใจใˆใฐใ€ไธกๆ–นใฎๅ‡บๅŠ›ใ‚’ใ€ใใ‚Œใ‚‰ใŒๆไพ›ใ™ใ‚‹ๅ‡บๅŠ›ใซใคใ„ใฆใปใผ็ขบๅฎŸ(ๅฎŒๅ…จใซ็ขบๅฎŸใงใฏใชใ„)ใซใ™ใ‚‹ใ“ใจใงๅฆฅๅ”ใ™ใ‚‹ใ“ใจใŒใงใใพใ™ใ€‚\n", "\n", "ใ•ใพใ–ใพใชใ‚ฐใƒฌใƒผใฎ่‰ฒๅˆใ„ใ‚’ไฝฟ็”จใ—ใฆใ€ใ“ใ‚Œใ‚’่ฆ–่ฆšๅŒ–ใ—ใพใ™ใ€‚ๅ††ใŒๆš—ใ„ใปใฉใ€ๅ‡บๅŠ›ใฏ`0`ใซใชใ‚‹ๅฏ่ƒฝๆ€งใŒ้ซ˜ใใชใ‚Šใพใ™ใ€‚ๅ††ใŒๆ˜Žใ‚‹ใ„ใปใฉใ€ๅ‡บๅŠ›ใฏ`1`ใซใชใ‚‹ๅฏ่ƒฝๆ€งใŒ้ซ˜ใใชใ‚Šใพใ™ใ€‚\n", "\n", "\n", - "### ็ทด็ฟ’ๅ•้กŒ\n", + "#### ็ทด็ฟ’ๅ•้กŒ\n", "* `q[1]`ใฎ2ใคใฎๅ††ใ‚’ไธกๆ–นใจใ‚‚ๆ˜Žใ‚‹ใ„็ฐ่‰ฒใซใ—ใพใ™ใ€‚ใ“ใ‚Œใฏใ€`1`ใ‚’ๅ‡บๅŠ›ใ™ใ‚‹ๅฏ่ƒฝๆ€งใŒ้ซ˜ใ„ใ“ใจใ‚’ๆ„ๅ‘ณใ—ใพใ™ใŒใ€็ขบๅฎŸใงใฏใ‚ใ‚Šใพใ›ใ‚“ใ€‚" ] }, @@ -713,12 +713,12 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "## ใƒ‘ใ‚บใƒซ 10\n", + "### ใƒ‘ใ‚บใƒซ 10\n", "\n", - "### ๅฐŽๅ…ฅ\n", + "#### ๅฐŽๅ…ฅ\n", "ใ“ใ‚ŒใงๅŸบๆœฌ็š„ใชใƒ„ใƒผใƒซใŒใ‚ใ‹ใฃใŸใฎใงใ€ไธกๆ–นใฎ้‡ๅญใƒ“ใƒƒใƒˆใซๅŒๆ™‚ใซๅ–ใ‚Š็ต„ใ‚€ใ“ใจใŒใงใใพใ™ใ€‚\n", "\n", - "### ็ทด็ฟ’ๅ•้กŒ\n", + "#### ็ทด็ฟ’ๅ•้กŒ\n", "* ไธกๆ–นใฎZๅ‡บๅŠ›ใ‚’ใƒฉใƒณใƒ€ใƒ ใซใ—ใพใ™ใ€‚" ] }, @@ -749,7 +749,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "### ็ต‚็ต\n", + "#### ็ต‚็ต\n", "ใ“ใ“ใงใฎๅ„Zๅ‡บๅŠ›ใฏใ€ใƒฉใƒณใƒ€ใƒ ใซ`0`ใพใŸใฏ`1`ใ‚’ๅ‡บๅŠ›ใ—ใพใ™ใ€‚ใ—ใ‹ใ—ใ€ใใ‚Œใ‚‰ใฎๅ‡บๅŠ›ใฏ็›ธ้–ขใ—ใพใ™ใ‹๏ผŸ ๅ็›ธ้–ข๏ผŸ ๅฎŒๅ…จใซ็„ก้–ขไฟ‚ใงใ™ใ‹๏ผŸ\n", "\n", "ใƒ“ใƒƒใƒˆใง่กŒใฃใŸใ‚ˆใ†ใซใ€ใ„ใใคใ‹ใฎ่ฟฝๅŠ ใฎๅ††ใ‚’ไฝฟ็”จใ—ใฆใ“ใฎๆƒ…ๅ ฑใ‚’่ฟฝ่ทกใ—ใพใ™ใ€‚" @@ -759,12 +759,12 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "## ใƒ‘ใ‚บใƒซ 11\n", + "### ใƒ‘ใ‚บใƒซ 11\n", "\n", - "### ๅฐŽๅ…ฅ\n", + "#### ๅฐŽๅ…ฅ\n", "ใ“ใฎใƒ‘ใ‚บใƒซใงใฏใ€4ใคใฎๆ–ฐใ—ใ„ๅ††ใŒ่กจ็คบใ•ใ‚Œใพใ™ใ€‚ใใฎใ†ใกใฎ1ใคใฏใ€ใƒฌใƒ™ใƒซ1ใงใ™ใงใซ่ฆ‹ใŸใ‚‚ใฎใงใ™ใ€‚ใใ“ใงใฏใ€2ใคใฎใƒ“ใƒƒใƒˆๅ€คใŒ็ขบๅฎŸใซไธ€่‡ดใ™ใ‚‹ใ‹(้ป’)ใ€ไธ€่‡ดใ—ใชใ„ใ‹(็™ฝ)ใ‚’่ฟฝ่ทกใ—ใฆใ„ใพใ—ใŸใ€‚ใ“ใ“ใงใฏใ€ไธกๆ–นใฎ้‡ๅญใƒ“ใƒƒใƒˆใฎZๅ‡บๅŠ›ใซๅฏพใ—ใฆๅŒใ˜ไฝœ็”จใ‚’ใ—ใพใ™ใ€‚\n", "\n", - "### ็ทด็ฟ’ๅ•้กŒ\n", + "#### ็ทด็ฟ’ๅ•้กŒ\n", "* Zๅ‡บๅŠ›ใŒ็ขบๅฎŸใซไธ€่‡ดใ—ใชใ„ใ‚ˆใ†ใซใ—ใพใ™ใ€‚" ] }, @@ -795,12 +795,12 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "## ใƒ‘ใ‚บใƒซ 12\n", + "### ใƒ‘ใ‚บใƒซ 12\n", "\n", - "### ๅฐŽๅ…ฅ\n", + "#### ๅฐŽๅ…ฅ\n", "ไธ€็•ชไธŠใฎๆ–ฐใ—ใ„ๅ††ใซใ‚‚ๅŒๆง˜ใฎไฝœ็”จใŒใ‚ใ‚Šใพใ™ใ€‚ใ“ใฎๅ ดๅˆใ€ไธกๆ–นใฎ้‡ๅญใƒ“ใƒƒใƒˆใฎXๅ‡บๅŠ›ใซใคใ„ใฆไธ€่‡ดใ™ใ‚‹็ขบ็Ž‡ใจไธ€่‡ดใ—ใชใ„็ขบ็Ž‡ใ‚’่ฟฝ่ทกใ—ใพใ™ใ€‚\n", "\n", - "### ็ทด็ฟ’ๅ•้กŒ\n", + "#### ็ทด็ฟ’ๅ•้กŒ\n", "* Xๅ‡บๅŠ›ใŒ็ขบๅฎŸใซไธ€่‡ดใ™ใ‚‹ใ‚ˆใ†ใซใ—ใพใ™ใ€‚" ] }, @@ -831,7 +831,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "### ็ต‚็ต\n", + "#### ็ต‚็ต\n", "ใ“ใฎๆƒ…ๅ ฑใ‚’่กจใ™ใฎใŒใ“ใฎๆ–ฐใ—ใ„ๅ††ใงใ‚ใ‚‹็†็”ฑใŒใ‚ใ‹ใ‚‰ใชใ„ๅ ดๅˆใฏใ€ไธ€ๆ–นใฎ้‡ๅญใƒ“ใƒƒใƒˆใฎXๅ‡บๅŠ›ใ‹ใ‚‰ไผธใณใ‚‹่กŒใจใ€ใ‚‚ใ†ไธ€ๆ–นใฎ้‡ๅญใƒ“ใƒƒใƒˆใฎXๅ‡บๅŠ›ใ‹ใ‚‰ไผธใณใ‚‹ๅˆฅใฎ่กŒใซใคใ„ใฆ่€ƒใˆใฆใฟใฆใใ ใ•ใ„ใ€‚ๆœ€ไธŠ้ƒจใฎๅ††ใฏใ€ใ“ใ‚Œใ‚‰2ใคใฎ่กŒใŒไบคใ‚ใ‚‹ๅ ดๆ‰€ใซใ‚ใ‚Šใพใ™ใ€‚ใ“ใ‚ŒใŒใ€2ใคใฎXๅ‡บๅŠ›้–“ใฎไธ€่‡ดใ‚’่กจใ™็†็”ฑใงใ™ใ€‚" ] }, @@ -839,12 +839,12 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "## ใƒ‘ใ‚บใƒซ 13\n", + "### ใƒ‘ใ‚บใƒซ 13\n", "\n", - "### ๅฐŽๅ…ฅ\n", + "#### ๅฐŽๅ…ฅ\n", "่ชฌๆ˜Žใ™ใ‚‹ๅฟ…่ฆใฎใ‚ใ‚‹ๆ–ฐใ—ใ„ๅ††ใŒใพใ 2ใคใ‚ใ‚Šใพใ™ใ€‚1ใคใฏใ€`q[0]`ใ‹ใ‚‰ใฎZๅ‡บๅŠ›่กŒใŒ`q[1]`ใ‹ใ‚‰ใฎXๅ‡บๅŠ›่กŒใจไบคใ‚ใ‚‹ๅ ดๆ‰€ใงใ™ใ€‚ใ“ใ‚Œใฏใ€`q[0]`ใฎZๅ‡บๅŠ›ใŒ`q[1]`ใ‹ใ‚‰ใฎXๅ‡บๅŠ›ใจไธ€่‡ดใ™ใ‚‹ใ‹ใฉใ†ใ‹ใ‚’็คบใ—ใพใ™ใ€‚ใ‚‚ใ†1ใคใ‚‚ๅŒใ˜ใงใ™ใŒใ€`q[0]`ใŒXๅ‡บๅŠ›ใจ`q[1]`ใŒZๅ‡บๅŠ›ใงใ™ใ€‚\n", "\n", - "### ็ทด็ฟ’ๅ•้กŒ\n", + "#### ็ทด็ฟ’ๅ•้กŒ\n", "* `q[0]`ใฎXๅ‡บๅŠ›ใŒ`q[1]`ใฎZๅ‡บๅŠ›ใจไธ€่‡ดใ—ใชใ„ใ“ใจใ‚’็ขบ่ชใ—ใพใ™ใ€‚" ] }, @@ -875,12 +875,12 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "## ใƒ‘ใ‚บใƒซ 14\n", + "### ใƒ‘ใ‚บใƒซ 14\n", "\n", - "### ๅฐŽๅ…ฅ\n", + "#### ๅฐŽๅ…ฅ\n", "`x`ใ€`z`ใ€`h`ใ‚ฒใƒผใƒˆใŒๆ–ฐใ—ใ„ๅ††ใซใฉใฎใ‚ˆใ†ใซๅฝฑ้Ÿฟใ™ใ‚‹ใ‹ใซๆณจ็›ฎใ—ใฆใใ ใ•ใ„ใ€‚ๅ…ทไฝ“็š„ใซใฏใ€xใ‚ฒใƒผใƒˆใฏใ€ๅ˜ไธ€ใฎZๅ‡บๅŠ›ใ ใ‘ใงใชใใ€ใใ‚Œใ‚‰ใฎ่กŒๅ…จไฝ“ใซๅฝฑ้Ÿฟใ‚’ไธŽใˆใพใ™ใ€‚ใคใพใ‚Šใ€ๅ„ๅ††ใ‚’้ป’ใ‹ใ‚‰็™ฝ(ใพใŸใฏๆš—ใ„่‰ฒใ‹ใ‚‰ๆ˜Žใ‚‹ใ„่‰ฒ)ใซใ€ใพใŸใฏใใฎ้€†ใซๅ่ปขใ—ใพใ™ใ€‚\n", "\n", - "### ็ทด็ฟ’ๅ•้กŒ\n", + "#### ็ทด็ฟ’ๅ•้กŒ\n", "* 2ใคใฎZๅ‡บๅŠ›ใ‚’ใ‚ชใƒณใซใ—ใพใ™ใ€‚" ] }, @@ -911,7 +911,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "### ็ต‚็ต\n", + "#### ็ต‚็ต\n", "ๆฌกใฎใƒ‘ใ‚บใƒซใงๅˆ†ใ‹ใ‚‹ใ‚ˆใ†ใซใ€Zใ‚ฒใƒผใƒˆใฏๅŒใ˜ใ‚ˆใ†ใชๆ–นๆณ•ใงXๅ‡บๅŠ›ใฎๅˆ—ใซๅฝฑ้Ÿฟใ—ใพใ™ใ€‚" ] }, @@ -919,12 +919,12 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "## ใƒ‘ใ‚บใƒซ 15\n", + "### ใƒ‘ใ‚บใƒซ 15\n", "\n", - "### ๅฐŽๅ…ฅ\n", + "#### ๅฐŽๅ…ฅ\n", "ไปฅๅ‰ใ€`h`ใ‚ฒใƒผใƒˆใŒๅ††ใฎใƒšใ‚ขใ‚’ไบคๆ›ใ™ใ‚‹ๆ–นๆณ•ใ‚’่ฆ‹ใฆใใพใ—ใŸใ€‚ใ“ใ‚ŒใจๅŒใ˜ใ‚ˆใ†ใซ่กŒใฎใƒšใ‚ขใซๅฝฑ้Ÿฟใ‚’ไธŽใˆใพใ™ใ€‚่กŒๅ…จไฝ“ใŒๅ่ปขใ•ใ‚Œใ‚‹ใพใงใ€ๅ††ใฎๅ„ใƒšใ‚ขใ‚’ๅ่ปขใ—ใพใ™ใ€‚ๅ†ๅบฆใ€[Hello Quantumใ‚ขใƒ—ใƒช](https://helloquantum.mybluemix.net/)ใง็ด ๆ•ตใชใ‚ขใƒ‹ใƒกใƒผใ‚ทใƒงใƒณใ‚’ใƒใ‚งใƒƒใ‚ฏใ™ใ‚‹ใ“ใจใ‚’ใŠๅ‹งใ‚ใ—ใพใ™ใ€‚\n", "\n", - "### ็ทด็ฟ’ๅ•้กŒ\n", + "#### ็ทด็ฟ’ๅ•้กŒ\n", "* Xๅ‡บๅŠ›ใ‚’ใ‚ชใƒ•ใซใ—ใพใ™ใ€‚" ] }, @@ -955,7 +955,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "### ็ตๆžœ\n", + "#### ็ตๆžœ\n", "ใ“ใ‚Œใงใ€2ใคใฎ้‡ๅญใƒ“ใƒƒใƒˆใŒใฉใฎใ‚ˆใ†ใซ่ฆ‹ใˆใ‚‹ใ‹ใ€ใŠใ‚ˆใณใใ‚Œใ‚‰ใ‚’ๅ€‹ๅˆฅใซๆ“ไฝœใ™ใ‚‹ๆ–นๆณ•ใฎๅŸบๆœฌใ‚’็†่งฃใ—ใพใ—ใŸใ€‚ใ—ใ‹ใ—ใ€2ใคใฎ้‡ๅญใƒ“ใƒƒใƒˆใ‚ฒใƒผใƒˆใ‚’ไฝฟใ„ๅง‹ใ‚ใ‚‹ใจใ€ๆœฌๅฝ“ใฎๆฅฝใ—ใฟใŒๅ‡บใฆใใพใ™ใ€‚" ] }, @@ -963,23 +963,23 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "# ใƒฌใƒ™ใƒซ 3: ๏ผ’้‡ๅญใƒ“ใƒƒใƒˆใฎใ‚ฒใƒผใƒˆ" + "## ใƒฌใƒ™ใƒซ 3: ๏ผ’้‡ๅญใƒ“ใƒƒใƒˆใฎใ‚ฒใƒผใƒˆ" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ - "### ใƒ‘ใ‚บใƒซ 1\n", + "#### ใƒ‘ใ‚บใƒซ 1\n", "\n", - "### ๅฐŽๅ…ฅ\n", + "#### ๅฐŽๅ…ฅ\n", "ใƒ“ใƒƒใƒˆใฎๆผ”็ฟ’ใงใฏใ€`CNOT`ใ‚ฒใƒผใƒˆใ‚’ไฝฟ็”จใ—ใพใ—ใŸใ€‚้‡ๅญใƒ“ใƒƒใƒˆใฎๅ ดๅˆใ€NOTใฎ้‡ๅญใƒใƒผใ‚ธใƒงใƒณใจใ—ใฆxใ‚’ไฝฟ็”จใ—ใฆใ€ๅŒๆง˜ใฎใ‚ฒใƒผใƒˆใŒใ‚ใ‚Šใพใ™ใ€‚ใ“ใฎใŸใ‚ใ€Qiskitใƒ—ใƒญใ‚ฐใƒฉใƒ ใงใฏ`cx`ใจๅ‘ผใณใพใ™ใ€‚\n", "\n", "ๅพ“ๆฅใฎ`CNOT`ใจๅŒๆง˜ใซใ€`cx`ใ‚ฒใƒผใƒˆใซใฏใ€Œใ‚ณใƒณใƒˆใƒญใƒผใƒซใ€ใจใ€Œใ‚ฟใƒผใ‚ฒใƒƒใƒˆใ€ใŒใ‚ใ‚Šใพใ™ใ€‚ใ‚ณใƒณใƒˆใƒญใƒผใƒซใฎZๅ‡บๅŠ›ใ‚’่ชฟในใ€ใใฎ็ตๆžœใงใ€xใŒใ‚ฟใƒผใ‚ฒใƒƒใƒˆ้‡ๅญใƒ“ใƒƒใƒˆใซ้ฉ็”จใ•ใ‚Œใ‚‹ใ‹ใฉใ†ใ‹ใ‚’ๆฑบๅฎšใ—ใพใ™ใ€‚\n", "\n", "ใ“ใฎใ‚ฒใƒผใƒˆใ‚’้ฉ็”จใ™ใ‚‹ใจใ€้ธๆŠžใ—ใŸ้‡ๅญใƒ“ใƒƒใƒˆใŒใ‚ฟใƒผใ‚ฒใƒƒใƒˆใจใ—ใฆๆฉŸ่ƒฝใ—ใพใ™ใ€‚ใใฎๅ ดๅˆใ€ไป–ใฎ้‡ๅญใƒ“ใƒƒใƒˆใŒใ‚ณใƒณใƒˆใƒญใƒผใƒซใซใชใ‚Šใพใ™ใ€‚\n", "\n", - "### ็ทด็ฟ’ๅ•้กŒ\n", + "#### ็ทด็ฟ’ๅ•้กŒ\n", "* `cx`ใ‚’1ๅ›žใ‹2ๅ›žไฝฟ็”จใ—ใฆใ€q[1]ใฎZๅ‡บๅŠ›ใ‚’ใ‚ชใƒณใซใ—ใ€q[0]ใฎZๅ‡บๅŠ›ใ‚’ใ‚ชใƒ•ใซใ—ใพใ™ใ€‚" ] }, @@ -1012,12 +1012,12 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "## ใƒ‘ใ‚บใƒซ 2\n", + "### ใƒ‘ใ‚บใƒซ 2\n", "\n", - "### ๅฐŽๅ…ฅ\n", + "#### ๅฐŽๅ…ฅ\n", "`cx`ใ‚ฒใƒผใƒˆใ ใ‘ใงใชใใ€`cz`ใ‚‚ใ‚ใ‚Šใพใ™ใ€‚ใ“ใ‚ŒใฏๅŒใ˜ใ“ใจใ‚’่กŒใ„ใพใ™ใŒใ€`x`ใงใฏใชใ`z`ใ‚’ใ‚ฟใƒผใ‚ฒใƒƒใƒˆใซ้ฉ็”จใ™ใ‚‹ๅฏ่ƒฝๆ€งใŒใ‚ใ‚‹็‚นใŒ็•ฐใชใ‚Šใพใ™ใ€‚\n", "\n", - "### ็ทด็ฟ’ๅ•้กŒ\n", + "#### ็ทด็ฟ’ๅ•้กŒ\n", "* q [0]ใฎXๅ‡บๅŠ›ใ‚’ใ‚ชใƒณใซใ—ใพใ™ใ€‚" ] }, @@ -1048,14 +1048,14 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "## ใƒ‘ใ‚บใƒซ 2b\n", + "### ใƒ‘ใ‚บใƒซ 2b\n", "\n", - "### ๅฐŽๅ…ฅ\n", + "#### ๅฐŽๅ…ฅ\n", "้‡ๅญใ‚ฒใƒผใƒˆใฎ่ˆˆๅ‘ณๆทฑใ„็‚นใฏใ€้‡ๅญใ‚ฒใƒผใƒˆใŒไฝ•ใ‚’ใ—ใฆใ„ใ‚‹ใฎใ‹ใ‚’่ชฌๆ˜Žใ™ใ‚‹ๆ–นๆณ•ใŒ่ค‡ๆ•ฐใ‚ใ‚‹ใ“ใจใŒๅคšใ„ใจใ„ใ†ใ“ใจใงใ™ใ€‚ใ“ใ‚Œใ‚‰ใฎ่ชฌๆ˜ŽใฏๅฎŒๅ…จใซไบ’ๆ›ๆ€งใŒใชใ„ใ‚ˆใ†ใซ่ฆ‹ใˆใ‚‹ๅ ดๅˆใŒใ‚ใ‚Šใพใ™ใŒใ€ๅŒใ˜ๆ“ไฝœใงใ™ใ€‚\n", "\n", "ใŸใจใˆใฐใ€`cz`ใฏใ€*ใ‚ฟใƒผใ‚ฒใƒƒใƒˆ*ใฎๆฝœๅœจ็š„ใชZๅ‡บๅŠ›ใซๅฟœใ˜ใฆใ€*ใ‚ณใƒณใƒˆใƒญใƒผใƒซ*้‡ๅญใƒ“ใƒƒใƒˆใซzใ‚’้ฉ็”จใ™ใ‚‹ใ‚ฒใƒผใƒˆใจใ—ใฆ่ชฌๆ˜Žใ™ใ‚‹ใ“ใจใ‚‚ใงใใพใ™ใ€‚ไปฅๅ‰ใจใพใฃใŸใๅŒใ˜่ชฌๆ˜Žใงใ™ใŒใ€้‡ๅญใƒ“ใƒƒใƒˆใฎๅฝนๅ‰ฒใŒ้€†ใซใชใฃใฆใ„ใพใ™ใ€‚ใใ‚Œใซใ‚‚ใ‹ใ‹ใ‚ใ‚‰ใšใ€ใใ‚Œใฏ็ญ‰ใ—ใ็œŸๅฎŸใงใ™ใ€‚\n", "\n", - "### ็ทด็ฟ’ๅ•้กŒ\n", + "#### ็ทด็ฟ’ๅ•้กŒ\n", "* ๅ‰ๅ›žใฎ็ทด็ฟ’ๅ•้กŒใจๅŒใ˜ใงใ™ใŒใ€้‡ๅญใƒ“ใƒƒใƒˆใŒ้€†ใซใชใฃใฆใ„ใพใ™ใ€‚ใŸใ ใ—ใ€czใฏไปฅๅ‰ใจๅŒใ˜ๆ–นๆณ•ใงใ™ใ€‚" ] }, @@ -1086,16 +1086,16 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "## ใƒ‘ใ‚บใƒซ 3\n", + "### ใƒ‘ใ‚บใƒซ 3\n", "\n", - "### ๅฐŽๅ…ฅ\n", + "#### ๅฐŽๅ…ฅ\n", "ใ“ใ“ใงใ€czใซใคใ„ใฆๅˆฅใฎ่ชฌๆ˜Žใ‚’ใ—ใพใ™ใ€‚`h`ใ‚ฒใƒผใƒˆใจๅŒๆง˜ใซใ€ๅ††ใŒๅ…ฅใ‚Œๆ›ฟใ‚ใฃใฆใ„ใ‚‹ใจ่€ƒใˆใ‚‹ใ“ใจใŒใงใใพใ™ใ€‚czใฎไฝœ็”จใฏไปฅไธ‹ใฎใ‚ˆใ†ใชใ‚‚ใฎใงใ™ใ€‚\n", "\n", "- q[0]ใฎXๅ‡บๅŠ›ใ‚’ๅณไธŠใฎ้šฃๆŽฅใ™ใ‚‹ๅ††ใจไบคๆ›ใ—ใพใ™ใ€‚\n", "- q[1]ใฎXๅ‡บๅŠ›(ๅทฆไธŠใฎ้šฃใฎๅ ดๅˆ)ใงใ‚‚ๅŒใ˜ใ“ใจใ‚’่กŒใ„ใพใ™ใ€‚czใฏใพใŸใ€็›ค้ขใฎไธŠ้ƒจใซใ‚ใ‚‹ๅ††ใงไฝ•ใ‹ๅฅ‡ๅฆ™ใชใ“ใจใ‚’ใ—ใพใ™ใŒใ€ใใ‚ŒใฏๅพŒใง่งฃๆฑบใ•ใ‚Œใ‚‹่ฌŽใงใ™๏ผ\n", "ใ“ใ“ใงใ‚‚ใ€[Hello Quantumใ‚ขใƒ—ใƒช](https://helloquantum.mybluemix.net/)ใง็ด ๆ™ดใ‚‰ใ—ใ„ใ‚ขใƒ‹ใƒกใƒผใ‚ทใƒงใƒณใ‚’ใฟใ‚‹ใ“ใจใŒใงใใพใ™ใ€‚\n", "\n", - "### ็ทด็ฟ’ๅ•้กŒ\n", + "#### ็ทด็ฟ’ๅ•้กŒ\n", "* ใ‚ณใƒณใƒˆใƒญใƒผใƒซใจใ—ใฆๅ„้‡ๅญใƒ“ใƒƒใƒˆใง2ๅ›ž`cz`ใ‚’ๅฎŸ่กŒใ—ใ€ไฝ•ใŒ่ตทใ“ใ‚‹ใ‹ใ‚’็ขบ่ชใ—ใพใ™ใ€‚" ] }, @@ -1128,7 +1128,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "### ็ต‚็ต\n", + "#### ็ต‚็ต\n", "ใ“ใ‚Œใงใ€`cz`ใซใคใ„ใฆ้žๅธธใซๅฝน็ซ‹ใคใ“ใจใŒใ‚ใ‹ใ‚Šใพใ—ใŸใ€‚ใ‚ณใƒณใƒˆใƒญใƒผใƒซใจใ—ใฆใฉใฎ้‡ๅญใƒ“ใƒƒใƒˆใ‚’้ธๆŠžใ—ใฆใ‚‚ใ€`cz`ใฏใฉใกใ‚‰ใฎๅ ดๅˆใ‚‚ๅŒใ˜ใ“ใจใ‚’่กŒใ„ใพใ™ใ€‚ใ“ใฎใŸใ‚ใ€ใ“ใ‚Œใ‹ใ‚‰ใฏ`cz`ใฎใ‚ณใƒณใƒˆใƒญใƒผใƒซ้‡ๅญใƒ“ใƒƒใƒˆใ‚’้ธๆŠžใ™ใ‚‹ๅฟ…่ฆใฏใ‚ใ‚Šใพใ›ใ‚“ใ€‚" ] }, @@ -1136,16 +1136,16 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "## ใƒ‘ใ‚บใƒซ 3b\n", + "### ใƒ‘ใ‚บใƒซ 3b\n", "\n", - "### ๅฐŽๅ…ฅ\n", + "#### ๅฐŽๅ…ฅ\n", "ๅ‰่ฟฐใฎใ‚ˆใ†ใซใ€XใŠใ‚ˆใณZๅ‡บๅŠ›ใฏใ€้‡ๅญใƒ“ใƒƒใƒˆใ‹ใ‚‰ๅ‡บๅŠ›ใ‚’ๅ–ๅพ—ใ™ใ‚‹2ใคใฎๆ–นๆณ•ใซๅฏพๅฟœใ—ใพใ™ใ€‚XใŠใ‚ˆใณZๆธฌๅฎšใงใ™ใ€‚ใ“ใ‚Œใ‚‰ใฎๅๅ‰ใŒ็คบใ™ใ‚ˆใ†ใซใ€Yๆธฌๅฎšใจใ—ใฆ็Ÿฅใ‚‰ใ‚Œใ‚‹3็•ช็›ฎใฎๆ–นๆณ•ใ‚‚ใ‚ใ‚Šใพใ™ใ€‚\n", "\n", "ใ“ใ‚Œใ‚‰ใฎใƒ‘ใ‚บใƒซใงใฏใ€็‰ฉไบ‹ใ‚’ๅฐ‘ใ—็ฐกๅ˜ใซใ™ใ‚‹ใŸใ‚ใซใ€Yๆธฌๅฎšใ‚’ใปใจใ‚“ใฉ็„ก่ฆ–ใ—ใพใ™ใ€‚ใŸใ ใ—ใ€้‡ๅญใƒ“ใƒƒใƒˆใฎๅฎŒๅ…จใช่ชฌๆ˜Žใซใคใ„ใฆใฏใ€Yๅ‡บๅŠ›ใŒใฉใฎใ‚ˆใ†ใซ่ฆ‹ใˆใ‚‹ใ‹ใ‚’่ฟฝ่ทกใ™ใ‚‹ๅฟ…่ฆใŒใ‚ใ‚Šใพใ™ใ€‚ใ“ใ‚Œใฏใ€ๅ„้‡ๅญใƒ“ใƒƒใƒˆใฎYๅ‡บๅŠ›ใซๅฏพใ—ใฆใ€ใ•ใ‚‰ใซ2ใ€3่กŒใฎๅ††ใ‚’่ฟฝๅŠ ใ™ใ‚‹ใ“ใจใ‚’ๆ„ๅ‘ณใ—ใพใ™ใ€‚\n", "\n", "ๆฌกใฎๆผ”็ฟ’ใฏใ€Yๅ‡บๅŠ›่กŒใŒ่กจ็คบใ•ใ‚Œใ‚‹ใ“ใจใ‚’้™คใ„ใฆใ€ๅ‰ๅ›žใจใพใฃใŸใๅŒใ˜ใงใ™ใ€‚ใ“ใ‚Œใ‚‰ใ‚’ไฝฟ็”จใ™ใ‚‹ใจใ€ๆœ€ๅพŒใฎใƒ‘ใ‚บใƒซใง่ฆ‹ใ‚‰ใ‚ŒใŸๅฅ‡ๅฆ™ใชๅŠนๆžœใฏใพใฃใŸใๅฅ‡ๅฆ™ใซใชใ‚Šใพใ›ใ‚“ใ€‚ใ”่‡ชๅˆ†ใฎ็›ฎใง็ขบใ‹ใ‚ใฆใฟใฆใใ ใ•ใ„!\n", "\n", - "### ็ทด็ฟ’ๅ•้กŒ\n", + "#### ็ทด็ฟ’ๅ•้กŒ\n", "* `cz`ใ‚’2ๅ›žๅฎŸ่กŒใ—ใฆใ€ไฝ•ใŒ่ตทใ“ใ‚‹ใ‹ใ‚’็ขบ่ชใ—ใพใ™ใ€‚" ] }, @@ -1176,7 +1176,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "### ็ต‚็ต\n", + "#### ็ต‚็ต\n", "ใ“ใ“ใงใฏใ€`cz`ใซใ‚ˆใฃใฆ่กŒใ‚ใ‚ŒใŸ3็•ช็›ฎใฎๅ††ใฎไบคๆ›ใŒ่กจ็คบใ•ใ‚Œใพใ™ใ€‚ไธŠ้ƒจใฎๅ††(ไธกๆ–นใฎ้‡ๅญใƒ“ใƒƒใƒˆใฎXๅ‡บๅŠ›ใฎ็›ธ้–ขใ‚’่กจใ™)ใŒไธญๅคฎใฎๅ††(ไธกๆ–นใฎ้‡ๅญใƒ“ใƒƒใƒˆใฎYๅ‡บๅŠ›ใฎ็›ธ้–ขใ‚’่กจใ™)ใจไบคๆ›ใ•ใ‚Œใพใ™ใ€‚\n", "\n", "้‡ๅญใƒ“ใƒƒใƒˆใฎ่ชฌๆ˜ŽใŒๅฎŒๅ…จใงใฏใชใ‹ใฃใŸใจใ„ใ†็†็”ฑใ ใ‘ใงใ€ไธญๅคฎใฎ่กŒใŒๆฌ ่ฝใ—ใฆใ„ใ‚‹ใจใใ€ใ“ใ‚Œใฏๅฅ‡ๅฆ™ใซ่ฆ‹ใˆใพใ—ใŸใ€‚ใใ‚Œใงใ‚‚ใ€Yๅ‡บๅŠ›ใฎใชใ„ๅ˜็ด”ใช็›ค้ขใ‚’ๅผ•ใ็ถšใไฝฟ็”จใ—ใพใ™ใ€‚`hello_quantum.run_game()`ใง`mode = 'y'ๅผ•ๆ•ฐ`ใ‚’ไฝฟ็”จใ™ใ‚‹ใจ่‡ชๅˆ†ใงYๅ‡บๅŠ›ใ‚’่ฟฝๅŠ ใงใใพใ™ใ€‚" @@ -1186,12 +1186,12 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "## ใƒ‘ใ‚บใƒซ 4\n", + "### ใƒ‘ใ‚บใƒซ 4\n", "\n", - "### ๅฐŽๅ…ฅ\n", + "#### ๅฐŽๅ…ฅ\n", "ๅ‰ใฎ็ทด็ฟ’ๅ•้กŒใงใฏใ€`z`ใ‚ฒใƒผใƒˆใจใ„ใใคใ‹ใฎ`h`ใ‚ฒใƒผใƒˆใ‹ใ‚‰`x`ใ‚’ไฝœๆˆใ—ใพใ—ใŸใ€‚ๅŒๆง˜ใซใ€`cz`ใจใ„ใใคใ‹ใฎ`h`ใ‹ใ‚‰`cx`ใ‚’ๆง‹็ฏ‰ใ™ใ‚‹ใ“ใจใ‚‚ๅฏ่ƒฝใงใ™ใ€‚\n", "\n", - "### ็ทด็ฟ’ๅ•้กŒ\n", + "#### ็ทด็ฟ’ๅ•้กŒ\n", "* q[1]ใฎZๅ‡บๅŠ›ใ‚’ใ‚ชใƒณใซใ—ใพใ™ใ€‚" ] }, @@ -1222,7 +1222,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "### ็ต‚็ต\n", + "#### ็ต‚็ต\n", "`cz`ใจใฏ็•ฐใชใ‚Šใ€`cx`ใฏๅฏพ็งฐใงใฏใ‚ใ‚Šใพใ›ใ‚“ใ€‚ไปฃใ‚ใ‚Šใซใ€ใ‚ฟใƒผใ‚ฒใƒƒใƒˆใŒq[0]ใงใ‚ใ‚‹cxใ‚’ไฝœๆˆใ—ใŸใ„ๅ ดๅˆใฏใ€ไปฃใ‚ใ‚Šใซq[0]ใง`h`ใ‚’ๅฎŸ่กŒใ™ใ‚‹ๅฟ…่ฆใŒใ‚ใ‚Šใพใ™ใ€‚" ] }, @@ -1230,16 +1230,16 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "## ใƒ‘ใ‚บใƒซ 5\n", + "### ใƒ‘ใ‚บใƒซ 5\n", "\n", - "### ๅฐŽๅ…ฅ\n", + "#### ๅฐŽๅ…ฅ\n", "`cz`ใฎใ€Œ้€†ๆ–นๅ‘ๆ€งใ€ใ‚’่งฃ้‡ˆใ™ใ‚‹ใ“ใจใŒใงใใพใ—ใŸ๏ผšใคใพใ‚Šใ€ใ‚ฟใƒผใ‚ฒใƒƒใƒˆ้‡ๅญใƒ“ใƒƒใƒˆใŒใ‚ณใƒณใƒˆใƒญใƒผใƒซ้‡ๅญใƒ“ใƒƒใƒˆใฎๅฝนๅ‰ฒใ‚’ๆžœใŸใ—ใ€ใพใŸใ€ใใฎ้€†ใฎๅฝนๅ‰ฒใ‚‚ๆžœใŸใ™ใจใ„ใ†่งฃ้‡ˆใงใ™ใ€‚`cx`ใงใ‚‚ๅŒใ˜ใ“ใจใ‚’ใ—ใพใ™ใ€‚ใŸใ ใ—ใ€ใ“ใฎใ‚ฒใƒผใƒˆใซใฏๅฏพ็งฐๅŠนๆžœใŒใชใ„ใŸใ‚ใ€ใ“ใ‚Œใฏใ‚‚ใ†ๅฐ‘ใ—ๆณจๆ„ใŒๅฟ…่ฆใงใ™ใ€‚\n", "\n", "ๅ…ทไฝ“็š„ใซใฏใ€ใ‚ณใƒณใƒˆใƒญใƒผใƒซใฎZๅ‡บๅŠ›ใฎๅฎŸ่กŒๅ†…ๅฎนใซๅฟœใ˜ใฆใ‚ฟใƒผใ‚ฒใƒƒใƒˆใซๅฏพใ—ใฆxใ‚’ๅฎŸ่กŒใ™ใ‚‹ใจ่€ƒใˆใ‚‹ใฎใงใฏใชใใ€ใ‚ฟใƒผใ‚ฒใƒƒใƒˆใฎXๅ‡บๅŠ›ใฎๅฎŸ่กŒๅ†…ๅฎนใซๅฟœใ˜ใฆใ‚ณใƒณใƒˆใƒญใƒผใƒซใซๅฏพใ—ใฆzใ‚’ๅฎŸ่กŒใ™ใ‚‹ใจ่€ƒใˆใ‚‹ใ“ใจใŒใงใใพใ™ใ€‚\n", "\n", "ใ“ใฎๆผ”็ฟ’ใงใฏใ€ใ‚ฟใƒผใ‚ฒใƒƒใƒˆใŒใ‚ณใƒณใƒˆใƒญใƒผใƒซใ‚’่กŒใฃใฆใ„ใ‚‹ใ‚ˆใ†ใซ่ฆ‹ใˆใ€ใ‚ณใƒณใƒˆใƒญใƒผใƒซใŒใ‚ฟใƒผใ‚ฒใƒƒใƒˆใงใ‚ใ‚‹ใ“ใจใŒใ‚ใ‹ใ‚Šใพใ™ใ€‚\n", "\n", - "### ็ทด็ฟ’ๅ•้กŒ\n", + "#### ็ทด็ฟ’ๅ•้กŒ\n", "* `q[0]`ใฎXๅ‡บๅŠ›ใ‚’ใ‚ชใƒณใซใ—ใพใ™ใ€‚" ] }, @@ -1270,7 +1270,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "### ็ต‚็ต\n", + "#### ็ต‚็ต\n", "`cx`ใŒใฉใฎใ‚ˆใ†ใซๆฉŸ่ƒฝใ™ใ‚‹ใ‹ใซใคใ„ใฆใฎใ“ใ‚Œใ‚‰ใฎ2ใคใฎ็•ฐใชใ‚‹่ฉฑใฏ็Ÿ›็›พใ—ใฆใ„ใ‚‹ใ‚ˆใ†ใซ่ฆ‹ใˆใ‚‹ใ‹ใ‚‚ใ—ใ‚Œใพใ›ใ‚“ใŒใ€ใใ‚Œใ‚‰ใฏ็ญ‰ใ—ใๆœ‰ๅŠนใช่ชฌๆ˜Žใงใ™ใ€‚้‡ๅญใ‚ฒใƒผใƒˆใฎๅฅ‡ๅฆ™ใง็ด ๆ™ดใ‚‰ใ—ใ„ๆ€ง่ณชใฎ็ด ๆ™ดใ‚‰ใ—ใ„ไพ‹ใงใ™ใ€‚" ] }, @@ -1278,14 +1278,14 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "## ใƒ‘ใ‚บใƒซ 6\n", + "### ใƒ‘ใ‚บใƒซ 6\n", "\n", - "### ๅฐŽๅ…ฅ\n", + "#### ๅฐŽๅ…ฅ\n", "ใ“ใ‚Œใงใ€`cx`ใฎใ“ใ‚Œใ‚‰2ใคใฎ่งฃ้‡ˆใŒใ‚ใ‹ใฃใŸใฎใงใ€้žๅธธใซไพฟๅˆฉใชใ“ใจใ‚’่กŒใ†ใ“ใจใŒใงใใพใ™ใ€‚\n", "\n", "ใ“ใฎใƒ‘ใ‚บใƒซใงใฏใ€`q[1]`ใ‚’ใ‚ฟใƒผใ‚ฒใƒƒใƒˆใจใ—ใฆ`cx`ใ‚’ๅ–ๅพ—ใ—ใพใ™ใŒใ€`q[0]`ใ‚’ใ‚ฟใƒผใ‚ฒใƒƒใƒˆใจใ—ใฆ`cx`ใŒๅฟ…่ฆใซใชใ‚Šใพใ™ใ€‚ใ„ใใคใ‹ใฎ`h`ใ‚ฒใƒผใƒˆใฎใƒ˜ใƒซใƒ—ใ‚’ไฝฟ็”จใ—ใฆๅŒใ˜ๅŠนๆžœใ‚’ๅพ—ใ‚‹ๆ–นๆณ•ใ‚’็†่งฃใงใใ‚‹ใ‹ใฉใ†ใ‹ใ‚’็ขบ่ชใ—ใฆใใ ใ•ใ„ใ€‚\n", "\n", - "### ็ทด็ฟ’ๅ•้กŒ\n", + "#### ็ทด็ฟ’ๅ•้กŒ\n", "* `q[1]`ใฎZๅ‡บๅŠ›ใ‚’็ถญๆŒใ—ใพใ™ใŒใ€`q[0]`ใฎZๅ‡บๅŠ›ใ‚’ใ‚ชใƒ•ใซใ—ใพใ™ใ€‚" ] }, @@ -1316,7 +1316,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "### ็ต‚็ต\n", + "#### ็ต‚็ต\n", "ใ“ใ‚Œใ‚‰ใฎ็ทด็ฟ’ๅ•้กŒใ‹ใ‚‰ไฝ•ใ‹ใ‚’่ฆšใˆใฆใ„ใ‚‹ใชใ‚‰ใ€ใใ‚ŒใฏใŠใใ‚‰ใใ“ใ‚Œใงใ‚ใ‚‹ใฏใšใงใ™ใ€‚ๅฎŸ้š›ใฎ้‡ๅญใƒ“ใƒƒใƒˆใƒ‡ใƒใ‚คใ‚นใงใฏใ€`cx`ใ‚’ๅฎŸ่กŒใงใใ‚‹ๆ–นๆณ•ใ‚’ๅˆถ้™ใ™ใ‚‹ใฎใŒไธ€่ˆฌ็š„ใงใ‚ใ‚‹ใŸใ‚ใ€ใใ‚Œใ‚‰ใ‚’ๆ–นๅ‘่ปขๆ›ใ™ใ‚‹ๆฉŸ่ƒฝใฏ้žๅธธใซไพฟๅˆฉใงใ™ใ€‚" ] }, @@ -1324,12 +1324,12 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "## ใƒ‘ใ‚บใƒซ 7\n", + "### ใƒ‘ใ‚บใƒซ 7\n", "\n", - "### ๅฐŽๅ…ฅ\n", + "#### ๅฐŽๅ…ฅ\n", "ใ‚‚ใ†1ใคใฎๆœ‰็”จใช้‡ๅญใ‚ฒใƒผใƒˆใฏ`swap`ใงใ™ใ€‚ใ“ใ‚Œใฏใ€ๅๅ‰ใŒ็คบใ™ใจใŠใ‚Šใ€2ใคใฎ้‡ๅญใƒ“ใƒƒใƒˆใฎ็Šถๆ…‹ใ‚’ไบคๆ›ใ—ใพใ™ใ€‚Qiskitใงใฏๅ˜ใซ`swap`ใ‚ณใƒžใƒณใƒ‰ใ‚’ๅ‘ผใณๅ‡บใ™ใ“ใจใŒใงใใพใ™ใŒใ€ใ“ใฎใ‚ฒใƒผใƒˆใ‚’`cz`ใพใŸใฏ`cx`ใ‚ฒใƒผใƒˆใ‹ใ‚‰ไฝœๆˆใ™ใ‚‹ๆ–นใŒ่ˆˆๅ‘ณๆทฑใ„ใงใ™ใ€‚\n", "\n", - "### ็ทด็ฟ’ๅ•้กŒ\n", + "#### ็ทด็ฟ’ๅ•้กŒ\n", "* 2ใคใฎ้‡ๅญใƒ“ใƒƒใƒˆใ‚’ไบคๆ›ใ—ใพใ™ใ€‚\n", " - q[0]ใฎZๅ‡บๅŠ›ใ‚’็™ฝใ€Xๅ‡บๅŠ›ใ‚’็ฐ่‰ฒใซใ—ใพใ™ใ€‚\n", " - q[1]ใฎZๅ‡บๅŠ›ใ‚’ๆฟƒใ„็ฐ่‰ฒใซใ—ใ€Xๅ‡บๅŠ›ใ‚’่–„ใ„็ฐ่‰ฒใซใ—ใพใ™ใ€‚" @@ -1362,7 +1362,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "### ็ต‚็ต\n", + "#### ็ต‚็ต\n", "ใ“ใฎใƒ‘ใ‚บใƒซใฎ่งฃๆฑบ็ญ–ใฏใ€ๆฑŽ็”จใฎswapใงใฏใชใ„ๅฏ่ƒฝๆ€งใŒใ‚ใ‚‹ใ“ใจใซๆณจๆ„ใ—ใฆใใ ใ•ใ„ใ€‚ไปŠๅ›žใฎ่งฃๆฑบ็ญ–ใ‚’ใ€ๆฌกใฎใƒ‘ใ‚บใƒซใฎ่งฃๆฑบ็ญ–ใจๆฏ”่ผƒใ—ใฆใใ ใ•ใ„ใ€‚" ] }, @@ -1370,12 +1370,12 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "## ใƒ‘ใ‚บใƒซ 8\n", + "### ใƒ‘ใ‚บใƒซ 8\n", "\n", - "#### ๅฐŽๅ…ฅ\n", + "##### ๅฐŽๅ…ฅ\n", "ใ“ใ‚Œใฏใ€`swap`ใ‚’ไฝœๆˆใ™ใ‚‹ใจใ„ใ†ใ‚ขใ‚คใƒ‡ใ‚ขใซๅŸบใฅใ„ใŸๅˆฅใฎใƒ‘ใ‚บใƒซใงใ™ใ€‚\n", "\n", - "#### ็ทด็ฟ’ๅ•้กŒ\n", + "##### ็ทด็ฟ’ๅ•้กŒ\n", "* 2ใคใฎ้‡ๅญใƒ“ใƒƒใƒˆใ‚’ไบคๆ›ใ—ใพใ™ใ€‚\n", " * q[0]ใฎXๅ‡บๅŠ›ใ‚’้ป’ใซใ—ใพใ™ใ€‚\n", " * q[1]ใฎZๅ‡บๅŠ›ใ‚’็™ฝใซใ—ใพใ™ใ€‚\n", @@ -1409,12 +1409,12 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "## ใƒ‘ใ‚บใƒซ 9\n", + "### ใƒ‘ใ‚บใƒซ 9\n", "\n", - "#### ๅฐŽๅ…ฅ\n", + "##### ๅฐŽๅ…ฅ\n", "ใพใŸๅˆฅใฎ`swap`ใƒ™ใƒผใ‚นใฎใƒ‘ใ‚บใƒซใ€‚\n", "\n", - "#### ็ทด็ฟ’ๅ•้กŒ\n", + "##### ็ทด็ฟ’ๅ•้กŒ\n", "* 2ใคใฎ้‡ๅญใƒ“ใƒƒใƒˆใ‚’ไบคๆ›ใ—ใพใ™ใ€‚\n", " * q[0]ใฎZๅ‡บๅŠ›ใ‚’ใ‚ชใƒณใซใ—ใพใ™ใ€‚\n", " * Zๅ‡บๅŠ›q[1]ใ‚’ใ‚ชใƒ•ใซใ—ใพใ™ใ€‚" @@ -1449,21 +1449,21 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "# ใƒฌใƒ™ใƒซ 4:ใ‚ฏใƒชใƒ•ใ‚ฉใƒผใƒ‰ใ‚ฒใƒผใƒˆใ‚’่ถŠใˆใฆ" + "## ใƒฌใƒ™ใƒซ 4:ใ‚ฏใƒชใƒ•ใ‚ฉใƒผใƒ‰ใ‚ฒใƒผใƒˆใ‚’่ถŠใˆใฆ" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ - "## ใƒ‘ใ‚บใƒซ 1a\n", + "### ใƒ‘ใ‚บใƒซ 1a\n", "\n", - "### ๅฐŽๅ…ฅ\n", + "#### ๅฐŽๅ…ฅ\n", "ใ“ใ‚Œใพใงใซ่ฆ‹ใŸใ‚ฒใƒผใƒˆใฏใ€Œใ‚ฏใƒชใƒ•ใ‚ฉใƒผใƒ‰ใ‚ฒใƒผใƒˆใ€ใจๅ‘ผใฐใ‚Œใฆใ„ใพใ™ใ€‚ใใ‚Œใ‚‰ใฏใ€้‡ๅญใ‚ณใƒณใƒ”ใƒฅใƒผใ‚ฟใƒผใงๆƒ…ๅ ฑใ‚’็งปๅ‹•ใŠใ‚ˆใณๆ“ไฝœใ™ใ‚‹ใŸใ‚ใซ้žๅธธใซ้‡่ฆใงใ™ใ€‚ใŸใ ใ—ใ€ใ‚ฏใƒชใƒ•ใ‚ฉใƒผใƒ‰ใ‚ฒใƒผใƒˆใฎใฟใ‚’ไฝฟ็”จใ—ใฆๆจ™ๆบ–็š„ใชใ‚ณใƒณใƒ”ใƒฅใƒผใ‚ฟใƒผใ‚ˆใ‚Šใ‚‚ๅ„ชใ‚ŒใŸใƒ‘ใƒ•ใ‚ฉใƒผใƒžใƒณใ‚นใ‚’็™บๆฎใงใใ‚‹ใ‚ขใƒซใ‚ดใƒชใ‚บใƒ ใ‚’ไฝœๆˆใ™ใ‚‹ใ“ใจใฏใงใใพใ›ใ‚“ใ€‚ๆ–ฐใ—ใ„ใ‚ฒใƒผใƒˆใŒๅฟ…่ฆใงใ™ใ€‚\n", "\n", "ใ“ใฎใƒ‘ใ‚บใƒซใง่ฉฆใ™ใ“ใจใŒใงใใพใ™ใ€‚ๆ•ฐๅ›žๅฎŸ่กŒใ—ใฆใ€ไฝ•ใŒใงใใ‚‹ใ‹ใ‚’็ขบ่ชใ—ใฆใใ ใ•ใ„ใ€‚\n", "\n", - "### ็ทด็ฟ’ๅ•้กŒ\n", + "#### ็ทด็ฟ’ๅ•้กŒ\n", "* `ry(pi/4)`ใ‚’q[0]ใซ4ๅ›ž้ฉ็”จใ—ใพใ™ใ€‚" ] }, @@ -1496,7 +1496,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "### ็ต‚็ต\n", + "#### ็ต‚็ต\n", "ใ‚ˆใใงใใพใ—ใŸ๏ผๆฎ‹ใ‚Šใฎๅ•้กŒใงใ€ใ“ใ‚Œใ‚’็†่งฃใ™ใ‚‹ใŸใ‚ใซๆ–ฐใ—ใ„ใ“ใจใ‚’่ฉฆใ—ใฆใฟใพใ—ใ‚‡ใ†ใ€‚" ] }, @@ -1504,14 +1504,14 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "## ใƒ‘ใ‚บใƒซ 1b\n", + "### ใƒ‘ใ‚บใƒซ 1b\n", "\n", - "### ๅฐŽๅ…ฅ\n", + "#### ๅฐŽๅ…ฅ\n", "ไปŠ่ฆ‹ใŸใ‚ฒใƒผใƒˆใ‚’ใ‚ˆใ‚Šใ‚ˆใ็†่งฃใ™ใ‚‹ใŸใ‚ใซใ€้‡ๅญใƒ“ใƒƒใƒˆใ‚’่ฆ–่ฆšๅŒ–ใ™ใ‚‹ใŸใ‚ใซๅฐ‘ใ—็•ฐใชใ‚‹ๆ–นๆณ•ใ‚’ไฝฟ็”จใ—ใพใ™ใ€‚ใ“ใฎๅ ดๅˆใ€็ขบๅฎŸใซ`0`ใซใชใ‚‹ๅ‡บๅŠ›ใฏใ€็™ฝใ„ๅ††ใงใฏใชใ็™ฝใ„็ทšใง่กจใ•ใ‚Œใพใ™ใ€‚`1`ใ‚’ไธŽใˆใ‚‹ใ“ใจใŒ็ขบๅฎŸใชๅ‡บๅŠ›ใฏใ€้ป’ใ„ๅ††ใงใฏใชใ้ป’ใ„็ทšใซใชใ‚Šใพใ™ใ€‚ใƒฉใƒณใƒ€ใƒ ใชๅ‡บๅŠ›ใฎๅ ดๅˆใ€็ฐ่‰ฒใฎๅ††ใงใฏใชใใ€ไธ€้ƒจใŒ็™ฝใงไธ€้ƒจใŒ้ป’ใฎ็ทšใŒ่กจ็คบใ•ใ‚Œใพใ™ใ€‚\n", "\n", "ใ“ใ‚Œใฏใ€ใ“ใฎๆ–ฐใ—ใ„่ฆ–่ฆšๅŒ–ใซๆ…ฃใ‚Œใ‚‹ใฎใซๅฝน็ซ‹ใคๅคใ„็ทด็ฟ’ๅ•้กŒใงใ™ใ€‚\n", "\n", - "### ็ทด็ฟ’ๅ•้กŒ\n", + "#### ็ทด็ฟ’ๅ•้กŒ\n", "* Xๅ‡บๅŠ›ใŒ็ขบๅฎŸใซไธ€่‡ดใ™ใ‚‹ใ‚ˆใ†ใซใ—ใพใ™ใ€‚" ] }, @@ -1542,12 +1542,12 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "## ใƒ‘ใ‚บใƒซ 1c\n", + "### ใƒ‘ใ‚บใƒซ 1c\n", "\n", - "### ๅฐŽๅ…ฅ\n", + "#### ๅฐŽๅ…ฅ\n", "ใ“ใฎใƒ‘ใ‚บใƒซใงใฏใ€`ใƒ–ใƒญใƒƒใƒ›`ใงๆ–ฐใ—ใ„ใ“ใจใŒใงใใ‚‹ใ“ใจใŒใ‚ใ‹ใ‚Šใพใ™ใ€‚ใ“ใ‚ŒใฏๅฎŸ้š›ใซใฏใ‚ฒใƒผใƒˆใงใฏใชใใ€้‡ๅญใƒ—ใƒญใ‚ฐใƒฉใƒ ใซใฏ่กจ็คบใ•ใ‚Œใพใ›ใ‚“ใ€‚ไปฃใ‚ใ‚Šใซใ€ๅ„้‡ๅญใƒ“ใƒƒใƒˆใฎ2ๆœฌใฎ็ทšใ‚’ไบ’ใ„ใซ้‡ใญใฆๆ็”ปใ™ใ‚‹ใ“ใจใซใ‚ˆใ‚Šใ€่ฆ‹ใŸ็›ฎใ‚’ๅค‰ๆ›ดใ™ใ‚‹ใ ใ‘ใงใ™ใ€‚ใพใŸใ€ใใ‚Œใ‚‰ใฎใƒฌใƒ™ใƒซใŒไบคๅทฎใ™ใ‚‹ใƒใ‚คใƒณใƒˆใ‚’้…็ฝฎใ—ใพใ™ใ€‚ใƒ–ใƒญใƒƒใƒ›ใ‚’ไฝฟ็”จใ™ใ‚‹ใจใ€`ry(pi / 4)`ใŒใฉใฎใ‚ˆใ†ใซๆฉŸ่ƒฝใ™ใ‚‹ใ‹ใ‚’็†่งฃใงใใ‚‹ใฏใšใงใ™ใ€‚\n", "\n", - "### ็ทด็ฟ’ๅ•้กŒ\n", + "#### ็ทด็ฟ’ๅ•้กŒ\n", "* `q[0]`ใฎไธ€็•ชไธ‹ใฎ่กŒใ‚’ๅฎŒๅ…จใซใ‚ชใƒณใซใ—ใฆใ€`ใƒ–ใƒญใƒƒใƒ›`ใ‚ฒใƒผใƒˆใ‚’ไฝฟ็”จใ—ใพใ™ใ€‚" ] }, @@ -1580,7 +1580,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "### ็ต‚็ต\n", + "#### ็ต‚็ต\n", "ใƒใ‚คใƒณใƒˆใ‚’ใŸใฉใฃใŸๅ ดๅˆใ€`ry(pi/4)`ใฎๅŠนๆžœใฏใƒใ‚คใƒณใƒˆใ‚’$\\pi/4$ใƒฉใ‚ธใ‚ขใƒณ(45ๅบฆ)ๅ›ž่ปขใ•ใ›ใ‚‹ใ“ใจใงใ‚ใ‚‹ใ“ใจใซๆฐ—ไป˜ใใฏใšใงใ™ใ€‚\n", "\n", "็ทšใฎใƒฌใƒ™ใƒซใ‚‚ใใ‚Œใซๅˆใ‚ใ›ใฆๅค‰ๅŒ–ใ—ใพใ™ใ€‚`ry(-pi/4)`ใ‚ฒใƒผใƒˆใฎๅŠนๆžœใฏใ€ๅ›ž่ปขใŒๅๅฏพๆ–นๅ‘ใงใ‚ใ‚‹ใ“ใจใ‚’้™คใ„ใฆๅŒใ˜ใงใ™ใ€‚\n", @@ -1592,12 +1592,12 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "## ใƒ‘ใ‚บใƒซ 2\n", + "### ใƒ‘ใ‚บใƒซ 2\n", "\n", - "### ๅฐŽๅ…ฅ\n", + "#### ๅฐŽๅ…ฅ\n", "ใงใฏใ€ใ“ใ‚Œใ‚‰ใฎใ‚ฒใƒผใƒˆใ‚’ไป–ใฎ้‡ๅญใƒ“ใƒƒใƒˆใงใ‚‚ไฝฟ็”จใ—ใพใ—ใ‚‡ใ†ใ€‚\n", "\n", - "### ็ทด็ฟ’ๅ•้กŒ\n", + "#### ็ทด็ฟ’ๅ•้กŒ\n", "* ใƒœใƒˆใƒ ใƒฉใ‚คใƒณใ‚’ๅฎŒๅ…จใซใ‚ชใƒณใซใ—ใพใ™ใ€‚" ] }, @@ -1630,12 +1630,12 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "## ใƒ‘ใ‚บใƒซ 3\n", + "### ใƒ‘ใ‚บใƒซ 3\n", "\n", - "### ๅฐŽๅ…ฅ\n", + "#### ๅฐŽๅ…ฅ\n", "ใ“ใ‚Œใฏ`cx`ใ€`cz`ใ€`h`ใŒใ‚ใ‚Œใฐ่งฃใใ“ใจใŒใงใใ‚‹ใƒ‘ใ‚บใƒซใงใ™ใŒใ€ๆฎ‹ๅฟตใชใŒใ‚‰ใ€ไปŠๅ›žใฏใ€cxใจhใŒใ‚ใ‚Šใพใ›ใ‚“ใ€‚ใใฎใŸใ‚ใ€`cz`ใจ`ry`ใŒใฉใฎใ‚ˆใ†ใซๆฉŸ่ƒฝใ™ใ‚‹ใ‹ใ‚’็†่งฃใ™ใ‚‹ๅฟ…่ฆใŒใ‚ใ‚Šใพใ™ใ€‚\n", "\n", - "### ็ทด็ฟ’ๅ•้กŒ\n", + "#### ็ทด็ฟ’ๅ•้กŒ\n", "* Zๅ‡บๅŠ›ใ‚’ไธ€่‡ดใ•ใ›ใพใ™ใ€‚" ] }, @@ -1666,12 +1666,12 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "## ใƒ‘ใ‚บใƒซ 4\n", + "### ใƒ‘ใ‚บใƒซ 4\n", "\n", - "### ๅฐŽๅ…ฅ\n", + "#### ๅฐŽๅ…ฅ\n", "`x`ใพใŸใฏ`z`ใ‚’ไฝฟ็”จใ™ใ‚‹ใจใ€`ry`ใ‚’*ๅ่ปข*ใ•ใ›ใฆใ€ๅๅฏพๆ–นๅ‘ใซๅ‘ใ‘ใ‚‹ใ“ใจใŒใงใใพใ™ใ€‚\n", "\n", - "### ็ทด็ฟ’ๅ•้กŒ\n", + "#### ็ทด็ฟ’ๅ•้กŒ\n", "* ใใ‚Œใžใ‚Œใซ1ใคใฎ`ry(pi/4)`ใ‚’ไป˜ใ‘ใฆใ€Zๅ‡บๅŠ›ใ‚’ๅฎŒๅ…จใซใ‚ชใƒ•ใซใ—ใพใ™ใ€‚" ] }, @@ -1702,12 +1702,12 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "## ใƒ‘ใ‚บใƒซ 5\n", + "### ใƒ‘ใ‚บใƒซ 5\n", "\n", - "### ๅฐŽๅ…ฅ\n", + "#### ๅฐŽๅ…ฅ\n", "`ry`ใ‚’ไฝฟ็”จใ™ใ‚‹ใจใ€`cz`ใ‚„`cx`ใ‚ˆใ‚Šใ‚‚่ˆˆๅ‘ณๆทฑใ„ๆกไปถไป˜ใใ‚ฒใƒผใƒˆใ‚’ไฝœๆˆใงใใพใ™ใ€‚ใŸใจใˆใฐใ€ๅˆถๅพก`h`ใ‚’ไฝœๆˆใงใใพใ™ใ€‚\n", "\n", - "### ็ทด็ฟ’ๅ•้กŒ\n", + "#### ็ทด็ฟ’ๅ•้กŒ\n", "* q[1]ใฎ้‡ๅญใƒ“ใƒƒใƒˆใง1ๅ›žใฎ`ry(pi/4)`ใจ`ry(-pi/4)`ใ‚’ไฝฟ็”จใ—ใฆใ€q[1]ใฎZๅ‡บๅŠ›ใ‚’ใ‚ชใƒ•ใซใ—ใพใ™ใ€‚" ] }, @@ -1738,7 +1738,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "# ใƒœใƒผใƒŠใ‚นใƒฌใƒ™ใƒซ: Sandbox\n", + "## ใƒœใƒผใƒŠใ‚นใƒฌใƒ™ใƒซ: Sandbox\n", "\n", "ใ“ใ‚Œใงใ€ๅฎŒๅ…จใซๅผทๅŠ›ใช้‡ๅญใƒ—ใƒญใ‚ฐใƒฉใƒ ใ‚’ๆง‹็ฏ‰ใ™ใ‚‹ใฎใซๅๅˆ†ใชๅŸบๆœฌ็š„ใช้‡ๅญใ‚ฒใƒผใƒˆใ‚’็†่งฃใงใใพใ—ใŸใ€‚ๆœ€็ต‚ใƒฌใƒ™ใƒซใงใ“ใ‚Œใ‚’ๅ‘ณใ‚ใ†ใ“ใจใŒใงใใพใ™ใ€‚ใ—ใ‹ใ—ใใฎๅ‰ใซใ€ใ“ใ“ใซใ„ใใคใ‹ใฎใƒœใƒผใƒŠใ‚นใƒฌใƒ™ใƒซใŒใ‚ใ‚Šใพใ™ใ€‚\n", "\n", @@ -1804,7 +1804,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "# ใƒœใƒผใƒŠใ‚นใƒฌใƒ™ใƒซ: ่‡ชๅˆ†ใงใƒ‘ใ‚บใƒซใ‚’ใคใใฃใฆใฟใพใ—ใ‚‡ใ†ใ€‚\n", + "## ใƒœใƒผใƒŠใ‚นใƒฌใƒ™ใƒซ: ่‡ชๅˆ†ใงใƒ‘ใ‚บใƒซใ‚’ใคใใฃใฆใฟใพใ—ใ‚‡ใ†ใ€‚\n", "\n", "ใ“ใกใ‚‰ใ‹ใ‚‰ใƒ‘ใ‚บใƒซใ‚’ๆไพ›ใ™ใ‚‹ใ ใ‘ใงใชใใ€ใฟใชใ•ใ‚“ใŒใ”่‡ชๅˆ†ใงใƒ‘ใ‚บใƒซใ‚’ไฝœๆˆใงใใ‚‹ใ‚ˆใ†ใซใ—ใพใ—ใŸใ€‚Quantum Experienceใ‚’ไฝฟ็”จใ™ใ‚‹ใจใ€่‡ชๅˆ†ใฎใƒ‘ใ‚บใƒซใฎnotebookใ‚’็ฐกๅ˜ใซไฝœๆˆใงใใพใ™ใ€‚\n", "\n", @@ -1921,14 +1921,14 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "# ใƒฌใƒ™ใƒซ 5: ้‡ๅญๅค‰ๆ•ฐใฎไธ€ๆ„ๆ€งใฎ่จผๆ˜Ž" + "## ใƒฌใƒ™ใƒซ 5: ้‡ๅญๅค‰ๆ•ฐใฎไธ€ๆ„ๆ€งใฎ่จผๆ˜Ž" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ - "## ๅคๅ…ธๅค‰ๆ•ฐใ‚’็”จใ„ใŸใƒ™ใƒซใฎใƒ†ใ‚นใƒˆ\n", + "### ๅคๅ…ธๅค‰ๆ•ฐใ‚’็”จใ„ใŸใƒ™ใƒซใฎใƒ†ใ‚นใƒˆ\n", "ใ“ใ“ใงใฏใ€้‡ๅญๅค‰ๆ•ฐ(้‡ๅญใƒ“ใƒƒใƒˆใซๅŸบใฅใ)ใŒๆจ™ๆบ–ใฎใ‚‚ใฎ(ใƒ“ใƒƒใƒˆใซๅŸบใฅใ)ใจใฉใฎใ‚ˆใ†ใซ็•ฐใชใ‚‹ใ‹ใ‚’่ชฟๆŸปใ—ใพใ™ใ€‚\n", "\n", "ใ“ใ‚Œใ‚’่กŒใ†ใซใฏใ€`A`ใจ`B`ใจๅ‘ผใถๅค‰ๆ•ฐใฎใƒšใ‚ขใ‚’ไฝœๆˆใ—ใพใ™ใ€‚ใ“ใ‚Œใ‚‰ใŒไฝ•ใงใ‚ใ‚‹ใ‹ใ€ใพใŸใฏใฉใฎใ‚ˆใ†ใซๅˆๆœŸๅŒ–ใ•ใ‚Œใ‚‹ใ‹ใซใคใ„ใฆใฏใ€ๆกไปถใ‚’่จญๅฎšใ—ใพใ›ใ‚“ใ€‚ใ—ใŸใŒใฃใฆใ€ๅคšใใฎๅฏ่ƒฝๆ€งใŒใ‚ใ‚Šใพใ™ใ€‚\n", @@ -2076,27 +2076,37 @@ "\n", "ใ“ใฎ็†็”ฑใ‚’็†่งฃใ™ใ‚‹ใŸใ‚ใซใ€`hash2bit(A, H)`ใจ`hash2bit(B,V)`ใŒใฉใฎๅฎŸ่กŒใงใ‚‚้•ใ†ๅ€คใซใชใ‚‰ใชใ„ใ“ใจใ‚’`P['HV'] = 0.0`ใŒ็คบใ—ใฆใ„ใ‚‹ใ“ใจใ‹ใ‚‰ๅง‹ใ‚ใพใ—ใ‚‡ใ†ใ€‚ใคใพใ‚Šใ€ใ“ใ‚Œใฏๅธธใซใใ‚Œใ‚‰ใŒ็ญ‰ใ—ใ„ใ“ใจใ‚’ๆœŸๅพ…ใงใใ‚‹ใ“ใจใ‚’ๆ„ๅ‘ณใ—ใพใ™ใ€‚\n", "\n", + "```\n", " hash2bit(A, H) = hash2bit(B, V) (1)\n", - " \n", + "```\n", + "\n", "`P['VV'] = 0.0`ใŠใ‚ˆใณ`P['VH'] = 0.0`ใ‹ใ‚‰ใ€ๅŒๆง˜ใซไปฅไธ‹ใŒๅ–ๅพ—ใงใใพใ™ใ€‚\n", "\n", + "```\n", " hash2bit(A, V) = hash2bit(B, V) (2)\n", " \n", " hash2bit(A, V) = hash2bit(B, H) (3)\n", - " \n", + "```\n", + "\n", "(1)ใจ(2)ใ‚’็ต„ใฟๅˆใ‚ใ›ใ‚‹ใจใ€\n", "\n", + "```\n", " hash2bit(A, H) = hash2bit(A, V) (4)\n", - " \n", + "```\n", + "\n", "ใ“ใ‚Œใ‚’(3)ใจ็ต„ใฟๅˆใ‚ใ›ใ‚‹ใจใ€\n", "\n", + "```\n", " hash2bit(A, H) = hash2bit(B, H) (5)\n", + "```\n", "\n", "ใใ—ใฆใ€ใ“ใ‚Œใ‚‰ใฎๅ€คใŒๅธธใซ็ญ‰ใ—ใ„ๅ ดๅˆใ€็•ฐใชใ‚‹ๅฎŸ่กŒใฏใ‚ใ‚Šใˆใพใ›ใ‚“ใ€‚ใ“ใ‚Œใฏใพใ•ใซ็งใŸใกใŒ่จผๆ˜Žใ—ใ‚ˆใ†ใจใ—ใŸใ‚‚ใฎใงใ™๏ผš `P['HH'] = 0.0`\n", "\n", "ใ‚ˆใ‚Šไธ€่ˆฌ็š„ใซใฏใ€`P['HV']`ใ€ `P['VH']`ใ€ใŠใ‚ˆใณ`P['VV']`ใฎๅ€คใ‚’ไฝฟ็”จใ—ใฆใ€`P['HH']`ใฎไธŠ้™ใ‚’่จญๅฎšใงใใพใ™ใ€‚[CHSHไธ็ญ‰ๅผ](https://en.wikipedia.org/wiki/CHSH_inequality)ใ‚’้ฉๅฟœใ•ใ›ใ‚‹ใ“ใจใซใ‚ˆใ‚Šใ€ๆฌกใฎใ“ใจใŒใ‚ใ‹ใ‚Šใพใ™ใ€‚\n", "\n", - "$\\,\\,\\,\\,\\,\\,\\,$ `P['HH']` $\\, \\leq \\,$ `P['HV'] + P['VH'] + P['VV']`\n", + "```\n", + "P['HH'] โ‰ค P['HV'] + P['VH'] + P['VV']\n", + "```\n", "\n", "ใ“ใ‚Œใฏใ€`P['HHโ€™]`ใ ใ‘ใฎ็‰นๅˆฅใช็‰นๅพดใงใฏใ‚ใ‚Šใพใ›ใ‚“ใ€‚ไป–ใฎใ™ในใฆใฎ็ขบ็Ž‡ใซใ‚‚ๅฝ“ใฆใฏใพใ‚Šใพใ™ใ€‚ใ“ใ‚Œใ‚‰ใฎ็ขบ็Ž‡ใฎใใ‚Œใžใ‚Œใฏใ€ไป–ใฎ็ขบ็Ž‡ใฎๅˆ่จˆใ‚ˆใ‚Šๅคงใใใ™ใ‚‹ใ“ใจใฏใงใใพใ›ใ‚“ใ€‚\n", "\n", @@ -2149,7 +2159,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "## ้‡ๅญๅค‰ๆ•ฐใ‚’็”จใ„ใŸใƒ™ใƒซใฎใƒ†ใ‚นใƒˆ\n", + "### ้‡ๅญๅค‰ๆ•ฐใ‚’็”จใ„ใŸใƒ™ใƒซใฎใƒ†ใ‚นใƒˆ\n", "ใ“ใ“ใงใ€ๅค‰ๆ•ฐAใจBใŒ้‡ๅญๅค‰ๆ•ฐใซใชใ‚‹ใ“ใจใ‚’้™คใ„ใฆใ€ๅŒใ˜ใ“ใจใ‚’ใ‚‚ใ†ไธ€ๅบฆใ‚„ใ‚Š็›ดใ—ใพใ™ใ€‚ๅ…ทไฝ“็š„ใซใฏใ€ใใ‚Œใ‚‰ใฏๆœ€ใ‚‚ๅ˜็ด”ใช็จฎ้กžใฎ้‡ๅญๅค‰ๆ•ฐใ€ใคใพใ‚Š้‡ๅญใƒ“ใƒƒใƒˆใซใชใ‚Šใพใ™ใ€‚" ] }, @@ -2220,7 +2230,7 @@ "\n", "้ธๆŠžใ™ใ‚‹ใจใ„ใ†ใ“ใจใฏใ€็ขบ็Ž‡`P['HH']`ใ€`P['HV']`ใ€`P['VH']`ใ€ใŠใ‚ˆใณ`P['VV']`ใŒ็›ค้ขไธŠใฎๅ††ใซๆ˜Ž็คบ็š„ใซๅฏพๅฟœใ™ใ‚‹ใ“ใจใ‚’ๆ„ๅ‘ณใ™ใ‚‹ใ“ใจใซๆณจๆ„ใ—ใฆใใ ใ•ใ„ใ€‚ใŸใจใˆใฐใ€ไธ€็•ชไธŠใฎๅ††ใฏใ€2ใคใฎXๅ‡บๅŠ›ใŒไธ€่‡ดใ—ใชใ„ๅฏ่ƒฝๆ€งใŒใฉใฎ็จ‹ๅบฆใ‚ใ‚‹ใ‹ใ‚’็คบใ—ใฆใ„ใพใ™ใ€‚ใ“ใ‚ŒใŒ็™ฝใฎๅ ดๅˆใ€`P['HH'] = 1`ใ€้ป’ใฎๅ ดๅˆใ€`P['HH'] = 0`ใงใ™ใ€‚\n", "\n", - "### ็ทด็ฟ’ๅ•้กŒ\n", + "#### ็ทด็ฟ’ๅ•้กŒ\n", "* ไธกๆ–นใฎ้‡ๅญใƒ“ใƒƒใƒˆใฎXๅ‡บๅŠ›ใŒไธ€่‡ดใ—ใชใ„ๅฏ่ƒฝๆ€งใŒ้ซ˜ใใ€ไป–ใฎใ™ในใฆใฎๅ‡บๅŠ›ใฎ็ต„ใฟๅˆใ‚ใ›ใŒไธ€่‡ดใ™ใ‚‹ๅฏ่ƒฝๆ€งใŒ้ซ˜ใใชใ‚‹ใ‚ˆใ†ใซใ—ใพใ™ใ€‚" ] }, @@ -2266,12 +2276,15 @@ "source": [ "`P`ใฎๅ€คใฏใ€ไปฅไธ‹ใฎ้–ขๆ•ฐใง่จˆ็ฎ—ใ•ใ‚Œใพใ™ใ€‚ใ“ใ‚Œใงใฏใ€ใ“ใ“ใงใฏใ€ใ“ใฎnotebookใฎไป–ใฎ้ƒจๅˆ†ใฎใƒ‘ใ‚บใƒซใจๅŒๆง˜ใซใ€ๅฏ่ƒฝใชๅ‡บๅŠ›ใ‚’ไธŽใˆใŸใ‚ตใƒณใƒ—ใƒซใฎๆ•ฐใŒใ‚ใ‹ใ‚‹็ตๆžœใ‚’ๅพ—ใฆใ„ใพใ™ใ€‚ๅ‡บๅŠ›ใฏใƒ“ใƒƒใƒˆๆ–‡ๅญ—ๅˆ—ใ€`ๆ–‡ๅญ—ๅˆ—`ใจใ—ใฆๆไพ›ใ•ใ‚Œใ€Qiskitใฏๅณใ‹ใ‚‰ๅทฆใซ็•ชๅทใ‚’ไป˜ใ‘ใพใ™ใ€‚ ใ“ใ‚Œใฏใ€`bit[0]`ใซๅฏพๅฟœใ™ใ‚‹aใฎๅ€คใŒๅณใ‹ใ‚‰1็•ช็›ฎใงใ‚ใ‚‹ใ“ใจใ‚’ๆ„ๅ‘ณใ—ใพใ™ใ€‚\n", "\n", + "```\n", " a = string[-1]\n", + "```\n", "\n", "`b`ใฎๅ€คใฏใ€ๅณใ‹ใ‚‰2็•ช็›ฎใฎใ™ใ้šฃใซใ‚ใ‚Šใพใ™ใ€‚\n", "\n", + "```\n", " b = string[-2]\n", - "\n", + "```\n", "\n", "ใ“ใฎใƒ“ใƒƒใƒˆๆ–‡ๅญ—ๅˆ—ใฎใ‚ตใƒณใƒ—ใƒซๆ•ฐใฏใ€็ตๆžœใฎ่พžๆ›ธๅž‹`stats`ใซใ‚ˆใฃใฆ`stats [string]`ใจใ—ใฆๆไพ›ใ•ใ‚Œใพใ™ใ€‚" ] @@ -2363,8 +2376,10 @@ "\n", "็ญ”ใˆใฏใ€ใใฎ่ซ–็†ใซใฏ้š ใ•ใ‚ŒใŸไปฎๅฎšใŒใ‚ใ‚‹ใจใ„ใ†ใ“ใจใงใ™ใ€‚ใใฎ็†็”ฑใ‚’็†่งฃใ™ใ‚‹ใŸใ‚ใซใ€ๅผ(4)ใซๆˆปใ‚Šใพใ—ใ‚‡ใ†ใ€‚\n", "\n", + "```\n", " hash2bit ( A, H ) = hash2bit ( A, V ) (4)\n", - " \n", + "```\n", + "\n", "ใ“ใ“ใงใฏใ€ๅค‰ๆ•ฐ`A`ใฎ`H`ใ‚ฟใ‚คใƒ—ใฎใƒใƒƒใ‚ทใƒฅใ‹ใ‚‰ๅ–ๅพ—ใ™ใ‚‹ๅ€คใ‚’`V`ใ‚ฟใ‚คใƒ—ใฎใƒใƒƒใ‚ทใƒฅใฎๅ€คใจๆฏ”่ผƒใ—ใพใ™ใ€‚\n", "\n", "ๅคๅ…ธ็š„ใชๅค‰ๆ•ฐใฎๅ ดๅˆใ€ใ“ใ‚ŒใฏๅฎŒๅ…จใซ็†ใซใ‹ใชใฃใฆใ„ใพใ™ใ€‚ไธกๆ–นใฎใƒใƒƒใ‚ทใƒฅใ‚’่จˆ็ฎ—ใ—ใฆ็ตๆžœใ‚’ๆฏ”่ผƒใ™ใ‚‹ใ“ใจใ‚’ๅฆจใ’ใ‚‹ใ‚‚ใฎใฏไฝ•ใ‚‚ใ‚ใ‚Šใพใ›ใ‚“ใ€‚ๅค‰ๆ•ฐใฎใƒใƒƒใ‚ทใƒฅใ‚’่จˆ็ฎ—ใ™ใ‚‹ใจๅค‰ๆ•ฐใŒๅค‰ๆ›ดใ•ใ‚Œใฆใ‚‚ใ€ใใ‚Œใฏๅ•้กŒใงใฏใ‚ใ‚Šใพใ›ใ‚“ใ€‚ไบ‹ๅ‰ใซใ‚ณใƒ”ใƒผใ™ใ‚‹ใ ใ‘ใงใ€ไธกๆ–นใฎใƒใƒƒใ‚ทใƒฅใ‚’ๅ•้กŒใชใๅฎŸ่กŒใงใใพใ™ใ€‚\n", diff --git a/translations/ja/v1/toc.yaml b/translations/ja/v1/toc.yaml index 2961b6390..e5cd9d650 100755 --- a/translations/ja/v1/toc.yaml +++ b/translations/ja/v1/toc.yaml @@ -1,10 +1,10 @@ - title: ๅ‰ๆๆกไปถ url: /ch-prerequisites sections: - - id: environment-setup-guide-to-work-with-qiskit-textbook + - id: setting-the-environment uuid: a5a86ddc-b519-11ec-b909-0242ac120002 url: /ch-prerequisites/setting-the-environment - - id: introduction-to-python-and-jupyter-notebooks + - id: python-and-jupyter-notebooks uuid: a9f5ea68-b519-11ec-b909-0242ac120002 url: /ch-prerequisites/python-and-jupyter-notebooks @@ -24,7 +24,7 @@ - id: single-qubit-gates uuid: bd4334a4-b519-11ec-b909-0242ac120002 url: /ch-states/single-qubit-gates - - id: the-case-for-quantum-computers + - id: case-for-quantum uuid: c0bbff62-b519-11ec-b909-0242ac120002 url: /ch-states/case-for-quantum @@ -41,13 +41,13 @@ - id: phase-kickback uuid: cb7353ec-b519-11ec-b909-0242ac120002 url: /ch-gates/phase-kickback - - id: basic-circuit-identities + - id: more-circuit-identities uuid: ce8ce75a-b519-11ec-b909-0242ac120002 url: /ch-gates/more-circuit-identities - id: proving-universality uuid: d15d3548-b519-11ec-b909-0242ac120002 url: /ch-gates/proving-universality - - id: classical-computation-on-a-quantum-computer + - id: oracles uuid: d4f6e424-b519-11ec-b909-0242ac120002 url: /ch-gates/oracles @@ -55,16 +55,16 @@ - title: ้‡ๅญใƒ—ใƒญใƒˆใ‚ณใƒซใจ้‡ๅญใ‚ขใƒซใ‚ดใƒชใ‚บใƒ  url: /ch-algorithms sections: - - id: quantum-circuits + - id: defining-quantum-circuits uuid: d90cbfb6-b519-11ec-b909-0242ac120002 url: /ch-algorithms/defining-quantum-circuits - - id: deutsch-jozsa-algorithm + - id: deutsch-jozsa uuid: dc9d3aa2-b519-11ec-b909-0242ac120002 url: /ch-algorithms/deutsch-jozsa - - id: bernstein-vazirani-algorithm + - id: bernstein-vazirani uuid: df6e5a40-b519-11ec-b909-0242ac120002 url: /ch-algorithms/bernstein-vazirani - - id: simons-algorithm + - id: simon uuid: e2714126-b519-11ec-b909-0242ac120002 url: /ch-algorithms/simon - id: quantum-fourier-transform @@ -73,16 +73,19 @@ - id: quantum-phase-estimation uuid: e8ac9ec8-b519-11ec-b909-0242ac120002 url: /ch-algorithms/quantum-phase-estimation - - id: shors-algorithm + - id: shor uuid: ec157cd8-b519-11ec-b909-0242ac120002 url: /ch-algorithms/shor - - id: grovers-algorithm + - id: grover uuid: eebb7488-b519-11ec-b909-0242ac120002 url: /ch-algorithms/grover - id: quantum-counting uuid: f1a9942c-b519-11ec-b909-0242ac120002 url: /ch-algorithms/quantum-counting - - id: quantum-teleportation + - id: quantum-walk-search-algorithm + uuid: 9a061c81-d490-4fff-bb71-727408234082 + url: /ch-algorithms/quantum-walk-search-algorithm + - id: teleportation uuid: f4f4a090-b519-11ec-b909-0242ac120002 url: /ch-algorithms/teleportation - id: superdense-coding @@ -96,32 +99,32 @@ - title: ้‡ๅญใ‚ขใƒ—ใƒชใ‚ฑใƒผใ‚ทใƒงใƒณใฎใ‚ขใƒซใ‚ดใƒชใ‚บใƒ  url: /ch-applications sections: - - id: solving-linear-systems-of-equations-using-hhl-and-its-qiskit-implementation + - id: hhl_tutorial uuid: 01484810-b51a-11ec-b909-0242ac120002 url: /ch-applications/hhl_tutorial - - id: simulating-molecules-using-vqe + - id: vqe-molecules uuid: 041df288-b51a-11ec-b909-0242ac120002 url: /ch-applications/vqe-molecules - - id: solving-combinatorial-optimization-problems-using-qaoa + - id: qaoa uuid: 06ff7ada-b51a-11ec-b909-0242ac120002 url: /ch-applications/qaoa - - id: solving-satisfiability-problems-using-grovers-algorithm + - id: satisfiability-grover uuid: 09d1529c-b51a-11ec-b909-0242ac120002 url: /ch-applications/satisfiability-grover - - id: hybrid-quantum-classical-neural-networks-with-pytorch-and-qiskit + - id: machine-learning-qiskit-pytorch uuid: 0cac4d14-b51a-11ec-b909-0242ac120002 url: /ch-machine-learning/machine-learning-qiskit-pytorch - - id: the-variational-quantum-linear-solver + - id: vqls uuid: 1163f456-b51a-11ec-b909-0242ac120002 url: /ch-paper-implementations/vqls - - id: flexible-representation-of-quantum-images-frqi + - id: image-processing-frqi-neqr uuid: 14acf6a8-b51a-11ec-b909-0242ac120002 url: /ch-applications/image-processing-frqi-neqr - title: ้‡ๅญๅ›ž่ทฏใซใ‚ˆใ‚‹้‡ๅญใƒใƒผใƒ‰ใ‚ฆใ‚งใ‚ขใฎๆŽข็ฉถ url: /quantum-hardware sections: - - id: introduction-to-quantum-error-correction-via-the-repetition-code + - id: error-correction-repetition-code uuid: 197f7f66-b51a-11ec-b909-0242ac120002 url: /ch-quantum-hardware/error-correction-repetition-code - id: measurement-error-mitigation @@ -138,16 +141,16 @@ - title: ใƒžใ‚คใ‚ฏใƒญๆณขใƒ‘ใƒซใ‚นใซใ‚ˆใ‚‹้‡ๅญใƒใƒผใƒ‰ใ‚ฆใ‚งใ‚ขใฎๆŽข็ฉถ url: /quantum-hardware-pulses sections: - - id: calibrating-qubits-using-qiskit-pulse + - id: calibrating-qubits-pulse uuid: 292100ca-b51a-11ec-b909-0242ac120002 url: /ch-quantum-hardware/calibrating-qubits-pulse - - id: accessing-higher-energy-states-with-qiskit-pulse + - id: accessing_higher_energy_states uuid: 2bf0d316-b51a-11ec-b909-0242ac120002 url: /ch-quantum-hardware/accessing_higher_energy_states - - id: introduction-to-transmon-physics + - id: transmon-physics uuid: 2e944e0e-b51a-11ec-b909-0242ac120002 url: /ch-quantum-hardware/transmon-physics - - id: circuit-quantum-electrodynamics + - id: cQED-JC-SW uuid: 31b2ccdc-b51a-11ec-b909-0242ac120002 url: /ch-quantum-hardware/cQED-JC-SW @@ -155,10 +158,10 @@ - title: ้‡ๅญใ‚ณใƒณใƒ”ใƒฅใƒผใƒ†ใ‚ฃใƒณใ‚ฐใƒปใƒฉใƒœ url: /ch-labs sections: - - id: lab-1-quantum-circuits + - id: Lab01_QuantumCircuits uuid: 3ff5a7ec-b51a-11ec-b909-0242ac120002 url: /ch-labs/Lab01_QuantumCircuits - - id: lab-2-quantum-measurement + - id: Lab02_QuantumMeasurement uuid: 82eb9557-1420-487b-a3a5-72fdf38878e8 url: /ch-labs/Lab02_QuantumMeasurement @@ -166,10 +169,10 @@ - title: Appendix(ไป˜้Œฒ) url: /ch-appendix sections: - - id: an-introduction-to-linear-algebra-for-quantum-computing + - id: linear_algebra uuid: 5d2bb2ca-b51a-11ec-b909-0242ac120002 url: /ch-appendix/linear_algebra - - id: basic-qiskit-syntax + - id: qiskit uuid: 5fd6b79a-b51a-11ec-b909-0242ac120002 url: /ch-appendix/qiskit @@ -177,9 +180,9 @@ - title: ใ‚ฒใƒผใƒ ใจใƒ‡ใƒข url: /ch-demos sections: - - id: bonus-level-sandbox + - id: hello-qiskit uuid: 63a85f0e-b51a-11ec-b909-0242ac120002 url: /ch-ex/hello-qiskit - - id: estimating-pi-using-quantum-phase-estimation-algorithm + - id: piday-code uuid: 69b9707c-b51a-11ec-b909-0242ac120002 url: /ch-demos/piday-code diff --git a/translations/ja/v2/basics/multiple-systems.ipynb b/translations/ja/v2/basics/multiple-systems.ipynb index 4b8e8a09e..f1acc5537 100755 --- a/translations/ja/v2/basics/multiple-systems.ipynb +++ b/translations/ja/v2/basics/multiple-systems.ipynb @@ -1158,7 +1158,7 @@ "4 ใคใฎใƒ™ใƒซใฎ็Šถๆ…‹ใฎใ™ในใฆใฎ้›†ใพใ‚Š\n", "\n", "$$\n", - " \\bigl\\{\\vert \\phi^+ \\rangle, \\vert \\phi^- \\rangle, \\vert \\psi^+ \\rangle, \\vert \\psi^+ \\rangle\\bigr\\}\n", + " \\bigl\\{\\vert \\phi^+ \\rangle, \\vert \\phi^- \\rangle, \\vert \\psi^+ \\rangle, \\vert \\psi^- \\rangle\\bigr\\}\n", "$$\n", "\n", "ใฏใ€ *ใƒ™ใƒซๅŸบๅบ•*ใจใ—ใฆ็Ÿฅใ‚‰ใ‚Œใฆใ„ใพใ™ใ€‚ 2้‡ๅญใƒ“ใƒƒใƒˆใฎไปปๆ„ใฎ้‡ๅญ็Šถๆ…‹ใƒ™ใ‚ฏใƒˆใƒซใ€ใพใŸใฏๅฎŸ้š›ใซใฏ 2 ใƒ“ใƒƒใƒˆใฎ 4 ใคใฎๅคๅ…ธ็š„ใช็Šถๆ…‹ใซๅฏพๅฟœใ™ใ‚‹่ฆ็ด ใ‚’ๆŒใคไปปๆ„ใฎ่ค‡็ด ใƒ™ใ‚ฏใƒˆใƒซใฏใ€4 ใคใฎใƒ™ใƒซ็Šถๆ…‹ใฎ็ทšๅฝข็ตๅˆใจใ—ใฆ่กจ็พใงใใพใ™ใ€‚ไพ‹ใˆใฐใ€ๆฌกใฎใ‚ˆใ†ใซใชใ‚Šใพใ™ใ€‚\n", @@ -1704,7 +1704,7 @@ "\n", "2ใคใฎใ‚ทใ‚นใƒ†ใƒ ใซๆณจ็›ฎใ™ใ‚‹ใจใ€ $\\mathsf{X}$ ใŒๅคๅ…ธ็Šถๆ…‹ใฎ้›†ๅˆ $\\Sigma$ ใ‚’ๆŒใคใ‚ทใ‚นใƒ†ใƒ ใ€ $\\mathsf{Y}$ ใŒๅคๅ…ธ็Šถๆ…‹้›†ๅˆ $\\Gamma$ ใ‚’ๆŒใคใ‚ทใ‚นใƒ†ใƒ ใงใ‚ใ‚Œใฐใ€ๅˆๆˆใ‚ทใ‚นใƒ†ใƒ ใฎๅคๅ…ธ็Šถๆ…‹ใฎ้›†ๅˆ $(\\mathsf{X},\\mathsf{Y})$ ใฏ $\\Sigma\\times\\Gamma$ ใงใ™ใ€‚ ใ—ใŸใŒใฃใฆใ€ใ“ใฎๅˆๆˆใ‚ทใ‚นใƒ†ใƒ ใซๅฏพใ—ใฆๅฎŸ่กŒๅฏ่ƒฝใชๆผ”็ฎ—ใฎ้›†ๅˆใฏใ€่กŒใจๅˆ—ใŒ้›†ๅˆ $\\Sigma\\times\\Gamma$ ใซๅฏพๅฟœใ™ใ‚‹ใ‚ˆใ†ใซ้…็ฝฎใ•ใ‚ŒใŸใƒฆใƒ‹ใ‚ฟใƒชใƒผ่กŒๅˆ—ใง่กจ็พใ•ใ‚Œใพใ™ใ€‚ใ“ใฎ่กŒๅˆ—ใฎ่กŒใจๅˆ—ใฎไธฆใณใฏใ€ใ‚ทใ‚นใƒ†ใƒ  $(\\mathsf{X},\\mathsf{Y})$ ใฎ้‡ๅญ็Šถๆ…‹ใƒ™ใ‚ฏใƒˆใƒซใซ็”จใ„ใ‚‰ใ‚Œใ‚‹ไธฆใณใจๅŒใ˜ใงใ™ใ€‚\n", "\n", - "ไพ‹ใˆใฐใ€ $\\Sigma = \\{1,2,3\\}$ ใจ $\\Gamma = \\{0,1\\}$ ใจใ™ใ‚‹ใจใ€ใƒ‡ใ‚ซใƒซใƒˆ็ฉ $\\{1,2,3\\}\\times\\{0,1\\}$ ใฎ่ฆ็ด ใฎ้ †็•ชใฏใ€ $(1,0)$, $(1,1)$, $(2,0)$, $(2,1)$, $(3,0)$, $(3,1)$ ใŒๆจ™ๆบ–ใงใ‚ใ™ใ€‚
ไปฅไธ‹ใฏใ€ $(\\mathsf{X},\\mathsf{Y})$ ไธŠใฎๆผ”็ฎ—ใ‚’่กจใ™ใƒฆใƒ‹ใ‚ฟใƒชใƒผ่กŒๅˆ—ใฎไพ‹ใงใ™ใ€‚\n", + "ไพ‹ใˆใฐใ€ $\\Sigma = \\{1,2,3\\}$ ใจ $\\Gamma = \\{0,1\\}$ ใจใ™ใ‚‹ใจใ€ใƒ‡ใ‚ซใƒซใƒˆ็ฉ $\\{1,2,3\\}\\times\\{0,1\\}$ ใฎ่ฆ็ด ใฎ้ †็•ชใฏใ€ $(1,0)$, $(1,1)$, $(2,0)$, $(2,1)$, $(3,0)$, $(3,1)$ ใŒๆจ™ๆบ–ใงใ™ใ€‚
ไปฅไธ‹ใฏใ€ $(\\mathsf{X},\\mathsf{Y})$ ไธŠใฎๆผ”็ฎ—ใ‚’่กจใ™ใƒฆใƒ‹ใ‚ฟใƒชใƒผ่กŒๅˆ—ใฎไพ‹ใงใ™ใ€‚\n", "\n", "$$\n", "U = \n", @@ -1874,7 +1874,7 @@ "\n", "ๆŽˆๆฅญใ‚’็ท ใ‚ใใใ‚‹ใŸใ‚ใซใ€่ค‡ๆ•ฐใ‚ทใ‚นใƒ†ใƒ ใงใฎใƒฆใƒ‹ใ‚ฟใƒชใƒผๆผ”็ฎ—ใฎไพ‹ใ‚’ 2 ใค่ฆ‹ใฆใฟใพใ—ใ‚‡ใ†ใ€‚*ใ‚นใƒฏใƒƒใƒ—ๆผ”็ฎ—*ใ‹ใ‚‰ๅง‹ใ‚ใพใ™ใ€‚\n", "\n", - "$\\mathsf{X}$ ใจ $\\mathsf{Y}$ ใŒใ€ๅŒใ˜ๅคๅ…ธ็š„ใช็Šถๆ…‹ใ‚ปใƒƒใƒˆ $\\Sigma$ ใ‚’ๅ…ฑๆœ‰ใ™ใ‚‹ใ‚ทใ‚นใƒ†ใƒ ใงใ‚ใ‚‹ใจใ—ใพใ™ใ€‚ใƒšใ‚ข $(\\mathsf{X},\\mathsf{Y})$ ใฎ*ใ‚นใƒฏใƒƒใƒ—*ๆ“ไฝœใฏใ€2 ใคใฎใ‚ทใ‚นใƒ†ใƒ ใฎๅ†…ๅฎนใ‚’ไบคๆ›ใ™ใ‚‹ๆ“ไฝœใงใ™ใŒใ€ใใ‚Œไปฅๅค–ใฎๅ ดๅˆใฏใ‚ทใ‚นใƒ†ใƒ ใ‚’ใใฎใพใพใซใ—ใฆใŠใใพใ™ (ใ—ใŸใŒใฃใฆใ€$\\mathsf{X}$ ใฏๆฎ‹ใ‚Šใพใ™)ใ€‚ๅทฆๅดใซใ€$\\mathsf{Y}$ ใŒๅณๅดใซๆฎ‹ใ‚Šใพใ™)ใ€‚\n", + "$\\mathsf{X}$ ใจ $\\mathsf{Y}$ ใŒใ€ๅŒใ˜ๅคๅ…ธ็š„ใช็Šถๆ…‹ใ‚ปใƒƒใƒˆ $\\Sigma$ ใ‚’ๅ…ฑๆœ‰ใ™ใ‚‹ใ‚ทใ‚นใƒ†ใƒ ใงใ‚ใ‚‹ใจใ—ใพใ™ใ€‚ใƒšใ‚ข $(\\mathsf{X},\\mathsf{Y})$ ใฎ*ใ‚นใƒฏใƒƒใƒ—*ๆ“ไฝœใฏใ€2 ใคใฎใ‚ทใ‚นใƒ†ใƒ ใฎๅ†…ๅฎนใ‚’ไบคๆ›ใ™ใ‚‹ๆ“ไฝœใงใ™ใŒใ€ใใ‚Œไปฅๅค–ใฎๅ ดๅˆใฏใ‚ทใ‚นใƒ†ใƒ ใ‚’ใใฎใพใพใซใ—ใฆใŠใใพใ™ (ใ—ใŸใŒใฃใฆใ€ $\\mathsf{X}$ ใฏๅทฆๅดใซใ€ $\\mathsf{Y}$ ใŒๅณๅดใซๆฎ‹ใ‚Šใพใ™)ใ€‚\n", "\n", "ใ“ใฎๆผ”็ฎ—ใ‚’ $\\operatorname{SWAP}$ ใจๆ›ธใใ€ๅคๅ…ธ็š„ใช็Šถๆ…‹ $a,b\\in\\Sigma$ ใฎใ™ในใฆใฎ้ธๆŠžใซๅฏพใ—ใฆใ€ๆฌกใฎใ‚ˆใ†ใซๆ“ไฝœใ—ใพใ™ใ€‚\n", "\n", @@ -2053,7 +2053,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "ไปฅไธ‹ใฎๅˆฅใฎไพ‹ใงใฏใ€ $|{-}\\rangle$ ใŠใ‚ˆใณ $\\tfrac{1}{\\sqrt{2}}(|0\\rangle + i|1\\rangle)$ ็Šถๆ…‹ใ‚’่กจใ™็Šถๆ…‹ใƒ™ใ‚ฏใƒˆใƒซใ‚’ไฝœๆˆใ—ใ€ๅˆๆˆใ—ใฆใ€ๆ–ฐใ—ใ„็Šถๆ…‹ใƒ™ใ‚ฏใƒˆใƒซใ‚’ไฝœๆˆใ—ใพใ™ใ€‚ใ“ใฎๆ–ฐใ—ใ„ใƒ™ใ‚ฏใƒˆใƒซใ‚’ๅค‰ๆ•ฐ`psi`ใซๅ‰ฒใ‚Šๅฝ“ใฆใพใ™ใ€‚" + "ไปฅไธ‹ใฎๅˆฅใฎไพ‹ใงใฏใ€ $|{+}\\rangle$ ใŠใ‚ˆใณ $\\tfrac{1}{\\sqrt{2}}(|0\\rangle + i|1\\rangle)$ ็Šถๆ…‹ใ‚’่กจใ™็Šถๆ…‹ใƒ™ใ‚ฏใƒˆใƒซใ‚’ไฝœๆˆใ—ใ€ๅˆๆˆใ—ใฆใ€ๆ–ฐใ—ใ„็Šถๆ…‹ใƒ™ใ‚ฏใƒˆใƒซใ‚’ไฝœๆˆใ—ใพใ™ใ€‚ใ“ใฎๆ–ฐใ—ใ„ใƒ™ใ‚ฏใƒˆใƒซใ‚’ๅค‰ๆ•ฐ`psi`ใซๅ‰ฒใ‚Šๅฝ“ใฆใพใ™ใ€‚" ] }, { diff --git a/translations/ja/v2/ch-algorithms/quantum-walk-search-algorithm.ipynb b/translations/ja/v2/ch-algorithms/quantum-walk-search-algorithm.ipynb new file mode 100644 index 000000000..c72f4b83f --- /dev/null +++ b/translations/ja/v2/ch-algorithms/quantum-walk-search-algorithm.ipynb @@ -0,0 +1,709 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "id": "8c521bc3", + "metadata": { + "tags": [ + "remove_cell" + ] + }, + "source": [ + "# ้‡ๅญใ‚ฆใ‚ฉใƒผใ‚ฏใซใ‚ˆใ‚‹ๆŽข็ดขใ‚ขใƒซใ‚ดใƒชใ‚บใƒ " + ] + }, + { + "cell_type": "markdown", + "id": "55932bd9", + "metadata": {}, + "source": [ + "้‡ๅญใ‚ฆใ‚ฉใƒผใ‚ฏใฏๅคๅ…ธใฎใƒžใƒซใ‚ณใƒ•้€ฃ้Ž–ใฎ้‡ๅญ็‰ˆใงใ‚ใ‚Šใ€ๅคšใใฎ้‡ๅญใ‚ขใƒซใ‚ดใƒชใ‚บใƒ ใซใจใฃใฆ้‡่ฆใชใ‚‚ใฎใงใ™ใ€‚ใ“ใฎ็ซ ใงใฏใ‚ฐใƒฉใƒ•ไธŠใซใƒžใƒผใ‚ฏใ—ใŸ่ฆ็ด ใ‚’่ฆ‹ใคใ‘ใ‚‹้‡ๅญใ‚ฆใ‚ฉใƒผใ‚ฏใซใ‚ˆใ‚‹ๆŽข็ดขใ‚ขใƒซใ‚ดใƒชใ‚บใƒ ใ‚’ๅฎŸ่ฃ…ใ—ใพใ™ใ€‚ใ“ใฎใ‚ขใƒซใ‚ดใƒชใ‚บใƒ ใฏๅคๅ…ธใซๆฏ”ในใฆไบŒๆฌกๅŠ ้€Ÿใ‚’ๆŒใกใพใ™ใ€‚\n", + "\n", + "\n", + "## 1. ๅคๅ…ธใƒžใƒซใ‚ณใƒ•้€ฃ้Ž– \n", + "ใƒžใƒซใ‚ณใƒ•้€ฃ้Ž–ใฏ็พๅฎŸใฎใƒ—ใƒญใ‚ปใ‚นใ‚’ใƒขใƒ‡ใƒซๅŒ–ใ™ใ‚‹ใŸใ‚ใซใ‚ˆใไฝฟใ‚ใ‚Œใ‚‹็ขบ็Ž‡้Ž็จ‹ใงใ™ใ€‚็Šถๆ…‹ใจ้ท็งป็ขบ็Ž‡ใ‹ใ‚‰ใชใ‚Šใ€ๅ„ๆ™‚้–“ใ‚นใƒ†ใƒƒใƒ—ใงใฎ็Šถๆ…‹้–“ใฎ็ขบ็Ž‡ใฎ็งปๅ‹•ใ‚’่จ˜่ฟฐใ—ใพใ™ใ€‚ใ“ใ“ใง็ดนไป‹ใ™ใ‚‹้›ขๆ•ฃๆ™‚้–“ใƒžใƒซใ‚ณใƒ•้€ฃ้Ž–ใงใฏใ€ๆ™‚้–“ใ‚นใƒ†ใƒƒใƒ—ใฏ้›ขๆ•ฃ็š„ใงใ™ใ€‚ใƒžใƒซใ‚ณใƒ•้€ฃ้Ž–ใฏใƒžใƒซใ‚ณใƒ•ๆ€งใ‚’ๆบ€ใŸใ—ใพใ™ใ€ใคใพใ‚Šๆฌกใฎใ‚นใƒ†ใƒƒใƒ—ใงใฎ็ขบ็Ž‡้Ž็จ‹ใฏ็พๅœจใฎใ‚นใƒ†ใƒƒใƒ—ใฎใฟใซไพๅญ˜ใ—ใฆใ€ใใ‚Œไปฅๅ‰ใซใฏไพๅญ˜ใ—ใพใ›ใ‚“ใ€‚ใƒžใƒซใ‚ณใƒ•้€ฃ้Ž–ใฏ็Šถๆ…‹้–“ใฎ็ขบ็Ž‡ใฎ็งปๅ‹•ใ‚’่กจ็พใ™ใ‚‹้ท็งป่กŒๅˆ— P ใ‚’ๆŒใกใพใ™ใ€‚ใ“ใ“ใงใ€ใƒžใƒซใ‚ณใƒ•้€ฃ้Ž–ใฎไพ‹ใจใ€ใใฎ้ท็งป่กŒๅˆ— $P$ ใ‚’็คบใ—ใพใ™ใ€‚\n", + "\n", + "\n", + " $$\n", + " P\n", + " = \\begin{pmatrix}\n", + " 0.1 & 0.3 & 0.3\\\\\n", + " 0.1 & 0.1 & 0.2 \\\\\n", + " 0.8 & 0.6 & 0.5\n", + " \\end{pmatrix}.\n", + " $$\n", + " \n", + "\n", + "\n", + "้ท็งป่กŒๅˆ— $P$ ใŒไธŽใˆใ‚‰ใ‚Œใ‚‹ใจใ€ $t$ ๆ™‚้–“ใ‚นใƒ†ใƒƒใƒ—ๅพŒใฎ็ขบ็Ž‡ๅˆ†ๅธƒใ‚’ $P^t$ ใซใ‚ˆใ‚Š่จˆ็ฎ—ใงใใพใ™ใ€‚\n", + "\n", + "## 2. ้‡ๅญใ‚ฆใ‚ฉใƒผใ‚ฏ \n", + "้‡ๅญใ‚ฆใ‚ฉใƒผใ‚ฏใฏๅคๅ…ธใฎใƒžใƒซใ‚ณใƒ•้€ฃ้Ž–ใฎ้‡ๅญ็‰ˆใงใ™ใ€‚ๆธฌๅฎšใ™ใ‚‹ใพใงใฏใ€้‡ๅญใ‚ฆใ‚ฉใƒผใ‚ฏใฏๅ…จใฆใฎๅฏ่ƒฝใช็ตŒ่ทฏใฎ้‡ใญๅˆใ‚ใ›ใ‚’ๅ–ใ‚Šใพใ™ใ€‚ใพใŸใ€้‡ๅญๅนฒๆธ‰ใซใ‚ˆใ‚Šใ‚ใ‚‹็Šถๆ…‹ใฏๆ‰“ใกๆถˆใ—ใ‚ใ„ใพใ™ใ€‚ใ“ใฎ็พ่ฑกใ‚’ใ€้–“้•ใˆใŸ็ญ”ใˆใ‚’ๆถˆๅŽปใ™ใ‚‹ใ‚ˆใ†ใช่จญ่จˆใซๅˆฉ็”จใ™ใ‚‹ใ“ใจใงใ€้‡ๅญใ‚ฆใ‚ฉใƒผใ‚ฏใ‚ขใƒซใ‚ดใƒชใ‚บใƒ ใ‚’ใƒฉใƒณใƒ€ใƒ ใ‚ฆใ‚ฉใƒผใ‚ฏใ‚ˆใ‚Šใ‚‚้€Ÿใใ—ใพใ™ใ€‚ใ‚ณใ‚คใƒณ้‡ๅญใ‚ฆใ‚ฉใƒผใ‚ฏใจใ‚ปใ‚ฒใƒ‡ใ‚ฃ้‡ๅญใ‚ฆใ‚ฉใƒผใ‚ฏใŒใ‚ˆใ็”จใ„ใ‚‰ใ‚Œใ€ใ“ใ‚Œใ‚‰ใฏใ‚ใ‚‹ๆกไปถไธ‹ใงใฏ็ญ‰ไพกใซใชใ‚Šใพใ™ใ€‚ใ‚ณใ‚คใƒณ้‡ๅญใ‚ฆใ‚ฉใƒผใ‚ฏใฏใ‚ฐใƒฉใƒ•ไธŠใฎ้ ‚็‚นใ‚’ใ€ใ‚ปใ‚ฒใƒ‡ใ‚ฃ้‡ๅญใ‚ฆใ‚ฉใƒผใ‚ฏใฏ่พบใ‚’ๅ‹•ใใพใ™ใ€‚้‡ๅญใ‚ฆใ‚ฉใƒผใ‚ฏใฎๅฎŸ่ฃ…ใฎๅ‰ใซใ“ใฎไบŒใคใฎใƒขใƒ‡ใƒซใ‚’็ดนไป‹ใ—ใพใ™ใ€‚\n", + "\n", + " $\\newcommand{\\ket}[1]{\\left|{#1}\\right\\rangle}$\n", + " $\\newcommand{\\bra}[1]{\\left\\langle{#1}\\right|}$\n", + "### 2.A ใ‚ณใ‚คใƒณ้‡ๅญใ‚ฆใ‚ฉใƒผใ‚ฏ \n", + "ใ€€ใ‚ณใ‚คใƒณ้‡ๅญใ‚ฆใ‚ฉใƒผใ‚ฏใฎ็ฐกๅ˜ใชไพ‹ใฏใ€็„ก้™้•ทใฎๆ•ดๆ•ฐไธŠใฎ้‹ๅ‹•ใงใ™ใ€‚ใ“ใฎๅ ดๅˆใ€ๆ•ดๆ•ฐ $\\mathbb{Z}$ ไธŠใงใฎไฝ็ฝฎใ‚’ $\\{\\ket{j} : j \\in \\mathbb{Z} \\}$ ใจใ—ใพใ™ใ€‚ใใ—ใฆใ€ใ‚ณใ‚คใƒณใฎ่จˆ็ฎ—ๅŸบๅบ•ใฏ $\\{\\ket{0}, \\ket{1}\\}$ ใจใ—ใ€ใ‚ณใ‚คใƒณใŒ $\\ket{0}$ ใฎๅ ดๅˆใฏใ‚ใ‚‹ๆ–นๅ‘ใซๅ‹•ใใ€ใ‚ณใ‚คใƒณใŒ $\\ket{1}$ ใฎๅ ดๅˆใฏใ‚‚ใ†ไธ€ๆ–นใซๅ‹•ใใพใ™ใ€‚\n", + "\n", + "ใ‚ณใ‚คใƒณ้‡ๅญใ‚ฆใ‚ฉใƒผใ‚ฏใฏใ‚ฐใƒฉใƒ•ใฎ้ ‚็‚นไธŠใ‚’ๅ‹•ใใฎใงใ€้ ‚็‚นใ‚’็Šถๆ…‹ใจใ—ใพใ™ใ€‚่พบใง็น‹ใŒใฃใฆใ„ใ‚‹็Šถๆ…‹้–“ใฎใฟๅ‹•ใใ“ใจใŒใงใใพใ™ใ€‚ใ‚ณใ‚คใƒณใƒขใƒ‡ใƒซใงใฏใ€ไบŒใคใฎ้‡ๅญ็Šถๆ…‹็ฉบ้–“ใจไบŒใคใฎๆผ”็ฎ—ๅญใ‚’ไฝฟใ„ใพใ™ใ€‚ไธ€ใค็›ฎใฎ็Šถๆ…‹็ฉบ้–“ใฏไฝ็ฝฎใ‚’่กจใ™ไฝ็ฝฎ็Šถๆ…‹ใงใ™ใ€‚ไธŠ่จ˜ใฎ้‹ๅ‹•ใงใฏใ€ๆ•ดๆ•ฐไธŠใฎใฉใ“ใงใ‚‚็งปๅ‹•ใงใใ‚‹ใฎใงใ€ๆ•ดๆ•ฐใจใชใ‚Šใพใ™ใ€‚ใ‚‚ใ†ไธ€ๆ–นใฏใ€ใ‚ณใ‚คใƒณ็Šถๆ…‹ใงใ™ใ€‚ใ‚ณใ‚คใƒณ็Šถๆ…‹ใฏๆฌกใฎใ‚นใƒ†ใƒƒใƒ—ใงใฉใฎใ‚ˆใ†ใซๅ‹•ใใ‹ใ‚’ๆฑบๅฎšใ—ใพใ™ใ€‚ใ“ใฎใ‚ณใ‚คใƒณ็Šถๆ…‹ใจไฝ็ฝฎ็Šถๆ…‹ใจใ‚’ๅˆใ‚ใ›ใฆใ€ใƒ’ใƒซใƒ™ใƒซใƒˆ็ฉบ้–“ไธŠใฎใƒ™ใ‚ฏใƒˆใƒซใจใ—ใฆ่กจ็พใงใใพใ™ใ€‚ใ‚ณใ‚คใƒณ็Šถๆ…‹ใ‚’ $\\mathcal{H}_C$ ใฎใƒ™ใ‚ฏใƒˆใƒซใจใ—ใฆ่กจใ—ใ€ไฝ็ฝฎ็Šถๆ…‹ใ‚’ $\\mathcal{H}_P$ ใฎใƒ™ใ‚ฏใƒˆใƒซใจใ—ใฆ่กจใ™ใจใ€้‹ๅ‹•ใฎใ™ในใฆใฎ้‡ๅญ็Šถๆ…‹็ฉบ้–“ใฏ $\\mathcal{H} = \\mathcal{H}_C \\otimes \\mathcal{H}_P$ ใจใชใ‚Šใพใ™ใ€‚\n", + "\n", + "ใ™ใงใซ่ฟฐในใŸใ‚ˆใ†ใซใ€ใƒขใƒ‡ใƒซใซใฏไบŒใคใฎๆผ”็ฎ—ๅญใŒใ‚ใ‚Šใ‚ณใ‚คใƒณๆผ”็ฎ—ๅญ $C$ ใจใ‚ทใƒ•ใƒˆๆผ”็ฎ—ๅญ $S$ ใงใ™ใ€‚ใ‚ณใ‚คใƒณๆผ”็ฎ—ๅญใฏๆ™‚้–“ใ‚นใƒ†ใƒƒใƒ—ๆฏŽใซ $\\mathcal{H}_C$ ใซไฝœ็”จใ—ใฆ้‡ใญๅˆใ‚ใ›็Šถๆ…‹ใ‚’ไฝœใ‚‹ใŸใ‚ใ€ๅ…จใฆใฎๅฏ่ƒฝใช็ตŒ่ทฏใ‚’ๅŒๆ™‚ใซๅ‹•ใใพใ™ใ€‚ๆ•ดๆ•ฐไธŠใฎ้‹ๅ‹•ใงใฏใ€ๆ™‚้–“ใ‚นใƒ†ใƒƒใƒ—ๆฏŽใซๅทฆใจๅณใฎไธกๆ–นใซๅ‹•ใใ“ใจใซใชใ‚Šใพใ™ใ€‚ใ„ใ‚ใ„ใ‚ใชใ‚ณใ‚คใƒณๆผ”็ฎ—ๅญใŒใ‚ใ‚Šใพใ™ใŒใ€ใ‚ˆใ็”จใ„ใ‚‰ใ‚Œใ‚‹ใฎใฏใ‚ขใƒ€ใƒžใƒผใƒซใ‚ณใ‚คใƒณใจใ‚ฐใƒญใƒผใƒใƒผใ‚ณใ‚คใƒณใงใ™ใ€‚ใ‚ขใƒ€ใƒžใƒผใƒซใ‚ณใ‚คใƒณใฏใ‚ขใƒ€ใƒžใƒผใƒซใ‚ฒใƒผใƒˆใซใ‚ˆใ‚Š็ญ‰็ขบ็Ž‡ใงใฎ้‡ใญๅˆใ‚ใ›็Šถๆ…‹ใ‚’ไฝœใ‚Šใพใ™: \n", + "\n", + " $$\n", + " H\n", + " = \\frac{1}{\\sqrt{2}}\n", + " \\begin{bmatrix}\n", + " 1 & 1 \\\\\n", + " 1 & -1 \n", + " \\end{bmatrix}.\n", + " $$\n", + "\n", + "ใ‚ฐใƒญใƒผใƒใƒผใ‚ณใ‚คใƒณใฏใ‚ฐใƒญใƒผใƒใƒผใฎใ‚ขใƒซใ‚ดใƒชใ‚บใƒ ใซใ‚ใ‚‹ใ‚ฐใƒญใƒผใƒใƒผใฎๆ‹กๆ•ฃๆผ”็ฎ—ๅญใ‚’็”จใ„ใ€ไปฅไธ‹ใฎใ‚ˆใ†ใซๅฎš็พฉใ—ใพใ™\n", + "\n", + " $$\n", + " G\n", + " = \\begin{bmatrix}\n", + " \\frac{2}{n} -1 & \\frac{2}{n} & \\ldots & \\frac{2}{n}\\\\\n", + " \\frac{2}{n} & \\frac{2}{n} - 1 & \\ldots & \\frac{2}{n} \\\\\n", + " \\vdots & \\vdots & \\ddots & \\vdots \\\\\n", + " \\frac{2}{n} & \\frac{2}{n} & \\ldots & \\frac{2}{n} -1\n", + " \\end{bmatrix}.\n", + " $$\n", + "\n", + "ใ‚ขใƒ€ใƒžใƒผใƒซใ‚ณใ‚คใƒณใฎใ‚ˆใ†ใซใ‚ฐใƒญใƒผใƒใƒผใ‚ณใ‚คใƒณใ‚‚้‡ใญๅˆใ‚ใ›็Šถๆ…‹ใ‚’ไฝœใ‚Šใพใ™ใ€‚ใ—ใ‹ใ—ใ€ๆŒฏใ‚‹่ˆžใ„ใฏๅฐ‘ใ—็•ฐใชใ‚Šใพใ™ใ€‚ไฝ็ฝฎ $\\ket{000}$ ใซใ‚ฐใƒญใƒผใƒใƒผใ‚ณใ‚คใƒณใ‚’ไฝœ็”จใ•ใ›ใ‚‹ใจใ€ไธ‹ๅ›ณใฎใ‚ˆใ†ใช็Šถๆ…‹ใƒ™ใ‚ฏใƒˆใƒซใฎ็ขบ็Ž‡ๅˆ†ๅธƒใ‚’ๅพ—ใพใ™ใ€‚ใ“ใฎใ‚ˆใ†ใซใ€ใ‚ขใƒ€ใƒžใƒผใƒซใ‚ณใ‚คใƒณใฎใ‚ˆใ†ใช็ญ‰็ขบ็Ž‡ใฎ้‡ใญๅˆใ‚ใ›็Šถๆ…‹ใ‚’ไฝœใ‚Šใพใ›ใ‚“ใ€‚ไป–ใฎ็Šถๆ…‹ใซๆฏ”ในใฆใ€ $\\ket{000}$ ใซใ‚ˆใ‚Šๅคงใใช็ขบ็Ž‡ใ‚’ๆŒใกใพใ™ใ€‚\n", + "\n", + "\n", + "\n", + "ใƒขใƒ‡ใƒซใฎใ‚‚ใ†ไธ€ใคใฎๆผ”็ฎ—ๅญใฎใ‚ทใƒ•ใƒˆๆผ”็ฎ—ๅญใฏ $\\mathcal{H}_P$ ใซไฝœ็”จใ—ใฆใ€ๆฌกใฎไฝ็ฝฎใซ็งปๅ‹•ใ•ใ›ใพใ™ใ€‚ๆ•ดๆ•ฐไธŠใฎ้‹ๅ‹•ใงใฏใ€ใ‚ทใƒ•ใƒˆๆผ”็ฎ—ๅญใซใ‚ˆใ‚Šใ€ใ‚ณใ‚คใƒณใŒ $\\ket{0}$ ใฎๆ™‚ใฏๅทฆใซๅ‹•ใใ€ใ‚ณใ‚คใƒณใŒ $\\ket{1}$ ใฎๆ™‚ใฏๅณใซๅ‹•ใใพใ™: \n", + "\n", + "$$\n", + "\\begin{aligned}\n", + " S \\vert 0 \\rangle \\vert j \\rangle & = \\vert 0 \\rangle \\vert j+1 \\rangle \\\\[1mm]\n", + " S \\vert 1 \\rangle \\vert j \\rangle & = \\vert 1 \\rangle \\vert j-1 \\rangle\n", + "\\end{aligned}\n", + "$$\n", + "\n", + "ไธŠ่จ˜ใงๅฎš็พฉใ•ใ‚ŒใŸใ‚ทใƒ•ใƒˆๆผ”็ฎ—ๅญใงใ€ไธ€ใ‚นใƒ†ใƒƒใƒ—ๅˆ†ใฎใ‚ณใ‚คใƒณ้‡ๅญใ‚ฆใ‚ฉใƒผใ‚ฏใ‚’ไปฅไธ‹ใฎใƒฆใƒ‹ใ‚ฟใƒชๆผ”็ฎ—ๅญใจใ—ใฆ่กจ็พใงใใพใ™\n", + "$$\n", + " U = SC,\n", + "$$\n", + "\n", + "ใ“ใ“ใง C ใฏใ‚ณใ‚คใƒณๆผ”็ฎ—ๅญใงใ™ใ€‚ๆ•ดๆ•ฐไธŠใฎ้‡ๅญใ‚ฆใ‚ฉใƒผใ‚ฏใงใ‚ขใƒ€ใƒžใƒผใƒซใ‚ณใ‚คใƒณใ‚’็”จใ„ใพใ—ใŸใŒใ€C ใฏใ‚ขใƒ€ใƒžใƒผใƒซใ‚ณใ‚คใƒณใงใ‚‚ใ€ใ‚ฐใƒญใƒผใƒใƒผใ‚ณใ‚คใƒณใงใ‚‚ใ€ใใฎไป–ใฎใ‚ณใ‚คใƒณๆผ”็ฎ—ๅญใงใ‚‚็”จใ„ใ‚‹ใ“ใจใŒใงใใพใ™ใ€‚\n", + "\n", + "\n", + "ๅ…ˆใซ้€ฒใฟใพใ—ใ‚‡ใ†ใ€‚$t$ ๆ™‚้–“ใ‚นใƒ†ใƒƒใƒ—ๅพŒใฎ้‡ๅญ็Šถๆ…‹ $\\ket{\\psi}$ ใฏไปฅไธ‹ใง่กจใ™ใ“ใจใŒใงใใพใ™\n", + "$$\n", + " \\ket{\\psi (t)} = U^t \\ket{\\psi(0)},\n", + "$$\n", + "ใ“ใ“ใงใ€ $\\ket{\\psi(0)}$ ใฏๅˆๆœŸ็Šถๆ…‹ใงใ€U ใฏไธ€ใ‚นใƒ†ใƒƒใƒ—ๅˆ†ใฎๆผ”็ฎ—ๅญใงใ™[1]ใ€‚\n", + "\n", + "ใ‚ณใ‚คใƒณ้‡ๅญใ‚ฆใ‚ฉใƒผใ‚ฏใฏๅคšใใฎๆญฃๅ‰‡ใ‚ฐใƒฉใƒ•(ๅ…จใฆใฎ้ ‚็‚นใง้šฃๆŽฅใ™ใ‚‹้ ‚็‚นใฎๆ•ฐใŒๅŒใ˜ใ‚ฐใƒฉใƒ•)ใงๅฎ‰ๅฎšใ—ใฆใ„ใพใ™[2]ใ€‚ ใ‚‚ใ†ไธ€ใคใฎใƒขใƒ‡ใƒซใงใ‚ใ‚‹ใ‚ปใ‚ฒใƒ‡ใ‚ฃ้‡ๅญใ‚ฆใ‚ฉใƒผใ‚ฏใฏ้žๆญฃๅ‰‡ใ‚ฐใƒฉใƒ•ใซ้ฉใ—ใฆใŠใ‚Šใ€ๆฌกใฎ็ซ ใง่งฃ่ชฌใ—ใพใ™ใ€‚\n", + "\n", + "### 2.B ใ‚ปใ‚ฒใƒ‡ใ‚ฃ้‡ๅญใ‚ฆใ‚ฉใƒผใ‚ฏ \n", + "ใ‚ณใ‚คใƒณ้‡ๅญใ‚ฆใ‚ฉใƒผใ‚ฏใฏใ‚ฐใƒฉใƒ•ใฎ้ ‚็‚นใ‚’ๅ‹•ใใพใ—ใŸใŒใ€ใ‚ปใ‚ฒใƒ‡ใ‚ฃ้‡ๅญใ‚ฆใ‚ฉใƒผใ‚ฏใฏๅ…ƒใฎใ‚ฐใƒฉใƒ•ใฎไบŒ้ƒจไบŒ้‡่ขซ่ฆ†ใ‚ฐใƒฉใƒ•ไธŠใฎ่พบใ‚’ๅ‹•ใใพใ™ใ€‚ไบŒ้‡่ขซ่ฆ†ใ‚ฐใƒฉใƒ•ใจใฏๅ…ƒใฎใ‚ฐใƒฉใƒ•ใฎไบŒๅ€ใฎ้ ‚็‚นใ‚’ๆŒใคใ‚ฐใƒฉใƒ•ใงใ™ใ€‚ไบŒ้ƒจไบŒ้‡่ขซ่ฆ†ใ‚ฐใƒฉใƒ•ใฎไบŒใคใฎ้ ‚็‚นใฏใ€ๅ…ƒใฎใ‚ฐใƒฉใƒ•ใงใใฎ้ ‚็‚นใŒ็น‹ใŒใฃใฆใ„ใ‚‹ๅ ดๅˆใซใฎใฟใ€่พบใง็น‹ใŒใ‚Šใพใ™ใ€‚ใ“ใฎใƒขใƒ‡ใƒซใ‚’ไฝœใ‚‹ใซใฏใ€ๅคๅ…ธใฎใƒฉใƒณใƒ€ใƒ ใ‚ฆใ‚ฉใƒผใ‚ฏใฎ้ท็งป็ขบ็Ž‡่กŒๅˆ— P ใ‹ใ‚‰ๅง‹ใ‚ใพใ™ใ€‚1 ็ซ ใง็คบใ—ใŸใ‚ˆใ†ใซใ€ๅคๅ…ธใฎ้›ขๆ•ฃๆ™‚้–“ใƒฉใƒณใƒ€ใƒ ใ‚ฆใ‚ฉใƒผใ‚ฏใฏ้ท็งป่กŒๅˆ— P ใง่จ˜่ฟฐใ•ใ‚Œใพใ™ใ€‚ไปปๆ„ใฎ $N \\times N$ ใฎ้ท็งป่กŒๅˆ— $P$ ใ‚’ๆŒใค $N$-้ ‚็‚นใ‚ฐใƒฉใƒ•ใซๅฏพใ—ใฆใ€้›ขๆ•ฃๆ™‚้–“้‡ๅญใ‚ฆใ‚ฉใƒผใ‚ฏใ‚’ใƒ’ใƒซใƒ™ใƒซใƒˆ็ฉบ้–“ $\\mathcal{H}^N \\otimes \\mathcal{H}^N$ ไธŠใฎใƒฆใƒ‹ใ‚ฟใƒชๆผ”็ฎ—ๅญใจใ—ใฆๅฎš็พฉใงใใพใ™ใ€‚ $P_{jk}$ ใ‚’ $j$ ใ‹ใ‚‰ $k$ ใธ้ท็งปใ™ใ‚‹็ขบ็Ž‡ใจๅฎš็พฉใ—ใพใ—ใ‚‡ใ†ใ€‚้‹ๅ‹•ใ‚’ๅฎš็พฉใ™ใ‚‹ๅ‰ใซใ€ๆญฃ่ฆๅŒ–ใ•ใ‚ŒใŸ็Šถๆ…‹ใ‚’ๅฎš็พฉใ—ใพใ™\n", + "\n", + "$$\n", + " \\ket{\\psi_j} := \\sum_{k=1}^N \\sqrt{P_{kj}} \\ket{j,k}, \\; j=1,...,N\n", + "$$\n", + "\n", + "ใใ—ใฆใ€ $\\vert \\psi_j \\rangle :j=1,...,N$ ใธใฎๅฐ„ๅฝฑใฏ\n", + "\n", + "$$\n", + " \\Pi := \\sum_{j=1}^N \\ket{\\psi_j} \\bra{\\psi_j}\n", + "$$\n", + "\n", + "ใ‚ทใƒ•ใƒˆๆผ”็ฎ—ๅญใ‚’ๅฐŽๅ…ฅใ—ใพใ™:\n", + "\n", + "$$\n", + " S := \\sum_{j,k=1}^N \\ket{j,k} \\bra{k,j}\n", + "$$\n", + "\n", + "ไธŠใงๅฎš็พฉใ—ใŸ $S$ ใจ $\\Pi$ ใ‚’็”จใ„ใฆไธ€ใ‚นใƒ†ใƒƒใƒ—ๅˆ†ใฎ้›ขๆ•ฃๆ™‚้–“้‡ๅญใ‚ฆใ‚ฉใƒผใ‚ฏใ‚’ๅฎš็พฉใ—ใพใ™:\n", + "\n", + "$$\n", + " U := S(2 \\Pi - 1),\n", + "$$\n", + "\n", + "ใ“ใ“ใงใ€ $(2 \\Pi - 1)$ ใฏๅๅฐ„ๆผ”็ฎ—ๅญใงใ™ใ€‚ใพใŸใ€ $t$ ใ‚นใƒ†ใƒƒใƒ—ๅพŒใฎ็Šถๆ…‹ใฏ $U^t$ ใซใ‚ˆใ‚Šๅฎš็พฉใงใใพใ™[2]ใ€‚\n", + "\n", + "### 2.C ใ‚ณใ‚คใƒณใจใ‚ปใ‚ฒใƒ‡ใ‚ฃ้‡ๅญใ‚ฆใ‚ฉใƒผใ‚ฏใฎ็ญ‰ไพกๆ€ง \n", + "ใ‚ฐใƒญใƒผใƒใƒผใ‚ณใ‚คใƒณใซใ‚ˆใ‚‹ใ‚ณใ‚คใƒณ้‡ๅญใ‚ฆใ‚ฉใƒผใ‚ฏใฏใ‚ปใ‚ฒใƒ‡ใ‚ฃ้‡ๅญใ‚ฆใ‚ฉใƒผใ‚ฏใจ็ญ‰ไพกใงใ‚ใ‚‹ใ“ใจใŒ็Ÿฅใ‚‰ใ‚Œใฆใ„ใพใ™ใ€‚่ฉณ็ดฐใฏ Thomas G. Wong ใซใ‚ˆใ‚‹ๆ–‡็Œฎ[3]ใ‚’ๅ‚็…งใใ ใ•ใ„ใ€ๆ–‡็Œฎใงใฏๆผ”็ฎ—ๅญใฎ็ญ‰ไพกๆ€งใซใคใ„ใฆใ‚‚็คบใ•ใ‚Œใฆใ„ใพใ™ใ€‚\n", + "\n", + "\n", + "## 3. ไพ‹: ่ถ…็ซ‹ๆ–นไฝ“ไธŠใฎ้‡ๅญใ‚ฆใ‚ฉใƒผใ‚ฏ \n", + "่ถ…็ซ‹ๆ–นไฝ“ใฏ $3$ ๆฌกๅ…ƒใฎ็ซ‹ๆ–นไฝ“ใ‚’ $n$ ๆฌกๅ…ƒๅŒ–ใ—ใŸใ‚‚ใฎใงใ™ใ€‚ๅ…จใฆใฎ้ ‚็‚นใฎๆฌกๆ•ฐใฏ $n$ ใงใ€่ถ…็ซ‹ๆ–นไฝ“ใฏ $N=2^n$ ๅ€‹ใฎ้ ‚็‚นใ‚’ๆŒใกใพใ™ใ€‚ไบŒๅ€คใฎ $n$ ใ‚ฟใƒ—ใƒซใ‚’็”จใ„ใฆ่ถ…็ซ‹ๆ–นไฝ“ใฎ้ ‚็‚นใ‚’่กจ็พใงใใพใ™ใ€‚้šฃๆŽฅใ™ใ‚‹้ ‚็‚นใฎไบŒๅ€ค่กจ็พใฏไธ€ใคใฎไบŒๅ€คใฎใฟใŒ็•ฐใชใ‚Šใพใ™ใ€‚ไพ‹ใˆใฐ4ๆฌกๅ…ƒ่ถ…็ซ‹ๆ–นไฝ“ใฎๅ ดๅˆใ€้ ‚็‚น $0000$ ใฎ้šฃๆŽฅ้ ‚็‚นใฏ $0001$, $0010$, $0100$, $1000$ ใงใ™ใ€‚ใ—ใŸใŒใฃใฆใ€ใƒใƒŸใƒณใ‚ฐ่ท้›ขใŒ1ใฎๅ…จใฆใฎ้ ‚็‚นใจๆŽฅ็ถšใ—ใฆใ„ใพใ™ใ€‚่พบใ‚‚ๅŒๆ™‚ใซใƒฉใƒ™ใƒซใงใใพใ™ใ€‚ไบŒใคใฎ้šฃๆŽฅใ™ใ‚‹้ ‚็‚นใฎa็•ช็›ฎใฎใƒ“ใƒƒใƒˆใŒ็•ฐใชใ‚‹ๅ ดๅˆใ€ $a$ ใจใƒฉใƒ™ใƒซใ•ใ‚ŒใŸ่พบใง็น‹ใŒใ‚Šใพใ™ใ€‚\n", + "\n", + "่ถ…็ซ‹ๆ–นไฝ“ใฎใ‚ณใ‚คใƒณ้‡ๅญใ‚ฆใ‚ฉใƒผใ‚ฏใ‚’่กจ็พใ™ใ‚‹ใƒ’ใƒซใƒ™ใƒซใƒˆ็ฉบ้–“ใฏ $\\mathcal{H} = \\mathcal{H}^n \\otimes \\mathcal{H}^{2^n}$ ใงใ™ใ€‚ใ“ใ“ใงใ€ใ€€$\\mathcal{H}^n$ ใฏใ‚ณใ‚คใƒณ็ฉบ้–“ใงใ€ใ€€$\\mathcal{H}^{2^n}$ ใฏไฝ็ฝฎใงใ™ใ€‚่จˆ็ฎ—ๅŸบๅบ•ใงใฏ\n", + "\n", + "$$\n", + " \\big\\{ \\ket{a,\\vec{v}}, 0 \\leq a \\leq n-1, \\vec{v} \\in \\{(00...00), (00...01), ....., (11...11 )\\} \\big\\}. \n", + "$$\n", + "\n", + "่พบ $a$ ใ‚’่กจใ™ใ‚ณใ‚คใƒณ่จˆ็ฎ—ๅŸบๅบ• $a$ ใฏใ€็งปๅ‹•ใฎๆ–นๅ‘ใ‚’่กจใ—ใพใ™ใ€‚ใ€€$a=0$ ใฎๅ ดๅˆใ€็พๅœจใฎ่พบใจใฏไธ€็•ช็›ฎใฎไบŒๅ€คใŒ็•ฐใชใ‚‹่พบใธ็งปๅ‹•ใ—ใพใ™ใ€‚ใพใŸใ€ใ€€$a=1$ ใฎๅ ดๅˆใ€็พๅœจใฎ่พบใจใฏไบŒ็•ช็›ฎใฎไบŒๅ€คใŒ็•ฐใชใ‚‹่พบใธ็งปๅ‹•ใ—ใพใ™ใ€‚ใ€€$\\vec{e}_a$ ใ‚’ $a$ ไปฅๅค–ใฏๅ…จใฆ $0$ ใ‚’ใจใ‚‹ไบŒๅ€คใฎ n ใ‚ฟใƒ—ใƒซใจใ—ใพใ™ใ€‚ใใ—ใฆใ€ใ‚ทใƒ•ใƒˆๆผ”็ฎ—ๅญ $S$ ใฏ ็Šถๆ…‹ $\\ket{a} \\ket{\\vec{v}}$ ใ‚’ $\\ket{a} \\ket{\\vec{v} \\oplus \\vec{e}_a}$ ใธ็งปๅ‹•ใ—ใพใ™ใ€‚\n", + "\n", + "$$\n", + " S \\ket{a} \\ket{\\vec{v}} = \\ket{a} \\ket{\\vec{v} \\oplus \\vec{e}_a}.\n", + "$$\n", + "\n", + "ใ“ใ“ใงใฏใ€ใ‚ฐใƒญใƒผใƒใƒผใ‚ณใ‚คใƒณ $G$ ใ‚’็”จใ„ใพใ™ใ€‚ใใ—ใฆ็™บๅฑ•ๆผ”็ฎ—ๅญใฏ\n", + "\n", + "$$\n", + " U = SG.\n", + "$$\n", + "\n", + "ๆฌกใซใ€4ๆฌกๅ…ƒ่ถ…็ซ‹ๆ–นไฝ“ใฎ้‡ๅญใ‚ฆใ‚ฉใƒผใ‚ฏใ‚’ใฉใฎใ‚ˆใ†ใซๅฎŸ่ฃ…ใ™ใ‚‹ใฎใ‹ใ‚’็ดนไป‹ใ—ใพใ™ใ€‚ใ‚ณใ‚คใƒณๆผ”็ฎ—ๅญใจใ‚ทใƒ•ใƒˆๆผ”็ฎ—ๅญใฎๅฎŸ่ฃ…ใŒๅฟ…่ฆใจใชใ‚Šใพใ™ใ€‚Qiskitใ‹ใ‚‰ๅฟ…่ฆใชใƒฉใ‚คใƒ–ใƒฉใƒชใ‚’ใ‚คใƒณใƒใƒผใƒˆใ™ใ‚‹ใจใ“ใ‚ใ‹ใ‚‰ๅง‹ใ‚ใพใ™ใ€‚" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "id": "501e85ad", + "metadata": {}, + "outputs": [], + "source": [ + "# Importing standard Qiskit libraries\n", + "from qiskit import QuantumCircuit, execute, Aer, IBMQ, QuantumRegister, ClassicalRegister\n", + "from qiskit.compiler import transpile, assemble\n", + "from qiskit.tools.jupyter import *\n", + "from qiskit.visualization import *\n", + "from qiskit.circuit.library import QFT\n", + "from numpy import pi\n", + "from qiskit.quantum_info import Statevector\n", + "from matplotlib import pyplot as plt\n", + "import numpy as np\n", + "# Loading your IBM Q account(s)\n", + "provider = IBMQ.load_account()" + ] + }, + { + "cell_type": "markdown", + "id": "c9487c17", + "metadata": {}, + "source": [ + "ๅ›ž่ทฏใฏไฝ็ฝฎใซ4ๅ€‹ใ€ใ‚ณใ‚คใƒณใซ2ๅ€‹็”จใ„ใฆใ€6้‡ๅญใƒ“ใƒƒใƒˆใ‹ใ‚‰ใชใ‚Šใพใ™ใ€‚ๅ‰ใซ่ฟฐในใŸใ‚ˆใ†ใซใ‚ณใ‚คใƒณใฏใ‚ฐใƒญใƒผใƒใƒผใ‚ณใ‚คใƒณใงใ€ใ‚ฐใƒญใƒผใƒใƒผใฎใ‚ขใƒซใ‚ดใƒชใ‚บใƒ ใฎๆ‹กๆ•ฃๆผ”็ฎ—ๅญใงใ™ใ€‚ใ“ใฎๅฎŸ่ฃ…ใ‹ใ‚‰ใฏใ˜ใ‚ใพใ™ใ€‚" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "id": "330b2adc", + "metadata": {}, + "outputs": [ + { + "data": { + "image/svg+xml": [ + "" + ], + "text/plain": [ + "
" + ] + }, + "execution_count": 3, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "one_step_circuit = QuantumCircuit(6, name=' ONE STEP') \n", + "# Coin operator\n", + "one_step_circuit.h([4,5])\n", + "one_step_circuit.z([4,5])\n", + "one_step_circuit.cz(4,5)\n", + "one_step_circuit.h([4,5])\n", + "one_step_circuit.draw() " + ] + }, + { + "cell_type": "markdown", + "id": "f3a875b4", + "metadata": {}, + "source": [ + "ๆฌกใซใ‚ทใƒ•ใƒˆๆผ”็ฎ—ๅญใ‚’ๅฎŸ่ฃ…ใ—ใพใ™ใ€‚้šฃๆŽฅใ™ใ‚‹้ ‚็‚นใซใ ใ‘็งปๅ‹•ใ—ใพใ™ใ€ใพใŸใ€ๅ…จใฆใฎ้šฃๆŽฅใ™ใ‚‹้ ‚็‚นใฏไธ€ใƒ“ใƒƒใƒˆใ ใ‘็•ฐใชใ‚Šใพใ™ใ€‚ใ‚ณใ‚คใƒณใซๅพ“ใฃใฆ็งปๅ‹•ใ™ใ‚‹ใŸใ‚ใ€้ ‚็‚นใฎ้‡ๅญใƒ“ใƒƒใƒˆใฎไธ€ใคใซๅฏพใ—ใฆNOTใ‚ฒใƒผใƒˆใ‚’ไฝœ็”จใ—ใพใ™ใ€‚ใ‚ณใ‚คใƒณใŒ $\\ket{11}$ ็Šถๆ…‹ใฎๆ™‚ใฏใ€ไธ€็•ช็›ฎใฎ้ ‚็‚นใฎ้‡ๅญใƒ“ใƒƒใƒˆใŒ็•ฐใชใ‚‹็Šถๆ…‹ใซ็งปๅ‹•ใ—ใพใ™ใ€‚ใ‚ณใ‚คใƒณใŒ $\\ket{10}$ ใพใŸใฏ $\\ket{01}$ ็Šถๆ…‹ใฎๆ™‚ใฏใ€ใใ‚Œใžใ‚ŒไบŒ็•ช็›ฎใ€ไธ‰็•ช็›ฎใฎ้‡ๅญใƒ“ใƒƒใƒˆใŒ็•ฐใชใ‚‹็Šถๆ…‹ใซ็งปๅ‹•ใ—ใพใ™ใ€‚ๆœ€ๅพŒใซใ‚ฐใƒญใƒผใƒใƒผใ‚ณใ‚คใƒณใŒ $\\ket{00}$ ใฎๆ™‚ใฏใ€4็•ช็›ฎใฎ้‡ๅญใƒ“ใƒƒใƒˆใ‚’ๅ่ปขใ—ใพใ™ใ€‚ใ“ใ‚Œใฏใ€ใ‚ฐใƒญใƒผใƒใƒผใ‚ณใ‚คใƒณใฎๅพŒใซใ€CCNOTใ‚ฒใƒผใƒˆใจNOTใ‚ฒใƒผใƒˆใซใ‚ˆใ‚ŠๅฎŸ่ฃ…ใ—ใพใ™ใ€‚ใ“ใ‚Œใ‚‰ๅ…จใฆใง4ๆฌกๅ…ƒ่ถ…็ซ‹ๆ–นไฝ“ใฎ้‡ๅญใ‚ฆใ‚ฉใƒผใ‚ฏใฎไธ€ใ‚นใƒ†ใƒƒใƒ—ๅˆ†ใซใชใ‚Šใพใ™ใ€‚" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "id": "2e907955", + "metadata": {}, + "outputs": [ + { + "data": { + "image/svg+xml": [ + "" + ], + "text/plain": [ + "
" + ] + }, + "execution_count": 4, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "# Shift operator function for 4d-hypercube\n", + "def shift_operator(circuit):\n", + " for i in range(0,4):\n", + " circuit.x(4)\n", + " if i%2==0:\n", + " circuit.x(5)\n", + " circuit.ccx(4,5,i)\n", + "\n", + "shift_operator(one_step_circuit)\n", + "\n", + "one_step_gate = one_step_circuit.to_instruction() \n", + "one_step_circuit.draw() " + ] + }, + { + "cell_type": "markdown", + "id": "57b0f8a4", + "metadata": {}, + "source": [ + "## 4. ้‡ๅญใ‚ฆใ‚ฉใƒผใ‚ฏใซใ‚ˆใ‚‹ๆŽข็ดขใ‚ขใƒซใ‚ดใƒชใ‚บใƒ  \n", + "ๆฌกใซใ‚ฐใƒฉใƒ•ไธŠใซใƒžใƒผใ‚ฏใ—ใŸ่ฆ็ด ใ‚’่ฆ‹ใคใ‘ใ‚‹้‡ๅญใ‚ฆใ‚ฉใƒผใ‚ฏใซใ‚ˆใ‚‹ๆŽข็ดขใ‚ขใƒซใ‚ดใƒชใ‚บใƒ ใ‚’ๅฎŸ่ฃ…ใ—ใพใ™ใ€‚ใฏใ˜ใ‚ใซใ‚ขใƒซใ‚ดใƒชใ‚บใƒ ใ‚’็ดนไป‹ใ—ใ€ใใฎๅพŒใงๅฎŸ่ฃ…ใ—ใพใ™ใ€‚้‡ๅญใ‚ฆใ‚ฉใƒผใ‚ฏใซใ‚ˆใ‚‹ๆŽข็ดขใ‚ขใƒซใ‚ดใƒชใ‚บใƒ ใฏใ€้‡ๅญใ‚ฆใ‚ฉใƒผใ‚ฏใ‚’็”จใ„ใฆใ€ใ‚ฐใƒฉใƒ•ไธŠใซใƒžใƒผใ‚ฏใ—ใŸ่ฆ็ด ใ‚’่ฆ‹ใคใ‘ใ‚‹ๅ•้กŒใ‚’่งฃใใพใ™ใ€‚ใคใพใ‚Šใ€ใ‚ใ‚‹้ ‚็‚น้›†ๅˆ $|M|$ ใ‚’ใƒžใƒผใ‚ฏใ—ใฆใ€ใ‚ฐใƒฉใƒ•ไธŠใฎไปปๆ„ใฎ้ ‚็‚นใ‹ใ‚‰ๅง‹ใ‚ใ€ใƒžใƒผใ‚ฏใ—ใŸ่ค‡ๆ•ฐใฎ้ ‚็‚นใ‚’่ฆ‹ใคใ‘ใ‚‹ใพใง็งปๅ‹•ใ—ใพใ™ใ€‚้‡ๅญใ‚ฆใ‚ฉใƒผใ‚ฏใซใ‚ˆใ‚‹ๆŽข็ดขใงใฏๅŸบๅบ•ใจใ—ใฆใ€็พๅœจใฎ้ ‚็‚นใจ็›ดๅ‰ใฎ้ ‚็‚นใซๅฏพๅฟœใ™ใ‚‹ไบŒใคใฎใƒฌใ‚ธใ‚นใ‚ฟใ‚’ๅฟ…่ฆใจใ—ใพใ™ใ€‚ใคใพใ‚Šใ‚ฐใƒฉใƒ•ใฎ่พบใซๅฏพๅฟœใ—ใพใ™ใ€‚้ท็งป่กŒๅˆ— $P$ ใซใ‚ˆใ‚‹ๅคๅ…ธใƒžใƒซใ‚ณใƒ•้€ฃ้Ž–ใ‚’ๅŸบใซใ—ใฆใ€ใ€€$\\mathcal{H}$ ไธŠใฎใƒฆใƒ‹ใ‚ฟใƒชๆผ”็ฎ—ๅญ $W(P)$ ใซใ‚ˆใ‚Š้‡ๅญใ‚ฆใ‚ฉใƒผใ‚ฏใ‚’่จ˜่ฟฐใ—ใพใ™ใ€‚ใพใŸใ€้ ‚็‚น $x$ ใซ้šฃๆŽฅใ™ใ‚‹้ ‚็‚นใฎไธ€ๆง˜ใช้‡ใญๅˆใ‚ใ›็Šถๆ…‹ใจใ—ใฆ $\\ket{p_x} = \\sum_y \\sqrt{P_{xy}}\\ket{y}$ ใ‚’ๅฎš็พฉใ—ใพใ™ใ€‚ $\\ket{x}\\ket{y}$ ใ‚’ไธ€ใคใฎๅŸบๅบ•ใจใ—ใพใ™ใ€‚ใ‚‚ใ— $x$ ใŒใƒžใƒผใ‚ฏใ—ใŸ้ ‚็‚นใฎๅ ดๅˆใ€ๅŸบๅบ• $\\ket{x}\\ket{y}$ ใ‚’ ''good'' ใจๅฎš็พฉใ—ใพใ™ใ€‚ใใ‚Œไปฅๅค–ใ‚’ ''bad'' ใจใ—ใพใ™ใ€‚ใใ—ใฆใ€''good'' ใจ ''bad'' ็Šถๆ…‹ใฏ: \n", + "\n", + "$$\n", + " \\ket{G} = \\frac{1}{\\sqrt{|M|}} \\sum_{x \\in M} \\ket{x} \\ket{p_x}, \\;\n", + " \\ket{B} = \\frac{1}{\\sqrt{N-|M|}} \\sum_{x \\notin M} \\ket{x} \\ket{p_x},\n", + "$$\n", + "\n", + "ใ“ใ‚Œใ‚‰ใฏ good ใŠใ‚ˆใณ bad ใฎๅŸบๅบ•ใฎ้‡ใญๅˆใ‚ใ›็Šถๆ…‹ใงใ™ใ€‚ๆฌกใซใ€ $\\epsilon = |M|/N$ ใจ $\\theta = \\arcsin(\\sqrt{\\epsilon})$ ใ‚’ๅฎš็พฉใ—ใพใ™ใ€‚\n", + "\n", + "\n", + "ใพใจใ‚ใ‚‹ใจใ€ใ‚ขใƒซใ‚ดใƒชใ‚บใƒ ใฏไปฅไธ‹ใฎไธ‰ใคใฎใ‚นใƒ†ใƒƒใƒ—ใ‹ใ‚‰ใชใ‚Šใพใ™:\n", + "\n", + "\n", + "1. ๅˆๆœŸ็Šถๆ…‹ใจใ—ใฆๅ…จใฆใฎ่พบใฎไธ€ๆง˜ใช้‡ใญๅˆใ‚ใ›็Šถๆ…‹ใ‚’ๆบ–ๅ‚™ $\\ket{U} = \\frac{1}{\\sqrt{N}} \\sum_{x} \\ket{x} \\ket{p_x} = \\sin{\\theta} \\ket{G} + \\cos{\\theta} \\ket{B}$\n", + "2. $O(1/\\sqrt{\\epsilon})$ ๅ›ž็นฐใ‚Š่ฟ”ใ—:\n", + " \n", + " (a) $\\ket{B}$ ใงใฎๅๅฐ„\n", + " \n", + " (b) $\\ket{U}$ ใงใฎๅๅฐ„\n", + "\n", + "3. ่จˆ็ฎ—ๅŸบๅบ•ใงใฎๆธฌๅฎšใ‚’ๅฎŸๆ–ฝ\n", + "\n", + "\n", + "ใ‚นใƒ†ใƒƒใƒ— $1$ ใฏใ€ใ‚ขใƒ€ใƒžใƒผใƒซใ‚ฒใƒผใƒˆใจใ€ $x$ ใŒไธ€ใค็›ฎใฎใƒฌใ‚ธใ‚นใ‚ฟใจ็ญ‰ใ—ใ„ๆ™‚ใซใ ใ‘ไฝ็›ธใ‚’ใ‚ทใƒ•ใƒˆใ™ใ‚‹ไฝ็›ธใ‚ชใƒฉใ‚ฏใƒซใ‚’็”จใ„ใฆๅๅฐ„ใ‚’่กŒใ†ใ“ใจใง็ฐกๅ˜ใซๅฎŸ่ฃ…ใงใใพใ™ใ€‚\n", + "\n", + "\n", + "ใ‚นใƒ†ใƒƒใƒ— 2(b) ใฏไปฅไธ‹ใฎๅ†™ๅƒใ‚’่กŒใ†ใƒฆใƒ‹ใ‚ฟใƒชๅค‰ๆ› $R(P)$ ใ‚’ๆŽขใ™ใ“ใจใจ็ญ‰ไพกใงใ™:\n", + "$$\n", + "\\label{eq:mapping_1}\n", + " \\ket{U} &\\mapsto \\ket{U}, \\: \\text{ใจ} \\\\\n", + " \\ket{\\psi} &\\mapsto -\\ket{\\psi}, \\: \\forall \\ket{\\psi} \\text{$\\ket{U}$ ใซ็›ดไบคใ™ใ‚‹ $W(P)$ ใฎๅ›บๆœ‰ใƒ™ใ‚ฏใƒˆใƒซใซๅซใพใ‚Œใ‚‹ๅ ดๅˆ}\n", + "\\label{eq:mapping_2}\n", + "$$\n", + "\n", + "ใ“ใฎๆผ”็ฎ—ๅญใ‚’ๆŽขใ™ใŸใ‚ใซใ€ $W(P)$ ใฎไฝ็›ธๆŽจๅฎšใ‚’่กŒใ„ใพใ™ใ€‚ไธŠ่จ˜ใง $W(P)$ ใ‚’ใƒฉใƒณใƒ€ใƒ ใ‚ฆใ‚ฉใƒผใ‚ฏใฎ็™บๅฑ•ๆผ”็ฎ—ๅญใจใ—ใฆๅฎš็พฉใ—ใพใ—ใŸใ€‚2.1 ็ซ ใง่ฆ‹ใŸใ‚ˆใ†ใซใ€ใ“ใ‚Œใฏใƒฆใƒ‹ใ‚ฟใƒชๆผ”็ฎ—ๅญใงใ™ใ€‚ๅพ“ใฃใฆใ€ $W(P)$ ใฎๅ›บๆœ‰ๅ€คใฎใƒŽใƒซใƒ ใฏ $1$ ใจใชใ‚Šใพใ™ใ€‚ใใ“ใงใ€ $W(P)$ ใฎๅ›บๆœ‰ๅ€คใ‚’ $e^{\\pm 2i\\theta_j}$ ใจๆ›ธใ็›ดใ—ใพใ™ใ€‚ใƒฆใƒ‹ใ‚ฟใƒชๆผ”็ฎ—ๅญ $W(P)$ ใฏๅ›บๆœ‰ๅ€คใŒ $1$ ใฎๅ›บๆœ‰ใƒ™ใ‚ฏใƒˆใƒซ $\\ket{U}$ ใ‚’ๆŒใกใพใ™ใ€‚ใ“ใ‚Œใฏใ€ $\\theta_1=0$ ใซใ‚ˆใ‚Šๅพ—ใ‚‰ใ‚Œใพใ™ใ€‚ใ€€$R(P)$ ใฏ่ฃœๅŠฉ้‡ๅญใƒ“ใƒƒใƒˆใ‚’ๅŠ ใˆใฆ $O(1/\\sqrt{\\delta})$ ใฎ็ฒพๅบฆใงไฝ็›ธๆŽจๅฎšใ‚’่กŒใ†ใ“ใจใง $\\ket{U}$ ใ‚’่ฆ‹ใคใ‘ใพใ™ใ€ใ“ใ“ใงใ€ $\\delta$ ใฏ $P$ ใฎใ‚นใƒšใ‚ฏใƒˆใƒซใ‚ฎใƒฃใƒƒใƒ—ใงใ™ใ€‚ใ“ใ‚Œใ‚’่กŒใ†ใซใฏใ€ $W(P)$ ใ‚’ $O(1/\\sqrt{\\delta})$ ๅ›žไฝœ็”จใ™ใ‚‹ๅฟ…่ฆใŒใ‚ใ‚Šใพใ™ใ€‚ $\\ket{w}$ ใ‚’ $W(P)$ ใฎๅ›บๆœ‰ใƒ™ใ‚ฏใƒˆใƒซใงใ€ๅ›บๆœ‰ๅ€ค $e^{\\pm 2i\\theta_j}$ ใ‚’ๆŒใคใจใ—ใพใ—ใ‚‡ใ†ใ€‚ $\\tilde{\\theta_j}$ ใ‚’ไฝ็›ธๆŽจๅฎšใซใ‚ˆใ‚‹ $\\theta_j$ ใฎใ‚‚ใฃใจใ‚‚่‰ฏใ„ๆŽจๅฎšๅ€คใจไปฎๅฎšใ—ใพใ™ใ€‚ใ‚นใƒ†ใƒƒใƒ— 2(b) ใฎ $\\ket{w}$ ใฎๅ†™ๅƒใ‚’ไธŽใˆใ‚‹ๆผ”็ฎ—ๅญ $R(P)$ ใฏๆ–‡็Œฎ[4]ใงไธŽใˆใ‚‰ใ‚Œใฆใ„ใพใ™ใ€‚\n", + "\n", + "$$\n", + " \\ket{w} \\ket{0} \\mapsto \\ket{w} \\ket{\\tilde{\\theta_j}} \\mapsto (-1)^{|\\tilde{\\theta_j} \\neq 0|} \\ket{w} \\ket{\\tilde{\\theta_j}} \\mapsto (-1)^{|\\tilde{\\theta_j} \\neq 0|} \\ket{w} \\ket{0}\n", + "$$\n", + "\n", + "\n", + "## 5.ไพ‹: 4ๆฌกๅ…ƒ่ถ…็ซ‹ๆ–นไฝ“ไธŠใฎ้‡ๅญใ‚ฆใ‚ฉใƒผใ‚ฏใซใ‚ˆใ‚‹ๆŽข็ดข \n", + "\n", + "\n", + "้‡ๅญใ‚ฆใ‚ฉใƒผใ‚ฏใซใ‚ˆใ‚‹ๆŽข็ดขใ‚ขใƒซใ‚ดใƒชใ‚บใƒ ใฏ $O(1/\\sqrt{\\epsilon})$ ใ‚นใƒ†ใƒƒใƒ—ใงใƒžใƒผใ‚ฏใ•ใ‚ŒใŸ้ ‚็‚นใฎ้›†ๅˆใ‚’ๆŽขใ™ใ“ใจใŒใงใใพใ™ใ€ใ“ใ“ใง $\\epsilon = |M|/N$ใ€ $M$ ใฏใƒžใƒผใ‚ฏใ—ใŸ้ ‚็‚นๆ•ฐใ€ $N$ ใฏๅ…จใฆใฎ้ ‚็‚นๆ•ฐใงใ™ใ€‚ใ“ใฎใ‚ขใƒซใ‚ดใƒชใ‚บใƒ ใฏๅ…ƒใฏใ‚ปใ‚ฒใƒ‡ใ‚ฃ้‡ๅญใ‚ฆใ‚ฉใƒผใ‚ฏใ‚’ไฝฟใ„ใ€้‡ๅญ็Šถๆ…‹ใ‚’่กจ็พใ™ใ‚‹ไบŒใคใฎ้ ‚็‚นใƒฌใ‚ธใ‚นใ‚ฟใ‚’็”จใ„ใพใ—ใŸใ€‚ใ—ใ‹ใ—ใ‚ฐใƒญใƒผใƒใƒผใ‚ณใ‚คใƒณใ‚’็”จใ„ใ‚‹ใ‚ณใ‚คใƒณ้‡ๅญใ‚ฆใ‚ฉใƒผใ‚ฏใฏใ‚ปใ‚ฒใƒ‡ใ‚ฃ้‡ๅญใ‚ฆใ‚ฉใƒผใ‚ฏใจ็ญ‰ไพกใงใ€ใ‚ณใ‚คใƒณ้‡ๅญใ‚ฆใ‚ฉใƒผใ‚ฏใฏไธ€่ˆฌ็š„ใซ็ฐก็ด ใซๅฎŸ่ฃ…ใงใใ‚‹ใŸใ‚ใ€ใ‚ณใ‚คใƒณ้‡ๅญใ‚ฆใ‚ฉใƒผใ‚ฏใซใ‚ˆใ‚‹ๅฎŸ่ฃ…ใ‚’้ธใณใพใ™ใ€‚3 ็ซ ใง็ดนไป‹ใ—ใŸ4ๆฌกๅ…ƒ่ถ…็ซ‹ๆ–นไฝ“ใ‚’็”จใ„ใพใ™ใ€‚\n", + "\n", + "ใพใจใ‚ใ‚‹ใจใ€ไปฅไธ‹ใฎใ‚ˆใ†ใซใ‚ขใƒซใ‚ดใƒชใ‚บใƒ ใ‚’ๅฎŸ่ฃ…ใ—ใพใ™ใ€‚ใ‚นใƒ†ใƒƒใƒ— 1 ใ‚’่กŒใ†ใซใฏใ€้ ‚็‚นใƒฌใ‚ธใ‚นใ‚ฟใฎๅ…จใฆใฎ้‡ๅญใƒ“ใƒƒใƒˆใซใ‚ขใƒ€ใƒžใƒผใƒซใ‚ฒใƒผใƒˆใ‚’ไฝœ็”จใ•ใ›ใฆๅ…จใฆใฎ่พบใฎไธ€ๆง˜ใช้‡ใญๅˆใ‚ใ›็Šถๆ…‹ใ‚’ไฝœใ‚Šใพใ™ใ€‚ใ‚นใƒ†ใƒƒใƒ— 2(a) ใงใฏใ€ไฝ็›ธใ‚ชใƒฉใ‚ฏใƒซใ‚’ๅฎŸ่ฃ…ใ—ใพใ™ใ€‚ใ‚นใƒ†ใƒƒใƒ— 2(b) ใฏใ€่ถ…็ซ‹ๆ–นไฝ“ใฎ้‡ๅญใ‚ฆใ‚ฉใƒผใ‚ฏใฎไธ€ใ‚นใƒ†ใƒƒใƒ—ๅˆ†ใฎไฝ็›ธๆŽจๅฎšใจใ€ $\\theta \\neq 0$ ใจใชใ‚‹ใ™ในใฆใฎ้‡ๅญ็Šถๆ…‹ใฎใƒžใƒผใ‚ฏใ‚’่กŒใ„ใพใ™ใ€‚ใ“ใ‚Œใ‚’่ฃœๅŠฉ้‡ๅญใƒ“ใƒƒใƒˆใฎๅ›ž่ปขใซใ‚ˆใ‚Š่กŒใ„ใพใ™ใ€‚ๆœ€ๅพŒใฎใ‚นใƒ†ใƒƒใƒ—ใฏใ€ไฝ็›ธๆŽจๅฎšใฎ้€†ๆผ”็ฎ—ใ‚’่กŒใ„ใพใ™ใ€‚ไฝ็›ธๆŽจๅฎšใซๅฟ…่ฆใช้‡ๅญใƒ“ใƒƒใƒˆใฏ $\\theta$ ใฎ็ฒพๅบฆใซไพๅญ˜ใ—ใพใ™ใ€‚\n", + "\n", + "ไปฅไธ‹ใ€4ๆฌกๅ…ƒ่ถ…็ซ‹ๆ–นไฝ“ใฎ้‡ๅญใ‚ฆใ‚ฉใƒผใ‚ฏใซใ‚ˆใ‚‹ๆŽข็ดขใ‚ขใƒซใ‚ดใƒชใ‚บใƒ ใ‚’ๅฎŸ่ฃ…ใ—ใพใ™ใ€‚" + ] + }, + { + "cell_type": "markdown", + "id": "050a316c", + "metadata": {}, + "source": [ + "ใ“ใฎใ‚ขใƒซใ‚ดใƒชใ‚บใƒ ใงใฏใ€ไธ€ใ‚นใƒ†ใƒƒใƒ—ๅˆ†ใฎใ‚ฒใƒผใƒˆใซๅฏพใ—ใฆไปฅๅ‰ๅฎŸ่ฃ…ใ—ใŸๅ่ปขใ‚’ๅฟ…่ฆใจใ—ใพใ™ใ€‚ใ“ใ‚Œใฏใƒ“ใƒซใƒˆใ‚คใƒณ้–ขๆ•ฐ inverse() ใง่กŒใˆใพใ™ใ€‚" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "id": "4911f08e", + "metadata": {}, + "outputs": [ + { + "data": { + "image/svg+xml": [ + "" + ], + "text/plain": [ + "
" + ] + }, + "execution_count": 5, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "one_step_circuit.inverse().draw() " + ] + }, + { + "cell_type": "markdown", + "id": "b3f5ade1", + "metadata": {}, + "source": [ + "ไธ€ใ‚นใƒ†ใƒƒใƒ—ๅˆ†ใฎใ‚ฒใƒผใƒˆใฎๅ่ปขใฏๅพŒใงไฝ็›ธๆŽจๅฎšใฎ้€†่จˆ็ฎ—ใซไฝฟ็”จใ—ใพใ™ใ€‚3 ็ซ ใงๅฎŸ่ฃ…ใ—ใŸไธ€ใ‚นใƒ†ใƒƒใƒ—ๅˆ†ใฎใ‚ฒใƒผใƒˆใจใใฎๅ่ปขใฎใ‚ฒใƒผใƒˆใฏใ€ๅˆถๅพกใ‚ฒใƒผใƒˆใ‚’ๅฟ…่ฆใจใ—ใพใ™ใ€‚ใ“ใ‚Œใ‚‰ใ‚’ๅพŒใซๅˆถๅพก้‡ๅญใƒ“ใƒƒใƒˆใซๅฟœใ˜ใฆไฝฟ็”จใ—ใพใ™ใ€‚" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "id": "de4c592a", + "metadata": {}, + "outputs": [], + "source": [ + "# Make controlled gates\n", + "inv_cont_one_step = one_step_circuit.inverse().control()\n", + "inv_cont_one_step_gate = inv_cont_one_step.to_instruction()\n", + "cont_one_step = one_step_circuit.control()\n", + "cont_one_step_gate = cont_one_step.to_instruction()" + ] + }, + { + "cell_type": "markdown", + "id": "a259ae43", + "metadata": {}, + "source": [ + "ๅˆถๅพกใ•ใ‚ŒใŸไธ€ใ‚นใƒ†ใƒƒใƒ—ๅˆ†ใฎใ‚ฒใƒผใƒˆใจใ€ๅˆถๅพกใ•ใ‚ŒใŸไธ€ใ‚นใƒ†ใƒƒใƒ—ๅˆ†ใฎๅ่ปขใ‚ฒใƒผใƒˆใฏไฝ็›ธๆŽจๅฎšใซ็”จใ„ใ‚‰ใ‚Œใพใ™ใ€‚ไฝ็›ธๆŽจๅฎšใซใฏ้‡ๅญใƒ•ใƒผใƒชใ‚จๅค‰ๆ›ใ‚‚็”จใ„ใพใ™ใ€‚Qiskit ใงใฏ้‡ๅญใƒ•ใƒผใƒชใ‚จๅค‰ๆ›ใ‚’ๅฎŸ่ฃ…ใ—ใŸ QFT ้–ขๆ•ฐใŒใ‚ใ‚Šใพใ™ใ€‚ไฝ็›ธๆŽจๅฎšใซใฏ้€†้‡ๅญใƒ•ใƒผใƒชใ‚จๅค‰ๆ›ใ‚’็”จใ„ใพใ™ใŒใ€ไฝ็›ธๆŽจๅฎšใฎ้€†่จˆ็ฎ—ใซใ‚‚้€šๅธธใฎ QFT ใ‚’ไฝฟ็”จใ—ใพใ™ใ€‚" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "id": "1dde4f45", + "metadata": {}, + "outputs": [ + { + "data": { + "image/svg+xml": [ + "" + ], + "text/plain": [ + "
" + ] + }, + "execution_count": 7, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "inv_qft_gate = QFT(4, inverse=True).to_instruction() \n", + "qft_gate = QFT(4, inverse=False).to_instruction()\n", + "\n", + "QFT(4, inverse=True).decompose().draw(\"mpl\")" + ] + }, + { + "cell_type": "markdown", + "id": "fd11ab6d", + "metadata": {}, + "source": [ + "ไฝ็›ธๆŽจๅฎšใ‚’ๅฎŸ่ฃ…ใ™ใ‚‹ๅ‰ใซใ€1011 ใจ 1111 ใ‚’ใƒžใƒผใ‚ฏใ™ใ‚‹ไฝ็›ธใ‚ชใƒฉใ‚ฏใƒซใ‚’ๅฎŸ่ฃ…ใ—ใพใ™ใ€‚ใใฎๅพŒใ€ๅ›ž่ทฏใ‚’ไฝœๆˆใ—ใพใ™ใ€‚ใ“ใ‚Œใฏใ‚ขใƒซใ‚ดใƒชใ‚บใƒ ใฎใ‚นใƒ†ใƒƒใƒ— 2(a) ใงใ™ใ€‚" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "id": "90133f6b", + "metadata": { + "scrolled": true + }, + "outputs": [ + { + "data": { + "image/svg+xml": [ + "" + ], + "text/plain": [ + "
" + ] + }, + "execution_count": 8, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "phase_circuit = QuantumCircuit(6, name=' phase oracle ')\n", + "# Mark 1011\n", + "phase_circuit.x(2)\n", + "phase_circuit.h(3)\n", + "phase_circuit.mct([0,1,2], 3)\n", + "phase_circuit.h(3)\n", + "phase_circuit.x(2)\n", + "# Mark 1111\n", + "phase_circuit.h(3)\n", + "phase_circuit.mct([0,1,2],3)\n", + "phase_circuit.h(3)\n", + "phase_oracle_gate = phase_circuit.to_instruction()\n", + "# Phase oracle circuit\n", + "phase_oracle_circuit = QuantumCircuit(11, name=' PHASE ORACLE CIRCUIT ')\n", + "phase_oracle_circuit.append(phase_oracle_gate, [4,5,6,7,8,9])\n", + "phase_circuit.draw() " + ] + }, + { + "cell_type": "markdown", + "id": "d64b5d40", + "metadata": {}, + "source": [ + "ไป–ใฎ้‡ๅญใƒ“ใƒƒใƒˆใŒใ‚ผใƒญใงใชใ„ๅ ดๅˆใซ่ฃœๅŠฉ้‡ๅญใƒ“ใƒƒใƒˆใ‚’ๅ›ž่ปขใ™ใ‚‹ใ‚ฒใƒผใƒˆใ‚’ๅฎŸ่ฃ…ใ—ใพใ™ใ€‚ใ“ใฎใ‚ฒใƒผใƒˆใฏไฝ็›ธๆŽจๅฎšใง็”จใ„ใ‚‰ใ‚Œใ€ $\\theta \\neq 0$ ใฎๆ™‚ใซ่ฃœๅŠฉ้‡ๅญใƒ“ใƒƒใƒˆใ‚’ๅ›ž่ปขใ—ใพใ™ใ€‚" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "id": "2badd3a6", + "metadata": {}, + "outputs": [ + { + "data": { + "image/svg+xml": [ + "" + ], + "text/plain": [ + "
" + ] + }, + "execution_count": 9, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "# Mark q_4 if the other qubits are non-zero \n", + "mark_auxiliary_circuit = QuantumCircuit(5, name=' mark auxiliary ')\n", + "mark_auxiliary_circuit.x([0,1,2,3,4])\n", + "mark_auxiliary_circuit.mct([0,1,2,3], 4)\n", + "mark_auxiliary_circuit.z(4)\n", + "mark_auxiliary_circuit.mct([0,1,2,3], 4)\n", + "mark_auxiliary_circuit.x([0,1,2,3,4])\n", + "\n", + "mark_auxiliary_gate = mark_auxiliary_circuit.to_instruction()\n", + "mark_auxiliary_circuit.draw()" + ] + }, + { + "cell_type": "markdown", + "id": "2fe04e88", + "metadata": {}, + "source": [ + "ๆฌกใซใ‚ขใƒซใ‚ดใƒชใ‚บใƒ ใฎใ‚นใƒ†ใƒƒใƒ— 2(b) ใ‚’ๅฎŸ่ฃ…ใ—ใพใ™ใ€‚ใ“ใฎใ‚นใƒ†ใƒƒใƒ—ใฏใ€้‡ๅญใ‚ฆใ‚ฉใƒผใ‚ฏไธ€ใ‚นใƒ†ใƒƒใƒ—ๅˆ†ใฎไฝ็›ธๆŽจๅฎšใจใ€ $\\theta \\neq 0$ ใฎๆ™‚ใฎ่ฃœๅŠฉ้‡ๅญใƒ“ใƒƒใƒˆใฎๅ›ž่ปขๆ“ไฝœใ‚’ๅซใฟใพใ™ใ€‚ใ“ใฎใŸใ‚ใซใ€็›ดๅ‰ใซไฝœๆˆใ—ใŸ mark_auxiliary_gate ใ‚’็”จใ„ใพใ™ใ€‚ใใฎๅพŒใ€ไฝ็›ธๆŽจๅฎšใฎ้€†ๆผ”็ฎ—ใ‚’่กŒใ„ใพใ™ใ€‚" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "id": "a9929ba0", + "metadata": { + "scrolled": false + }, + "outputs": [ + { + "data": { + "image/svg+xml": [ + "" + ], + "text/plain": [ + "
" + ] + }, + "execution_count": 11, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "# Phase estimation\n", + "phase_estimation_circuit = QuantumCircuit(11, name=' phase estimation ')\n", + "phase_estimation_circuit.h([0,1,2,3])\n", + "for i in range(0,4):\n", + " stop = 2**i\n", + " for j in range(0,stop):\n", + " phase_estimation_circuit.append(cont_one_step, [i,4,5,6,7,8,9])\n", + "\n", + "# Inverse fourier transform\n", + "phase_estimation_circuit.append(inv_qft_gate, [0,1,2,3])\n", + "\n", + "# Mark all angles theta that are not 0 with an auxiliary qubit\n", + "phase_estimation_circuit.append(mark_auxiliary_gate, [0,1,2,3,10])\n", + "\n", + "# Reverse phase estimation\n", + "phase_estimation_circuit.append(qft_gate, [0,1,2,3]) \n", + "\n", + "for i in range(3,-1,-1):\n", + " stop = 2**i\n", + " for j in range(0,stop):\n", + " phase_estimation_circuit.append(inv_cont_one_step, [i,4,5,6,7,8,9])\n", + "phase_estimation_circuit.barrier(range(0,10))\n", + "phase_estimation_circuit.h([0,1,2,3])\n", + "\n", + "# Make phase estimation gate\n", + "phase_estimation_gate = phase_estimation_circuit.to_instruction()\n", + "phase_estimation_circuit.draw() " + ] + }, + { + "cell_type": "markdown", + "id": "8f8dcc75", + "metadata": {}, + "source": [ + "ใ“ใ“ใงใ€ใ“ใ‚Œใพใงไฝœๆˆใ—ใŸใ‚ฒใƒผใƒˆใ‚’็”จใ„ใฆใ€้‡ๅญใ‚ฆใ‚ฉใƒผใ‚ฏใซใ‚ˆใ‚‹ๆŽข็ดขใ‚ขใƒซใ‚ดใƒชใ‚บใƒ ใฎๅ…จไฝ“ใ‚’ๅฎŸ่ฃ…ใ—ใพใ™ใ€‚ๆœ€ๅˆใฏใ€ใ‚นใƒ†ใƒƒใƒ— 1 ใฎ้ ‚็‚นใจใ‚ณใ‚คใƒณใฎ้‡ๅญใƒ“ใƒƒใƒˆใซใ‚ขใƒ€ใƒžใƒผใƒซใ‚ฒใƒผใƒˆใ‚’ไฝœ็”จใ•ใ›ใพใ™ใ€‚ใใฎๅพŒใ€ใ‚นใƒ†ใƒƒใƒ— 2(a) ใจ 2(b) ใฎไฝ็›ธใ‚ชใƒฉใ‚ฏใƒซใ‚ฒใƒผใƒˆใจไฝ็›ธๆŽจๅฎšใ‚ฒใƒผใƒˆใ‚’็นฐใ‚Š่ฟ”ใ—ไฝœ็”จใ•ใ›ใพใ™ใ€‚4 ็ซ ใงใ‚ขใƒซใ‚ดใƒชใ‚บใƒ ใ‚’่ชฌๆ˜Žใ—ใŸใ‚ˆใ†ใซใ€ $O(1/\\sqrt{\\epsilon})$ ๅ›žใฎ็นฐใ‚Š่ฟ”ใ—ใŒๅฟ…่ฆใงใ™ใ€‚ๆœ€ๅพŒใซ้ ‚็‚น้‡ๅญใƒ“ใƒƒใƒˆใ‚’ๆธฌๅฎšใ—ใพใ™ใ€‚" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "id": "55c1c857", + "metadata": {}, + "outputs": [ + { + "data": { + "image/svg+xml": [ + "" + ], + "text/plain": [ + "
" + ] + }, + "execution_count": 12, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "# Implementation of the full quantum walk search algorithm\n", + "theta_q = QuantumRegister(4, 'theta')\n", + "node_q = QuantumRegister(4, 'node')\n", + "coin_q = QuantumRegister(2, 'coin')\n", + "auxiliary_q = QuantumRegister(1, 'auxiliary')\n", + "creg_c2 = ClassicalRegister(4, 'c')\n", + "circuit = QuantumCircuit(theta_q, node_q, coin_q, auxiliary_q, creg_c2)\n", + "# Apply Hadamard gates to the qubits that represent the nodes and the coin\n", + "circuit.h([4,5,6,7,8,9])\n", + "iterations = 2\n", + "\n", + "for i in range(0,iterations):\n", + " circuit.append(phase_oracle_gate, [4,5,6,7,8,9])\n", + " circuit.append(phase_estimation_gate, [0,1,2,3,4,5,6,7,8,9,10])\n", + "\n", + "circuit.measure(node_q[0], creg_c2[0])\n", + "circuit.measure(node_q[1], creg_c2[1])\n", + "circuit.measure(node_q[2], creg_c2[2])\n", + "circuit.measure(node_q[3], creg_c2[3])\n", + "circuit.draw()" + ] + }, + { + "cell_type": "markdown", + "id": "38ec1434", + "metadata": {}, + "source": [ + "ๆœ€ๅพŒใซใ€ใ“ใฎๅฎŸ่ฃ…ใ‚’ qasm ใ‚ทใƒŸใƒฅใƒฌใƒผใ‚ฟใงๅฎŸ่กŒใ—ใพใ™ใ€‚ใƒžใƒผใ‚ฏใ—ใŸ็Šถๆ…‹ใธใจใฏใฃใใ‚Šใจ้›†ใพใฃใฆใ„ใ‚‹ใ“ใจใŒๅˆ†ใ‹ใ‚Šใพใ™ใ€‚" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "id": "659702ef", + "metadata": {}, + "outputs": [ + { + "data": { + "image/svg+xml": [ + "" + ], + "text/plain": [ + "
" + ] + }, + "execution_count": 13, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "backend = Aer.get_backend('qasm_simulator') \n", + "job = execute( circuit, backend, shots=1024 ) \n", + "hist = job.result().get_counts() \n", + "plot_histogram( hist )" + ] + }, + { + "cell_type": "markdown", + "id": "d055c293", + "metadata": {}, + "source": [ + "## 6. ๅ‚่€ƒๆ–‡็Œฎ \n", + "\n", + "1. Renato Portugal. Quantum Walks and Search Algorithms. New York, NY: Springer New York, 2013\n", + "2. Markus G. Kuhn.Some Introductory Notes on Quantum Computing. Apr. 2000\n", + "3. Thomas G. Wong. โ€œEquivalence of Szegedyโ€™s and coined quantum walksโ€. In: Quantum InformationProcessing 16.9 (July 2017). ISSN: 1573-1332. DOI:10.1007/s11128-017-1667-y. URL:http://dx.doi.org/10.1007/s11128-017-1667-y.37\n", + "4. Ronald de Wolf. Quantum Computing: Lecture Notes. 2021. arXiv:1907.09415 [quant-ph]" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "id": "97872b22", + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "/usr/local/anaconda3/lib/python3.7/site-packages/qiskit/aqua/__init__.py:86: DeprecationWarning: The package qiskit.aqua is deprecated. It was moved/refactored to qiskit-terra For more information see \n", + " warn_package('aqua', 'qiskit-terra')\n" + ] + }, + { + "data": { + "text/html": [ + "

Version Information

Qiskit SoftwareVersion
qiskit-terra0.18.0
qiskit-aer0.8.2
qiskit-ignis0.6.0
qiskit-ibmq-provider0.15.0
qiskit-aqua0.9.4
qiskit0.28.0
System information
Python3.7.7 (default, May 6 2020, 04:59:01) \n", + "[Clang 4.0.1 (tags/RELEASE_401/final)]
OSDarwin
CPUs8
Memory (Gb)32.0
Tue Oct 05 13:51:31 2021 BST
" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "import qiskit.tools.jupyter\n", + "%qiskit_version_table" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.9" + } + }, + "nbformat": 4, + "nbformat_minor": 5 +} diff --git a/translations/ja/v2/quantum-hardware/error-correction-repetition-code.ipynb b/translations/ja/v2/quantum-hardware/error-correction-repetition-code.ipynb index e85349740..a066fe961 100755 --- a/translations/ja/v2/quantum-hardware/error-correction-repetition-code.ipynb +++ b/translations/ja/v2/quantum-hardware/error-correction-repetition-code.ipynb @@ -157,7 +157,7 @@ "name": "stdout", "output_type": "stream", "text": [ - "{'000': 992, '001': 6, '010': 18, '100': 8}\n" + "{'001': 6, '100': 10, '010': 11, '000': 997}\n" ] } ], @@ -174,6 +174,20 @@ "print(counts)" ] }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "tags": [ + "sanity-check" + ] + }, + "outputs": [], + "source": [ + "# ...almost all results still come out '000',...\n", + "assert counts['000'] > sum(counts.values())*0.95" + ] + }, { "cell_type": "markdown", "metadata": {}, @@ -185,14 +199,14 @@ }, { "cell_type": "code", - "execution_count": 5, + "execution_count": 6, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "{'011': 16, '101': 13, '110': 16, '111': 979}\n" + "{'001': 1, '110': 16, '101': 19, '011': 9, '111': 979}\n" ] } ], @@ -208,6 +222,21 @@ "print(counts)" ] }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "tags": [ + "sanity-check" + ] + }, + "outputs": [], + "source": [ + "# ...number of samples that come out with a majority in the wrong state\n", + "# (0 in this case) is again much less than 10,...\n", + "assert counts.get('000', 0) < 10" + ] + }, { "cell_type": "markdown", "metadata": {}, @@ -219,14 +248,14 @@ }, { "cell_type": "code", - "execution_count": 6, + "execution_count": 8, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "{'000': 127, '001': 123, '010': 133, '011': 152, '100': 117, '101': 122, '110': 118, '111': 132}\n" + "{'100': 124, '001': 126, '110': 119, '101': 133, '010': 117, '000': 127, '011': 139, '111': 139}\n" ] } ], @@ -236,6 +265,21 @@ "print(counts)" ] }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "tags": [ + "sanity-check" + ] + }, + "outputs": [], + "source": [ + "# ...all outcomes occur with equal probability, with\n", + "# differences in results being due only to statistical noise.\n", + "assert max(counts.values()) < 200" + ] + }, { "cell_type": "markdown", "metadata": {}, @@ -280,17 +324,19 @@ }, { "cell_type": "code", - "execution_count": 7, + "execution_count": 10, "metadata": {}, "outputs": [ { "data": { - "image/png": "iVBORw0KGgoAAAANSUhEUgAAAS8AAADWCAYAAACANAS9AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8vihELAAAACXBIWXMAAAsTAAALEwEAmpwYAAAu2UlEQVR4nO3deVyVZf7/8ddh7yAqHlRkcQE0FVEUHDXCJc2lRRwzcwlLLcpKM7OaFhpxyTSnMXOsphQ1lRo1vjqKW45ilhWLIIhLpQzLkMgi7iRw/f7gx9EDRzgYCLd9no/H/Yhzneu+7s9N8va6r/vmqFNKKYQQQmOsGroAIYS4FRJeQghNkvASQmiShJcQQpMkvIQQmiThJYTQJAkvIYQmSXgJITRJwksIoUkSXkIITZLwEkJokoSXEEKTJLyEEJok4SWE0CQJLyGEJkl4CSE0ScJLCKFJEl5CCE2S8BJCaJKElxBCkyS8hBCaJOElhNAkCS8hhCZJeAkhNEnCSwihSRJeQghNkvASQmiShJcQQpMkvIQQmiThJYTQJAkvIYQmSXgJITRJwksIoUkSXkIITfrDhVdycjI6nY4dO3Y0dCk1ysnJQafTERUVVWPflJQUk/O6fPkyc+bM4fDhw7U+blFREc8++yytWrVCr9cTFBTEwYMHaz2OEPXpDxdecXFxAAQEBDRwJTWLj48HoHfv3jX2d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l4CSE06f8BDBIGEXAu4HYAAAAASUVORK5CYII=\n", + "image/svg+xml": [ + "" + ], "text/plain": [ - "
" + "
" ] }, - "execution_count": 7, + "execution_count": 10, "metadata": {}, "output_type": "execute_result" } @@ -298,13 +344,13 @@ "source": [ "from qiskit import QuantumRegister, ClassicalRegister\n", "\n", - "cq = QuantumRegister(2,'code_qubit')\n", - "lq = QuantumRegister(1,'ancilla_qubit')\n", - "sb = ClassicalRegister(1,'syndrome_bit')\n", - "qc = QuantumCircuit(cq,lq,sb)\n", - "qc.cx(cq[0],lq[0])\n", - "qc.cx(cq[1],lq[0])\n", - "qc.measure(lq,sb)\n", + "cq = QuantumRegister(2, 'code_qubit')\n", + "lq = QuantumRegister(1, 'ancilla_qubit')\n", + "sb = ClassicalRegister(1, 'syndrome_bit')\n", + "qc = QuantumCircuit(cq, lq, sb)\n", + "qc.cx(cq[0], lq[0])\n", + "qc.cx(cq[1], lq[0])\n", + "qc.measure(lq, sb)\n", "qc.draw()" ] }, @@ -319,30 +365,32 @@ }, { "cell_type": "code", - "execution_count": 8, + "execution_count": 11, "metadata": {}, "outputs": [ { "data": { - "image/png": "iVBORw0KGgoAAAANSUhEUgAAAS8AAADWCAYAAACANAS9AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8vihELAAAACXBIWXMAAAsTAAALEwEAmpwYAAAu2UlEQVR4nO3deVyVZf7/8ddh7yAqHlRkcQE0FVEUHDXCJc2lRRwzcwlLLcpKM7OaFhpxyTSnMXOsphQ1lRo1vjqKW45ilhWLIIhLpQzLkMgi7iRw/f7gx9EDRzgYCLd9no/H/Yhzneu+7s9N8va6r/vmqFNKKYQQQmOsGroAIYS4FRJeQghNkvASQmiShJcQQpMkvIQQmiThJYTQJAkvIYQmSXgJITRJwksIoUkSXkIITZLwEkJokoSXEEKTJLyEEJok4SWE0CQJLyGEJkl4CSE0ScJLCKFJEl5CCE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S2/0iPuSJq5bBRVpaen06FDh2r7REZGmnzEjRB3CgkvDfvtt9+qPM1fWYcOHerkuTMhGhsJLyGEJjW6h1SFEMISEl5CCE2S8BJCaJKElxBCkyS8hBCaJOElhNAkCS8hhCZJeAkhNEnCSwihSRJeQghNkvASQmiShJcQQpMkvIQQmiThJYTQJAkvIYQmSXgJITRJwksIoUkSXkIITZLwEkJokoSXEEKTJLyEEJok4SWE0CQJLyGEJkl4CSE06f8BDBIGEXAu4HYAAAAASUVORK5CYII=\n", + "image/svg+xml": [ + "" + ], "text/plain": [ - "
" + "
" ] }, - "execution_count": 8, + "execution_count": 11, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "qc_init = QuantumCircuit(cq)\n", + "qc_init = QuantumCircuit(cq, lq, sb)\n", "\n", - "(qc_init+qc).draw()" + "qc_init.compose(qc).draw()" ] }, { "cell_type": "code", - "execution_count": 9, + "execution_count": 12, "metadata": {}, "outputs": [ { @@ -354,8 +402,22 @@ } ], "source": [ - "counts = execute( qc_init+qc, Aer.get_backend('qasm_simulator')).result().get_counts()\n", - "print('Results:',counts)" + "counts = execute(qc_init.compose(qc), Aer.get_backend('qasm_simulator')).result().get_counts()\n", + "print('Results:', counts)" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "tags": [ + "sanity-check" + ] + }, + "outputs": [], + "source": [ + "# The outcome, in all cases, is 0.\n", + "assert list(counts.keys()) == ['0']" ] }, { @@ -369,31 +431,33 @@ }, { "cell_type": "code", - "execution_count": 10, + "execution_count": 14, "metadata": {}, "outputs": [ { "data": { - "image/png": "iVBORw0KGgoAAAANSUhEUgAAAVwAAADWCAYAAACdSjomAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8vihELAAAACXBIWXMAAAsTAAALEwEAmpwYAAAxlklEQVR4nO3de1xU1f7/8dcMFxFFwfGCgDfEK15Q8GgiqYmKecEsTSVU8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Tfn5+ZoukDTV98803jB49mrp161KvXj3mzp2LVqvl6NGjBAUFUatWLdq1a8eXX35pVkN6ejrPPvssGo0GJycnunbtanE/a9y8eZMpU6ag0WioVasWoaGhZste7p9SmD9/PkuXLgX0owTDJkRVVdOpBiMH9zE+9nSvT7+eXW1XUAlVInDDw8P57rvvWLJkCQcOHOCDDz6gffv25OfnM336dPbu3ct//vMfk2NWr16Nq6sro0ePNmmfMGECDRo04LPPPuP1119nx44dzJ492/i8Vqtl6NCh7Nixg6ioKHbu3EmzZs0YM2aMxdoKCwt5/vnnGTVqFHv27GH06NHk5ubSs2dPjh49yooVK9i1axdt2rQhPDyc999/36yPSZMm0bp1a3bu3ElkZCRvv/02c+bMITw8nIiICHbt2oWnpycjR440uc4TJ07QvXt3cnJy+OCDD/jyyy/p0KEDzzzzDLGxseX+Ob/88ssUFBTwySef8M4773DkyBGeeuopCgsLLe4/adIk4xzWkSNHjJsQVZlPM08CAzpgb2/H84P7YmdXJWIOqCJzuD/88AMLFy7khRdeMLYZ7g62bduW//3f/+Wf//wnCxcuBOD27dts3ryZ8ePH4+zsbNLXiBEjiImJAaB///5kZmaydu1aNmzYgEqlYv/+/Xz//fesXbuWiRMnAjBgwABu3brFRx99ZFbb7du3Wb58Oc8995yxbd68eVy9epVTp07Rtm1bAJ5++mmuXLlCVFQUkydPxtHR0bj/qFGjePPNNwEIDg5mz549vPPOO3z//ff07NkTgFatWtGyZUt27tzJnDlzAJg7dy6NGjXim2++oWbNmgAMHDiQnJwcXnvtNZ555ply/ZybN2/Otm3bjI9btWpFnz592LRpE9OmTTPb38vLCw8PDwB69Cj9hsP9Xl36z3LVJURlWbFuhyLnWfLKFKv2qxLR361bN5YtW8bKlSs5efKkyYJjFxcXxo0bx7p167h37x4An376Kb/99htTp04166vk9EPHjh25e/culy9fBiAhIQHAbGQ8duxYi7WpVCqzPuPj4+natasxbA3GjRvH9evXOXHihEn7008/bfK4Xbt21KlTxxi2AN7e3jg6OhrXAd65c4dvvvmGZ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5r333mP+/PnodLpK+RYlIR4HKt0j8tuj1Wpp27Ytvr6+D7UGVQghbM3mI9yyFBQUcPr0aXbs2MEvv/xSLb9cRgjxeKjygZuUlETfvn1p0KABy5cvN1m7KqCoqKjU5+3s7OTjuEJUEY/MlIIwl5WVRYsWLUrdZ8OGDSZftyiEsB0J3EfY77//bvaptpJatGhRIeuChRB/ngSuEEIopMp98EEIIaorCVwhhFCIBK4QQihEAlcIIRQigSuEEAqRwBVCCIVI4AohhEIkcIUQQiESuEIIoRAJXCGEUIgErhBCKEQCVwghFCKBK4QQCpHAFUIIhUjgCiGEQiRwhRBCIRK4QgihEAlcIYRQiASuEEIoRAJXCCEUIoErhBAKkcAVQgiFSOAKIYRCJHCFEEIh/w9INlPU08R2LgAAAABJRU5ErkJggg==\n", + "image/svg+xml": [ + "" + ], "text/plain": [ - "
" + "
" ] }, - "execution_count": 10, + "execution_count": 14, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "qc_init = QuantumCircuit(cq)\n", + "qc_init = QuantumCircuit(cq, lq, sb)\n", "qc_init.x(cq)\n", "\n", - "(qc_init+qc).draw()" + "qc_init.compose(qc).draw()" ] }, { "cell_type": "code", - "execution_count": 11, + "execution_count": 15, "metadata": {}, "outputs": [ { @@ -405,8 +469,22 @@ } ], "source": [ - "counts = execute(qc_init+qc, Aer.get_backend('qasm_simulator')).result().get_counts()\n", - "print('Results:',counts)" + "counts = execute(qc_init.compose(qc), Aer.get_backend('qasm_simulator')).result().get_counts()\n", + "print('Results:', counts)" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "tags": [ + "sanity-check" + ] + }, + "outputs": [], + "source": [ + "# The outcome in this case is also always 0.\n", + "assert list(counts.keys()) == ['0']" ] }, { @@ -418,32 +496,34 @@ }, { "cell_type": "code", - "execution_count": 12, + "execution_count": 17, "metadata": {}, "outputs": [ { "data": { - "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYkAAADWCAYAAAAkcn4rAAAAOXRFWHRTb2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EDnTp10lscHSt290PZY46NjeX8+fPaPxNDNL2owsLCih+EEOKBV+09iby8PPr27cvYsWNp1aoVNWrU4KeffuLPP/9kxowZ2u2GDh1K48aNOXDgAGFhYdjZVa704OBgunfvzowZM8jLy6NNmzbs2bOHn376yew2Zs2aRUREBAMHDmTevHk0bNiQ9evXs3//fr766iudSet7sXTpUoKCgujTpw+TJ0/G29ub3NxcTp48yd9//01ERESF2ktLS2PMmDGMHz9eO/nt5+fHiy++aPQzmq8f/uSTTxg4cCC2trZ06tSp3P3IcJMQD49qDwlHR0cCAwNZs2aN9vZPX19fvvzyS507bmxtbRkxYgRffPEFkydX/iRkY2PDjz/+yMyZMwkPD6e0tJT+/fsTGRlJ9+7mPbzSqFEjfvvtN9555x1mzpxJQUEBrVu3ZsOGDUYnwCujXbt2xMfHEx4ezltvvcXly5epX78+bdq00bkTzFxLlixh//79vPDCC9y8eZO+ffuyfPlyvTvE7vbss88yadIkvvjiC+bOnYtKpbL4t0wKIayXQvWA/I8vLS2lZcuW+Pv7V+oZASGEEBVX7T0JU/Lz8zl9+jRRUVH89ddfD+UX8AkhhLWy+pBISEigT58+NGjQgCVLlug8WyCguLi43PdtbW3lqzSEEJX2wAw3CX1paWk0bdq03G3Wrl2r89XfQghRERISD7Bbt27pPd1dVtOmTS3y3IYQ4tEkISGEEMIoq3uYTgghhPWQkBBCCGGUhIQQQgijJCSEEEIYJSEhhBDCKAkJIYQQRklICCGEMEpCQgghhFESEkIIIYySkBBCCGGUhIQQQgijJCSEEEIYJSEhhBDCKAkJIYQQRklICCGEMEpCQgghhFESEkIIIYySkBBCCGGUhIQQQgijJCSEEEIYJSEhhBDCKAkJIYQQRklICCGEMEpCQgghhFH/Hy7SU4KAfQ9UAAAAAElFTkSuQmCC\n", + "image/svg+xml": [ + "" + ], "text/plain": [ - "
" + "
" ] }, - "execution_count": 12, + "execution_count": 17, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "qc_init = QuantumCircuit(cq)\n", + "qc_init = QuantumCircuit(cq, lq, sb)\n", "qc_init.h(cq[0])\n", - "qc_init.cx(cq[0],cq[1])\n", + "qc_init.cx(cq[0], cq[1])\n", "\n", - "(qc_init+qc).draw()" + "qc_init.compose(qc).draw()" ] }, { "cell_type": "code", - "execution_count": 13, + "execution_count": 18, "metadata": {}, "outputs": [ { @@ -455,8 +535,23 @@ } ], "source": [ - "counts = execute(qc_init+qc, Aer.get_backend('qasm_simulator')).result().get_counts()\n", - "print('Results:',counts)" + "counts = execute(qc_init.compose(qc), Aer.get_backend('qasm_simulator')).result().get_counts()\n", + "print('Results:', counts)" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": { + "tags": [ + "sanity-check" + ] + }, + "outputs": [], + "source": [ + "# ...we can expect the same to be true also for\n", + "# any superposition of |00โŸฉ and |11โŸฉ...\n", + "assert list(counts.keys()) == ['0']" ] }, { @@ -468,33 +563,35 @@ }, { "cell_type": "code", - "execution_count": 14, + "execution_count": 20, "metadata": {}, "outputs": [ { "data": { - "image/png": "iVBORw0KGgoAAAANSUhEUgAAAbcAAADWCAYAAABSSMygAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8vihELAAAACXBIWXMAAAsTAAALEwEAmpwYAAA0aUlEQVR4nO3deVzU1f748dewiSgKjAuymCKaigsK5kqKkmLlkqmphCXupV7z2vKr6EpJLpnXW1R2y7XcMuVmiJp6hfJGxa6IXHIhkYsSYoiCKDC/P+Y7o8OMMNiwOLyfj8fn8XDO53zOeX8mmvec8zmfzyhUKpUKIYQQwoxY1HcAQgghhKlJchNCCGF2JLkJIYQwO5LchBBCmB1JbkIIIcyOJDchhBBmR5KbEEIIsyPJTQghhNmR5CaEEMLsSHITQghhdiS5CSGEMDuS3IQQQpgdSW5CCCHMjiQ3IYQQZkeSmxBCCLMjyU0IIYTZkeQmhBDC7EhyE0IIYXYkuQkhhDA7ktyEEEKYHUluQgghzI4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A8O7uSa+uHtjZNmHi6Ecb1JffBnHN7ccffyQ8PJxnn31WW6ZZOdO1a1f+3//7f/zzn/8kPDwcgJKSErZu3cpzzz2HnZ2dTlsTJkxg9erVADz22GNkZmby+eefs2nTJhQKBQcPHuQ///kPn3/+OTNnzgRg5MiR3Lhxg88++0wvtpKSEtasWcPEiRO1Za+88gr5+fmcOnWKrl27AvD444+Tl5dHaGgos2fPxsbmznB98uTJvP322wAEBASwf/9+/vGPf/Cf//yHQYMGAdC5c2c6derEnj17WLJkCQBLly6lbdu2HDt2jKZNmwIwatQocnJyeP3113nqqadq9D536NCBHTt2aF937tyZYcOGsWXLFubPn69X383NDRcXFwAGDBhgdD+vrfpnjeISQjz43v14W530s/LVOUbVaxAjt379+vHee++xbt06Tp48qXNDn729PdOnT2fDhg3cvn0bgJ07d/LHH38wb948vbYqT2H27NmT0tJSLl++DEBsbCyA3ohv2rRpBmNTKBR6bcbExNC3b19tYtOYPn06V69e5cQJ3ZscH3/8cZ3X3bp1o0WLFtrEBuDh4YGNjY323o+bN29y7Ngxnn76aaytrSkrK9Nuo0ePJiMjg7y8PIMx30vlcx46dCjOzs7a90QIIcxFgxi5ffXVV4SFhbFmzRpeeukl2rRpw4wZM1i2bBm2trYsWLCAjz76iL179/LMM8+wfv16hg8frpdcAJycnHReN2nSBFAnC4ArV67QvHlzmjVrplPP2dnZYGyOjo7aNjQKCgro1k1/brldu3baPiq3cTcbGxu9MgBra2udOMvKyli9erV2JFpZfn4+bdq0MbjPEEPn2LZtW714/yxjv1kJIURtaRDJrXXr1kRERBAREcG5c+fYtm0by5Ytw8rKiuXLl9O1a1dGjBjB+vXrefjhh/nll1/YvXv3ffWlVCq5fv06N27c0Elwly5dMljf0ByyUqk0WD83N1e7/89ydHTEwsKCWbNmMXv2bIN1PDw8atSmoZgvX75s8EvCnyHTkkKI2vJATUvezcPDg9DQULp06cLJkye15S+++CIxMTEsWbKEdu3aMX78+Ptqf+jQoYB6avNu27dvN7qNYcOGkZSUREZGhk75tm3bcHJyolevXvcV293s7OwYOnQoKSkp9OnTB19fX73N1ta2Rm1WPufY2FguXbqkfU8M0YxaS0pKan4SQghRT+p95FZYWMiIESOYNm0a3bp1o0mTJhw6dIj//ve/LFq0SFtv7NixtG/fnmPHjhEaGoqV1f2FHhgYyODBg1m0aBGFhYX06NGDgwcPcujQIaPbWLJkCVu2bGHUqFG8/fbbtGnThq1bt3L06FE++eQTncUkf8a6devw8/PD39+fOXPm4O7uTkFBAWlpaZw5c4YtW7bUqL2srCymTp3K9OnTtYtSPD09ee655+55jOYnKd577z1GjRqFpaUlvr6+VfYj05JCiPpW78nN1tYWHx8fNm7cqF0G36lTJz766COdFXyWlpZMmDCBDz/8kDlz7v/D08LCgm+//ZbFixcTFhZGRUUFjz32GDt27GDw4MFGtdG2bVt+/PFHXn31VRYvXkxxcTHdu3dn27Zt91yYcj969epFQkICYWFhvPzyy1y5coVWrVrRo0cPnZWlxlqzZg1Hjx7l2Wef5ebNm4wYMYKIiAi9Fad3e/rpp5k9ezYffvghy5YtQ6VS1coTvIUQwpQUqgfkk6qiooKuXbvi5eV1X/d4CSGEaDzqfeRWnaKiIk6fPs3u3bv59ddfzfLBxkIIIUyrwSe3xMRE/P39ad26NWvWrNG5N0xAWVlZlfstLS0b1FMDhBCiLjww05JCX1ZWFh07dqyyzqZNm3R+wkYIIRoDSW4PsFu3buk9DaWyjh07muS+OyGEeJBIchNCCGF2GtxN3EIIIcSfJclNCCGE2ZHkJoQQwuxIchNCCGF2JLkJIYQwO5LchBBCmB1JbkIIIcyOJDchhBBmR5KbEEIIsyPJTQghhNmR5CaEEMLsSHITQghhdiS5CSGEMDuS3IQQQpgdSW5CCCHMjiQ3IYQQZkeSmxBCCLMjyU0IIYTZkeQmhBDC7EhyE0IIYXYkuQkhhDA7ktyEEEKYHUluQgghzI4kNyGEEGbn/wMspuJ/40lugAAAAABJRU5ErkJggg==\n", + "image/svg+xml": [ + "" + ], "text/plain": [ - "
" + "
" ] }, - "execution_count": 14, + "execution_count": 20, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "qc_init = QuantumCircuit(cq)\n", + "qc_init = QuantumCircuit(cq, lq, sb)\n", "qc_init.h(cq[0])\n", "qc_init.cx(cq[0],cq[1])\n", "qc_init.x(cq[0])\n", "\n", - "(qc_init+qc).draw()" + "qc_init.compose(qc).draw()" ] }, { "cell_type": "code", - "execution_count": 15, + "execution_count": 21, "metadata": {}, "outputs": [ { @@ -506,10 +603,24 @@ } ], "source": [ - "counts = execute(qc_init+qc, Aer.get_backend('qasm_simulator')).result().get_counts()\n", + "counts = execute(qc_init.compose(qc), Aer.get_backend('qasm_simulator')).result().get_counts()\n", "print('Results:',counts)" ] }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": { + "tags": [ + "sanity-check" + ] + }, + "outputs": [], + "source": [ + "# In such cases the output is always '1'.\n", + "assert list(counts.keys()) == ['1']" + ] + }, { "cell_type": "markdown", "metadata": {}, @@ -542,7 +653,7 @@ }, { "cell_type": "code", - "execution_count": 16, + "execution_count": 23, "metadata": {}, "outputs": [], "source": [ @@ -560,14 +671,14 @@ }, { "cell_type": "code", - "execution_count": 17, + "execution_count": 24, "metadata": {}, "outputs": [], "source": [ "n = 3\n", "T = 1\n", "\n", - "code = RepetitionCode(n,T)" + "code = RepetitionCode(n, T)" ] }, { @@ -586,17 +697,19 @@ }, { "cell_type": "code", - "execution_count": 18, + "execution_count": 25, "metadata": {}, "outputs": [ { "data": { - "image/png": "iVBORw0KGgoAAAANSUhEUgAAAlQAAAFeCAYAAABD64HSAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8vihELAAAACXBIWXMAAAsTAAALEwEAmpwYAABhs0lEQVR4nO3deVzU1f7H8dewi6IgqGyaKK6I4pYrLmWKae5LyrVSu3rN9Jq323r1SmWmebve8ldWai7lkluZYmndpDQsFsUFzdJINJcU1zQUmN8fc2dyBGFggAF8Px+PeTic7/me8/kOIJ8553zPGIxGoxERERERKTInRwcgIiIiUt4poRIRERGxkxIqERERETspoRIRERGxkxIqERERETspoRIRERGxkxIqERERETspoRIRERGxkxIqERERETspoRIRERGxkxIqERERETspoRIRERGxkxIqERERETspoRIRERGxkxIqERERETspoRIRERGxkxIqERERETspoRIRERGxkxIqERERETspoRIRERGxkxIqERERETspoRIRERGxkxIqERERETspoRIRERGxkxIqERERETspoRIRERGxk4ujAxARkYppypQp7Nmzp9T7jYiIYN68eaXer9zZlFCJiEiJ2LNnD3FxcY4OQ6RUaMpPRERExE5KqERERETspCk/uaNlZcPJC5CeARevmcqquENwdQjyATf9hhSbG9lw4jwcz4DLv5vKqlaC2tUh0BtcnB0anoiIXfTnQu5IF67C19/DriPwW2beddxdoG096NIIalYt3fgqkl8vw1ffQ8JR+P1G3nUqu0O7+hDZEHwql258IiLFQQmV3FGMRoj/ET5Ohsys/OtmZsGOw6b6UeFwT1Nw1iS5zbJz4MuD8OleyMrJv+5vmfDfVNh5GPq1hI4NwGAonThFRIqDEiq5Y+TkwMpvTSMlhZGdA5tT4MgZGNNF04C2uJEN730Fqb8U7rzMLFiTAEd/hZEdlMCKSPmh/65ucvToUQwGA2vWrAFg3759GAwGtmzZYndbZcXJkycxGAysXLky33p5XfvVq1eZMWMGu3fvLlSfFy9e5C9/+Qs1a9bE09OTTp06sWPHjiLFb481CYVPpm526CQs+RpyjMUXU0WUY4SlOwqfTN0sKQ0+/K7YQpJypmrVqvj6+uLu7l5g3cjISJyc9KdMHE8/hTdJSkoCoHXr1gAEBgYSHx/PvffeW+S22rRpU3wBFoPExEQA2rZtm2+9vK59z549xMTEcPnyZZv7MxqN9O/fnw0bNjB37lw2btyIn58f9913X6ETM3ukHDNN3eVnXrTpkZ/UX0xrr+T2dh6G/cfzr2PLa/3tEdj9c/HFJWVXlSpVGD9+PLGxsZw+fZqLFy9y9uxZrl69SmpqKu+99x5du3bNdV50dDTbt29n6dKlGDRHLA6myYubJCUl4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w+w8zD8evn2df28oFMD6NwQXDX1VGgN/eHpPvDV9/DND3AhnzVsAd4Q2RDa1S/6KKKIVAxKqETKCRdn02LnLo3gRAYcyzCNWH39ven40LZQ29c05VTc2wDcaTxcoWczuLcpHDsHxzNgnWkLNbo0gkBvU5Ib4A1aIigioIRKpNxxMpgSp9q+pq/NCVWnho6LqaJydoKQGqaHOaEqK1tPiEjZokFqERERETspoRIRERGxk6b8RERE/iciIqLQ5xw9dhKAenUCrJ6XRt9SdiihEhER+Z958+YV+hxHf1yOlA2a8hMRERGxkxIqERERETspoRIRERGxkxIqERERETspoRIRERGxkxIqERERETspoRIRERGxkxIqERERETspoRIRERGxkxIqERERETspoRIRERGxkxIqERERETspoRIRERGxk4ujAxARkfxNmTKFPXv2OKTviIgI5s2b55C+RcoTJVQiImXcnj17iIuLc3QYIpIPTfmJiIiI2EkJlYiIiIidlFCJiIiI2EkJlYiIiIidlFCJiIiI2EkJlYiIiIidlFAVg5SUFAwGA1u2bHF0KAU6efIkBoOBlStXFlh33759Vtd19epVZsyYwe7duwvd78WLF/nLX/5CzZo18fT0pFOnTuzYsaPQ7YiI7fz9/QkLC6NJkyZ4eXnlW9fX15devXqVUmQiFY8SqmKQkJAAQOvWrR0cScESExMBaNu2bYF1AwMDiY+P59577wVMe+HExMRw+fLlQvVpNBrp378/GzZsYO7cuWzcuBE/Pz/uu+++IiVnIpI3g8FAz549WbNmDSdPnuTkyZPs37+f1NRULl26xPfff88bb7xB06ZNrc7z9fXlv//9L5988gm9e/d2UPQi5Zs29iwGCQkJBAcHU7NmTUeHUqDExER8fHwIDQ0tsK6vry++vr6Wr3fv3o3BYCAiIqJQfW7atIm4uDhiY2Mt/1l36dKFsLAwnn/+eWJjYwvVXkk4cf6P5z/9CnX9wGBwXDwihdW2bVsWLVpEeHi4pezChQucOHECZ2dnQkJCaNiwIQ0bNuTxxx9n7dq1TJw4kezsbP773//SvHlzDh48qDc5IkV0x4xQbdy4kR49euDt7Y2npyfh4eEsXrwYM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/Tp0/Pss0GD2++enJe8Yjt9+nSuRK44FHbK78efT2iaUERE7KIpv3LA09OTLl26sGrVKi5dupTreKNGjQgICGDFihVW5UePHuWbb76he/fuALRv3x53d3dWrVplVe/DDz/M9RlLvXv3Zu/evTRq1Ig2bdrkepg/ZNhW69ats+rjyJEjJCQk0LVr19ueY16jde3atUL1JSIiUlZphMrB5s6dS5cuXWjfvj1PPfUUd911F8eOHePrr79m4cKFvPzyy4wePZohQ4YwevRozp8/zz//+U+8vb15+umnAdNI19SpU5k1axbe3t488MADHDx4kDlz5uRam/Xiiy+ydetWOnfuzOTJk6lfvz6XL1/m0KFDbN++nc2bNxcq/hs3bnD//fczadIkLl++zPTp0/H29mbKlCm3Pce8L9X8+fP505/+hKurK82bN8fNzS3fvmx5l/DVd3uJ/XIXf4nuZ9NnOomIiBQLozhcSkqKsV+/fkZvb2+jh4eHsUGDBsZp06ZZjn/44YfGVq1aGd3d3Y3VqlUzDhw40Pj9999btZGdnW2MiYkxBgYGGt3d3Y133323cefOnca77rrL+PDDD1vVPXnypPEvf/mLsXbt2kZXV1djjRo1jJGRkcbXXnvN5ph/+uknI2D897//bXz66aeNtWrVMrq7uxu7detm3Lt3r1Xdrl27Grt27WpV9vzzzxsDAgKMTk5ORsD4008/2dz37WRmXje++Poy47srN9ndloiISGFo2wSpME6fPc/y9VsZcn9XjU6JiEipUkIlFUpOTo7NH60hIiJSXJRQSS63LmS/lZOTk5IWERGRm+ivouTi6uqa7+OFF15wdIgiIiJliu7yk1wSEhLyPR4YGFhKkYiIiJQPmvITERERsZOm/ERERETspIRKRERExE5KqERERETspIRKRERExE5KqERERETspIRKRERExE5KqERERETspIRKRERExE5KqERERETspIRKRERExE5KqERERETspIRKRERExE5KqERERETspIRKRERExE5KqERERETspIRKRERExE5KqERERETspIRKRERExE5KqERERETspIRKRERExE5KqERERETspIRKRERExE5KqERERETspIRKRERExE7/D5+Y4N1Hm9gGAAAAAElFTkSuQmCC\n", + "image/svg+xml": [ + "" + ], "text/plain": [ - "
" + "
" ] }, - "execution_count": 18, + "execution_count": 25, "metadata": {}, "output_type": "execute_result" } @@ -607,17 +720,19 @@ }, { "cell_type": "code", - "execution_count": 19, + "execution_count": 26, "metadata": {}, "outputs": [ { "data": { - "image/png": "iVBORw0KGgoAAAANSUhEUgAAAoIAAAFeCAYAAAAR5H7cAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8vihELAAAACXBIWXMAAAsTAAALEwEAmpwYAABl7ElEQVR4nO3deVyU5f7/8dewi6IgLoi4oLgiiqK5r5lSlluukZXa0czsmNl+9EhlLlnHb/mrLDW3XHKhzKW0zoFOicXqEpolkkvuuKaiwPz+mDOTAwgDgQPM+/l43A/hvq/7uj/3Lehnru02GI1GIyIiIiLicJzsHYCIiIiI2IcSQREREREHpURQRERExEEpERQRERFxUEoERURERByUEkERERERB6VEUERERMRBKREUERERcVBKBEVEREQclBJBEREREQelRFBERETEQSkRFBEREXFQSgRFREREHJQSQREREREHpURQRERExEEpERQRERFxUEoERURERByUEkERERERB6VEUERERMRBKREUERERcVBKBEVEREQclBJBEREREQelRFBERETEQSkRFBEREXFQSgRFREREHJQSQREREREH5WLvAEREREqLyZMnk5ycbJdrh4aGMn/+fLtcWxyXEkEREZH/SU5OJiYmxt5hiNwx6hoWERERcVBKBEVEREQclLqGRcqgC1fh6Dk4eRFuZoGrM9SsAnV9wdvT3tGVH0YjpP8BR9Ph9EXIzAY3F6jlDXWrglcFe0coIvLXKBEUKSOyjZD8G3x3EFLP3L5cg+rQuTG0rgtOavMvkqxsiDsM3x80JYG306QWdG0MwbXBYLhz8YmIFBclgiJlwJnLsDo2/wTQLPWMafvuIDzUAapXLvn4ypPj52FVrOnPgvx8wrQ194dh7dUaKyJlj9oLREq5Q6dg3lbbksBbHT4D87bBLydLJq7yaM9RePtL25LAW6X8Dm9uhWP5tB6KiJRGSgRvkZqaisFgYN26dQD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Ju3DhLd2phvPXWWyQkJPDhhx+yePFijh49So8ePazG7N2qX79+PP/88wBs3LiR2NhYYmNjqVXLtk/8hbEreT9Xrl6jd5ewYq9bREpG/QA/urVvZWpJub8nLi7O9g5JShFXVxeG3d8TJycDPTu2pq5/DXuHZJMOrZvTqH4AlStVZECfLvYOx4rWEbSzHj16cODAAQ4ePEjlypWtjmVnZ+Pv70/Dhg35/vvvLfsPHTpE06ZNGT9+PAsWLOD8+fPUqlWLoUOHsmLFCku5VatWERERwaOPPmqZRTtu3DjWr1/P/v37rRbWHDt2LBs3buTkyZO4u7sXGHdaWhqBgYEEBgZy8OBByyt7Dh06RJMmTXj22WeZM2eO5R7B9PongA8++IAJEyZw+PBh6tevb/OzenHOhzaXFRERcWSzXxhnUzm1CNrR1atX+e9//8uIESNyJYEABw4c4NSpUzz00ENW+xs2bEinTp0sidWuXbvIyMhgxIgRVuWGDRuW652KW7du5Z577sHX15fMzEzLFh4ezoULF9i9e3eh7uHBBx+0ukbDhg1p164dMTExhapHRERE7jwNnLKj8+fPk52dTe3atfM8np6eDoCfX+4FMmvVqsXBgwcB02rjeZVzcXHB19fXat+pU6f49NNP+fTTT/O85tmzZwt1D3nFVrNmTX766adC1WMLWz/d3Lhxk7kL1+BXvSqPj+hX7HGIiIiUF0oE7cjHxwcnJyeOHz+e53FzEmceL3irEydOWI7frlxmZqYlSTSrVq0a7dq1Y/r06Xles1GjRoW6h7xiO3XqVK4EtDgUtmv419+OqztZREQckrqGywBPT0+6devGmjVruHTpUq7jTZo0oVatWqxatcpqf2pqKjt37qRnz54AdOjQAXd3d9asWWNV7tNPP831PsV7772XPXv20KRJE9q2bZtrq1KlSqHuYcOGDVbXOHToEHFxcXTv3v2255jHIF67dq1Q1xIREZHipRZBO5s3bx7dunWjQ4cOPP/889SrV48jR47w3//+l0WLFvHGG28wevRohgwZwujRozl//jz//Oc/8fb25oUXXgBMLYtTpkxh1qxZeHt788ADD7B//37mzp2ba+zha6+9xvbt2+nSpQtPP/00DRs25PLlyxw4cIDo6Gi2bNlSqPhv3rzJfffdx6RJk7h8+TLTp0/H29ubyZMn3/Yc87qCCxYs4OGHH8bV1ZWWLVvi5pb/grG2fLr59sc9bP3PLp6I6F9q3jkpIiJSWikRtLOwsDBiY2OZNm0azzzzDNevX6dOnTqWiR+PPfYYFStWZPbs2Tz44IN4eHjQq1cvZs+ebfUezddffx0PDw8WLlzIRx99RKtWrVi3bl2uiSa1a9e2vNkjMjKSkydP4u3tTdOmTRk0aFCh43/22Wc5efIkf/vb37hw4QIdO3YkKioq3+Vg2rdvzyuvvMKSJUv44IMPyM7OLvQM4rzcuHGTb3/YTVC92koCRUREbKDlY6TcOHX2PCs2bmfIfd2VCIqIiNhAiaCUK9nZ2Tg5aeiriIiILZQISi45J5jk5OTkpGRLRESkHND/5pKLq6trvturr75q7xBFRESkGGiyiOQSFxeX73F/f/87FImIiIiUJHUNi4iIiDgodQ2LiIiIOCglgiIiIiIOSomgiIiIiINSIigiIiLioJQIioiIiDgoJYIiIiIiDkqJoIiIiIiDUiIoIiIi4qCUCIqIiIg4KCWCIiIiIg5KiaCIiIiIg1IiKCIiIuKglAiKiIiIOCglgiIiIiIOSomgiIiIiINSIigiIiLioJQIioiIiDgoJYIiIiIiDkqJoIiIiIiDUiIoIiIi4qCUCIqIiIg4KCWCIiIiIg5KiaCIiIiIg1IiKCIiIuKg/j9FrTADCTL+rQAAAABJRU5ErkJggg==\n", + "image/svg+xml": [ + "" + ], "text/plain": [ - "
" + "
" ] }, - "execution_count": 19, + "execution_count": 26, "metadata": {}, "output_type": "execute_result" } @@ -639,7 +754,7 @@ }, { "cell_type": "code", - "execution_count": 20, + "execution_count": 27, "metadata": { "scrolled": false }, @@ -648,16 +763,13 @@ "name": "stdout", "output_type": "stream", "text": [ - "Logical 0 : {'000 00': 1024} \n", - "\n", - "Logical 1 : {'111 00': 1024} \n", - "\n" + "Logical 0: {'000 00': 1024}\n", + "Logical 1: {'111 00': 1024}\n" ] } ], "source": [ "def get_raw_results(code,noise_model=None):\n", - "\n", " circuits = code.get_circuit_list()\n", " raw_results = {}\n", " for log in range(2):\n", @@ -667,7 +779,7 @@ "\n", "raw_results = get_raw_results(code)\n", "for log in raw_results:\n", - " print('Logical',log,':',raw_results[log],'\\n')" + " print(f'Logical {log}: {raw_results[log]}')" ] }, { @@ -681,26 +793,24 @@ }, { "cell_type": "code", - "execution_count": 21, + "execution_count": 28, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "Logical 0 : {'000 00 00 00 00': 1024} \n", - "\n", - "Logical 1 : {'111 00 00 00 00': 1024} \n", - "\n" + "Logical 0: {'000 00 00 00 00': 1024}\n", + "Logical 1: {'111 00 00 00 00': 1024}\n" ] } ], "source": [ - "code = RepetitionCode(n,4)\n", + "code = RepetitionCode(n, 4)\n", "\n", "raw_results = get_raw_results(code)\n", "for log in raw_results:\n", - " print('Logical',log,':',raw_results[log],'\\n')" + " print(f'Logical {log}: {raw_results[log]}')" ] }, { @@ -712,26 +822,24 @@ }, { "cell_type": "code", - "execution_count": 22, + "execution_count": 29, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "Logical 0 : {'00000 0000 0000 0000 0000': 1024} \n", - "\n", - "Logical 1 : {'11111 0000 0000 0000 0000': 1024} \n", - "\n" + "Logical 0: {'00000 0000 0000 0000 0000': 1024}\n", + "Logical 1: {'11111 0000 0000 0000 0000': 1024}\n" ] } ], "source": [ - "code = RepetitionCode(5,4)\n", + "code = RepetitionCode(5, 4)\n", "\n", "raw_results = get_raw_results(code)\n", "for log in raw_results:\n", - " print('Logical',log,':',raw_results[log],'\\n')" + " print(f'Logical {log}: {raw_results[log]}')" ] }, { @@ -745,7 +853,7 @@ }, { "cell_type": "code", - "execution_count": 23, + "execution_count": 30, "metadata": { "scrolled": true }, @@ -754,21 +862,21 @@ "name": "stdout", "output_type": "stream", "text": [ - "Logical 0 : {'000 00': 660, '000 01': 75, '100 00': 47, '100 01': 6, '100 10': 4, '101 00': 7, '110 00': 4, '110 01': 2, '111 00': 2, '000 10': 66, '000 11': 3, '001 00': 55, '001 01': 6, '001 10': 2, '010 00': 49, '010 01': 22, '010 10': 6, '010 11': 2, '011 00': 3, '011 01': 2, '011 11': 1} \n", + "Logical 0: {'011 11': 1, '010 11': 1, '001 01': 3, '101 00': 6, '100 10': 12, '110 00': 1, '100 00': 49, '110 01': 1, '010 10': 12, '100 01': 5, '010 00': 52, '010 01': 26, '000 00': 650, '000 10': 64, '011 00': 5, '001 00': 52, '000 11': 6, '000 01': 74, '001 10': 4}\n", "\n", - "Logical 1 : {'100 00': 3, '100 01': 1, '100 10': 2, '100 11': 1, '101 00': 55, '101 01': 20, '101 10': 5, '101 11': 15, '110 00': 56, '110 01': 21, '110 10': 7, '110 11': 3, '111 00': 613, '111 01': 61, '111 10': 65, '111 11': 7, '001 00': 3, '001 01': 3, '001 10': 1, '001 11': 2, '010 00': 3, '010 01': 2, '010 10': 4, '011 00': 34, '011 01': 10, '011 10': 24, '011 11': 3} \n", + "Logical 1: {'011 11': 2, '100 10': 1, '010 10': 1, '101 10': 9, '110 11': 1, '000 11': 1, '001 11': 1, '101 00': 47, '100 01': 3, '010 00': 4, '101 01': 31, '001 01': 1, '110 00': 40, '110 01': 24, '100 00': 5, '001 10': 2, '111 01': 74, '001 00': 3, '011 00': 59, '100 11': 7, '011 10': 25, '111 00': 574, '011 01': 5, '101 11': 20, '010 11': 4, '110 10': 6, '111 11': 5, '111 10': 69}\n", "\n" ] } ], "source": [ - "code = RepetitionCode(3,1)\n", + "code = RepetitionCode(3, 1)\n", "\n", - "noise_model = get_noise(0.05,0.05)\n", + "noise_model = get_noise(0.05, 0.05)\n", "\n", "raw_results = get_raw_results(code,noise_model)\n", "for log in raw_results:\n", - " print('Logical',log,':',raw_results[log],'\\n')" + " print(f'Logical {log}: {raw_results[log]}\\n')" ] }, { @@ -792,7 +900,7 @@ }, { "cell_type": "code", - "execution_count": 24, + "execution_count": 31, "metadata": {}, "outputs": [], "source": [ @@ -812,20 +920,20 @@ }, { "cell_type": "code", - "execution_count": 25, + "execution_count": 32, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "P = {'0': 0.0194, '1': 0.028}\n" + "P = {'0': 0.0219, '1': 0.0253}\n" ] } ], "source": [ - "P = lookuptable_decoding(raw_results,table_results)\n", - "print('P =',P)" + "P = lookuptable_decoding(raw_results, table_results)\n", + "print('P =', P)" ] }, { @@ -850,7 +958,7 @@ }, { "cell_type": "code", - "execution_count": 26, + "execution_count": 33, "metadata": {}, "outputs": [ { @@ -859,24 +967,24 @@ "text": [ "\n", "Logical 0:\n", - "raw results {'000 00 00': 476, '000 01 00': 58, '000 10 00': 55}\n", - "processed results {'0 0 00 00 00': 476, '0 0 00 01 01': 58, '0 0 00 10 10': 55}\n", + "raw results {'000 10 00': 55, '000 00 00': 463, '000 01 01': 56, '000 01 00': 52}\n", + "processed results {'0 0 00 10 10': 55, '0 0 00 00 00': 463, '0 0 01 01 00': 56, '0 0 00 01 01': 52}\n", "\n", "Logical 1:\n", - "raw results {'111 00 00': 427, '111 00 01': 51}\n", - "processed results {'1 1 00 00 00': 427, '1 1 01 01 00': 51}\n" + "raw results {'111 10 00': 53, '111 00 00': 437, '111 01 00': 59, '111 10 10': 54}\n", + "processed results {'1 1 00 10 10': 53, '1 1 00 00 00': 437, '1 1 00 01 01': 59, '1 1 10 10 00': 54}\n" ] } ], "source": [ - "code = RepetitionCode(3,2)\n", + "code = RepetitionCode(3, 2)\n", "\n", - "raw_results = get_raw_results(code,noise_model)\n", + "raw_results = get_raw_results(code, noise_model)\n", "\n", - "results = code.process_results( raw_results )\n", + "results = code.process_results(raw_results)\n", "\n", - "for log in ['0','1']:\n", - " print('\\nLogical ' + log + ':')\n", + "for log in ['0', '1']:\n", + " print(f'\\nLogical {log}:')\n", " print('raw results ', {string:raw_results[log][string] for string in raw_results[log] if raw_results[log][string]>=50 })\n", " print('processed results ', {string:results[log][string] for string in results[log] if results[log][string]>=50 })" ] @@ -943,7 +1051,7 @@ }, { "cell_type": "code", - "execution_count": 27, + "execution_count": 34, "metadata": {}, "outputs": [], "source": [ @@ -960,7 +1068,7 @@ }, { "cell_type": "code", - "execution_count": 28, + "execution_count": 35, "metadata": { "tags": [ "uses-hardware" @@ -982,7 +1090,7 @@ }, { "cell_type": "code", - "execution_count": 29, + "execution_count": 36, "metadata": { "tags": [ "uses-hardware" @@ -1019,7 +1127,7 @@ }, { "cell_type": "code", - "execution_count": 30, + "execution_count": 37, "metadata": { "tags": [ "uses-hardware" @@ -1042,7 +1150,7 @@ }, { "cell_type": "code", - "execution_count": 31, + "execution_count": 38, "metadata": { "tags": [ "uses-hardware" @@ -1068,7 +1176,7 @@ }, { "cell_type": "code", - "execution_count": 32, + "execution_count": 39, "metadata": { "tags": [ "uses-hardware" @@ -1094,7 +1202,7 @@ }, { "cell_type": "code", - "execution_count": 33, + "execution_count": 40, "metadata": { "tags": [ "uses-hardware" @@ -1122,7 +1230,7 @@ }, { "cell_type": "code", - "execution_count": 34, + "execution_count": 41, "metadata": { "tags": [ "uses-hardware" @@ -1152,7 +1260,7 @@ }, { "cell_type": "code", - "execution_count": 35, + "execution_count": 42, "metadata": { "tags": [ "uses-hardware" @@ -1177,7 +1285,7 @@ }, { "cell_type": "code", - "execution_count": 36, + "execution_count": 43, "metadata": { "tags": [ "uses-hardware" @@ -1200,7 +1308,7 @@ }, { "cell_type": "code", - "execution_count": 37, + "execution_count": 44, "metadata": { "tags": [ "uses-hardware" @@ -1223,7 +1331,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 45, "metadata": { "tags": [ "uses-hardware" @@ -1256,13 +1364,26 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 46, "metadata": { "tags": [ "uses-hardware" ] }, - "outputs": [], + "outputs": [ + { + "data": { + "image/svg+xml": [ + "" + ], + "text/plain": [ + "
" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], "source": [ "import matplotlib.pyplot as plt\n", "import numpy as np\n", @@ -1299,7 +1420,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 47, "metadata": { "tags": [ "uses-hardware" @@ -1334,13 +1455,31 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 48, "metadata": { "tags": [ "uses-hardware" ] }, - "outputs": [], + "outputs": [ + { + "data": { + "text/plain": [ + "{'count': 29.0,\n", + " 'mean': 0.1839624024105741,\n", + " 'std': 0.08969281029182916,\n", + " 'min': 0.032099523882660116,\n", + " '25%': 0.1202076677316294,\n", + " '50%': 0.15479808944854537,\n", + " '75%': 0.2585266030013643,\n", + " 'max': 0.3820573455512858}" + ] + }, + "execution_count": 48, + "metadata": {}, + "output_type": "execute_result" + } + ], "source": [ "import pandas as pd\n", "\n", @@ -1356,13 +1495,31 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 49, "metadata": { "tags": [ "uses-hardware" ] }, - "outputs": [], + "outputs": [ + { + "data": { + "text/plain": [ + "{'count': 43.0,\n", + " 'mean': 0.03964249408264689,\n", + " 'std': 0.02227486941657462,\n", + " 'min': 0.01279016878072245,\n", + " '25%': 0.025389504940856747,\n", + " '50%': 0.03296455263355727,\n", + " '75%': 0.046331516695269206,\n", + " 'max': 0.11660000000000004}" + ] + }, + "execution_count": 49, + "metadata": {}, + "output_type": "execute_result" + } + ], "source": [ "if step_3:\n", "\n", @@ -1390,11 +1547,22 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 50, "metadata": { "scrolled": true }, - "outputs": [], + "outputs": [ + { + "data": { + "text/plain": [ + "{'qiskit-terra': '0.21.2', 'qiskit-aer': '0.10.4', 'qiskit-ignis': None, 'qiskit-ibmq-provider': '0.19.2', 'qiskit': '0.37.2', 'qiskit-nature': '0.4.1', 'qiskit-finance': '0.3.2', 'qiskit-optimization': '0.4.0', 'qiskit-machine-learning': '0.4.0'}" + ] + }, + "execution_count": 50, + "metadata": {}, + "output_type": "execute_result" + } + ], "source": [ "import qiskit\n", "qiskit.__qiskit_version__" @@ -1417,7 +1585,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.9" + "version": "3.8.5" } }, "nbformat": 4, diff --git a/translations/ja/v2/toc.yaml b/translations/ja/v2/toc.yaml index 23b349ae3..9c91b91e4 100755 --- a/translations/ja/v2/toc.yaml +++ b/translations/ja/v2/toc.yaml @@ -98,15 +98,18 @@ - id: quantum-counting uuid: f1a9942c-b519-11ec-b909-0242ac120002 url: /ch-algorithms/quantum-counting - - id: quantum-teleportation - uuid: f4f4a090-b519-11ec-b909-0242ac120002 - url: /ch-algorithms/teleportation - - id: superdense-coding - uuid: f87cbd42-b519-11ec-b909-0242ac120002 - url: /ch-algorithms/superdense-coding + - id: quantum-walk-search-algorithm + uuid: b2ef52cf-0ce4-494a-8142-fd00e0e8330d + url: /ch-algorithms/quantum-walk-search-algorithm - id: quantum-key-distribution uuid: fbafa8c6-b519-11ec-b909-0242ac120002 url: /ch-algorithms/quantum-key-distribution + - id: superdense-coding + uuid: f87cbd42-b519-11ec-b909-0242ac120002 + url: /ch-algorithms/superdense-coding + - id: quantum-teleportation + uuid: f4f4a090-b519-11ec-b909-0242ac120002 + url: /ch-algorithms/teleportation - title: ้‡ๅญใ‚ขใƒ—ใƒชใ‚ฑใƒผใ‚ทใƒงใƒณใฎใ‚ขใƒซใ‚ดใƒชใ‚บใƒ  @@ -200,10 +203,10 @@ - title: Appendix(ไป˜้Œฒ) url: /ch-appendix sections: - - id: an-introduction-to-linear-algebra-for-quantum-computing + - id: linear_algebra uuid: 5d2bb2ca-b51a-11ec-b909-0242ac120002 url: /ch-appendix/linear_algebra - - id: basic-qiskit-syntax + - id: qiskit uuid: 5fd6b79a-b51a-11ec-b909-0242ac120002 url: /ch-appendix/qiskit @@ -211,7 +214,7 @@ - title: ใ‚ฒใƒผใƒ ใจใƒ‡ใƒข url: /ch-demos sections: - - id: bonus-level-sandbox + - id: hello-qiskit uuid: 63a85f0e-b51a-11ec-b909-0242ac120002 url: /ch-ex/hello-qiskit - id: estimating-pi-using-quantum-phase-estimation-algorithm diff --git a/translations/ko/toc.yaml b/translations/ko/toc.yaml index 3abd079f3..611a907c0 100644 --- a/translations/ko/toc.yaml +++ b/translations/ko/toc.yaml @@ -124,129 +124,3 @@ title: "\uC591\uC790 \uCEF4\uD4E8\uD305 \uC18C\uAC1C" type: learning-path url: /v2_introduction - - -#---- Below was added by machine --- - -- sections: - - id: introduction - title: Introduction - url: v2/ch-states/introduction - uuid: afcc559e-b519-11ec-b909-0242ac120002 - - id: the-atoms-of-computation - title: The Atoms of Computation - url: v2/ch-states/atoms-computation - uuid: b31c20ee-b519-11ec-b909-0242ac120002 - - id: representing-qubit-states - title: Representing Qubit States - url: v2/ch-states/representing-qubit-states - uuid: b81717ca-b519-11ec-b909-0242ac120002 - - id: single-qubit-gates - title: Single Qubit Gates - url: v2/ch-states/single-qubit-gates - uuid: bd4334a4-b519-11ec-b909-0242ac120002 - - id: the-case-for-quantum-computers - title: The Case for Quantum - url: v2/ch-states/case-for-quantum - uuid: c0bbff62-b519-11ec-b909-0242ac120002 - title: "\uC591\uC790 \uC0C1\uD0DC\uC640 \uD050\uBE44\uD2B8" - url: /v2_ch-states -- sections: - - id: multiple-qubits-and-entangled-states - title: Multiple Qubits and Entangled States - url: v2/ch-gates/multiple-qubits-entangled-states - uuid: c7cfe502-b519-11ec-b909-0242ac120002 - - id: basic-circuit-identities - title: More Circuit Identities - url: v2/ch-gates/more-circuit-identities - uuid: ce8ce75a-b519-11ec-b909-0242ac120002 - title: "\uB2E4\uC911 \uD050\uBE44\uD2B8\uC640 \uC5BD\uD798" - url: /v2_ch-gates -- sections: - - id: quantum-circuits - title: Defining Quantum Circuits - url: v2/ch-algorithms/defining-quantum-circuits - uuid: d90cbfb6-b519-11ec-b909-0242ac120002 - - id: deutsch-jozsa-algorithm - title: Deutsch-Jozsa Algorithm - url: v2/ch-algorithms/deutsch-jozsa - uuid: dc9d3aa2-b519-11ec-b909-0242ac120002 - - id: bernstein-vazirani-algorithm - title: Bernstein-Vazirani Algorithm - url: v2/ch-algorithms/bernstein-vazirani - uuid: df6e5a40-b519-11ec-b909-0242ac120002 - - id: quantum-fourier-transform - title: Quantum Fourier Transform - url: v2/ch-algorithms/quantum-fourier-transform - uuid: e59ba472-b519-11ec-b909-0242ac120002 - - id: quantum-phase-estimation - title: Quantum Phase Estimation - url: v2/ch-algorithms/quantum-phase-estimation - uuid: e8ac9ec8-b519-11ec-b909-0242ac120002 - - id: shors-algorithm - title: Shor's Algorithm - url: v2/ch-algorithms/shor - uuid: ec157cd8-b519-11ec-b909-0242ac120002 - - id: hidden-shift-problem - title: The Hidden Shift Problem - url: v2/ch-algorithms/hidden-shift-problem - uuid: 56d13a0c-cae7-11ec-9d64-0242ac120002 - - id: quantum-counting - title: Quantum Counting - url: v2/ch-algorithms/quantum-counting - uuid: f1a9942c-b519-11ec-b909-0242ac120002 - - id: quantum-teleportation - title: Quantum Teleportation - url: v2/ch-algorithms/teleportation - uuid: f4f4a090-b519-11ec-b909-0242ac120002 - - id: superdense-coding - title: Superdense Coding - url: v2/ch-algorithms/superdense-coding - uuid: f87cbd42-b519-11ec-b909-0242ac120002 - - id: quantum-key-distribution - title: Quantum Key Distribution - url: v2/ch-algorithms/quantum-key-distribution - uuid: fbafa8c6-b519-11ec-b909-0242ac120002 - - id: quantum-walk-search-algorithm - title: Quantum Walk Search Algorithm - url: v2/ch-algorithms/quantum-walk-search-algorithm - uuid: 5083763f-3db8-461f-8e7d-675533924165 - title: "\uC591\uC790 \uD504\uB85C\uD1A0\uCF5C\uB4E4\uACFC \uC54C\uACE0\uB9AC\uB4EC\ - \uB4E4" - url: /v2_ch-algorithms -- sections: - - id: phase-kickback - title: Phase Kickback - url: v2/algorithms/phase-kickback - uuid: 976e9da6-6c33-4e2f-b7eb-f9588f700f07 - title: "\uC591\uC790 \uC54C\uACE0\uB9AC\uB4EC" - type: learning-path - url: /v2_algorithms -- sections: - - id: why-quantum-computing - title: Why quantum computing? - url: v2/intro/why-quantum-computing - uuid: bdb1d662-e0f6-428a-8830-befe6b47f320 - - id: what-is-quantum - title: What is quantum? - url: v2/intro/what-is-quantum - uuid: 7c765036-aebc-11ec-b909-0242ac120002 - - id: describing-quantum-computers - title: Describing quantum computers - url: v2/intro/describing-quantum-computers - uuid: 9260a554-aebc-11ec-b909-0242ac120002 - - id: entangled-states - title: Entangled states - url: v2/intro/entangled-states - uuid: 98aa9032-aebc-11ec-b909-0242ac120002 - - id: grovers-search-algorithm - title: Grovers algorithm - url: v2/intro/grover-intro - uuid: a2e6f7a2-aebc-11ec-b909-0242ac120002 - - id: project - title: Project - url: v2/intro/project - uuid: e25c3f90-aebd-11ec-b909-0242ac120002 - title: "\uC591\uC790 \uCEF4\uD4E8\uD305 \uC18C\uAC1C" - type: learning-path - url: /v2_introduction diff --git a/translations/ko/v1/ch-gates/introduction.ipynb b/translations/ko/v1/ch-gates/introduction.ipynb deleted file mode 100644 index e696daca9..000000000 --- a/translations/ko/v1/ch-gates/introduction.ipynb +++ /dev/null @@ -1,52 +0,0 @@ -{ - "cells": [ - { - "cell_type": "markdown", - "metadata": { - "tags": [ - "remove_cell" - ] - }, - "source": [ - "# ์†Œ๊ฐœ" - ] - }, - { - "cell_type": "markdown", - "metadata": { - }, - "source": [ - "๋‹จ์ผ ํ๋น„ํŠธ์™€ ๋‹จ์ผ ํ๋น„ํŠธ ๊ฒŒ์ดํŠธ๋กœ ๋ช‡๊ฐ€์ง€ ํฅ๋ฏธ๋กœ์šด ํšจ๊ณผ๋“ค์„ ๋ณด์•˜์œผ๋‚˜, ์–‘์ž ์ปดํ“จํŒ…์˜ ์ง„์ •ํ•œ ํž˜์€ ํ๋น„ํŠธ๋“ค ์‚ฌ์ด์— ์ƒํ˜ธ์ž‘์šฉ์œผ๋กœ ์‹คํ˜„๋ฉ๋‹ˆ๋‹ค. ์ด ์„น์…˜์—์„œ ๋‹ค์ค‘ ํ๋น„ํŠธ ๊ฒŒ์ดํŠธ๋ฅผ ์†Œ๊ฐœํ•˜๊ณ  ๋‹ค์ค‘ ํ๋น„ํŠธ ์‹œ์Šคํ…œ์˜ ํฅ๋ฏธ๋กœ์šด ๋™์ž‘์„ ์‚ดํŽด๋ณผ ๊ฒƒ์ž…๋‹ˆ๋‹ค.\n", - "\n", - "์ผ๋ฐ˜์ ์œผ๋กœ, ํ•˜๋“œ์›จ์–ด์—์„œ ์ง์ ‘ ๊ตฌํ˜„ํ•  ์ˆ˜ ์žˆ๋Š” ๊ฒŒ์ดํŠธ๋“ค์€ ํ•˜๋‚˜ ํ˜น์€ ๋‘ ๊ฐœ์˜ ํ๋น„ํŠธ๋“ค์—์„œ ๋™์ž‘ํ•ฉ๋‹ˆ๋‹ค. ํšŒ๋กœ์—์„œ, ์šฐ๋ฆฌ๋Š” ๋งŽ์€ ํ๋น„ํŠธ์—์„œ ๋™์ž‘ํ•˜๋Š” ๋ณต์žกํ•œ ๊ฒŒ์ดํŠธ๋ฅผ ์‚ฌ์šฉํ•˜๋Š” ๊ฒƒ์„ ์ข‹์•„ํ•ฉ๋‹ˆ๋‹ค. ๋‹คํ–‰ํžˆ๋„, ์ด๊ฒƒ์€ ๋ฌธ์ œ๊ฐ€ ๋˜์ง€ ์•Š์„ ๊ฒƒ์ž…๋‹ˆ๋‹ค. ํ•˜๋“œ์›จ์–ด๋กœ ๋ถ€ํ„ฐ ์šฐ๋ฆฌ๊ฐ€ ๋ฐ›์€ ํ•˜๋‚˜์˜ ํ๋น„ํŠธ ๊ฒŒ์ดํŠธ์™€ ๋‘ ๊ฐœ์˜ ํ๋น„ํŠธ ๊ฒŒ์ดํŠธ๋กœ, ๋‹ค๋ฅธ ์–ด๋–ค ๊ฒŒ์ดํŠธ๋„ ๋งŒ๋“ค ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.\n", - "\n", - "์ด ์žฅ์—์„œ๋Š” ๋จผ์ € ๊ฐ€์žฅ ๊ธฐ๋ณธ์ ์ธ ๋‹ค์ค‘-ํ๋น„ํŠธ ๊ฒŒ์ดํŠธ์™€ ์ด๋ฅผ ์„ค๋ช…ํ•˜๊ณ  ๋ถ„์„ํ•˜๋Š”๋ฐ ์‚ฌ์šฉํ•˜๋Š” ์ˆ˜ํ•™์„ ์†Œ๊ฐœํ•ฉ๋‹ˆ๋‹ค. ๊ทธ๋Ÿฐ ๋‹ค์Œ ์ด๋Ÿฌํ•œ ๊ฒŒ์ดํŠธ๊ฐ€ ์–‘์ž ์•Œ๊ณ ๋ฆฌ์ฆ˜์„ ๋งŒ๋“œ๋Š”๋ฐ ์‚ฌ์šฉ๋  ์ˆ˜ ์žˆ๋‹ค๋Š” ๊ฒƒ์„ ์ฆ๋ช…ํ•˜๋Š” ๋ฐฉ๋ฒ•์„ ๋ณด์—ฌ์ค„ ์˜ˆ์ •์ž…๋‹ˆ๋‹ค. ๊ทธ๋Ÿฐ ๋‹ค์Œ ์ด ์žฅ์€ ์–‘์ž ๊ฒŒ์ดํŠธ์˜ ์†Œ๊ทœ๋ชจ ์‚ฌ์šฉ์„ ๋ณด๋Š” ๊ฒƒ์œผ๋กœ ๋งˆ๋ฌด๋ฆฌ๋ฉ๋‹ˆ๋‹ค. ์˜ˆ๋ฅผ ๋“ค์–ด, ๋‹จ์ผ ํ๋น„ํŠธ ๋ฐ 2๊ฐœ์˜ ํ๋น„ํŠธ ์—ฐ์‚ฐ์œผ๋กœ ๋ถ€ํ„ฐ ํ† ํด๋ฆฌ ๊ฐ™์€ 3๊ฐœ์˜ ํ๋น„ํŠธ ๊ฒŒ์ดํŠธ๋ฅผ ๊ตฌ์ถ•ํ•˜๋Š” ๋ฐฉ๋ฒ•์„ ๋ด…๋‹ˆ๋‹ค.\n", - "\n", - "![A Toffoli made from single- and two-qubit gates](https://github.com/Qiskit/platypus/blob/main/translations/ko/ch-gates/images/basic3.png?raw=true)\n", - "\n", - "์ด๊ฒƒ์€ 3๊ฐœ์˜ ํ๋น„ํŠธ(q0, q1, q2)๋ฅผ ๊ฐ€์ง„ ํ† ํด๋ฆฌ์ž…๋‹ˆ๋‹ค. ์ด ํšŒ๋กœ ์˜ˆ์ œ์—์„œ, q0๋Š” q2์™€ ์—ฐ๊ฒฐ๋˜์ง€๋งŒ, q1๊ณผ๋Š” ์—ฐ๊ฒฐ๋˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค." - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "Python 3", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.9" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/translations/pt/toc.yaml b/translations/pt/toc.yaml index 63a84f2da..faf4e471f 100644 --- a/translations/pt/toc.yaml +++ b/translations/pt/toc.yaml @@ -1,57 +1,5 @@ -#---- Below was added by machine --- - -- sections: - - id: environment-setup-guide-to-work-with-qiskit-textbook - url: v2/ch-prerequisites/setting-the-environment - uuid: a5a86ddc-b519-11ec-b909-0242ac120002 - - id: introduction-to-python-and-jupyter-notebooks - url: v2/ch-prerequisites/python-and-jupyter-notebooks - uuid: a9f5ea68-b519-11ec-b909-0242ac120002 - title: "Pr\xE9-requisitos" - url: /v2_ch-prerequisites -- sections: - - id: phase-kickback - url: v2/algorithms/phase-kickback - uuid: 976e9da6-6c33-4e2f-b7eb-f9588f700f07 - title: "Algoritmos Qu\xE2nticos" - type: learning-path - url: /v2_algorithms -- sections: - - id: why-quantum-computing - url: v2/intro/why-quantum-computing - uuid: bdb1d662-e0f6-428a-8830-befe6b47f320 - - id: the-atoms-of-computation - url: v2/intro/atoms-of-computation - uuid: 37ef477e-ab8d-11ec-b909-0242ac120002 - - id: what-is-quantum - url: v2/intro/what-is-quantum - uuid: 7c765036-aebc-11ec-b909-0242ac120002 - - id: describing-quantum-computers - url: v2/intro/describing-quantum-computers - uuid: 9260a554-aebc-11ec-b909-0242ac120002 - - id: entangled-states - url: v2/intro/entangled-states - uuid: 98aa9032-aebc-11ec-b909-0242ac120002 - - id: visualizing-entanglement - url: v2/intro/visualizing-entanglement - uuid: 9e8ceb9e-aebc-11ec-b909-0242ac120002 - - id: project - url: v2/intro/project - uuid: e25c3f90-aebd-11ec-b909-0242ac120002 - title: "Introdu\xE7\xE3o \xE0 computa\xE7\xE3o qu\xE2ntica" - type: learning-path - url: /v2_introduction -- sections: - - id: data-encoding - url: v2/quantum-machine-learning/encoding - uuid: 1d09af66-b51b-11ec-b909-0242ac120002 - title: "Aprendizado de m\xE1quina qu\xE2ntico" - type: learning-path - url: /v2_machine-learning - - #---- Below was added by machine --- - sections: