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

Easier compilation to discrete basis sets #13695

Open
Cryoris opened this issue Jan 20, 2025 · 1 comment
Open

Easier compilation to discrete basis sets #13695

Cryoris opened this issue Jan 20, 2025 · 1 comment
Labels
type: feature request New feature or request

Comments

@Cryoris
Copy link
Contributor

Cryoris commented Jan 20, 2025

What should we add?

From discussions with @alexanderivrii: It would be nice if we could detect a discrete basis set in transpile or the preset PMs and then use a discrete basis synthesis, like the Solovay-Kitaev algorithm (or others in the future). Something like

transpile(circuit, basis_gates=["h", "t", "tdg", "cx"], translation_method="synthesis")

One way to do this could be to write a default plugin for discrete basis that takes n-qubits unitaries to U + {2q-gates in the basis gates} (e.g. using the existing unitary synthesis workflow) and then uses the Solovay-Kitaev algorithm to decompose the 1-qubit U gates.

It would be even nicer to skip the translation_method="synthesis" argument, but that might be necessary to distinguish the command from trying to use the basis translator (alternatively, we could auto-select based on the basis gates and users can force a behavior by setting this arg).

@Cryoris Cryoris added the type: feature request New feature or request label Jan 20, 2025
@jakelishman
Copy link
Member

imo we should:

  • introduce a new translation_method="default" plugin, so we're not tying the default to a concrete implementation, and we can have "default" include this circuit-based dispatch
  • consider if we'll eventually need a whole other pipeline for discrete optimisation - it's going to matter a lot more when we need to target EC backends, and our current pipeline is pretty heavily assumed to be targetting a continuous basis.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature request New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants