Skip to content

Commit b2abbaa

Browse files
authored
Updating the IonQ examples (#465) (#466)
1 parent 7303a05 commit b2abbaa

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

docs/sphinx/examples/cpp/providers/ionq.cpp

+3-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@ struct ghz {
1616
for (int i = 0; i < 4; i++) {
1717
x<cudaq::ctrl>(q[i], q[i + 1]);
1818
}
19-
mz(q);
19+
// Note: All qubits will be measured at the end upon performing
20+
// the sampling. You may encounter a pre-flight error on IonQ
21+
// backends if you include explicit measurements.
2022
}
2123
};
2224

docs/sphinx/examples/python/providers/ionq.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,10 @@
1111
qubits = kernel.qalloc(2)
1212
kernel.h(qubits[0])
1313
kernel.cx(qubits[0], qubits[1])
14-
kernel.mz(qubits[0])
15-
kernel.mz(qubits[1])
14+
15+
# Note: All qubits will be measured at the end upon performing
16+
# the sampling. You may encounter a pre-flight error on IonQ
17+
# backends if you include explicit measurements.
1618

1719
# Execute on IonQ and print out the results.
1820

0 commit comments

Comments
 (0)