KEMBAR78
Fix storage order of noise kraus ops by 1tnguyen · Pull Request #1825 · NVIDIA/cuda-quantum · GitHub
Skip to content

Conversation

@1tnguyen
Copy link
Collaborator

@1tnguyen 1tnguyen commented Jun 17, 2024

Description

The row-major data storage was not consistently handled in our NoiseModel.

This is especially problematic for amplitude damping channel, whose Kraus matrices are not self-adjoint.

This PR:

  • Makes sure that we properly map flattened row-major data to Eigen matrices for validation as well as application.
    Note: the base Qpp gate application has done this row-major mapping for gate matrices correctly. We need to fix the apply noise channel path.

  • Fixes a unit tests: these unit tests are using column-major data for amplitude damping channels, probably to make it to work with the underlying inconsistency.

  • Adds 'u3' as a supported gate for noise modeling. We also need to let the QIR runtime (nvqir) propagate the gate to the simulator for the noise channel look-up to work.

  • Makes the py::buffer (numpy ndarray) to flattened row-major Kraus matrix mapping generic for both row and column major storage in numpy.

  • Adds unit test.

Fixed #1811

@github-actions
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 Jun 17, 2024
github-actions bot pushed a commit that referenced this pull request Jun 17, 2024
@github-actions
Copy link

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

@github-actions
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 Jun 17, 2024
@1tnguyen 1tnguyen force-pushed the tnguyen/noise-model-storage-order branch from 424fe1b to 9273474 Compare June 17, 2024 06:14
github-actions bot pushed a commit that referenced this pull request Jun 17, 2024
@github-actions
Copy link

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

@1tnguyen 1tnguyen marked this pull request as ready for review June 17, 2024 07:48
Copy link
Collaborator

@schweitzpgi schweitzpgi left a comment

Choose a reason for hiding this comment

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

Seems plausible to me. Might want someone else to check though.

github-actions bot pushed a commit that referenced this pull request Jul 1, 2024
@github-actions
Copy link

github-actions bot commented Jul 1, 2024

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

@1tnguyen 1tnguyen merged commit ea0f950 into NVIDIA:main Jul 1, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Jul 1, 2024
@bettinaheim bettinaheim added the bug fix To be listed under Bug Fixes in the release notes label Jul 29, 2024
@bettinaheim bettinaheim added this to the release 0.8.0 milestone Jul 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

bug fix To be listed under Bug Fixes in the release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

T1 Kraus channel failing CPTP test

3 participants