Skip to content

Unable to use delay instruction in quantum circuit #36

Open
@pranavm1502

Description

I want to add a delay instruction in the Qiskit circuit as shown in the code below adapted from the tutorial. However I get the following error -

RPCError: Unhandled error in host program:
Found unknown gate application 'delay'.

Code to be run:

from qiskit import (
    QuantumCircuit,
    QuantumRegister,
    ClassicalRegister,
    execute
)
from qiskit_rigetti import RigettiQCSProvider


provider = RigettiQCSProvider()
backend = provider.get_simulator(num_qubits=2, noisy=True)  # or provider.get_backend(name="Aspen-9") when running via QCS


circuit = QuantumCircuit(QuantumRegister(2, "q"), ClassicalRegister(2, "ro"))
circuit.h(0)
circuit.cx(0, 1)
circuit.delay(16,qarg=0)
circuit.measure([0, 1], [0, 1])
circuit.draw()


job = execute(circuit, backend, shots=1000)
result = job.result()
counts = result.get_counts()
print("Counts for experiment:", counts)

IIUC, I think this is being caused because QUIL uses WAIT instead of DELAY. Maybe this could be fixed by using string replacement in the QASM string. What do you think?

Activity

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

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions