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

[Feature] Adding digital noise #34

Open
wants to merge 62 commits into
base: main
Choose a base branch
from
Open

[Feature] Adding digital noise #34

wants to merge 62 commits into from

Conversation

chMoussa
Copy link
Collaborator

@chMoussa chMoussa commented Dec 4, 2024

Closes #33 by:

  • Adding a NoiseInstance with different NoiseType values from where we can extract the krauss operators.
  • Adding a noise argument to gates as a tuple of NoiseInstance
  • Extending apply functions to handle noise and input State provided as a density matrix.
  • Extending the api functions to work with density matrices.
  • Adding tests
  • Adding section noise in docs
  • Removing circuit methods sample and expectation as they were redundant with the api's

@chMoussa chMoussa self-assigned this Dec 4, 2024
@chMoussa chMoussa marked this pull request as ready for review December 12, 2024 16:59
Copy link
Collaborator

@RolandMacDoland RolandMacDoland left a comment

Choose a reason for hiding this comment

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

Hey @chMoussa thank you for this. Two points that puzzle me: 1) wouldn't be easier to have a DensityMatrix type to be queried for instead of passing an argument all around ? It might not be idiomatic to Jax though. 2) Is there a need for NoiseProtocol to be an empty tuple ? Other than that, minor quibbles around type updates (Tuple -> tuple) and few other points.

horqrux/api.py Outdated Show resolved Hide resolved
horqrux/apply.py Outdated Show resolved Hide resolved
horqrux/apply.py Outdated Show resolved Hide resolved
horqrux/apply.py Outdated Show resolved Hide resolved
horqrux/apply.py Outdated Show resolved Hide resolved
horqrux/apply.py Outdated Show resolved Hide resolved
horqrux/apply.py Outdated Show resolved Hide resolved
horqrux/noise.py Outdated Show resolved Hide resolved
horqrux/parametric.py Outdated Show resolved Hide resolved
@chMoussa
Copy link
Collaborator Author

Hey @chMoussa thank you for this. Two points that puzzle me: 1) wouldn't be easier to have a DensityMatrix type to be queried for instead of passing an argument all around ? It might not be idiomatic to Jax though. 2) Is there a need for NoiseProtocol to be an empty tuple ? Other than that, minor quibbles around type updates (Tuple -> tuple) and few other points.

Hey @RolandMacDoland,
For 1) I tried originally to have this class but inheriting the Array is not allowed, so that's why I decided to carry a boolean instead.
For 2) I thought we would avoid the need to use None by simply using an empty tuple.

@chMoussa
Copy link
Collaborator Author

Hey @chMoussa thank you for this. Two points that puzzle me: 1) wouldn't be easier to have a DensityMatrix type to be queried for instead of passing an argument all around ? It might not be idiomatic to Jax though. 2) Is there a need for NoiseProtocol to be an empty tuple ? Other than that, minor quibbles around type updates (Tuple -> tuple) and few other points.

Hey @RolandMacDoland, For 1) I tried originally to have this class but inheriting the Array is not allowed, so that's why I decided to carry a boolean instead. For 2) I thought we would avoid the need to use None by simply using an empty tuple.

Hey @RolandMacDoland , I managed to make it with a DensityMatrix class and a few singledispatch mathods to handle state vectors and density matrices differently.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature] Add digital noise
3 participants