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

feat: support Braket noise model #160

Closed
wants to merge 1 commit into from

Conversation

yitchen-tim
Copy link
Collaborator

@yitchen-tim yitchen-tim commented Feb 23, 2024

Summary

Support Braket noise model for Braket backend. Solves half of #89. Still need to add support to Qiskit noise model which can be a separate PR.

Details and comments

  • Support noise model in local dm simulator
local_dm_simulator = BraketLocalBackend(name='braket_dm', noise_model=noise_model)
  • Support noise model in DM1 AWS backend
qpu_backend = provider.get_backend("dm1", noise_model=noise_model)

@CLAassistant
Copy link

CLAassistant commented Feb 23, 2024

CLA assistant check
All committers have signed the CLA.

@yitchen-tim
Copy link
Collaborator Author

@speller26 I tried to implement the UX

dm1 = provider.get_backend("DM1", noise_model=noise_bit_flip)

One concern I have is the provider.get_backend depends on provider.backends. The args of provider.backends are for filtering. Now I added a noise_model arg which is not for filtering. It may make the provider.backends less cohesive, especially for user who use backends instead of get_backend. For example,

provider.backends(types="Simulator", noise_model=noise_bit_flip)

will try to add the noise model to all the returned backends. Looking for some feedback around this point.

def __init__(
self,
name: str = "default",
noise_model: Optional[BraketNoiseModel] = None,
Copy link
Collaborator

Choose a reason for hiding this comment

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

This should be a qiskit noise model that we would translate to Braket before L88.

**fields: extra fields
"""
super().__init__(name=name, **fields)
self.backend_name = name
self._local_device = LocalSimulator(backend=self.backend_name)
self._local_device.set_noise_model(noise_model)
Copy link
Collaborator

Choose a reason for hiding this comment

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

We should have a self.set_noise_model(noise_model: QiskitNoiseModel) and translate noise_model and apply it to self._local_device.

@yitchen-tim yitchen-tim marked this pull request as draft April 29, 2024 14:09
@yitchen-tim
Copy link
Collaborator Author

Closing this PR. The Braket backend in Qiskit should accept Qiskit noise model instead of Braket noise model.

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