Skip to content

Commit

Permalink
use faster aqc objective function evaluation by default
Browse files Browse the repository at this point in the history
  • Loading branch information
ajavadia committed Jan 2, 2024
1 parent a9b3881 commit 8255dd1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 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,7 @@ 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 +132,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

0 comments on commit 8255dd1

Please sign in to comment.