Mapping quantum algorithms in a crossbar architecture