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

Add Cost Tracker Support for AwsQuantumJobs #1043

Open
ldi18 opened this issue Nov 4, 2024 · 0 comments
Open

Add Cost Tracker Support for AwsQuantumJobs #1043

ldi18 opened this issue Nov 4, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@ldi18
Copy link

ldi18 commented Nov 4, 2024

The costs of a quantum task can be constrained by:

device = AwsDevice("arn:aws:braket:us-west-1::device/qpu/rigetti/Ankaa-2")
with Tracker() as tracker:
    while tracker.qpu_tasks_cost() < 1:
        result = device.run(circ, shots=200).result()
print(tracker.quantum_tasks_statistics())
print(tracker.qpu_tasks_cost(), "USD")

As far as I know, there is no equivalent for AwsQuantumJobs yet. It would be nice to have a feature added so that a cost threshold for AwsQuantumJobs can be set either by:

with Tracker() as tracker:
    while tracker.qpu_tasks_cost() < 1:
          job = AwsQuantumJob.create(
              device="arn:aws:braket:::device/quantum-simulator/amazon/sv1",
              source_module="src",
              entry_point="src.test_code:run",
              hyperparameters={},
              job_name=f"job1",
          )
print(tracker.quantum_tasks_statistics())
print(tracker.qpu_tasks_cost(), "USD")

or by adding another parameter to the .create() method.

@shpface shpface added the enhancement New feature or request label Nov 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants