We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PlacementPass
SquareGrid
Benny and I found this by running a randomly generated circuit through the compiler.
Recreate with:
from pytket import Circuit from pytket.architecture import SquareGrid from pytket.passes import NaivePlacementPass from pytket.extensions.qiskit import AerBackend backend = AerBackend() subcirc_4 = Circuit(2, "subcirc_4") a = SquareGrid(subcirc_4.n_qubits, 1) NaivePlacementPass(a).apply(subcirc_4) no_pass_circ = backend.get_compiled_circuit(subcirc_4, optimisation_level=0) counts_no_pass = backend.run_circuit(no_pass_circ, 1).get_counts()
Results in:
[q[0], q[1]] [gridNode[0, 0, 0], gridNode[1, 0, 0]] NotImplementedError: Qiskit registers must use a single index
This is because routing on square grid creates indices with 3 dimensions, which won't work and throw a NotImplementedError as shown here.
NotImplementedError
This also limits users from using the feature where you can define qubit indices more than one dimension.
from pytket import Circuit, Qubit from pytket.architecture import SquareGrid from pytket.passes import NaivePlacementPass from pytket.extensions.qiskit import AerBackend backend = AerBackend() subcirc_4 = Circuit(2, "subcirc_4") subcirc_4.add_qubit(Qubit("qw", [0, 1])) print(subcirc_4.qubits) no_pass_circ = backend.get_compiled_circuit(subcirc_4, optimisation_level=0) counts_no_pass = backend.run_circuit(no_pass_circ, 1).get_counts()
Although this isn't really a RunTime error, this limitation isn't stated in documentation as far as we can tell.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Benny and I found this by running a randomly generated circuit through the compiler.
Recreate with:
Results in:
This is because routing on square grid creates indices with 3 dimensions, which won't work and throw a
NotImplementedError
as shown here.This also limits users from using the feature where you can define qubit indices more than one dimension.
Although this isn't really a RunTime error, this limitation isn't stated in documentation as far as we can tell.
The text was updated successfully, but these errors were encountered: