Weighted Graph State Generation

c236a920-10f0-4986-bebc-9a95f89f189b
3.0
Description

This quantum circuit prepares a weighted graph state by applying Hadamard gates and controlled-phase gates with variable phases to 4 qubits.

Qiskit Circuit Code
Python
```python
from qiskit import QuantumCircuit
import math

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

# Initialize all qubits to the |+⟩ state
qc.h([0, 1, 2, 3])

# Apply controlled-phase gates with variable phases to create a weighted graph state
theta1 = math.pi / 3  # Phase between qubits 0 and 1
theta2 = math.pi / 2  # Phase between qubits 1 and 2
theta3 = math.pi / 4  # Phase between qubits 2 and 3
theta4 = math.pi / 6  # Phase between qubits 3 and 0

qc.cp(theta1, 0, 1)
qc.cp(theta2, 1, 2)
qc.cp(theta3, 2, 3)
qc.cp(theta4, 3, 0)

# Measure all qubits
qc.measure([0, 1, 2, 3], [0, 1, 2, 3])
```
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