This is an automated email from the ASF dual-hosted git repository.
rawkintrevo pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/mahout.git
The following commit(s) were added to refs/heads/main by this push:
new 20034f801 Fix quantum teleportation example to use explicit Pauli gate
names (#585)
20034f801 is described below
commit 20034f8018176b201a68968da821eeb28ba6dc79
Author: Guan-Ming (Wesley) Chiu <[email protected]>
AuthorDate: Mon Oct 20 08:18:51 2025 +0800
Fix quantum teleportation example to use explicit Pauli gate names (#585)
---
examples/quantum_teleportation.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/examples/quantum_teleportation.py
b/examples/quantum_teleportation.py
index abc14075f..653d182da 100644
--- a/examples/quantum_teleportation.py
+++ b/examples/quantum_teleportation.py
@@ -46,9 +46,9 @@ receiver_quantum_computer.create_empty_circuit(3)
# Apply X and Z gates based on the received measurement results
received_measurement_results = [0, 1] # Simulated measurement results
if received_measurement_results[1] == 1:
- receiver_quantum_computer.apply_x_gate(2)
+ receiver_quantum_computer.apply_pauli_x_gate(2)
if received_measurement_results[0] == 1:
- receiver_quantum_computer.apply_z_gate(2)
+ receiver_quantum_computer.apply_pauli_z_gate(2)
# The state on qubit 2 now matches the original state on qubit 0