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

[Refac] Add pyq noise #469

Draft
wants to merge 23 commits into
base: main
Choose a base branch
from
Draft

[Refac] Add pyq noise #469

wants to merge 23 commits into from

Conversation

EthanObadia
Copy link
Collaborator

@EthanObadia EthanObadia commented Jun 19, 2024

This issue includes several tasks for refactoring and adding noise in Qadence:

Merge run and run_dm in the backends:

  • Remove the run_dm method from the abstract class Backend, the Horcrux, Bracket and Pyqtorch classes..
  • Merge the run_dm and run methods in the Pulser backend class.
  • Modify the unpyqfy method to represent the output density matrix as tensor.
    Closes [Feature] Enable noisy simulations through run() #428

Add the noise gates from pyq:

  • Add an optional noise parameter to the PrimitiveBlock class
  • Add an optional noise parameter to the ParametricBlock class
  • Update the Primitive and Parametric block instances class to support the noise attribute.
  • Add pyq's protocols to the Noise Class.
  • Modify the convert_block function:
  • Add a constructor in pyq:
    Closes [Proto] Integrate the Pyqtorch's noisy simulation #423

Add the noise features:

  • Create a function to add a noise protocol after every gate in a circuit.
  • Create a function to add a noise protocol after a specific type of gate in a circuit.
    (Will open an issue)

@EthanObadia EthanObadia marked this pull request as draft June 19, 2024 11:58
@EthanObadia EthanObadia added realistic-sim backends Improving the backends refactoring Refactoring of legacy code labels Jun 19, 2024
@EthanObadia EthanObadia self-assigned this Jun 19, 2024
elif (
is_single_qubit_chain(block)
and config.use_single_qubit_composition
and all([not isinstance(b, NoisyPrimitiveBlock) for b in block])
Copy link
Collaborator

Choose a reason for hiding this comment

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

came here to suggest this, nice that you spotted it already @EthanObadia

@jpmoutinho jpmoutinho changed the title [Refac] Merge run and run_dm in the backends [Refac] Add pyq noise Aug 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backends Improving the backends realistic-sim refactoring Refactoring of legacy code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature] Enable noisy simulations through run() [Proto] Integrate the Pyqtorch's noisy simulation
3 participants