Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
GHZ quantum circuit in Qiskit.

A GHZ quantum circuit is a quantum computing system that includes 3 entangled qubits.

A Greenberger–Horne–Zeilinger state (GHZ state) is a certain type of entangled quantum state that involves at least three subsystems.

Demo in IBM Quantum Composer.

def ghz():
Create a GHZ (entangled 3-qubit system) quantum circuit.
qc = QuantumCircuit(3)
qc.h(0), 1), 2)
job = qiskit.execute(qc, qiskit.BasicAer.get_backend('qasm_simulator'), shots=1000)
{'000': 481, '111': 519}

This comment has been minimized.

Copy link
Owner Author

@primaryobjects primaryobjects commented Aug 5, 2021


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment