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

doc: update hybrid job tutorial to use base container instead of byoc #127

Merged
merged 6 commits into from
Nov 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
259 changes: 259 additions & 0 deletions docs/tutorials/2_tutorial_hybrid_jobs.ipynb

Large diffs are not rendered by default.

264 changes: 0 additions & 264 deletions docs/tutorials/2_tutorial_hybrid_jobs_byoc.ipynb

This file was deleted.

8 changes: 3 additions & 5 deletions docs/tutorials/data/2_hybrid_jobs/job_script.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@


def main():
# Sets up the "SV1" backend the quantum device, a default simulator provided by Amazon Braket.
backend = AWSBraketProvider().get_backend("SV1")

h2_op = SparsePauliOp(
Expand All @@ -23,18 +24,15 @@ def main():
],
)

estimator = BackendEstimator(
backend=backend,
options={"seed_simulator": 42, "seed_transpiler": 42, "shots": 10},
skip_transpilation=False,
)
estimator = BackendEstimator(backend=backend, options={"shots": 10})
ansatz = TwoLocal(rotation_blocks="ry", entanglement_blocks="cz")
slsqp = SLSQP(maxiter=1)

vqe = VQE(estimator=estimator, ansatz=ansatz, optimizer=slsqp)

vqe_result = vqe.compute_minimum_eigenvalue(h2_op)

# Save the results of the VQE computation to the EC2 instance.
save_job_result(
{
"VQE": {
Expand Down
Loading