Skip to content

Instantly share code, notes, and snippets.

@willzeng
Created December 17, 2017 03:21
Show Gist options
  • Select an option

  • Save willzeng/8c20ecfe5da76b01f9bbf55e4a72e3fd to your computer and use it in GitHub Desktop.

Select an option

Save willzeng/8c20ecfe5da76b01f9bbf55e4a72e3fd to your computer and use it in GitHub Desktop.
from pyquil.quil import Program
from pyquil.api import QPUConnection
from pyquil.gates import H, CNOT
qpu = QPUConnection(device_name='19Q-Acorn')
bell_state = Program(H(0), CNOT(0, 1))
result = qpu.run_and_measure(bell_state, [0, 1])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment