code

Run Settings
LanguagePython
Language Version
Run Command
from qiskit import QuantumCircuit, execute, Aer # Set up a simple 2 qubit circuit qc = QuantumCircuit(2) # Apply a Hadamard gate to the first qubit qc.h(0) # Entangle the two qubits qc.cx(0, 1) # Measure both qubits qc.measure_all() # Simulate the circuit backend = Aer.get_backend('qasm_simulator') result = execute(qc, backend, shots=1024).result() counts = result.get_counts(qc) print(counts)
Editor Settings
Theme
Key bindings
Full width
Lines