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

increase shot limit for Aquila to 5k #370

Open
balewski opened this issue Sep 30, 2023 · 7 comments
Open

increase shot limit for Aquila to 5k #370

balewski opened this issue Sep 30, 2023 · 7 comments
Labels
enhancement New feature or request

Comments

@balewski
Copy link

When I submit Aquila job which requests more than 1k shots it is rejected by Braket.
Can you please bump up this limit to 5k or 10k? I run problems which require higher statistics than 1k shots.
This is the Braket error I see

Traceback (most recent call last):
  File "/quera/problem_Z2Phase1D/./submit_Z2Phase_job.py", line 148, in <module>
    job = device.run(discr_ahs_program, shots=shots)  
  File "/usr/local/lib/python3.10/dist-packages/braket/aws/aws_device.py", line 184, in run
    return AwsQuantumTask.create(
  File "/usr/local/lib/python3.10/dist-packages/braket/aws/aws_quantum_task.py", line 189, in create
    return _create_internal(
  File "/usr/lib/python3.10/functools.py", line 889, in wrapper
    return dispatch(args[0].__class__)(*args, **kw)
  File "/usr/local/lib/python3.10/dist-packages/braket/aws/aws_quantum_task.py", line 676, in _
    task_arn = aws_session.create_quantum_task(**create_task_kwargs)
  File "/usr/local/lib/python3.10/dist-packages/braket/aws/aws_session.py", line 230, in create_quantum_task
    response = self.braket_client.create_quantum_task(**boto3_kwargs)
  File "/usr/local/lib/python3.10/dist-packages/botocore/client.py", line 535, in _api_call
    return self._make_api_call(operation_name, kwargs)
  File "/usr/local/lib/python3.10/dist-packages/botocore/client.py", line 980, in _make_api_call
    raise error_class(parsed_response, operation_name)
botocore.errorfactory.ValidationException: An error occurred (ValidationException) when calling the CreateQuantumTask operation: shots must be between #[1, 1000]

@balewski balewski added the enhancement New feature or request label Sep 30, 2023
@peterkomar-aws
Copy link
Contributor

Hello, thank you for this request. One reason we set it to 1000, is to limit accidental spending on Aquila. Can you provide more details about what you are trying to achieve, to help us re-evaluate this decision?

Until then, you can try running your use case that require many shots as a series of identical tasks with 1000 shots each back-to-back. If you are looking to run 10k shots, the cost difference between 10[tasks] x 1k[shots] and 1[task] x 10k[shots] is around 3 USD, 3% of the total cost. Would this solve your issue?

@balewski
Copy link
Author

balewski commented Oct 4, 2023 via email

@balewski
Copy link
Author

balewski commented Oct 4, 2023 via email

@peterkomar-aws
Copy link
Contributor

Thank you very much, Jan. I appreciate the difficulty of having to agregate across hundreds or thousands of tasks, and certainly the 3% cost overhead is also not something to ignore. It is very useful for us to understand when and how these limit your work. Thank you for providing details.

To help us further evaluate the effects (and side effects) of increasing the limit, do you mind telling us how big of an increase would make substantial difference in your experience? In your initial message you mentioned 5-10k, but based on the N_qubit=256 example (where the probability of defect-free arrangement is around (0.99)^256 = 7.6%), it sounds like even an increase by a factor of 1/0.076 = 13 would be useful. Is this correct? (I guess it comes down to exactly how many perfect shots you need to suppress the statistical fluctuation in the domain wall position.)

Thank you,
Peter

@balewski
Copy link
Author

balewski commented Oct 5, 2023 via email

@peterkomar-aws
Copy link
Contributor

Hi Jan,

Thank you. I've just shared the details you provided with our team. I will follow up on this issue.

Please feel free to comment to ping me if I don't give an update in a week.

Best,
Peter

@zmohammad01
Copy link

Hey @balewski

I'm on the product management team for Amazon Braket. Thanks again for opening this issue and being active in our developer community.

We are speaking internally and with QuEra to discuss our options and exploring if we add this to our future roadmap.

In the interim, I'll add this to our internal feature request tracking and will post here if this feature is rolled out 😊

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

3 participants