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

Add optimization_level=0 to transpiler for compiling dynamic circuits #2000

Merged
merged 1 commit into from
Nov 20, 2023
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion qiskit_aer/backends/aer_compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,9 @@ def compile(self, circuits, basis_gates=None, optypes=None):
circuit = self._inline_initialize(circuit, compiled_optypes[idx])
if self._is_dynamic(circuit, compiled_optypes[idx]):
compiled_circ = transpile(
self._inline_circuit(circuit, None, None), basis_gates=basis_gates
self._inline_circuit(circuit, None, None),
basis_gates=basis_gates,
optimization_level=0,
)
compiled_circuits.append(compiled_circ)
# Recompute optype for compiled circuit
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
fixes:
- |
For dynamic circuits, aer_compiler calls transpiler without optimizaiton
level. Because id gates are removed by transpiler, noise applied id gates
did not work correctly. This fix adds optimization_level=0 not to remove
id gates of dynamic circuits
Loading