From fc321d86c3915e80d8bc0cf0dea197a91bf9a86e Mon Sep 17 00:00:00 2001 From: maolinml <86260930+maolinml@users.noreply.github.com> Date: Fri, 28 Jun 2024 11:17:51 -0700 Subject: [PATCH] Remove oqc (#148) --- notebooks/textbook/Bells_Inequality.ipynb | 23 ++++++++----------- notebooks/textbook/CHSH_Inequality.ipynb | 6 ++--- .../textbook/Quantum_Fourier_Transform.ipynb | 9 ++++---- .../default_data/default_results.json | 3 --- 4 files changed, 18 insertions(+), 23 deletions(-) diff --git a/notebooks/textbook/Bells_Inequality.ipynb b/notebooks/textbook/Bells_Inequality.ipynb index 479ee64f..8ffc9104 100644 --- a/notebooks/textbook/Bells_Inequality.ipynb +++ b/notebooks/textbook/Bells_Inequality.ipynb @@ -155,11 +155,9 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "# Run on a QPU\n", + "# Run on a QPU \n", "\n", - "To run Bell's inequality on a QPU, we replace the LocalSimulator with an AwsDevice. \n", - "The cost to run this experiment is \\\\$0.3 per task and \\\\$0.00035 per shot on the Oxford Quantum Circuits Lucy device. \n", - "Since we have three circuits of 1000 shots each, that totals \\$1.95 USD." + "To run Bell's inequality on a QPU, we replace the LocalSimulator with an AwsDevice. The cost to run this experiment is \\\\$0.3 per task and \\\\$0.00145 per shot on the IQM Garnet device. Since we have three circuits of 1000 shots each, that totals \\$5.25 USD." ] }, { @@ -168,12 +166,11 @@ "metadata": {}, "outputs": [], "source": [ - "# # Uncomment to run on a QPU\n", - "# from braket.aws import AwsDevice\n", - "\n", - "# oqc_lucy = AwsDevice(\"arn:aws:braket:eu-west-2::device/qpu/oqc/Lucy\")\n", - "# oqc_tasks = run_bell_inequality([circAB, circAC, circBC], oqc_lucy, shots=1000)\n", - "# results, pAB, pAC, pBC = get_bell_inequality_results(oqc_tasks)" + "# # Uncomment to run on a QPU \n", + "# from braket.aws import AwsDevice \n", + "# iqm_garnet = AwsDevice(\"arn:aws:braket:eu-north-1::device/qpu/iqm/Garnet\") \n", + "# iqm_tasks = run_bell_inequality([circAB, circAC, circBC], iqm_garnet, shots=1000) \n", + "# results, pAB, pAC, pBC = get_bell_inequality_results(iqm_tasks)\n" ] }, { @@ -193,9 +190,9 @@ "output_type": "stream", "text": [ "Task Summary\n", - "{'arn:aws:braket:eu-west-2::device/qpu/oqc/Lucy': {'shots': 3000, 'tasks': {'COMPLETED': 3}}} \n", + "{'arn:aws:braket:eu-north-1::device/qpu/iqm/Garnet': {'shots': 3000, 'tasks': {'COMPLETED': 3}}}\n", "\n", - "Estimated cost to run this example: 1.95 USD\n" + "Estimated cost to run this example: 5.25 USD\n" ] } ], @@ -229,7 +226,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.9.5" + "version": "3.11.4" }, "vscode": { "interpreter": { diff --git a/notebooks/textbook/CHSH_Inequality.ipynb b/notebooks/textbook/CHSH_Inequality.ipynb index 4d4f9815..cdd94571 100644 --- a/notebooks/textbook/CHSH_Inequality.ipynb +++ b/notebooks/textbook/CHSH_Inequality.ipynb @@ -382,7 +382,7 @@ "To run CHSH inequality on a QPU, we replace the LocalSimulator with an AwsDevice. \n", "To reduce the cost, we run the the experiment only the defualt angles which gives the maximum CHSH inequality value.\n", "\n", - "The cost to run this experiment is \\\\$0.3 per task and \\\\$0.00035 per shot on the Oxford Quantum Circuits Lucy device. Since we have four circuits of 1000 shots each, the total cost is \\$2.60 USD." + "The cost to run this experiment is \\\\$0.3 per task and \\\\$0.00145 per shot on the IQM Garnet device. Since we have four circuits of 1000 shots each, the total cost is \\$7 USD." ] }, { @@ -393,7 +393,7 @@ "source": [ "# # Uncomment the following to run on QPU\n", "# from braket.aws import AwsDevice\n", - "# device = AwsDevice(\"arn:aws:braket:eu-west-2::device/qpu/oqc/Lucy\")\n", + "# device = AwsDevice(\"arn:aws:braket:eu-north-1::device/qpu/iqm/Garnet\")\n", "# circuits = create_chsh_inequality_circuits()\n", "# tasks = run_chsh_inequality(circuits, device, shots=1_000)\n", "# chsh_value, results, E_a1b1, E_a1b2, E_a2b1, E_a2b2 = get_chsh_results(tasks)" @@ -449,7 +449,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.9.5" + "version": "3.11.4" }, "vscode": { "interpreter": { diff --git a/notebooks/textbook/Quantum_Fourier_Transform.ipynb b/notebooks/textbook/Quantum_Fourier_Transform.ipynb index 337b3727..7b013908 100644 --- a/notebooks/textbook/Quantum_Fourier_Transform.ipynb +++ b/notebooks/textbook/Quantum_Fourier_Transform.ipynb @@ -366,7 +366,7 @@ "\n", "tracker = Tracker().start()\n", "\n", - "# device = AwsDevice(\"arn:aws:braket:eu-west-2::device/qpu/oqc/Lucy\") # OQC Lucy" + "# device = AwsDevice(\"arn:aws:braket:eu-north-1::device/qpu/iqm/Garnet\") # IQM Garnet" ] }, { @@ -514,9 +514,9 @@ "output_type": "stream", "text": [ "Task Summary\n", - "{'arn:aws:braket:eu-west-2::device/qpu/oqc/Lucy': {'shots': 3000, 'tasks': {'COMPLETED': 3}}} \n", + "{'arn:aws:braket:eu-north-1::device/qpu/iqm/Garnet': {'shots': 3000, 'tasks': {'COMPLETED': 3}}}\n", "\n", - "Estimated cost to run this example: 1.95 USD\n" + "Estimated cost to run this example: 5.25 USD\n" ] } ], @@ -528,6 +528,7 @@ }, { "cell_type": "markdown", + "id": "ef318356", "metadata": {}, "source": [ "Note: Charges shown are estimates based on your Amazon Braket simulator and quantum processing unit (QPU) task usage. Estimated charges shown may differ from your actual charges. Estimated charges do not factor in any discounts or credits, and you may experience additional charges based on your use of other services such as Amazon Elastic Compute Cloud (Amazon EC2)." @@ -550,7 +551,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.9.7" + "version": "3.11.4" } }, "nbformat": 4, diff --git a/test/integ_tests/default_data/default_results.json b/test/integ_tests/default_data/default_results.json index 235477f4..4468543d 100644 --- a/test/integ_tests/default_data/default_results.json +++ b/test/integ_tests/default_data/default_results.json @@ -1057,9 +1057,6 @@ "rigettiMetadata": { "compiledProgram": "DECLARE ro BIT[2];" }, - "oqcMetadata": { - "compiledProgram": "DECLARE ro BIT[2];" - }, "simulatorMetadata": { "braketSchemaHeader": { "name": "braket.task_result.simulator_metadata",