Skip to content

Commit b05e106

Browse files
Merge branch 'main' into warn-draw
2 parents 9002d5b + bf0d50a commit b05e106

File tree

67 files changed

+2038
-374
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+2038
-374
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
nvidia-mgpu-repo: cuda-quantum/cuquantum-mgpu.git
2-
nvidia-mgpu-commit: bfccb143f12b42be129ed2fbf16c39428eaba7b7
2+
nvidia-mgpu-commit: 5f1033f9efbe952633e567d676a64a237cb43ba7

.github/workflows/config/md_link_check_config.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,13 @@
99
"headers": {
1010
"Accept-Encoding": "zstd, br, gzip, deflate"
1111
}
12+
},
13+
{
14+
"urls": ["https://www.quantum-machines.co/"],
15+
"headers": {
16+
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0 Safari/537.36",
17+
"Accept-Language": "en-US,en;q=0.9"
18+
}
1219
}
1320
],
1421
"ignorePatterns": [

.github/workflows/config/spelling_allowlist.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ QCaaS
9999
QEC
100100
QIR
101101
QIS
102+
QOP
102103
QPP
103104
QPU
104105
QPUs

.github/workflows/config/validation_config.json

Lines changed: 25 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
"operating_systems":
77
[
88
"ubuntu:22.04",
9-
"fedora:41"
9+
"redhat/ubi8:8.10",
10+
"fedora:42"
1011
]
1112
},
1213
{
@@ -15,24 +16,27 @@
1516
[
1617
"ubuntu:22.04",
1718
"debian:12",
18-
"fedora:41",
19-
"redhat/ubi9:9.2"
19+
"fedora:42",
20+
"redhat/ubi8:8.10",
21+
"redhat/ubi9:9.6"
2022
]
2123
},
2224
{
2325
"version": "3.12",
2426
"operating_systems":
2527
[
2628
"ubuntu:24.04",
27-
"fedora:41",
28-
"redhat/ubi9:9.2"
29+
"fedora:42",
30+
"redhat/ubi8:8.10",
31+
"redhat/ubi9:9.6",
32+
"redhat/ubi10:10.0"
2933
]
3034
},
3135
{
3236
"version": "3.13",
3337
"operating_systems":
3438
[
35-
"fedora:41"
39+
"fedora:42"
3640
]
3741
}
3842
],
@@ -45,9 +49,9 @@
4549
[
4650
"ubuntu:22.04",
4751
"debian:12",
48-
"redhat/ubi9:9.2",
52+
"redhat/ubi9:9.6",
4953
"opensuse/leap:15.5",
50-
"fedora:41"
54+
"fedora:42"
5155
],
5256
"ubuntu:22.04":
5357
{
@@ -61,7 +65,7 @@
6165
"cudart_version": "12.6",
6266
"cuda_distribution": "debian12"
6367
},
64-
"redhat/ubi9:9.2":
68+
"redhat/ubi9:9.6":
6569
{
6670
"libcdev_package": "glibc-devel",
6771
"cudart_version": "12.0",
@@ -73,11 +77,11 @@
7377
"cudart_version": "12.0",
7478
"cuda_distribution": "opensuse15"
7579
},
76-
"fedora:41":
80+
"fedora:42":
7781
{
7882
"libcdev_package": "glibc-devel",
7983
"cudart_version": "12.4",
80-
"cuda_distribution": "fedora41"
84+
"cuda_distribution": "fedora42"
8185
}
8286
},
8387
{
@@ -86,17 +90,17 @@
8690
"operating_systems":
8791
[
8892
"ubuntu:22.04",
89-
"redhat/ubi8:8.0",
93+
"redhat/ubi8:8.10",
9094
"opensuse/leap:15.5",
91-
"fedora:41"
95+
"fedora:42"
9296
],
9397
"ubuntu:22.04":
9498
{
9599
"libcdev_package": "libc6-dev",
96100
"cudart_version": "11.8",
97101
"cuda_distribution": "ubuntu2204"
98102
},
99-
"redhat/ubi8:8.0":
103+
"redhat/ubi8:8.10":
100104
{
101105
"libcdev_package": "glibc-devel",
102106
"cudart_version": "11.8",
@@ -108,7 +112,7 @@
108112
"cudart_version": "11.8",
109113
"cuda_distribution": "opensuse15"
110114
},
111-
"fedora:41":
115+
"fedora:42":
112116
{
113117
"libcdev_package": "glibc-devel",
114118
"cudart_version": "11.8",
@@ -121,15 +125,15 @@
121125
"operating_systems":
122126
[
123127
"ubuntu:22.04",
124-
"redhat/ubi9:9.2"
128+
"redhat/ubi9:9.6"
125129
],
126130
"ubuntu:22.04":
127131
{
128132
"libcdev_package": "libc6-dev",
129133
"cudart_version": "12.0",
130134
"cuda_distribution": "ubuntu2204"
131135
},
132-
"redhat/ubi9:9.2":
136+
"redhat/ubi9:9.6":
133137
{
134138
"libcdev_package": "glibc-devel",
135139
"cudart_version": "12.0",
@@ -142,22 +146,22 @@
142146
"operating_systems":
143147
[
144148
"ubuntu:22.04",
145-
"redhat/ubi8:8.0",
146-
"fedora:41"
149+
"redhat/ubi8:8.10",
150+
"fedora:42"
147151
],
148152
"ubuntu:22.04":
149153
{
150154
"libcdev_package": "libc6-dev",
151155
"cudart_version": "11.8",
152156
"cuda_distribution": "ubuntu2204"
153157
},
154-
"redhat/ubi8:8.0":
158+
"redhat/ubi8:8.10":
155159
{
156160
"libcdev_package": "glibc-devel",
157161
"cudart_version": "11.8",
158162
"cuda_distribution": "rhel9"
159163
},
160-
"fedora:41":
164+
"fedora:42":
161165
{
162166
"libcdev_package": "glibc-devel",
163167
"cudart_version": "11.8",

.github/workflows/publishing.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -924,7 +924,7 @@ jobs:
924924

925925
strategy:
926926
matrix:
927-
os_image: ['redhat/ubi8:8.0', 'ubuntu:22.04']
927+
os_image: ['redhat/ubi8:8.10', 'ubuntu:22.04']
928928
cuda_version: ['11.8', '12.0']
929929
fail-fast: false
930930

docker/test/installer/linux.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# the terms of the Apache License 2.0 which accompanies this distribution. #
77
# ============================================================================ #
88

9-
ARG base_image=redhat/ubi8:8.0
9+
ARG base_image=redhat/ubi8:8.10
1010
ARG base_image_mpibuild=amd64/almalinux:8
1111

1212
# [OpenMPI Installation]

docker/test/wheels/redhat.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# the terms of the Apache License 2.0 which accompanies this distribution. #
77
# ============================================================================ #
88

9-
ARG base_image=redhat/ubi9:9.2
9+
ARG base_image=redhat/ubi9:9.6
1010
FROM ${base_image}
1111

1212
ARG python_version=3.11

docs/sphinx/api/languages/python_api.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ Kernel Execution
7272
.. autofunction:: cudaq::vqe
7373
.. autofunction:: cudaq::draw
7474
.. autofunction:: cudaq::translate
75+
.. autofunction:: cudaq::estimate_resources
7576

7677
Backend Configuration
7778
=============================
@@ -285,6 +286,9 @@ Data Types
285286
.. autoclass:: cudaq::AsyncEvolveResult
286287
:members:
287288

289+
.. autoclass:: cudaq::Resources
290+
:members:
291+
288292
Optimizers
289293
-----------------
290294

docs/sphinx/targets/cpp/anyon.cpp

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
// Compile and run with:
2+
// ```
3+
// nvq++ --target anyon anyon.cpp -o out.x && ./out.x
4+
// ```
5+
// This will submit the job to Anyon's default superconducting QPU.
6+
// You can specify a specific machine via the `--anyon-machine` flag:
7+
// ```
8+
// nvq++ --target anyon --anyon-machine telegraph-8q anyon.cpp -o out.x &&
9+
// ./out.x
10+
// ```
11+
// or for the larger system:
12+
// ```
13+
// nvq++ --target anyon --anyon-machine berkeley-25q anyon.cpp -o out.x &&
14+
// ./out.x
15+
// ```
16+
//
17+
// To use this target you will need to set up credentials in `~/.anyon_config`
18+
// The configuration file should contain your Anyon Technologies username and
19+
// password:
20+
// ```
21+
// credential:<username>:<password>
22+
// ```
23+
24+
#include <cudaq.h>
25+
#include <fstream>
26+
27+
// Define a quantum kernel to execute on Anyon backend.
28+
struct ghz {
29+
// Maximally entangled state between 5 qubits.
30+
auto operator()() __qpu__ {
31+
cudaq::qvector q(5);
32+
h(q[0]);
33+
for (int i = 0; i < 4; i++) {
34+
x<cudaq::ctrl>(q[i], q[i + 1]);
35+
}
36+
auto result = mz(q);
37+
}
38+
};
39+
40+
int main() {
41+
42+
// Submit asynchronously
43+
auto future = cudaq::sample_async(ghz{});
44+
45+
// ... classical optimization code can run while job executes ...
46+
47+
// Can write the future to file:
48+
{
49+
std::ofstream out("saveMe.json");
50+
out << future;
51+
}
52+
53+
// Then come back and read it in later.
54+
cudaq::async_result<cudaq::sample_result> readIn;
55+
std::ifstream in("saveMe.json");
56+
in >> readIn;
57+
58+
// Get the results of the read in future.
59+
auto async_counts = readIn.get();
60+
async_counts.dump();
61+
62+
// OR: Submit to synchronously
63+
auto counts = cudaq::sample(ghz{});
64+
counts.dump();
65+
66+
return 0;
67+
}

docs/sphinx/targets/cpp/oqc.cpp

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
// Compile and run with:
2+
// ```
3+
// nvq++ --target oqc oqc.cpp -o out.x && ./out.x
4+
// ```
5+
// This will submit the job to the OQC platform. You can also specify
6+
// the machine to use via the `--oqc-machine` flag:
7+
// ```
8+
// nvq++ --target oqc --oqc-machine lucy oqc.cpp -o out.x && ./out.x
9+
// ```
10+
// The default is the 8 qubit Lucy device. You can set this to be either
11+
// `toshiko` or `lucy` via this flag.
12+
//
13+
// To use the OQC target you will need to set the following environment
14+
// variables: OQC_URL OQC_EMAIL OQC_PASSWORD To setup an account, contact
15+
16+
17+
#include <cudaq.h>
18+
#include <fstream>
19+
20+
// Define a simple quantum kernel to execute on OQC backends.
21+
struct bell_state {
22+
auto operator()() __qpu__ {
23+
cudaq::qvector q(2);
24+
h(q[0]);
25+
x<cudaq::ctrl>(q[0], q[1]);
26+
auto result = mz(q);
27+
return result;
28+
}
29+
};
30+
31+
int main() {
32+
// Submit to OQC asynchronously (e.g., continue executing
33+
// code in the file until the job has been returned).
34+
auto future = cudaq::sample_async(bell_state{});
35+
// ... classical code to execute in the meantime ...
36+
37+
// Can write the future to file:
38+
{
39+
std::ofstream out("future.json");
40+
out << future;
41+
}
42+
43+
// Then come back and read it in later.
44+
cudaq::async_result<cudaq::sample_result> readIn;
45+
std::ifstream in("future.json");
46+
in >> readIn;
47+
48+
// Get the results of the read in future.
49+
auto async_counts = readIn.get();
50+
async_counts.dump();
51+
52+
// OR: Submit to OQC synchronously (e.g., wait for the job
53+
// result to be returned before proceeding).
54+
auto counts = cudaq::sample(bell_state{});
55+
counts.dump();
56+
}

0 commit comments

Comments
 (0)