1
$\begingroup$

I'm trying to use qiskit_aer_gpu 0.14.2 with qiskit 1.1.0

I defined the class CCRYGate() y another script gate.py

from qiskit_aer import AerSimulator

def simulate_circuit(circuit, shots=1024, *args, **kwargs):
    if 'backend' in kwargs.keys():
        backend = kwargs.pop('backend')
    else:
        backend = AerSimulator()
    job = backend.run(circuit)
    
    return job.result()

But im obtain : qiskit_aer.aererror.AerError: 'unknown instruction: ccry' thank!

$\endgroup$

1 Answer 1

2
$\begingroup$

This is because the Aer simulator does not directly support certain custom or advanced instructions.

Make sure to transpile your circuit before running it.

from qiskit import transpile
    
circuit_t = transpile(circuit,backend)
job = backend.run(circuit_t)
$\endgroup$

Not the answer you're looking for? Browse other questions tagged or ask your own question.