// Import necessary modules
import qiskit as q
// Set up quantum circuit
qc = q.QuantumCircuit(2, 2)
// Create Bell state
qc.h(0)
qc.cx(0, 1)
// Measure qubits
qc.measure([0, 1], [0, 1])
// Execute the circuit
backend = q.Aer.get_backend('qasm_simulator')
result = q.execute(qc, backend=backend, shots=1024).result()
// Print the results
counts = result.get_counts()
print(counts)
Tidak ada komentar:
Posting Komentar