Qiskit/qiskit-aer

`AerStatevector(QuantumVolume(1))` raises an error

hhorii opened this issue · 1 comments

Informations

  • Qiskit Aer version: 0.11.1
  • Python version: 3.8
  • Operating system: MacOS

What is the current behavior?

AerStatevector(QuantumVolume(1)) raises an error.
This is because QuantumVolume(1).data[0].operation.definition returns an empty QuantumCircuit, which return True with not operation.

Steps to reproduce the problem

from qiskit.circuit.library import QuantumVolume
from qiskit_aer.quantum_info.states import AerStatevector
state = AerStatevector(QuantumVolume(1))

What is the expected behavior?

No error.

Suggested solutions

This test expression should check == None.

This issue is reported by @derwind

#1643 resolved this.