Skip to content

Allow passing Target as backend argument in transpile()#16000

Open
lschleck24 wants to merge 1 commit intoQiskit:mainfrom
lschleck24:fix/is-unitary-tolerance
Open

Allow passing Target as backend argument in transpile()#16000
lschleck24 wants to merge 1 commit intoQiskit:mainfrom
lschleck24:fix/is-unitary-tolerance

Conversation

@lschleck24
Copy link
Copy Markdown

Fixes #15066

When a Target is passed as the second positional argument to transpile(), it is now automatically treated as the target argument instead of backend. A TypeError is raised if both are specified simultaneously.

This makes transpile() consistent with generate_preset_pass_manager() which already supports this behavior.

@lschleck24 lschleck24 requested a review from a team as a code owner April 11, 2026 02:28
@qiskit-bot qiskit-bot added the Community PR PRs from contributors that are not 'members' of the Qiskit repo label Apr 11, 2026
@qiskit-bot
Copy link
Copy Markdown
Collaborator

Thank you for opening a new pull request.

Before your PR can be merged it will first need to pass continuous integration tests and be reviewed. Sometimes the review process can be slow, so please be patient.

While you're waiting, please feel free to review other open PRs. While only a subset of people are authorized to approve pull requests for merging, everyone is encouraged to review open pull requests. Doing reviews helps reduce the burden on the core team and helps make the project's code better for everyone.

One or more of the following people are relevant to this code:

  • @Qiskit/terra-core

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Apr 11, 2026

CLA assistant check
All committers have signed the CLA.

@CLAassistant
Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Community PR PRs from contributors that are not 'members' of the Qiskit repo

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

Make transpile accept a Target as the backend argument

3 participants