Using Gate-Model Solvers#
Guidance and best practices for using gate-model solvers.
Parameters of the gate-model simulator.
Submitting QCDL programs to the gate-model simulator.
Example#
The following example creates a Bell state circuit, producing a QCDL program that is passed to a gate-model simulator in the Leap service:
from dwave.gate.leap import LeapQCDLSimulator
from dwave.gate.qcdl import qcdl
from dwave.gate.qcdl.operations import cx, h, measure
@qcdl(num_qubits=2)
def qcdl_program(q0, q1):
h(q0) # Hadamard gate on q0
cx(q0, q1) # CNOT with q0 as control, q1 as target
measure(q0)
measure(q1)
# Submit to a gate-model simulator
simulator = LeapQCDLSimulator()
future = simulator.run(qcdl_program, shots=3)
result = future.result().result