Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Quantum Neuron #110

Closed
wants to merge 45 commits into from
Closed
Show file tree
Hide file tree
Changes from 9 commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
31998b2
first commit
Mar 27, 2023
581573a
second commit
Mar 31, 2023
3d8ce23
third commit
Mar 31, 2023
d252018
enable import quantum_neuron
May 6, 2023
f875d5b
delete run_test.ipynb
May 6, 2023
e09bf95
delete model.tar.gz
May 6, 2023
edc0a3e
delete notebooks/textbook/Quantum_Neuron/qn
May 6, 2023
cc8de51
Merge branch 'main' into yuttaky
math411 May 9, 2023
9f573d2
Merge branch 'main' into yuttaky
math411 May 10, 2023
2eab649
Merge branch 'main' into yuttaky
math411 May 26, 2023
939823f
Merge branch 'main' into yuttaky
math411 May 30, 2023
a9360ef
fix Quantum_Neuron.ipynb and quantum_neuron.py as reviewed
Jul 12, 2023
dcdb50e
Merge branch 'aws-samples:main' into yuttaky
YutoMorohoshi Jul 12, 2023
ab2b53b
install black[jupyter]
Jul 13, 2023
fcc21d3
fix style errors
Jul 14, 2023
55e6728
fix style errors
Jul 14, 2023
4a5d8a1
fix: style errors
Jul 14, 2023
927f515
fix: style errors
Jul 17, 2023
6ea06e8
fix setup.py
Jul 22, 2023
5e1de8f
add Quantum_Neuron_mocks.py
Jul 28, 2023
82f379a
add Quantum_Neuron_mocks.py
Jul 28, 2023
5255e3e
exclude Quantum_Neuron_mocks.py for integ test
Jul 28, 2023
9cf12c1
Merge branch 'main' into yuttaky
math411 Aug 11, 2023
a024e6a
edit test_all_notebooks.py
Aug 12, 2023
3179173
add mock for Quantum_Neuron
Aug 12, 2023
5702e27
add mock for Quantum_Neuron
Aug 12, 2023
c0c2364
add mock for Quantum_Neuron
Aug 12, 2023
b782a59
add mock for Quantum_Neuron
Aug 12, 2023
b87dfe1
add mock for Quantum_Neuron
Aug 12, 2023
d8a2ffd
add mock for Quantum_Neuron
Aug 12, 2023
9b59414
add mock for Quantum_Neuron
Aug 12, 2023
a7e5543
add mock for Quantum_Neuron
Aug 12, 2023
e0cfbc8
add mock for Quantum_Neuron
Aug 12, 2023
4a3ce2a
add mock for Quantum_Neuron
Aug 12, 2023
853bd96
add mock for Quantum_Neuron
Aug 12, 2023
8543c76
add mock for Quantum_Neuron
Aug 12, 2023
b179e6c
add mock for Quantum_Neuron
Aug 12, 2023
b75a080
update mock files for quantum neuron
math411 Aug 15, 2023
db6f157
update mock results.json
math411 Aug 16, 2023
eedee92
Merge pull request #1 from YutoTakaki/qn_mocks
YutoMorohoshi Aug 17, 2023
816eb0b
add mock for Quantum_Neuron
Aug 17, 2023
a23f72b
run QPU
Aug 22, 2023
6a4ca9f
run QPU
Aug 22, 2023
c66fde4
run QPU
Aug 22, 2023
fa166a0
Merge branch 'main' into yuttaky
YutoMorohoshi Sep 21, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions notebooks/textbook/Bells_Inequality.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -215,9 +215,9 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"display_name": "conda_braket",
"language": "python",
"name": "python3"
"name": "conda_braket"
},
"language_info": {
"codemirror_mode": {
Expand All @@ -229,7 +229,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.5"
"version": "3.7.12"
},
"vscode": {
"interpreter": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
"cells": [
{
"cell_type": "markdown",
"id": "8b423ad7",
"id": "455cd77b",
"metadata": {},
"source": [
"# QUANTUM APPROXIMATE OPTIMIZATION ALGORITHM (QAOA)"
]
},
{
"cell_type": "markdown",
"id": "12e108d5",
"id": "849472aa",
"metadata": {},
"source": [
"In this noteook, we show how to (approximately) solve binary combinatorial optimization problems, using the __Quantum Approximate Optimization Algorithm (QAOA)__.\n",
Expand All @@ -24,7 +24,7 @@
{
"cell_type": "code",
"execution_count": 1,
"id": "bd0a975d",
"id": "f59d6171",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -41,7 +41,7 @@
{
"cell_type": "code",
"execution_count": 2,
"id": "50e4d13a",
"id": "75c20f85",
"metadata": {},
"outputs": [
{
Expand All @@ -66,7 +66,7 @@
{
"cell_type": "code",
"execution_count": 3,
"id": "6e26acc1",
"id": "d6012510",
"metadata": {},
"outputs": [
{
Expand All @@ -93,7 +93,7 @@
{
"cell_type": "code",
"execution_count": 4,
"id": "223d34d0",
"id": "1a1a0687",
"metadata": {},
"outputs": [
{
Expand All @@ -112,7 +112,7 @@
},
{
"cell_type": "markdown",
"id": "8cc043c3",
"id": "8ea08a49",
"metadata": {},
"source": [
"## Run on a local simulator\n",
Expand All @@ -123,7 +123,7 @@
{
"cell_type": "code",
"execution_count": 5,
"id": "c700195c",
"id": "d0dfe14f",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -140,7 +140,7 @@
{
"cell_type": "code",
"execution_count": 6,
"id": "bc524eef",
"id": "bab1d2ca",
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -169,7 +169,7 @@
{
"cell_type": "code",
"execution_count": 7,
"id": "16df2abe",
"id": "5d313165",
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -207,7 +207,7 @@
{
"cell_type": "code",
"execution_count": 8,
"id": "96992efa",
"id": "2b6ef1c3",
"metadata": {},
"outputs": [
{
Expand All @@ -229,7 +229,7 @@
},
{
"cell_type": "markdown",
"id": "64478182",
"id": "8ca8961a",
"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)."
Expand All @@ -238,9 +238,9 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3.9.5 64-bit ('braket')",
"display_name": "conda_braket",
"language": "python",
"name": "python3"
"name": "conda_braket"
},
"language_info": {
"codemirror_mode": {
Expand All @@ -252,7 +252,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.5"
"version": "3.7.12"
},
"vscode": {
"interpreter": {
Expand Down
717 changes: 717 additions & 0 deletions notebooks/textbook/Quantum_Neuron/Quantum_Neuron.ipynb

Large diffs are not rendered by default.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 4 additions & 5 deletions notebooks/textbook/Template.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,9 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3.9.5 64-bit ('braket')",
"display_name": "conda_braket",
"language": "python",
"name": "python3"
"name": "conda_braket"
},
"language_info": {
"codemirror_mode": {
Expand All @@ -121,15 +121,14 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.5"
"version": "3.7.12"
},
"orig_nbformat": 4,
"vscode": {
"interpreter": {
"hash": "5904cb9a2089448a2e1aeb5d493d227c9de33e591d7c07e4016fb81e71061a5d"
}
}
},
"nbformat": 4,
"nbformat_minor": 2
"nbformat_minor": 4
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@
cost_function,
qaoa,
run_qaoa_circuit,
)
)
18 changes: 18 additions & 0 deletions src/braket/experimental/algorithms/quantum_neuron/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"). You
# may not use this file except in compliance with the License. A copy of
# the License is located at
#
# http://aws.amazon.com/apache2.0/
#
# or in the "license" file accompanying this file. This file is
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
# ANY KIND, either express or implied. See the License for the specific
# language governing permissions and limitations under the License.
from braket.experimental.algorithms.quantum_neuron.quantum_neuron import ( # noqa: F401
generate_random_numbers,
linear_combination,
quantum_neuron,
activation_function
)
Loading