diff --git a/pennylane_qiskit/__init__.py b/pennylane_qiskit/__init__.py index 991b73d7..97808291 100644 --- a/pennylane_qiskit/__init__.py +++ b/pennylane_qiskit/__init__.py @@ -18,6 +18,6 @@ from .basic_aer import BasicAerDevice, BasicSimulatorDevice from .ibmq import IBMQDevice from .remote import RemoteDevice -from .converter import load, load_pauli_op, load_qasm, load_qasm_from_file +from .converter import load, load_pauli_op, load_qasm, load_qasm_from_file, load_noise_model from .runtime_devices import IBMQCircuitRunnerDevice from .runtime_devices import IBMQSamplerDevice diff --git a/pennylane_qiskit/converter.py b/pennylane_qiskit/converter.py index 7351622c..2177490d 100644 --- a/pennylane_qiskit/converter.py +++ b/pennylane_qiskit/converter.py @@ -1057,16 +1057,21 @@ def load_noise_model(noise_model, **kwargs) -> qml.NoiseModel: kwargs: Optional keyword arguments for conversion of the noise model. Keyword Arguments: + thermal_relaxation (bool): prefer conversion of ``QiskitErrors`` to thermal relaxation errors + over damping errors. Default is ``False``. gate_times (Dict[str, float]): gate times for building thermal relaxation error. - If not provided, the default value of ``1.0`` will be used for construction. - decimals (int): number of decimal places to round the Kraus matrices for errors to. - If not provided, the default value of ``10`` is used. - atol (float): the relative tolerance parameter. Default value is ``1e-05``. - rtol (float): the absolute tolernace parameters. Defualt value is ``1e-08``. - optimize (bool): controls if intermediate optimization is used while transforming Kraus - operators to a Choi matrix, wherever required. Default is ``False``. + If not provided, the default value of ``1.0 s`` will be used for construction. + readout_error (bool): include readout error in the converted noise model. Default is ``True``. + optimize (bool): controls if a contraction order optimization is used for ``einsum`` while + transforming Kraus operators to a Choi matrix, wherever required. Default is ``False``. kraus_shape (bool): use shape of the Kraus operators to display ``qml.QubitChannel`` instead of the complete list of matrices. Default is ``True``. + options (dict[str, Union[int, float]]): optional parameters related to tolerance and rounding: + + - decimals (int): number of decimal places to round the Kraus matrices for errors to. + If not provided, the default value of ``10`` is used. + - atol (float): the relative tolerance parameter. Default value is ``1e-05``. + - rtol (float): the absolute tolernace parameters. Defualt value is ``1e-08``. Returns: qml.NoiseModel: An equivalent noise model constructed in PennyLane diff --git a/setup.py b/setup.py index ad805ba6..3ce36e66 100644 --- a/setup.py +++ b/setup.py @@ -57,6 +57,7 @@ 'qiskit_op = pennylane_qiskit:load_pauli_op', 'qasm = pennylane_qiskit:load_qasm', 'qasm_file = pennylane_qiskit:load_qasm_from_file', + 'qiskit_noise = pennylane_qiskit:load_noise_model', ], }, 'description': 'PennyLane plugin for Qiskit',