Upgrade to Pro — share decks privately, control downloads, hide ads and more …

AWS re:Invent 2021 recap - Amazon Braket Hybrid Jobs

AWS re:Invent 2021 recap - Amazon Braket Hybrid Jobs

Amazon Braket Hybrid Jobs はフルマネージドな量子・古典ハイブリッドアルゴリズムの実行環境です。このスライドでは Braket Hybrid Jobs の概要を説明します。デモを含んだ動画は [YouTube](https://youtu.be/ujYd2EFCBsk) に公開されています。

Yoshitaka Haribara

January 20, 2022
Tweet

More Decks by Yoshitaka Haribara

Other Decks in Technology

Transcript

  1. Japan, January 2022

  2. © 2022, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Quantum : Amazon Braket Hybrid Jobs Startup ML/Quantum Solutions Architect AWS Japan G.K.
  3. • AWS Amazon Braket Amazon Braket Hybrid Jobs • •

    • Amazon Braket • Amazon Braket Quantum : Amazon Braket
  4. Quantum AWS re:Invent 2021 • Amazon Braket Hybrid Jobs •

    Amazon Braket QPU • Oxford Quantum Circuits • QuEra Computing • AWS Center for Quantum Computing [AWS Quantum Computing Blog] Updates from re:Invent 2021 https://aws.amazon.com/blogs/quantum-computing/postreinvent2021/
  5. Amazon Braket 量子アニーリング 超伝導 イオントラップ 超伝導 Coming soon! Rydberg 原子

    Coming soon!
  6. https://docs.aws.amazon.com/braket/latest/developerguide/braket-devices.html (2021 1 ) Amazon Braket Type Provider Paradigm Device

    Name QPU D-Wave quantum annealer DW_2000Q_6 Advantage_system4 IonQ gate-based ionQdevice Rigetti gate-based Aspen-11 Managed Simulator AWS gate-based SV1 DM1 TN1 Local Simulator AWS gate-based braket_sv braket_dm
  7. from braket.aws import AwsDevice from braket.circuits import Circuit # bell

    = Circuit().h(0).cnot(0, 1) # ( SV1 ) device = AwsDevice("arn:aws:braket:::device/quantum-simulator/amazon/sv1") # (100 ) result = device.run(bell, s3_folder, shots=100).result() Quantum Device (QPU / Simulators) Braket Python SDK (Braket Notebook / Local IDE) or Management Console User Create Quantum Task API Quantum Task T : |0|1| q0 : -H-C- q1 : ---X- Result Circuit Queue
  8. CPU QPU D D D D • • CPU QPU

    • : • (Variational Quantum Eigensolver; VQE) • (Quantum Approximate Optimization Algorithm; QAOA)
  9. Amazon Braket Hybrid Jobs • Job ( ) Amazon Braket

    Tasks • QPU • Job (Simulator QPU ) Job • : Python (Amazon Braket SDK PennyLane) (QPU ) BYOC Job Instance (Container) Quantum Device (QPU / Simulators) Braket Python SDK (Braket Notebook / Local IDE) or Management Console User Create Job API Quantum Task Algorithm Script
  10. import os from braket.aws import AwsDevice from braket.circuits import Circuit

    def start_here(): print("Test job started!!!!!") # device = AwsDevice(os.environ["AMZN_BRAKET_DEVICE_ARN"]) bell = Circuit().h(0).cnot(0, 1) for count in range(5): task = device.run(bell, shots=100) print(task.result().measurement_counts) print("Test job completed!!!!!") algorithm_script.py
  11. from braket.aws import AwsDevice, AwsQuantumJob from braket.circuits import Circuit #

    ( SV1 ) device = AwsDevice("arn:aws:braket:::device/quantum-simulator/amazon/sv1") # job = AwsQuantumJob.create( device, source_module="algorithm_script.py", # Python entry_point="algorithm_script:start_here", wait_until_complete=True )
  12. Braket

  13. S3 モニタリング ダッシュボード ジョブ作成・ 開始・終了時間 S3 に保存した source code, checkpoint

    files, 計算結果の path
  14. • カスタマイズ可能なメトリクス • アルゴリズムの進捗状況を可視化 • Amazon Braket コンソールと CloudWatch でリアルタイムに確認

    • アルゴリズムが収束しない (または早期に収束した) 場合に、 介入または調整を行うことも可能
  15. Amazon Braket Hybrid Jobs Job Instance (Container) Quantum Device (QPU

    / Simulators) Braket Python SDK (Braket Notebook / Local IDE) or Management Console User Create Job Quantum Task Algorithm Script Amazon Braket Create Job API Amazon ECR Amazon S3 Amazon CloudWatch
  16. © 2022, Amazon Web Services, Inc. or its affiliates. All

    rights reserved.
  17. Hybrid Jobs • • CPU/GPU ( ) • SSD •

    $0.14 per GB-month • (QPU/Simulator) https://aws.amazon.com/braket/pricing/ vCPU Memory Price per Minute Standard Instances ml.m5.large-Training 2 8 GiB $0.00192 ml.m5.xlarge-Training (default) 4 16 GiB $0.00383 ml.m5.2xlarge-Training 8 32 GiB $0.00768 ml.m5.4xlarge-Training 16 64 GiB $0.01537 ml.m5.12xlarge-Training 48 192 GiB $0.04608 ml.m5.24xlarge-Training 96 384 GiB $0.09217 Compute Optimized ml.c5.xlarge-Training 4 8 GiB $0.0034 ml.c5.2xlarge-Training 8 16 GiB $0.0068 ml.c5.4xlarge-Training 16 32 GiB $0.0136 ml.c5.9xlarge-Training 36 72 GiB $0.0306 ml.c5.18xlarge-Training 72 144 GiB $0.0612 ml.c5n.xlarge-Training 4 10.5 GiB $0.00432 ml.c5n.2xlarge-Training 8 21 GiB $0.00863 ml.c5n.4xlarge-Training 16 42 GiB $0.01728 ml.c5n.9xlarge-Training 36 96 GiB $0.03888 ml.c5n.18xlarge-Training 72 192 GiB $0.07777 Accelerated Computing (GPU) ml.g4dn.xlarge-Training 4 16 GiB $0.01227 ml.g4dn.2xlarge-Training 8 32 GiB $0.01567 ml.g4dn.4xlarge-Training 16 64 GiB $0.02508 ml.g4dn.8xlarge-Training 32 128 GiB $0.04533 ml.g4dn.12xlarge-Training 48 192 GiB $0.0815 ml.g4dn.16xlarge-Training 64 256 GiB $0.09067 ml.p3.2xlarge-Training 8 61 GiB $0.06375 ml.p3.8xlarge-Training 32 244 GiB $0.2448 ml.p3.16xlarge-Training 64 488 GiB $0.4692 ml.p3dn.24xlarge-Training 96 768 GiB $0.59823 ml.p4d.24xlarge-Training 96 1152 GiB $0.62813
  18. • (QPU) • • SV1, DM1: $ 0.075 / min

    • TN1: $ 0.275 / min • Braket SDK Amazon SageMaker Notebook QPU QPU https://aws.amazon.com/braket/pricing/ Hardware Provider QPU family Per-task price Per-shot price D-Wave 2000Q, Advantage $0.30000 $0.00019 IonQ IonQ device $0.30000 $0.01000 Rigetti Aspen-11 $0.30000 $0.00035
  19. job = AwsQuantumJob.create( device, source_module="algorithm_script.py", entry_point="algorithm_script:start_here", wait_until_complete=True, tags={ "User": "Haribara",

    "Project": "Recap", "Algorithm": "QAOA" } )
  20. Thank you! © 2022, Amazon Web Services, Inc. or its

    affiliates. All rights reserved. Yoshitaka Haribara [email protected] Twitter: @_hariby
  21. © 2022, Amazon Web Services, Inc. or its affiliates. All

    rights reserved.
  22. Amazon Braket Hybrid Jobs • What’s New • https://aws.amazon.com/about-aws/whats-new/2021/11/amazon-braket-hybrid-jobs- quantum-classical-workloads/

    • AWS Blog • ( ) https://aws.amazon.com/blogs/aws/introducing-amazon-braket-hybrid-jobs-set-up- monitor-and-efficiently-run-hybrid-quantum-classical-workloads/ • ( ) https://aws.amazon.com/jp/blogs/news/introducing-amazon-braket-hybrid-jobs- set-up-monitor-and-efficiently-run-hybrid-quantum-classical-workloads/ • Documentation • https://docs.aws.amazon.com/braket/latest/developerguide/braket-jobs.html • Amazon Braket Examples ( ) • https://github.com/aws/amazon-braket-examples/tree/main/examples/hybrid_jobs