量子信息与量子计算_量子计算为23美分。
量子信息與量子計(jì)算
On Aug 13, 2020, AWS announced the General Availability of Amazon Braket. Braket is their fully managed quantum computing service. It is available on an on-demand basis, much like SageMaker. That means the everyday developer and data scientist can tinker around and kick the tires.
2020年8月13日, AWS宣布了Amazon Braket的全面可用性。 Braket是其完全托管的量子計(jì)算服務(wù)。 它像SageMaker一樣按需提供。 這意味著每天的開(kāi)發(fā)人員和數(shù)據(jù)科學(xué)家都可以修補(bǔ)和踢輪胎。
I wanted to take a look at the Braket Console and see how intuitive the experience was. Ease of use and friendly UI is crucial to me. I am a novice in the area of quantum computing, so I have much to learn. The introductory notebooks available make learning the basics easy. The very basics, I should say. The science behind the magic gets quite complicated, but it is interesting.
我想看一下Braket Console,看看這種體驗(yàn)有多直觀。 易于使用和友好的用戶界面對(duì)我至關(guān)重要。 我是量子計(jì)算領(lǐng)域的新手,因此我要學(xué)習(xí)很多東西。 可用的入門筆記本使學(xué)習(xí)基礎(chǔ)變得容易。 我應(yīng)該說(shuō)非常基本的東西。 魔術(shù)背后的科學(xué)變得相當(dāng)復(fù)雜,但這很有趣。
成本 (Cost)
My first order of business was to check out the cost. When I played around with some SageMaker projects, my AWS budget alarm kicked off early. I don’t want any $100 surprises, and I’m sure you don’t either. From what I gather, the cost is broken down differently in four areas. The notebooks are based on SageMaker pricing and billed as such. The larger your instance, the more it costs. The AWS Simulator runs at $4.50 an hour. The Quantum devices run at their own per ‘shot’ basis. And finally, you do send the output to S3, so there is a nominal storage fee. I was cautious to check my billing during this process. I knew I was running a tiny sample so that the costs would be low — less than $1.00. In the end, it cost me 23 cents.
我的第一筆生意是檢查費(fèi)用。 當(dāng)我處理一些SageMaker項(xiàng)目時(shí),我的AWS預(yù)算警報(bào)很早就開(kāi)始了。 我不希望有$ 100的驚喜,而且我相信您也不會(huì)。 根據(jù)我的收集,成本在四個(gè)方面進(jìn)行了不同的細(xì)分。 這些筆記本基于SageMaker的定價(jià),并以此計(jì)費(fèi)。 您的實(shí)例越大,成本就越高。 AWS模擬器每小時(shí)收費(fèi)4.50美元。 Quantum器件以“發(fā)射”為基礎(chǔ)獨(dú)立運(yùn)行。 最后,您確實(shí)將輸出發(fā)送到S3,因此需要支付少量的存儲(chǔ)費(fèi)。 在此過(guò)程中,我非常謹(jǐn)慎地檢查帳單。 我知道我正在運(yùn)行一個(gè)很小的樣本,因此成本較低-不到1.00美元。 最后,它花了我23美分。
23 cents to run on this geek eye candy? Not bad.
這款極客型眼糖果的價(jià)格為23美分? 不錯(cuò)。
準(zhǔn)備 (Prep)
All of the information below assumes you have an AWS account set up, including billing. If you are setting up your account for the first time, there are some free tier options, though not for quantum devices.
以下所有信息均假設(shè)您已設(shè)置AWS賬戶(包括賬單)。 如果您是第一次設(shè)置帳戶,則有一些免費(fèi)套餐選項(xiàng) ,但不適用于量子設(shè)備。
Once you have an account, you’ll need to name an S3 bucket for your output. Other than that, you’re ready to go.
擁有帳戶后,您需要為輸出命名一個(gè)S3存儲(chǔ)桶。 除此之外,您已經(jīng)準(zhǔn)備好了。
運(yùn)行示例 (Running the example)
Sometimes jumping into the code is the best way to learn how the hardware works. Hands-on tutorials can be hard to find at this early stage. I started with the AWS blog itself. It has a step-by-step guide with screenprints.
有時(shí),跳入代碼是學(xué)習(xí)硬件工作方式的最佳方法。 在此早期階段很難找到動(dòng)手教程。 我從AWS博客本身開(kāi)始。 它具有有關(guān)屏幕截圖的分步指南。
https://awsfeed.com/whats-new/aws/amazon-braket-go-hands-on-with-quantum-computing
https://awsfeed.com/whats-new/aws/amazon-braket-go-hands-on-with-quantum-computing
It’s pretty straight forward in regards to running the sample notebooks.
就運(yùn)行示例筆記本而言,這非常簡(jiǎn)單。
I only had one small hiccup; I overlooked updating the S3 bucket variable. If you don’t update this value with the S3 bucket of your choosing, you will get this error:
我只有一個(gè)小小的打ic。 我忽略了更新S3存儲(chǔ)桶變量。 如果不使用您選擇的S3存儲(chǔ)桶更新此值,則會(huì)出現(xiàn)以下錯(cuò)誤:
“ValidationException: An error occurred (ValidationException) when calling the CreateQuantumTask operation: Caller doesn’t have access to amazon-braket-<##########> or it doesn’t exist.”If you want to run a quick test to be sure you have all of your configurations correct, below is a simple single-cell script. Based on the SuperDense example, it covers using a local simulator (that comes with the SDK), the AWS simulator, and the one quantum device (ionQ) that was available in my region at the time of my test.
如果要運(yùn)行快速測(cè)試以確保所有配置正確,下面是一個(gè)簡(jiǎn)單的單單元腳本。 基于SuperDense示例,它涵蓋了使用本地模擬器(SDK附帶),AWS模擬器以及測(cè)試時(shí)在我所在地區(qū)可用的一個(gè)量子設(shè)備( ionQ )。
# !pip show amazon-braket-sdk | grep Version# Import Braket librariesfrom braket.circuits import Circuit, Gate, Momentsfrom braket.circuits.instruction import Instructionfrom braket.aws import AwsDeviceimport matplotlib.pyplot as pltimport boto3import timefrom braket.devices import LocalSimulator# Please enter the S3 bucket you created during onboarding in the code below,# or create a new bucket named as ‘a(chǎn)mazon-braket-<your account number>’ to run the below code without changes.aws_account_id = boto3.client(“sts”).get_caller_identity()[“Account”]my_bucket = f”amazon-braket-{aws_account_id}” # the name of the bucketmy_prefix = “simulation-output” # the name of the folder in the buckets3_folder = (my_bucket, my_prefix)# Run local simulatordevice = LocalSimulator()bell = Circuit().h(0).cnot(0, 1)print(bell)print(‘local simulator results: ‘ + str(device.run(bell, shots=100).result().measurement_counts))# Run AWS simulatordevice = AwsDevice(“arn:aws:braket:::device/quantum-simulator/amazon/sv1”)bell = Circuit().h(0).cnot(0, 1)print(‘a(chǎn)ws simulator results: ‘)get_result(device, bell, s3_folder)My output:
我的輸出:
image by author圖片作者支架示例筆記本 (Braket Example Notebooks)
Advanced Circuits Algorithms
先進(jìn)電路算法
- Grover’s quantum algorithm 格羅弗的量子算法
- Quantum Amplitude Amplification (QAA) 量子振幅放大(QAA)
- Quantum Fourier Transform (QFT) 量子傅立葉變換(QFT)
- Quantum Phase Estimation (QPE) 量子相位估計(jì)(QPE)
Hybrid Quantum Algorithms
混合量子算法
- Quantum Approximate Optimization Algorithm (QAOA) 量子近似優(yōu)化算法(QAOA)
- Transverse Ising Model with Variational Quantum Eigenvalue Solver (VQE) 具有變分量子特征值求解器(VQE)的橫向Ising模型
Quantum Annealing
量子退火
- Anatomy of Quantum Annealing with D-Wave D波的量子退火解剖
- D-Wave Graph Partitioning — Quadratic Unconstrained Binary Optimization (QUBO) D波圖分區(qū)—二次無(wú)約束二進(jìn)制優(yōu)化(QUBO)
- D-Wave Maximum Cut Problem (MaxCut) D波最大切割問(wèn)題(MaxCut)
- D-Wave Minimum Vertex Cover Problem D波最小頂點(diǎn)覆蓋問(wèn)題
Simple Circuits Algorithms +++ start here
簡(jiǎn)單電路算法+++從這里開(kāi)始
- Anatomy of quantum circuits 量子電路的解剖
- Backend Devices — GHZ state Preparation 后端設(shè)備-GHZ狀態(tài)準(zhǔn)備
- Backend Devices — Bell state Preparation 后端設(shè)備-響鈴狀態(tài)準(zhǔn)備
- Superdense Coding 超密編碼
總體 (Overall)
I was pleased to see such detailed and educational notebooks right within the notebook instance. These are not entry-level concepts, but break down the workflow nicely. It is a good intro to the platform. Above, I have listed the different folders of examples provided. I’d recommend starting with the Simple Circuit Algorithms. The instructions walk you through the building of the circuit. The circuit visualization options aren’t as nice as some other platforms, but I imagine this will improve over time. AWS is known for getting the meat of the product to market then adding in the friendlier features in subsequent releases. The price is right, so give it a try.
我很高興在筆記本實(shí)例中看到如此詳細(xì)且具有教育意義的筆記本。 這些不是入門級(jí)的概念,但可以很好地分解工作流程。 這是該平臺(tái)的一個(gè)很好的介紹。 上面,我列出了提供的示例的不同文件夾。 我建議從簡(jiǎn)單電路算法開(kāi)始。 這些說(shuō)明將引導(dǎo)您完成電路的構(gòu)建。 電路可視化選項(xiàng)不如其他平臺(tái)好,但我認(rèn)為隨著時(shí)間的推移,這種情況會(huì)有所改善。 AWS以將產(chǎn)品推向市場(chǎng)然后在后續(xù)版本中添加更友好的功能而聞名。 價(jià)格合適,請(qǐng)嘗試一下。
與往常一樣-記住停止并刪除您的筆記本實(shí)例。 (As always — remember to stop and delete your notebook instances.)
image by author圖片作者翻譯自: https://towardsdatascience.com/quantum-computing-for-23-cents-917e1f664cea
量子信息與量子計(jì)算
總結(jié)
以上是生活随笔為你收集整理的量子信息与量子计算_量子计算为23美分。的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: 女人梦到三个黑棺材什么预兆
- 下一篇: 梦到被枣刺扎怎么回事