# Why is circuit inverse not working for EfficientSU2?

For some reason I get the following error when attempting to find the inverse of the EfficientSU2 VQE variational form:

TypeError: 'NoneType' object is not reversible

My code is as follows:

var_form = EfficientSU2(6, entanglement="linear")
var_form_inv = var_form.inverse() # error thrown of this line


Is there a bug in the implementation of the inverse method? and if so how can I implement a working inverse function?

Note qiskit.__qiskit_version__:

{'qiskit-terra': '0.15.2',
'qiskit-aer': '0.6.1',
'qiskit-ignis': '0.4.0',
'qiskit-ibmq-provider': '0.9.0',
'qiskit-aqua': '0.7.5',
'qiskit': '0.21.0'}

• Could you open an issue for that on Qiskit Terra's GitHub? That should be fixed soon! – Cryoris Sep 28 at 9:35

## 1 Answer

EfficientSU2 is a BlueprintCircuit and does not populates its internal data field until you try to access them.

In this case, when you are calling the inverse function the data are still empty (None) and this is the error you are getting. It is probably a bug and should be fixed.

Nevertheless, as a workaround for now you can try:

var_form = EfficientSU2(6, entanglement="linear")
# build the circuit
var_form._build()
# or just print it
print(var_form)
var_form_inv = var_form.inverse()