pub fn import(py: Python) -> PyResult<Self> { let module = PyModule::import(py, "qiskit.circuit")?; Ok(Self { circuit: module .getattr("QuantumCircuit")? .downcast::<PyType>()? .into_py(py), qreg: module .getattr("QuantumRegister")? .downcast::<PyType>()? .into_py(py), ...
At Python interpreter run time, an instance of the OxidizedFinder meta path finder parses this data structure and uses it to power Python module importing.This functionality is similar to using a .zip file for holding Python modules. However, the Python packed resources data structure is far ...
called 'random.py' and the first code file tried to import 'random', the 'random.py' file in the same directory would be ignored and instead it would go off any use the 'random' module distributed with Python instead. With the new importer though it will look in the same directory fir...