You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the Python file one_qubit.py, the cx and cz gates are used instead of the controlled c_if gates. Although the code most probably return a similar distribution, the code disagrees with the Qiskit official version that more closely follows the quantum teleportation specification.
How can we reproduce the issue?
Run the following code in the Python file:
fromqiskitimport*# Define register of 3 qubitsq=QuantumRegister(3)
c=ClassicalRegister(2)
circuit=QuantumCircuit(q,c)
# Generate entanglementcircuit.h(1)
circuit.cx(1, 2)
circuit.barrier()
# Perform Bell state measurementcircuit.cx(0, 1)
circuit.h(0)
circuit.measure(0, 0)
circuit.measure(1, 1)
# Operate on Bob's qubit given resultcircuit.cx(0, 2)
circuit.cz(1, 2)
print(circuit)
The cx and cz gates are not conditioned on the classical register.
Any Suggestions?
The code should probably use the c_if gates instead of the cx and cz gates. An example could be:
Environment
What is happening?
In the Python file one_qubit.py, the
cx
andcz
gates are used instead of the controlledc_if
gates. Although the code most probably return a similar distribution, the code disagrees with the Qiskit official version that more closely follows the quantum teleportation specification.How can we reproduce the issue?
Run the following code in the Python file:
The cx and cz gates are not conditioned on the classical register.
Any Suggestions?
The code should probably use the
c_if
gates instead of thecx
andcz
gates. An example could be:Thanks in advance, I wish you a happy and productive day
The text was updated successfully, but these errors were encountered: