I want to use the BasisTranslator in Qiskit to process my circuit to base gates.
One of the constructor parameters for BasisTranslator is EquivalenceLibrary. I attempted creating a parameter-less EquivalenceLibrary()
and pass it to a BasisTranslator, but the code fails, saying it cannot translate gates like MCT or CCX into the default basis.
TranspilerError: "Unable to map source basis {('mcx', 4), ('ccx', 3), ('x', 1), ('measure', 1), ('h', 1)} to target basis {'u2', 'snapshot', 'barrier', 'cx', 'u3', 'reset', 'u1', 'measure', 'delay'}
I would expect there is some default EquivalenceLibrary that the Transpiler uses when I attempt to run the circuit, since it runs both for simulators and actual hardware. How could I get such default EquivalenceLibrary?