W State Preparation and Measurement

c62e9c8b-83b4-41b8-9e7d-3ed539b57b63
3.0
Description

This quantum circuit prepares a W state across three qubits and then measures them.

Qiskit Circuit Code
Python
```python
from qiskit import *
import numpy as np

# Create circuit with 3 qubits and 3 classical bits
qc = QuantumCircuit(3, 3)

# Prepare a W state across qubits 0, 1, and 2
theta = 2 * np.arccos(1 / np.sqrt(3))  # θ = 2 * arccos(1/√3)

qc.ry(theta, 2)         # Apply Ry(θ) to qubit 2
qc.cx(2, 1)             # Apply CNOT with control qubit 2 and target qubit 1
qc.ry(np.pi/2, 1)       # Apply Ry(π/2) to qubit 1
qc.cx(1, 0)             # Apply CNOT with control qubit 1 and target qubit 0

# Measure all qubits
qc.measure([0, 1, 2], [0, 1, 2])
```
Quantum Execution Results
ibm_kyiv
N/A
N/A shots
Execution Notice:

'Failed to run program: \'409 Client Error: Conflict for url: https://api.quantum.ibm.com/runtime/jobs. {"errors":[{"message":"You have reached the limit of 3 pending jobs. Please wait for a job to complete or cancel one before submitting anything new.","code":3458,"solution":"Wait until some previous jobs were finished. You can cancel pending jobs to run new jobs.","more_info":"https://docs.quantum-computing.ibm.com/errors"}]}\''

Raw Result Data
Download Results
Back to Home