Skip to content

Commit

Permalink
use faster aqc objective function evaluation by default (Qiskit#11479)
Browse files Browse the repository at this point in the history
* use faster aqc objective function evaluation by default

* release note

* Update qiskit/transpiler/synthesis/aqc/aqc_plugin.py

Co-authored-by: Jake Lishman <[email protected]>

---------

Co-authored-by: Jake Lishman <[email protected]>
  • Loading branch information
ajavadia and jakelishman authored Jan 3, 2024
1 parent c15bea5 commit d4ef6c8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
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.

0 comments on commit d4ef6c8

Please sign in to comment.