Skip to content

Commit

Permalink
Add reset gate
Browse files Browse the repository at this point in the history
  • Loading branch information
hitomitak committed Jul 20, 2023
1 parent 2ff6c09 commit 67232e4
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 1 deletion.
27 changes: 26 additions & 1 deletion qiskit_aer/backends/aerbackend.py
Original file line number Diff line number Diff line change
Expand Up @@ -348,12 +348,37 @@ def max_circuits(self):

@property
def target(self):
self.set_option("basis_gates", self.configuration().basis_gates + ["reset"])
self._target = convert_to_target(
self.configuration(), self.properties(), self.defaults(), self._mapping
)
return self._target

@property
def dtm(self):
if hasattr(self.configuration(), "dtm"):
return self.configuration().dtm
else:
return None

@property
def meas_map(self):
if hasattr(self.configuration(), "meas_map"):
return self.configuration().meas_map
else:
return None

def acquire_channel(self):
return None

def control_channel(self):
return None

def drive_channel(self):
return None

def measure_channel(self):
return None

@classmethod
def _default_options(cls):
pass
Expand Down
8 changes: 8 additions & 0 deletions qiskit_aer/backends/backend_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@
"pauli",
"mcx_gray",
"ecr",
"reset",
]
),
"density_matrix": sorted(
Expand Down Expand Up @@ -149,6 +150,7 @@
"delay",
"pauli",
"ecr",
"reset",
]
),
"matrix_product_state": sorted(
Expand Down Expand Up @@ -191,6 +193,7 @@
"cswap",
"diagonal",
"initialize",
"reset",
]
),
"stabilizer": sorted(
Expand All @@ -210,6 +213,7 @@
"swap",
"delay",
"pauli",
"reset",
]
),
"extended_stabilizer": sorted(
Expand All @@ -235,6 +239,7 @@
"ccz",
"delay",
"pauli",
"reset",
]
),
"unitary": sorted(
Expand Down Expand Up @@ -296,6 +301,7 @@
"delay",
"pauli",
"ecr",
"reset",
]
),
"superop": sorted(
Expand Down Expand Up @@ -335,6 +341,7 @@
"diagonal",
"delay",
"pauli",
"reset",
]
),
"tensor_network": sorted(
Expand Down Expand Up @@ -397,6 +404,7 @@
"delay",
"pauli",
"mcx_gray",
"reset",
]
),
}
Expand Down
1 change: 1 addition & 0 deletions qiskit_aer/backends/qasm_simulator.py
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,7 @@ class QasmSimulator(AerBackend):
"pauli",
"mcx_gray",
"ecr",
"reset",
]
)

Expand Down
1 change: 1 addition & 0 deletions qiskit_aer/backends/statevector_simulator.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,7 @@ class StatevectorSimulator(AerBackend):
"initialize",
"delay",
"pauli",
"reset",
]
),
"custom_instructions": sorted(
Expand Down
1 change: 1 addition & 0 deletions qiskit_aer/backends/unitary_simulator.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,7 @@ class UnitarySimulator(AerBackend):
"multiplexer",
"delay",
"pauli",
"reset",
]
),
"custom_instructions": sorted(["save_unitary", "save_state", "set_unitary"]),
Expand Down

0 comments on commit 67232e4

Please sign in to comment.