Skip to content

Commit

Permalink
Update backend qubit property tests (#1745)
Browse files Browse the repository at this point in the history
  • Loading branch information
kt474 authored Jun 12, 2024
1 parent 1717bd8 commit cb1c506
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/integration/test_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,8 @@ def test_backend_fetch_all_qubit_properties(self):
"""Check retrieving properties of all qubits"""
if self.dependencies.channel == "ibm_cloud":
raise SkipTest("Cloud channel does not have instance.")
if not self.backend.properties():
raise SkipTest("Simulators and fake backends do not have qubit properties.")
num_qubits = self.backend.num_qubits
qubits = list(range(num_qubits))
qubit_properties = self.backend.qubit_properties(qubits)
Expand Down Expand Up @@ -277,6 +279,8 @@ def test_too_many_qubits_in_circuit(self):
"""Check error message if circuit contains more qubits than supported on the backend."""
if self.dependencies.channel == "ibm_cloud":
raise SkipTest("Cloud channel does not have instance.")
if not self.backend.properties():
raise SkipTest("Simulators and fake backends do not have qubit properties.")
num = len(self.backend.properties().qubits)
num_qubits = num + 1
circuit = QuantumCircuit(num_qubits, num_qubits)
Expand Down

0 comments on commit cb1c506

Please sign in to comment.