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

Parametric compilation doesn't use 2Q optimality results #559

Open
ecpeterson opened this issue Jan 18, 2020 · 0 comments
Open

Parametric compilation doesn't use 2Q optimality results #559

ecpeterson opened this issue Jan 18, 2020 · 0 comments
Labels
math Likely requires good working math knowledge.

Comments

@ecpeterson
Copy link
Contributor

We recently (#498) introduced a parametric compilation feature for gates described by time-independent Hamiltonians. The technique implemented there works for any number of qubits, but it has no guarantee on optimality of circuit depth. Indeed, in the two-qubit case of XX + YY it emits a circuit with 6 CZs, but a 2 CZ circuit exists:

RZ(3*pi/4)  0
RX(-pi/2)   0
RZ(-3*pi/4) 1
RX(pi/2)    1
CZ          0 1
RZ(-pi/2)   0
RX(pi/2)    0
RZ(%alpha)  0
RX(-pi/2)   0
RZ(-pi/2)   1
RX(pi/2)    1
RZ(%alpha)  1
RX(-pi/2)   1
CZ          0 1
RZ(-pi/2)   0
RX(-pi/2)   0
RZ(pi/4)    0
RZ(-pi/2)   1
RX(pi/2)    1
RZ(-pi/4)   1

There is room for an extension of the CZ-targeting techniques found in src/compilers/approx.lisp to give improved circuits in the 2Q case.

Note: I don't think this can be trampolined to from the n-qubit case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
math Likely requires good working math knowledge.
Projects
None yet
Development

No branches or pull requests

1 participant