Skip to content

Commit

Permalink
Updating the IonQ examples (#465) (#466)
Browse files Browse the repository at this point in the history
  • Loading branch information
bettinaheim authored Jul 23, 2023
1 parent 7303a05 commit b2abbaa
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 3 additions & 1 deletion docs/sphinx/examples/cpp/providers/ionq.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ struct ghz {
for (int i = 0; i < 4; i++) {
x<cudaq::ctrl>(q[i], q[i + 1]);
}
mz(q);
// Note: All qubits will be measured at the end upon performing
// the sampling. You may encounter a pre-flight error on IonQ
// backends if you include explicit measurements.
}
};

Expand Down
6 changes: 4 additions & 2 deletions docs/sphinx/examples/python/providers/ionq.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,10 @@
qubits = kernel.qalloc(2)
kernel.h(qubits[0])
kernel.cx(qubits[0], qubits[1])
kernel.mz(qubits[0])
kernel.mz(qubits[1])

# Note: All qubits will be measured at the end upon performing
# the sampling. You may encounter a pre-flight error on IonQ
# backends if you include explicit measurements.

# Execute on IonQ and print out the results.

Expand Down

0 comments on commit b2abbaa

Please sign in to comment.