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

MPS backend to support gates on 3+ qubits #1420

Merged
merged 22 commits into from
Apr 2, 2024

Conversation

1tnguyen
Copy link
Collaborator

@1tnguyen 1tnguyen commented Mar 20, 2024

Description

(1) Support gates on 3+ qubits for the MPS backend via control gate decomposition.
Experimenting with different strategies to support this feature, implementing it at the simulator implementation level seems to be the best option:

  • A pure __qpu__ kernel based solution only works for individual gates, but not for the cuda::control wrapper. The later adds control qubits at runtime (library mode).

  • Need to support C++ kernels, kernel builder, and Python hence different runtimes (NVQIR and library mode execution manager).

Hence, intercepting these multi-controlled gates at the simulator-level prevent the need to spread this logic in multiple places.

(2) Remove all MPS-specific #ifdef in unit tests (bypass tests that have multi-control gates)

(3) Reduce test time for tensornet backends: skip those tests that are not backend-specific; adjust a few tests to make it run faster for tensornet backends (test_runtime_tensornet and test_runtime_tensornet-mps about 10-15 mins each)

Fixes: #884

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

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

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 Mar 20, 2024
@1tnguyen 1tnguyen marked this pull request as ready for review March 20, 2024 04:49
github-actions bot pushed a commit that referenced this pull request Mar 20, 2024
Copy link

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

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 Mar 21, 2024
Copy link

github-actions bot commented Apr 1, 2024

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

github-actions bot pushed a commit that referenced this pull request Apr 1, 2024
@1tnguyen 1tnguyen enabled auto-merge (squash) April 2, 2024 06:44
@1tnguyen 1tnguyen merged commit d34c714 into NVIDIA:main Apr 2, 2024
125 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Apr 2, 2024
@bettinaheim bettinaheim added the enhancement New feature or request label Apr 17, 2024
@bettinaheim bettinaheim added this to the release 0.7.1 milestone Apr 17, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enable automatic controlled-gate decomposition for tensornet-mps backend
4 participants