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

Noise model enhancements #2168

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

Conversation

1tnguyen
Copy link
Collaborator

@1tnguyen 1tnguyen commented Aug 28, 2024

Description

(1) Noise model enhancements

  • Support a match-all condition (noise on a gate, any qubits)

  • Support noise defined via callback functions.

(2) Noise mapping for custom operations

  • Move the custom operation map to the common/ location so that it can be accessed from anywhere.

  • Make the registration a bit earlier so that we know that an operation is registered before actually running that gate.

  • Connect the Python registration to C++.

  • Propagate the custom op name all the way back to the runtime, i.e., simulator.

Copy link

CUDA Quantum Docs Bot: A preview of the documentation can be found here.

github-actions bot pushed a commit that referenced this pull request Aug 28, 2024
Copy link

CUDA Quantum Docs Bot: A preview of the documentation can be found here.

github-actions bot pushed a commit that referenced this pull request Aug 28, 2024
Copy link

CUDA Quantum Docs Bot: A preview of the documentation can be found here.

github-actions bot pushed a commit that referenced this pull request Aug 29, 2024
- For the path via ExecutionManager: making sure the registration is
  early enough, i.e., at the point of registration.

- For the Python path: need to let the registry know about the
  registration.

- Propagate the custom op name all the way to the simulator.
Copy link

CUDA Quantum Docs Bot: A preview of the documentation can be found here.

github-actions bot pushed a commit that referenced this pull request Aug 30, 2024
@1tnguyen 1tnguyen marked this pull request as ready for review August 30, 2024 04:51
@1tnguyen 1tnguyen requested review from amccaskey and khalatepradnya and removed request for amccaskey and khalatepradnya August 30, 2024 04:51
Copy link

CUDA Quantum Docs Bot: A preview of the documentation can be found here.

github-actions bot pushed a commit that referenced this pull request Aug 30, 2024
@@ -58,5 +59,8 @@ def kernel():
# Make available to kernel builder object
setattr(PyKernel, operation_name,
partialmethod(__generalCustomOperation, operation_name))
# Let the runtime know about this registered operation.
# Note: the matrix generator/construction is not known by the ExecutionManager in this case since we don't expect the ExecutionManager to be involved.
cudaq_runtime.register_custom_operation(operation_name)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Q: Why do we need this?
(Is it for remote execution support?)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The NoiseModel class has a validation check for gate name when adding noise channels.
Previously, we only check against built-in gates. To support custom ops, I moved the custom gate map/registry to CustomOp.h in common/ so that the NoiseModel can check against registered custom ops. Python has a different registration mechanism here; hence we need to propagate this to the C++ registry as well via this call.

Copy link

CUDA Quantum Docs Bot: A preview of the documentation can be found here.

github-actions bot pushed a commit that referenced this pull request Aug 30, 2024
Copy link

CUDA Quantum Docs Bot: A preview of the documentation can be found here.

github-actions bot pushed a commit that referenced this pull request Aug 30, 2024
Copy link

CUDA Quantum Docs Bot: A preview of the documentation can be found here.

github-actions bot pushed a commit that referenced this pull request Sep 18, 2024
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.

2 participants