Skip to content

Batch Jobs#65

Merged
rryoung98 merged 3 commits into
qBraid:stagingfrom
AkiDoesntCode:AkiDoesntCode-patch-1
Jul 3, 2026
Merged

Batch Jobs#65
rryoung98 merged 3 commits into
qBraid:stagingfrom
AkiDoesntCode:AkiDoesntCode-patch-1

Conversation

@AkiDoesntCode

Copy link
Copy Markdown

Summary of changes

Added a notebook that covers how to Batch Jobs from the v0.12.1 release.

Added a batch jobs
@coderabbitai

coderabbitai Bot commented Jul 1, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 9d3d2be5-b96f-4e4b-a2c9-4c588baaefc3

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new qBraid Runtime tutorial notebook demonstrating how to submit multiple circuits as a single batch job (introduced in qBraid-SDK v0.12.1), including a minimal end-to-end example from circuit construction through result visualization.

Changes:

  • Added a new notebook documenting batch-job submission via as_batch=True and BatchResult.
  • Included a Qiskit-based example that submits multiple circuits to a simulator device and visualizes results.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +20 to +22
"%%capture\n",
"\n",
"%pip install 'qbraid[qiskit,visualization]'"
"provider = QbraidProvider()\n",
"device = provider.get_device(\"qbraid:equal1:sim:bell-1\")\n",
"\n",
"assert device.profile.batch_job_support is True"
"source": [
"## Submit as a single batch\n",
"\n",
"We pass the two circuits as a list with `as_batch=True`, so they run as one job instead of two separate submissions. `job.result()` returns a `BatchResult`: `result.num_circuits` is how many circuits ran, `result.results` holds each circuit's counts on its own, and `result.data.get_counts()` combines them, which we then plot as a histogram."
Comment on lines +88 to +93
"for i, circuit_result in enumerate(result.results):\n",
" print(f\"Circuit {i}: {circuit_result.data.get_counts()}\")\n",
"\n",
"batch_counts = result.data.get_counts()\n",
"\n",
"plot_histogram(batch_counts)"
@rryoung98 rryoung98 self-requested a review July 2, 2026 14:09

@rryoung98 rryoung98 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice work!

nit:

  1. Let's make sure to output and qbraid-sdk version in a cell.

Otherwise lgtm

@rryoung98 rryoung98 requested a review from TheGupta2012 July 2, 2026 14:11
@rryoung98 rryoung98 changed the base branch from main to staging July 3, 2026 04:33
@rryoung98 rryoung98 merged commit 8a75f48 into qBraid:staging Jul 3, 2026
6 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants