Skip to content
New issue

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

transpiled circuit layout refers to original circuit #3855

Closed
1ucian0 opened this issue Feb 17, 2020 · 1 comment
Closed

transpiled circuit layout refers to original circuit #3855

1ucian0 opened this issue Feb 17, 2020 · 1 comment
Labels
type: discussion type: enhancement It's working, but needs polishing

Comments

@1ucian0
Copy link
Member

1ucian0 commented Feb 17, 2020

A recent issue raised the problem of how confusing a transpiled circuit layout is. In other words, the result of transpiling circuit gives you a result_circuit in which result_circuit._layout is in the domain of circuit.

Should the transpiled circuit make the change to the flat register q or be kept in the original naming (holding the layout)?

@1ucian0 1ucian0 added type: enhancement It's working, but needs polishing type: discussion labels Feb 17, 2020
@jakelishman
Copy link
Member

The Layout linking the physical qubits of result_circuit to the virtual ones of circuit was always necessary, though it's unfortunate that Layout makes the physical qubits harder to work with in the output.

That said, the spirit of the problem should have been solved by #10835, so the TranspileLayout class that's now the public QuantumCircuit.layout field includes methods to get things like the initial layout suitable for recompilation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: discussion type: enhancement It's working, but needs polishing
Projects
None yet
Development

No branches or pull requests

2 participants