Skip to content

Commit

Permalink
rm some duplicate text in PL VQE
Browse files Browse the repository at this point in the history
  • Loading branch information
mbeach-aws committed Oct 16, 2023
1 parent 88d44b2 commit 8124909
Showing 1 changed file with 9 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -520,17 +520,15 @@
"\n",
"For long-running VQE algorithms, you can run the entire algorithm on Amazon Braket by using [Hybrid Jobs](https://docs.aws.amazon.com/braket/latest/developerguide/braket-jobs.html). As a fully managed solution, hybrid jobs give you access to monitor near-real time metrics like the energy during the training phase. \n",
"\n",
"Amazon Braket Hybrid Jobs provides fully managed orchestration of hybrid quantum-classical algorithms, combining Amazon EC2 compute resources with Amazon Braket QPU access. Quantum tasks created in a hybrid job have priority queueing over individual quantum tasks so that your algorithms will not be interrupted by fluctuations in the quantum task queue. Each QPU maintains a separate hybrid jobs queue, ensuring that only one hybrid job can run at any given time.\n",
"You can run your local Python code as an Amazon Braket hybrid job. You can do this by annotating your code with an `@hybrid_job` decorator, as shown in the following code example. Only Python 3.10 is supported by default with hybrid job decorators. For custom environments, you can opt to use hybrid job scripts, or specify a custom container from Amazon Elastic Container Registry (ECR) (see [BYOC](https://docs.aws.amazon.com/braket/latest/developerguide/braket-jobs-byoc.html)). \n",
"\n",
"\n",
"You can run your local Python code as an Amazon Braket hybrid job. You can do this by annotating your code with an @hybrid_job decorator, as shown in the following code example. Only Python 3.10 is supported by default with hybrid job decorators. For custom environments, you can opt to use hybrid job scripts, or specify a custom container from Amazon Elastic Container Registry (ECR) (see [BYOC](https://docs.aws.amazon.com/braket/latest/developerguide/braket-jobs-byoc.html)). \n",
"\n",
"The device argument in the @hybrid_job decorator specifies the device that the hybrid job will have priority access to. \n",
"The device argument in the `@hybrid_job` decorator specifies the device that the hybrid job will have priority access to. \n",
"In this case, we run with a simulator, so we don't need to target a QPU. \n",
"If you want to run a large number of circuits, consider using built-in MPI support to run local simulators on multiple instances within a single hybrid job. \n",
"See [embedded simulators](https://docs.aws.amazon.com/braket/latest/developerguide/pennylane-embedded-simulators.html) for further information. \n",
"\n",
"In this example set set `device=None` since we are using the lighning.qubit simulator. We also change the classical instance to a large instance called \"ml.c5.xlarge\"."
"In this example, we set `device=\"local:pennylane/lightning\"` since we are using the lightning.qubit simulator. \n",
"We also change the classical instance to a large instance called \"ml.c5.xlarge\"."
]
},
{
Expand All @@ -545,7 +543,11 @@
"large_instance = InstanceConfig(instanceType=\"ml.c5.xlarge\")\n",
"\n",
"\n",
"@hybrid_job(device=None, dependencies=\"requirements.txt\", instance_config=large_instance)\n",
"@hybrid_job(\n",
" device=\"local:pennylane/lightning\",\n",
" dependencies=\"requirements.txt\",\n",
" instance_config=large_instance,\n",
")\n",
"def run_large_vqe(iterations):\n",
" task_tracker = Tracker().start() # track Braket quantum tasks costs\n",
"\n",
Expand Down

0 comments on commit 8124909

Please sign in to comment.