From f7c25704cfbc215a07a4695b916cf4a4057aec0d Mon Sep 17 00:00:00 2001 From: Jun Doi Date: Thu, 30 May 2024 18:14:17 +0900 Subject: [PATCH] Move delay gate to custom instructions (#2153) --- qiskit_aer/backends/aer_simulator.py | 8 ++++++++ qiskit_aer/backends/backend_utils.py | 8 -------- .../add_delay_custom_instructions-e1bf80ec3598bfd1.yaml | 6 ++++++ 3 files changed, 14 insertions(+), 8 deletions(-) create mode 100644 releasenotes/notes/add_delay_custom_instructions-e1bf80ec3598bfd1.yaml diff --git a/qiskit_aer/backends/aer_simulator.py b/qiskit_aer/backends/aer_simulator.py index fbaae948f0..e1676ce61a 100644 --- a/qiskit_aer/backends/aer_simulator.py +++ b/qiskit_aer/backends/aer_simulator.py @@ -525,6 +525,7 @@ class AerSimulator(AerBackend): "continue_loop", "reset", "switch_case", + "delay", ] ), "density_matrix": sorted( @@ -549,6 +550,7 @@ class AerSimulator(AerBackend): "continue_loop", "reset", "switch_case", + "delay", ] ), "matrix_product_state": sorted( @@ -575,6 +577,7 @@ class AerSimulator(AerBackend): "continue_loop", "reset", "switch_case", + "delay", ] ), "stabilizer": sorted( @@ -598,6 +601,7 @@ class AerSimulator(AerBackend): "continue_loop", "reset", "switch_case", + "delay", ] ), "extended_stabilizer": sorted( @@ -607,6 +611,7 @@ class AerSimulator(AerBackend): "roerror", "save_statevector", "reset", + "delay", ] ), "unitary": sorted( @@ -615,6 +620,7 @@ class AerSimulator(AerBackend): "save_unitary", "set_unitary", "reset", + "delay", ] ), "superop": sorted( @@ -627,6 +633,7 @@ class AerSimulator(AerBackend): "save_superop", "set_superop", "reset", + "delay", ] ), "tensor_network": sorted( @@ -650,6 +657,7 @@ class AerSimulator(AerBackend): "set_density_matrix", "reset", "switch_case", + "delay", ] ), } diff --git a/qiskit_aer/backends/backend_utils.py b/qiskit_aer/backends/backend_utils.py index 66d165d41c..a030578b6c 100644 --- a/qiskit_aer/backends/backend_utils.py +++ b/qiskit_aer/backends/backend_utils.py @@ -114,7 +114,6 @@ "diagonal", "multiplexer", "initialize", - "delay", "pauli", "mcx_gray", "ecr", @@ -155,7 +154,6 @@ "ccx", "unitary", "diagonal", - "delay", "pauli", "ecr", ] @@ -186,7 +184,6 @@ "ccx", "unitary", "roerror", - "delay", "pauli", "r", "rx", @@ -218,7 +215,6 @@ "cy", "cz", "swap", - "delay", "pauli", "ecr", "rz", @@ -245,7 +241,6 @@ "p", "ccx", "ccz", - "delay", "pauli", "ecr", "rz", @@ -311,7 +306,6 @@ "unitary", "diagonal", "multiplexer", - "delay", "pauli", "ecr", ] @@ -351,7 +345,6 @@ "ccx", "unitary", "diagonal", - "delay", "pauli", ] ), @@ -416,7 +409,6 @@ "diagonal", "multiplexer", "initialize", - "delay", "pauli", "mcx_gray", "ecr", diff --git a/releasenotes/notes/add_delay_custom_instructions-e1bf80ec3598bfd1.yaml b/releasenotes/notes/add_delay_custom_instructions-e1bf80ec3598bfd1.yaml new file mode 100644 index 0000000000..7a146ce77b --- /dev/null +++ b/releasenotes/notes/add_delay_custom_instructions-e1bf80ec3598bfd1.yaml @@ -0,0 +1,6 @@ +--- +fixes: + - | + Add/move `delay` gate to default custom instructions for `AerSimulator.configulation` + to resolve error reported in issue #2152, `delay` was not in `basis_gates` + when AerSimulator is made by `from_backend`