Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more

You can simulate the standard quantum-teleportation protocol with three qubits, two classical measurement bits, and a simulator such as Qiskit Aer. One qubit holds a known test state, Alice’s qubit is entangled with Bob’s qubit, Alice measures her two qubits, and Bob applies conditional Pauli gates based on the two classical results. To verify the transfer, apply the inverse of the test state’s preparation to Bob’s qubit and check that the verification measurement is always 0 in an ideal simulation.

Teleportation transfers quantum-state information; it does not move matter, copy a qubit, or send information faster than light. The protocol consumes the shared entangled pair and requires ordinary classical communication.

What the circuit actually teleports

In the minimal protocol, the unknown state is represented by an input qubit. Alice and Bob first share an entangled Bell pair. Alice then performs a joint measurement on the input and her half of the pair. Those two classical results tell Bob which correction to apply to his qubit. After correction, Bob’s qubit has the same state the input had before Alice measured it.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The original state is not left intact. Alice’s measurement changes the source system, and the entangled pair (often called one e-bit) is consumed. Because Bob needs Alice’s two classical bits before choosing his corrections, no usable message travels faster than light.

#1 Best Overall
Sale
Compressed Air Duster,130000RPM Super Power Cordless Air Duster,Rechargeable Brushless Blower,3 Gear Adjustable Blower with LED Light,Dust Remover for Computer/House/Outdoor/Car
  • Powerful Turbo Fan:CAGIWIRU Electric Air Duster have reached speed up to 130000RPM,Can efficient remove dust and debris.With LED light and Three Adjustable Speed to meet with different cleaning tasks.
  • With Attached USB C Fasting Charging cable.Charing 3 hours,Enjoy up to 240 minutes of use on the lowest setting, For third speed can use for 25mins.with four charging options to meet with your needs.
  • Wide Application: attached 5 different nozzles,making it suitable for a variety of scenes, such as car,pet, pc, keyboards, and other electronic devices. It also serves for office and home clean duster.
  • Handy Design & Portable:Cordless air duster electric nozzle is Light weight and small size, design and comfortable to hold and space saving, convenient to carry around. You can put it in your room or inside the car without taking up space.
  • Economical &Reusable: Built durable materials with a long-lasting battery,our CAGIWIRU air duster it's a sustainable alternative to disposable air cans.

The three qubits

Qubit Role Who controls it
q0 Secret input state to be transferred Alice initially prepares and later measures it
q1 Alice’s half of the Bell pair Alice entangles and measures it
q2 Bob’s half of the Bell pair Bob applies conditional corrections

The circuit also needs two classical bits for Alice’s measurement outcomes. A third classical bit is convenient for the verification measurement at the end.

Gate sequence at a glance

With q0 as the input, q1 as Alice’s entangled qubit, and q2 as Bob’s, the protocol has four logical stages.

  1. Prepare the input. Apply any known state-preparation circuit to q0. A rotation sequence is useful for testing because it creates a state that is not simply 0, 1, or an equal superposition.
  2. Create the Bell pair. Apply a Hadamard gate to q1, then a controlled-NOT from q1 to q2. The pair is now entangled.
  3. Perform Alice’s Bell measurement. Apply CNOT from q0 to q1, then Hadamard to q0. Measure q0 and q1 in the computational basis.
  4. Correct Bob’s qubit. Send the two measured bits classically. Bob conditionally applies X and Z. Which measured bit controls which gate depends on your qubit, classical-register, and bit-order convention; the code below uses the mapping from the IBM Quantum Learning example described here.

The inverse of the input-preparation circuit is added only for testing. It is not part of teleportation and would not be available if the input state were genuinely unknown.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Set up a Qiskit simulator

A local Python installation with Qiskit and the Qiskit Aer simulator is sufficient. The example uses AerSimulator for shot-based execution, which repeats the circuit many times and returns measurement counts. Package APIs can change, so install versions that are compatible with one another and consult the installed package’s current documentation if an import or conditional-control method has been renamed.

pip install qiskit qiskit-aer

Run the program in a Python file or notebook. No quantum processor is required for this tutorial.

Rank #2
EVEO® Screen Cleaner Spray Kit (Streak-Free) TV Screen Cleaner for Smart TV, Lcd, LEd, Oled | Computer Screen Cleaner Spray and Wipe Microfiber Cloth - TV, Monitor, Laptop, iPad, Car - 6.7oz 1 Pack
  • Screen Cleaner is Your Screen’s New Bestfriend! - EVEO is proud to present a screen cleaner that’s perfectly suited for your TV. Meet your new screen cleaner, computer screen cleaner, laptop cleaner, iPad cleaner, Macbook,tv cleaner or any other electronic device. Our screen cleaner spray and wipe along with the included plush microfiber cloth, easily removes dust, fingerprints & other smudges on the screen’s surface. Clean effectively for a streak-free screen
  • Gentle on your Screens - Our screen cleaner spray and wipes is compatible to be used even for the most sensitive LCD, LED, CRT, and OLED screens in proper use. Be at ease knowing that this product is compatible with all the major brands: LG, SONY, Samsung, Sharp, iPad, iPhone, Android screens, Kindle, PC monitors - we’ve got you covered! Can be used as LCD screen cleaner, tv cleaner, smart tv screen cleaner, and more
  • Premium Super Soft Plush Microfiber Cloth - Included in this efficient screen cleaning kit. This screen cleaner spray and wipe has our signature plush microfiber cloth specially designed to comply with screens and monitors and leave them streak-free. Has been shown to effectively absorbs stubborn stains, zero streaks, and no fiber shedding. Always use this together with our screen cleaner for the best results
  • Easy-to-Use Screen Cleaner Kit + microfiber cleaning cloth - The EVEO Screen Cleaning Kit will easily be your new favorite tool when it comes to taking care of the things you love most, quick and easy solution for a streak-free screen. Simply screw on the sprayer gun on the screen cleaner bottle. Spray the cleaning liquid onto the microfiber cloth, then wipe the screen until desired cleanliness & shine is achieved.
  • Quality Screen Care Kit Worth Purchasing - Enjoy a convenient Screen Cleaner anytime, anywhere you need it. Your satisfaction is our top priority. We stand behind the quality of our products and that’s why, you shouldn’t be worrying at all. We manufacture the Best Screen Cleaner. and can be used for laptop cleaning kit, laptop screen cleaner, tv screen cleaner for smart tv. MacBook screen cleaner, monitor cleaner or screen cleaner spray for electronic devices with microfiber cleaning cloth

Build the circuit step by step

1. Allocate quantum and classical registers

Use separate one-bit classical registers for Alice’s two results. This makes the correction conditions unambiguous: m0 stores the measurement of q0 and m1 stores the measurement of q1. A separate verify register stores Bob’s final test bit.

from qiskit import QuantumCircuit, QuantumRegister, ClassicalRegister
from qiskit_aer import AerSimulator

q = QuantumRegister(3, 'q')
m0 = ClassicalRegister(1, 'm0')
m1 = ClassicalRegister(1, 'm1')
verify = ClassicalRegister(1, 'verify')
qc = QuantumCircuit(q, m0, m1, verify)

2. Prepare a known input state

For a reproducible test, prepare q0 with two rotations. The angles below are arbitrary test values, not a special teleportation requirement.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
theta = 0.7
phi = 1.1
qc.ry(theta, q[0])
qc.rz(phi, q[0])

The state-preparation unitary is the sequence ry(theta) followed by rz(phi). To undo it later, the inverse gates must be applied in reverse order: rz(-phi) followed by ry(-theta).

3. Create the shared Bell pair

qc.h(q[1])
qc.cx(q[1], q[2])

The Hadamard puts q1 into a superposition. The controlled-NOT correlates q2 with q1, producing the entangled pair that supplies the resource for teleportation. At this point q0 is still the input and q1-q2 are the shared pair.

4. Transform and measure Alice’s two qubits

qc.cx(q[0], q[1])
qc.h(q[0])
qc.measure(q[0], m0[0])
qc.measure(q[1], m1[0])

The CNOT and Hadamard convert the joint information in q0 and q1 into two computational-basis bits. Measurement produces ordinary classical values, each either 0 or 1. It also removes the original coherent state from Alice’s side; this is why the protocol is transfer rather than cloning.

Rank #3
Sale
BladeHawks RGB Gaming Mouse Pad Extra Large Extended 31.5x12 Inch-Black | LED mouse pad with 14 lighting modes, covers keyboard & mouse, anti-slip rubber base, waterproof surface, USB powered
  • 【Large size】:Measuring 800 x 300 mm/ 31. 5×12 inches, which is wider and taller than others. Large mouse pad can perfectly fit your keyboard and mouse of any size, and there is also ample space for peripherals such as phones, tablets, etc.
  • 【LED backlight mouse pad】:Blade Hawks RGB mouse pad provides 7 static modes and 7 dynamic modes will give you the options you are looking for. Power-off memory function remembers the last lighting mode you selected. The super glow fiber Chroma will give you a colorful gaming setup that you want.
  • 【Anti-slip rubber base】:Made from Natural rubber, this gaming mousepad will firmly grip your desktop, allowing you to enjoy the ultimate precision in the games you are most passionate about. It also comes with a texture that enhances this ability even further.
  • 【Smooth and waterproof surface】: Micro-textured cloth surface, for extremely precise mouse control and a smooth movement. When liquid splashes on the gaming mouse pad, it forms water droplets and slides down. Will not delay your work or gameplay.
  • 【Plug and play】: This mouse and keyboard pad is powered by USB, plug and play, no driver required. One button control light modes. Press one time to change the lighting mode, press twice to change the brightness, press and hold about 3 seconds turn ON/OFF.

5. Apply Bob’s conditional corrections

For the register assignment above, the IBM example applies Z to q2 when m0 is 1 and X to q2 when m1 is 1. In current Qiskit-style dynamic-circuit syntax, the conditions can be written as follows:

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
with qc.if_test((m0, 1)):
    qc.z(q[2])
with qc.if_test((m1, 1)):
    qc.x(q[2])

These two operations commute up to an irrelevant global phase when both conditions are true, so applying them in the displayed order is fine. The conceptual rule is that one measurement outcome selects the phase-flip correction Z and the other selects the bit-flip correction X. Other tutorials may label the measured bits in the opposite order or pack them into one classical register; in those circuits the apparent conditions can be swapped. Always trace which classical bit received each measurement before copying a conditional statement.

6. Undo the known preparation for verification

Now test whether Bob’s state equals the state originally prepared on q0:

qc.rz(-phi, q[2])
qc.ry(-theta, q[2])
qc.measure(q[2], verify[0])

If teleportation and the corrections are correct, the inverse preparation maps Bob’s state to |0⟩. The final measurement should therefore be 0 on every shot in an ideal simulator. This inverse is a diagnostic operation added after the protocol; it is not a step Alice and Bob use to teleport an unknown state.

Complete runnable example

The following listing puts the pieces together and executes 1,024 shots.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #4
Sale
Vaydeer Wrist Rest for Keyboard and Mouse, Computer Ergonomic Wrist Support Pad, Soft Memory Foam Arm Cushion for Desk, Palm Hand Office Laptop Typing
  • 【Softer and More Comfortable】Vaydeer wrist rest has unique diamond pattern, which is the combination of softness and aesthetics. The materials of wrist rest are improved into higher quality memory foam and covered with silky smooth lycra. The computer wrist rest makes you as comfortable and cushiony as like rest your wrists on clouds.
  • 【Ergonomic Wrist Saver】The wrist rests for keyboard and mouse comes with a 17.32×3.15×0.83 inch keyboard wrist pad and a 5.94×3.15×0.83 inch mouse wrist support. Based on ergonomic design, the unique concave shape is the perfect fit for your wrist joints. The wrist rest pad fits most computer keyboards and laptops, improve hand and wrist posture, release your wrist and arm stress.
  • 【Non-Slip Rubber Bottom】Featuring an anti-skid silicone base on the bottom, this wrist keyboard support stays firmly in place on your desk, preventing the padding from sliding around, ensuring stable and consistent wrist support during extended computer sessions.
  • 【Better Experience & Pain Relief】Our keyboard arm rest is beneficial to alleviate the soreness caused by direct contact and friction between your arm and a hard desk surface, reducing the risk of wrist fatigue or carpal tunnel. The soft texture of memory foam can evenly distribute the pressure around your wrists and provide good support with just enough give.
  • 【Helpful in Multiple Scenarios】Whether you're working, studying, writing, typing, gaming, this keyboard and mouse rest combo is an essential accessory to add comfort and support to your hands and wrists. It’s also a great gift for men, women, family, friend, coworker, gamer, teacher, etc.
from qiskit import QuantumCircuit, QuantumRegister, ClassicalRegister, transpile
from qiskit_aer import AerSimulator

q = QuantumRegister(3, 'q')
m0 = ClassicalRegister(1, 'm0')
m1 = ClassicalRegister(1, 'm1')
verify = ClassicalRegister(1, 'verify')
qc = QuantumCircuit(q, m0, m1, verify)

theta = 0.7
phi = 1.1

# Known input state on q0
qc.ry(theta, q[0])
qc.rz(phi, q[0])

# Bell pair shared by Alice (q1) and Bob (q2)
qc.h(q[1])
qc.cx(q[1], q[2])

# Alice's Bell-basis measurement
qc.cx(q[0], q[1])
qc.h(q[0])
qc.measure(q[0], m0[0])
qc.measure(q[1], m1[0])

# IBM-example mapping for this register layout
with qc.if_test((m0, 1)):
    qc.z(q[2])
with qc.if_test((m1, 1)):
    qc.x(q[2])

# Verification only: undo the known input preparation on Bob's qubit
qc.rz(-phi, q[2])
qc.ry(-theta, q[2])
qc.measure(q[2], verify[0])

simulator = AerSimulator()
compiled = transpile(qc, simulator)
result = simulator.run(compiled, shots=1024).result()
counts = result.get_counts()
print(counts)

Qiskit may print keys containing several classical-register fields, with spacing or ordering determined by the register layout. Do not judge success by looking for one memorized key string. Identify the field corresponding to verify and confirm that its value is 0 in every counted outcome. Alice’s m0 and m1 values should vary across runs; their variation is normal and does not indicate failure.

How the correction mapping works

Before correction, Bob’s qubit is one of four related versions of the input state. Alice’s two bits select the version. One bit indicates whether a bit flip is needed, represented by X; the other indicates whether a phase flip is needed, represented by Z. If both bits are 1, both corrections are applied.

There is no universal visual rule such as “the leftmost printed bit always controls X.” Qiskit displays classical bits according to register and string conventions, while circuit diagrams often draw q0 at the top and concatenate registers in another order. In the example, q0 is measured into m0 and q1 into m1, and the explicit conditions are Z-on-m0 and X-on-m1. If you instead use one two-bit register, verify whether the integer condition 1 refers to the least-significant bit and whether your framework’s displayed bit string reverses the register order. A correct protocol with a mismatched condition silently produces the wrong state, so this mapping check is the most important debugging step.

Verifying teleportation with shots

Why inverse preparation is a strong test

Directly comparing two arbitrary quantum states is not possible with one measurement. Because the test input is known, you can apply its inverse to Bob’s qubit. Correct teleportation followed by the inverse gives the definite state |0⟩, making a simple computational-basis measurement decisive in the ideal case.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  • All verification shots should report verify = 0 in an ideal, noiseless simulator.
  • The two Alice bits can be 00, 01, 10, or 11; their distribution is not itself the success criterion.
  • A nonzero verification result indicates a circuit, mapping, simulator, or noise problem rather than a new teleportation outcome.

Testing simpler inputs first

If the rotation example fails, replace it temporarily with a single familiar preparation such as qc.h(q[0]) and use qc.h(q[2]) for the inverse test. You can also test |0⟩ by omitting input preparation; in that case the inverse is empty. Once those cases pass, restore the two-rotation state. This isolates correction and register-order errors from mistakes in manually constructing the inverse.

Best Value
Sale
Under Desk Cable Management Tray No Drill, Metal Mesh Cable Management Under Desk with Clamp Mount, 2 Hole Cable Tray with Wire Management and Cord Organizer for Home Office Standing Desk
  • 【No Drill Mounted】Cable management tray can be assembled in as little as 3 minutes or less-simply. Side clips easily clampe the edge of desk, pass through the holes on the sides, and secure excess cables with baskets. Desk cable management supports inward or outward installation to meet your needs in different scenarios, and provides you with great convenience when collecting and organizing wires.
  • 【Rubber Pad Protects Desk】Wire organizer under desk built-in soft rubber pads on the clamp protect your desk from scratches, so you will not damage your furniture or office.
  • 【Sturdy and Beautiful】Cord management under desk is made of high-quality carbon steel and holds about 15 lbs. The wire basket has 2 holes on each side of the tray to enable your cables to pass freely. Cable baskets are suitable for desk thickness use from 0.4" to 2.4".
  • 【Space Saving & Keep Organized】Desk cable management tray holds all your power cords, outlet strips, USB hubs and computer transformers hidden from your feet, and the data cables will not enter the vacuum cleaner to keep your desk clean and tidy. Desk wire organizer is also suitable for use in the kitchen and outdoors.
  • 【Reduce Safety Risks】Cable tray under desk keeps all plugs away from your kids, no more worry about tripping. Using 2 holes wire tray saves extra space, helps you easily cabling and wire protection. The mesh design is not easy to accumulate dust, but avoids safety accidents caused by messy wires.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Statevector simulation versus shot-based simulation

Method What it shows Best use Limitation
Statevector simulation Complex amplitudes of the ideal quantum state Inspecting superposition and entanglement without sampling noise Measurements collapse the state, and the output is less intuitive for a protocol that includes classical feed-forward
Shot-based simulation Repeated measurement samples and counts Running the complete measure, communicate, correct, and verify workflow Counts are statistical samples, so finite-shot histograms need not look perfectly uniform

A statevector view is useful for learning what the Bell pair and intermediate transformations do. For the end-to-end beginner check, the shot-based circuit with inverse-preparation verification is usually clearer: inspect the verification bit and expect zero in the noiseless case.

Troubleshooting failures

Verification is sometimes 1

  • Check the correction mapping first. Confirm that q0 was measured into m0 and q1 into m1, then confirm that your conditional gates match that convention.
  • Check inverse order. The inverse of ry(theta) followed by rz(phi) is rz(-phi) followed by ry(-theta) when written as circuit operations.
  • Check classical-register conditions. A condition on a two-bit register tests its encoded integer value, not necessarily “this individual bit equals 1.” Separate one-bit registers avoid that ambiguity.
  • Check that measurements occur before feed-forward. Bob’s corrections must be classically conditioned on Alice’s measured bits.

The program fails at if_test or c_if

Dynamic-circuit APIs differ between Qiskit releases. Use the conditional-control syntax supported by your installed version, but preserve the same logical conditions. If your version uses c_if, attach each condition to the appropriate one-bit classical register rather than guessing at a packed-register integer. Compile after adding the conditional operations so the simulator can validate the circuit.

The output keys look reversed

Multiple classical registers are commonly displayed in an order that differs from the order in which you read them. Name the registers, inspect the circuit diagram, and decode the key by register rather than assuming the leftmost character is m0. The physical protocol is unaffected by display order; only your interpretation and conditional code must agree.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Results are noisy on a real processor

A simulator with ideal gates is not a hardware benchmark. Real processors introduce gate, readout, and coherence errors, and their control software must support mid-circuit measurement and real-time conditional operations. A hardware result can therefore contain nonzero verification counts even when the circuit logic is correct. Hardware outcomes depend on the selected device, calibration, transpilation, and run conditions; do not treat a single tutorial run as a general accuracy statistic.

What this experiment proves—and what it does not

  • It demonstrates that an unknown quantum state can be reconstructed at Bob’s location using a pre-shared entangled pair plus two classical bits.
  • It does not transmit a physical object from Alice to Bob.
  • It does not create a second copy of the input state. Alice’s original is disturbed by measurement.
  • It does not eliminate the classical communication delay. Bob cannot choose the correct operation before receiving Alice’s results.
  • It does not require a quantum computer for the first demonstration; an ideal simulator is enough to validate the gate sequence.

Adapting the circuit to an unknown input

In a real protocol, Alice need not know the amplitudes of q0. The teleportation gates and measurements are unchanged. What changes is the verification method: Alice and Bob cannot apply an inverse-preparation circuit they do not know. Instead, experiments use state tomography, randomized measurements, or comparisons against a separately prepared reference state. For a beginner simulator, a known preparation remains preferable because it turns success into a direct 0/1 measurement test.

A practical checklist

  1. Allocate exactly three qubits and at least two classical measurement bits.
  2. Record the role of every qubit and classical bit before writing conditions.
  3. Prepare a known input state on q0.
  4. Create the Bell pair with H on q1 and CNOT q1 to q2.
  5. Apply CNOT q0 to q1, then H on q0.
  6. Measure q0 and q1 into explicitly named classical bits.
  7. Apply the X and Z corrections according to your actual bit mapping; in the example, Z is controlled by m0 and X by m1.
  8. For testing only, apply the exact inverse input preparation to q2.
  9. Run enough shots to see stable counts and inspect the verification bit, not just the printed key order.
  10. If moving to hardware, expect noise and confirm that the platform supports dynamic feed-forward.

Following this sequence gives a complete three-qubit teleportation demonstration while keeping the essential distinction clear: entanglement supplies the quantum resource, classical bits select the correction, and the simulator’s zero verification result confirms that Bob received the prepared state.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.