Skip to content

Instantly share code, notes, and snippets.

View SageMakerWorkshop.md
View AmazonBraketQuantumChemistry.md

Amazon Braket を使った量子化学計算

2021-10-21 10:00-12:00

Time Table (予定)

ハンズオン環境 (AWS Management Console) へのログイン

10:00-10:15 (15 min)

  • User 名 (WorkshopUser-n) の最後に付いている数字 n を3で割った余りでリージョンを割り振っています:
    • n%3 == 0: N. Virgnia (us-east-1)
    • n%3 == 1: N. California (us-west-1)
    • n%3 == 2: Oregon (us-west-2)
View specify_device_in_other_region.py
from boto3.session import Session
from braket.aws.aws_session import AwsSession
from braket.aws import AwsDevice
region_name = 'us-west-2'
sess = Session(region_name=region_name)
aws_sess = AwsSession(boto_session=sess)
device = AwsDevice("arn:aws:braket:::device/quantum-simulator/amazon/sv1", aws_session=aws_sess)
View AmazonBraketQML2.md
View AmazonBraketQML.md

Amazon Braket を使った量子機械学習入門 1

2021-06-18

Time Table

前半 (講義)

  • AWS と Amazon Braket について (30 min)

後半 (ハンズオン)

  • ログイン・セットアップ (10 min)
@hariby
hariby / retrieve_task_arn.py
Last active Jul 6, 2021
Tested with: `!pip install amazon-braket-sdk==1.6.4 botocore==1.20.96 awscli==1.19.96`
View retrieve_task_arn.py
import boto3
region_name='us-east-1'
device_arn='arn:aws:braket:::device/qpu/ionq/ionQdevice'
braket = boto3.client('braket', region_name=region_name)
response = braket.search_quantum_tasks(filters=[{
'name': 'deviceArn',
'operator': 'EQUAL',
'values': [device_arn]
View SageMakerOneStepForwardWorkshop.md

AWS でもう一歩進める機械学習 Amazon SageMaker ハンズオンセミナー

概要

日時: 2021年 6月 15日 (火) 12:00 - 15:00

Twitter ハッシュタグ: #startupfm

AWS メンバー紹介

Starup Solutions Architect

  • @_hariby: 日本のスタートアップに対する AWS 導入支援、特に機械学習・量子コンピュータ担当をやっています。
View pytorch_local.py
import os
import sagemaker
sagemaker_session = sagemaker.session.Session()
bucket = sagemaker_session.default_bucket()
prefix = 'sagemaker/DEMO-pytorch-mnist'
# set appropriate IAM Role
role = 'AmazonSageMaker-ExecutionRole-20210101T000000'
View braket-workshop-cdk.template.json
{
"Resources": {
"BraketWorkshopGroupD31A4393": {
"Type": "AWS::IAM::Group",
"Properties": {
"GroupName": "BraketWorkshopGroup",
"ManagedPolicyArns": [
{
"Fn::Join": [
"",
View braket-iam-policy.json
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "IamPassRole",
"Effect": "Allow",
"Action": "iam:PassRole",
"Resource": "arn:aws:iam::*:role/AmazonBraketServiceSageMakerNotebookRole-*"
},
{