Skip to content

Commit d2631c6

Browse files
authored
Merge branch 'main' into py.fix_loop_create
2 parents 5a18dcf + 158c0ca commit d2631c6

File tree

72 files changed

+2056
-335
lines changed

Some content is hidden

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

72 files changed

+2056
-335
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: 24 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"operating_systems":
77
[
88
"ubuntu:22.04",
9-
"fedora:41"
9+
"fedora:42"
1010
]
1111
},
1212
{
@@ -15,24 +15,27 @@
1515
[
1616
"ubuntu:22.04",
1717
"debian:12",
18-
"fedora:41",
19-
"redhat/ubi9:9.2"
18+
"fedora:42",
19+
"redhat/ubi8:8.10",
20+
"redhat/ubi9:9.6"
2021
]
2122
},
2223
{
2324
"version": "3.12",
2425
"operating_systems":
2526
[
2627
"ubuntu:24.04",
27-
"fedora:41",
28-
"redhat/ubi9:9.2"
28+
"fedora:42",
29+
"redhat/ubi8:8.10",
30+
"redhat/ubi9:9.6",
31+
"redhat/ubi10:10.0"
2932
]
3033
},
3134
{
3235
"version": "3.13",
3336
"operating_systems":
3437
[
35-
"fedora:41"
38+
"fedora:42"
3639
]
3740
}
3841
],
@@ -45,9 +48,9 @@
4548
[
4649
"ubuntu:22.04",
4750
"debian:12",
48-
"redhat/ubi9:9.2",
51+
"redhat/ubi9:9.6",
4952
"opensuse/leap:15.5",
50-
"fedora:41"
53+
"fedora:42"
5154
],
5255
"ubuntu:22.04":
5356
{
@@ -61,7 +64,7 @@
6164
"cudart_version": "12.6",
6265
"cuda_distribution": "debian12"
6366
},
64-
"redhat/ubi9:9.2":
67+
"redhat/ubi9:9.6":
6568
{
6669
"libcdev_package": "glibc-devel",
6770
"cudart_version": "12.0",
@@ -73,11 +76,11 @@
7376
"cudart_version": "12.0",
7477
"cuda_distribution": "opensuse15"
7578
},
76-
"fedora:41":
79+
"fedora:42":
7780
{
7881
"libcdev_package": "glibc-devel",
7982
"cudart_version": "12.4",
80-
"cuda_distribution": "fedora41"
83+
"cuda_distribution": "fedora42"
8184
}
8285
},
8386
{
@@ -86,17 +89,17 @@
8689
"operating_systems":
8790
[
8891
"ubuntu:22.04",
89-
"redhat/ubi8:8.0",
92+
"redhat/ubi8:8.10",
9093
"opensuse/leap:15.5",
91-
"fedora:41"
94+
"fedora:42"
9295
],
9396
"ubuntu:22.04":
9497
{
9598
"libcdev_package": "libc6-dev",
9699
"cudart_version": "11.8",
97100
"cuda_distribution": "ubuntu2204"
98101
},
99-
"redhat/ubi8:8.0":
102+
"redhat/ubi8:8.10":
100103
{
101104
"libcdev_package": "glibc-devel",
102105
"cudart_version": "11.8",
@@ -108,7 +111,7 @@
108111
"cudart_version": "11.8",
109112
"cuda_distribution": "opensuse15"
110113
},
111-
"fedora:41":
114+
"fedora:42":
112115
{
113116
"libcdev_package": "glibc-devel",
114117
"cudart_version": "11.8",
@@ -121,15 +124,15 @@
121124
"operating_systems":
122125
[
123126
"ubuntu:22.04",
124-
"redhat/ubi9:9.2"
127+
"redhat/ubi9:9.6"
125128
],
126129
"ubuntu:22.04":
127130
{
128131
"libcdev_package": "libc6-dev",
129132
"cudart_version": "12.0",
130133
"cuda_distribution": "ubuntu2204"
131134
},
132-
"redhat/ubi9:9.2":
135+
"redhat/ubi9:9.6":
133136
{
134137
"libcdev_package": "glibc-devel",
135138
"cudart_version": "12.0",
@@ -142,22 +145,22 @@
142145
"operating_systems":
143146
[
144147
"ubuntu:22.04",
145-
"redhat/ubi8:8.0",
146-
"fedora:41"
148+
"redhat/ubi8:8.10",
149+
"fedora:42"
147150
],
148151
"ubuntu:22.04":
149152
{
150153
"libcdev_package": "libc6-dev",
151154
"cudart_version": "11.8",
152155
"cuda_distribution": "ubuntu2204"
153156
},
154-
"redhat/ubi8:8.0":
157+
"redhat/ubi8:8.10":
155158
{
156159
"libcdev_package": "glibc-devel",
157160
"cudart_version": "11.8",
158161
"cuda_distribution": "rhel9"
159162
},
160-
"fedora:41":
163+
"fedora:42":
161164
{
162165
"libcdev_package": "glibc-devel",
163166
"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)