Closed kevinsung closed 4 years ago
I think this also falls under the purview of "we need to improve the serialization format". The simulator should presumably be happy to take arbitrary qubits. Even if we don't understand the user's qubit type we can rewrite into line qubits.
For hardware it might make sense to take line qubits and auto-lay them, but otherwise I agree that it should be force to grid qubit.
This should be done for the simulator.
I tried to run the following code through Quantum Engine:
and got
Maybe it makes sense to force the user to convert all their qubits to GridQubit, I don't know. I feel like my example should run, at least on the simulator.
google/programs.py
has lines likewhere we cast
q
to a GridQubit. Shouldn't we instead just change the type annotation from QubitId to GridQubit?