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

[ENH] specify circuit name for transpiler output #2745

Closed
ajavadia opened this issue Jul 5, 2019 · 1 comment
Closed

[ENH] specify circuit name for transpiler output #2745

ajavadia opened this issue Jul 5, 2019 · 1 comment
Labels
good first issue Good for newcomers status: pending PR It has one or more PRs pending to solve this issue

Comments

@ajavadia
Copy link
Member

ajavadia commented Jul 5, 2019

new_circuit = transpile(circuit) will return a new circuit, but with the same name as the original circuit. It is convenient if an option existed for specifying the output circuit's name.

This would be handy for example when:

# experiment transpiling the same circuit to 5 different initial layouts
new_circuits = transpile(
    [circ]*5, 
    backend=FakeMelbourne(),
    initial_layout=[[0,1,3], [1,5,6], [5,6,9], [7,4,1], [9,0,8]],
    output_names=['circ_0_1_3', 'circ_1_5_6', 'circ_5_6_9', 'circ_7_4_1', 'circ_9_0_8'])

Currently the output is a list of 5 circuits, all named the same.

@maddy-tod maddy-tod added the good first issue Good for newcomers label Jul 9, 2019
@ajavadia ajavadia added the status: pending PR It has one or more PRs pending to solve this issue label Jul 22, 2019
kdk pushed a commit that referenced this issue Jul 31, 2019
* added naming option for outputs of transpile function

* adding naming options for output circuits of transpiler function

* fixed naming functionality and added corresponding test

* more fixes for naming functionality and corresponding test file

* styling issues fixed

* copyright

* test prefix

* this test makes little sense

* backendie -> backend

* short description of tests

* setup

* sinmple circuits

* removed some redundant return statements and fixed iterator index

* iteration

* format
@maddy-tod
Copy link
Contributor

Closed by #2789

faisaldebouni pushed a commit to faisaldebouni/qiskit-terra that referenced this issue Aug 5, 2020
* added naming option for outputs of transpile function

* adding naming options for output circuits of transpiler function

* fixed naming functionality and added corresponding test

* more fixes for naming functionality and corresponding test file

* styling issues fixed

* copyright

* test prefix

* this test makes little sense

* backendie -> backend

* short description of tests

* setup

* sinmple circuits

* removed some redundant return statements and fixed iterator index

* iteration

* format
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers status: pending PR It has one or more PRs pending to solve this issue
Projects
None yet
Development

No branches or pull requests

2 participants