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

use faster aqc objective function evaluation by default #11479

Merged
merged 3 commits into from
Jan 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 4 additions & 2 deletions qiskit/transpiler/synthesis/aqc/aqc_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,9 @@ def run(self, unitary, **options):
from qiskit.transpiler.synthesis.aqc.aqc import AQC
from qiskit.transpiler.synthesis.aqc.cnot_structures import make_cnot_network
from qiskit.transpiler.synthesis.aqc.cnot_unit_circuit import CNOTUnitCircuit
from qiskit.transpiler.synthesis.aqc.cnot_unit_objective import DefaultCNOTUnitObjective
from qiskit.transpiler.synthesis.aqc.fast_gradient.fast_gradient import (
FastCNOTUnitObjective,
)

num_qubits = int(round(np.log2(unitary.shape[0])))

Expand All @@ -132,7 +134,7 @@ def run(self, unitary, **options):
aqc = AQC(optimizer, seed)

approximate_circuit = CNOTUnitCircuit(num_qubits=num_qubits, cnots=cnots)
approximating_objective = DefaultCNOTUnitObjective(num_qubits=num_qubits, cnots=cnots)
approximating_objective = FastCNOTUnitObjective(num_qubits=num_qubits, cnots=cnots)

initial_point = config.get("initial_point")
aqc.compile_unitary(
Expand Down
5 changes: 5 additions & 0 deletions releasenotes/notes/aqc-faster-default-8d47c88fefd1b6f6.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
features:
- |
The AQC unitary synthesis plugin method now uses a faster objective function
evaluation by default, which results in substantial improvement in synthesis time.