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

Add ORCA backends and documentation #1842

Merged
merged 26 commits into from
Jul 3, 2024
Merged

Conversation

Omar-ORCA
Copy link
Contributor

@Omar-ORCA Omar-ORCA commented Jun 20, 2024

Description

Added documentation for ORCA backend. Python implementation can be found in #1690.
This PR closes #1388
It also partially fixes #1285

Copy link

copy-pr-bot bot commented Jun 20, 2024

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@khalatepradnya
Copy link
Collaborator

khalatepradnya commented Jun 28, 2024

/ok to test

Command Bot: Processing...

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 28, 2024
@khalatepradnya
Copy link
Collaborator

khalatepradnya commented Jul 2, 2024

/ok to test

Command Bot: Processing...

@khalatepradnya
Copy link
Collaborator

Suggested patch#1 for spellings:

diff --git a/.github/workflows/config/spelling_allowlist.txt b/.github/workflows/config/spelling_allowlist.txt
index d33b9603a..cc4fd98fb 100644
--- a/.github/workflows/config/spelling_allowlist.txt
+++ b/.github/workflows/config/spelling_allowlist.txt
@@ -62,7 +62,6 @@ NVQC
 NVQIR
 OQC
 ORCA
-ORCA's
 OpenACC
 OpenMP
 OpenMPI
@@ -126,7 +125,6 @@ bitstrings
 boolean
 boson
 broadcasted
-bs
 buildable
 callable
 callables
@@ -224,7 +222,6 @@ namespace
 namespaces
 natively
 normalization
-np
 nullary
 optimizer
 optimizers
@@ -241,7 +238,6 @@ prepend
 preprocessor
 probability
 programmatically
-ps
 pybind
 quantize
 quantized
diff --git a/docs/sphinx/examples/cpp/providers/orca.cpp b/docs/sphinx/examples/cpp/providers/orca.cpp
index 4ec859252..bd06a8783 100644
--- a/docs/sphinx/examples/cpp/providers/orca.cpp
+++ b/docs/sphinx/examples/cpp/providers/orca.cpp
@@ -1,7 +1,6 @@
 // Compile and run with:
 // ```
-// nvq++ --target orca --orca-url $ORCA_ACCESS_URL orca.cpp -o out.x
-// && ./out.x
+// nvq++ --target orca --orca-url $ORCA_ACCESS_URL orca.cpp -o out.x && ./out.x
 // ```
 // To use the ORCA Computing target you will need to set the ORCA_ACCESS_URL
 // environment variable or pass the url to the --orca-url flag.
@@ -53,8 +52,10 @@ int main() {
 
   // Optionally, we can also specify the phase shifter angles (created as a
   // linear spaced vector of angles), if the system includes phase shifters
+  // ```
   // std::vector<double> ps_angles(n_beam_splitters);
   // linear_spaced_vector(ps_angles, M_PI / 6, M_PI / 3, n_beam_splitters);
+  // ```
 
   // we can also set number of requested samples
   int n_samples{10000};
@@ -67,8 +68,10 @@ int main() {
   // If the system includes phase shifters, the phase shifter angles can be
   // included in the call
 
+  // ```
   // auto counts = cudaq::orca::sample(input_state, loop_lengths, bs_angles,
   //                                   ps_angles, n_samples);
+  // ```
 
   // Print the results
   counts.dump();
diff --git a/docs/sphinx/examples/python/providers/orca.py b/docs/sphinx/examples/python/providers/orca.py
index a0314c5d6..9e488ea15 100644
--- a/docs/sphinx/examples/python/providers/orca.py
+++ b/docs/sphinx/examples/python/providers/orca.py
@@ -38,7 +38,9 @@ bs_angles = np.linspace(np.pi / 8, np.pi / 3, n_beam_splitters)
 
 # Optionally, we can also specify the phase shifter angles, if the system 
 # includes phase shifters
+# ```
 # ps_angles = np.linspace(np.pi / 6, np.pi / 3, n_beam_splitters)
+# ```
 
 # we can also set number of requested samples
 n_samples = 10000
@@ -50,8 +52,10 @@ counts = cudaq.orca.sample(input_state, loop_lengths, bs_angles, n_samples)
 
 # If the system includes phase shifters, the phase shifter angles can be 
 # included in the call
+# ```
 # counts = cudaq.orca.sample(input_state, loop_lengths, bs_angles, ps_angles, 
 #                            n_samples)
+# ```
 
 # Print the results
 print(counts)

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

github-actions bot commented Jul 3, 2024

CLA Assistant Lite bot All Contributors have signed the CLA.

@khalatepradnya
Copy link
Collaborator

khalatepradnya commented Jul 3, 2024

/ok to test

Command Bot: Processing...

Copy link

github-actions bot commented Jul 3, 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 Jul 3, 2024
@schweitzpgi
Copy link
Collaborator

This is blocked waiting for a "code owner".

@bmhowe23
Copy link
Collaborator

bmhowe23 commented Jul 3, 2024

/ok to test

Command Bot: Processing...

Copy link
Collaborator

@bmhowe23 bmhowe23 left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks @Omar-ORCA.

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

github-actions bot commented Jul 3, 2024

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

@bmhowe23
Copy link
Collaborator

bmhowe23 commented Jul 3, 2024

/ok to test

Command Bot: Processing...

@bmhowe23 bmhowe23 enabled auto-merge (squash) July 3, 2024 18:17
@bmhowe23 bmhowe23 merged commit 8de7504 into NVIDIA:main Jul 3, 2024
125 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Jul 3, 2024
@Omar-ORCA Omar-ORCA deleted the orca_doc branch July 4, 2024 07:59
@bettinaheim bettinaheim added documentation Improvements or additions to documentation enhancement New feature or request labels Jul 29, 2024
@bettinaheim bettinaheim added this to the release 0.8.0 milestone Jul 29, 2024
@bettinaheim bettinaheim changed the title Add ORCA documentation Add ORCA backends and documentation Jul 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Docs] Document the ORCA backend Additional/missing samples
6 participants