def METHOD_NAME(self):
    """test that an error is thrown if the method `qasm` is called."""
    matrix = np.zeros((2, 2))
    hamiltonian_gate = HamiltonianGate(data=matrix, time=1)
    with self.assertRaises(ExtensionError):
        with self.assertWarns(DeprecationWarning):
            hamiltonian_gate.qasm()