Only a subset of multi-qubit gates are supported in the simulator, causing custom multi-qubit operations to fail.
bell = Circuit(2)
with bell.context as (q, c):
ops.Hadamard(q[0])
ops.CNOT(q[0], q[1])
Bell = create_operation(bell, "Bell")
circuit = Circuit(2)
with circuit.context as (q, c):
Bell(q)
raises
simulator encountered unknown multi-qubit operation: Bell
Two potential solutions are:
- Add support for arbitrary unitaries in the simulator.
- Automatically decompose custom gates before running them on the simulator.