diff --git a/mindquantum/algorithm/error_mitigation/random_benchmarking.py b/mindquantum/algorithm/error_mitigation/random_benchmarking.py index c125aaf41..cc7c7a508 100644 --- a/mindquantum/algorithm/error_mitigation/random_benchmarking.py +++ b/mindquantum/algorithm/error_mitigation/random_benchmarking.py @@ -37,7 +37,7 @@ def query_single_qubit_clifford_elem(idx: int) -> Simulator: idx (int): The index of clifford element in single qubit clifford group. Returns: - :class:`~.simulator.Simulator`r, a stabilizer with tableau be the queried clifford element. + :class:`~.simulator.Simulator`, a stabilizer with tableau be the queried clifford element. Examples: >>> from mindquantum.algorithm.error_mitigation import query_single_qubit_clifford_elem diff --git a/mindquantum/io/qasm/hiqasm.py b/mindquantum/io/qasm/hiqasm.py index 67f1945f4..1e6a14cca 100644 --- a/mindquantum/io/qasm/hiqasm.py +++ b/mindquantum/io/qasm/hiqasm.py @@ -430,6 +430,12 @@ def _trans_v01(self, cmds, n_qubits): # pylint: disable=too-many-branches self.circuit.ry(*_extr_parameter(cmd), qubit[-1], qubit[:2]) elif cmd.startswith('CCRZ '): self.circuit.rz(*_extr_parameter(cmd), qubit[-1], qubit[:2]) + elif cmd.startswith("XX"): + self.circuit.rxx(*_extr_parameter(cmd), qubit[-2:], qubit[:-2]) + elif cmd.startswith("YY"): + self.circuit.ryy(*_extr_parameter(cmd), qubit[-2:], qubit[:-2]) + elif cmd.startswith("ZZ"): + self.circuit.rzz(*_extr_parameter(cmd), qubit[-2:], qubit[:-2]) elif cmd.startswith('MEASURE '): qubit = _find_qubit_id(cmd) if qubit: diff --git a/pyproject.toml b/pyproject.toml index 43d38a533..dc612ccd9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,9 @@ requires = [ 'setuptools>=61;python_version>="3.12"', 'wheel', 'pybind11>=2.9.2', - 'wheel-filename>1.2' + 'wheel-filename>1.2', + 'delocate==0.10.7;sys_platform=="darwin"' + ] build-backend = 'backend' backend-path = [ diff --git a/scripts/build/python_virtualenv_update.sh b/scripts/build/python_virtualenv_update.sh index 4a368ee5b..c868a3a51 100755 --- a/scripts/build/python_virtualenv_update.sh +++ b/scripts/build/python_virtualenv_update.sh @@ -54,7 +54,7 @@ if [[ "${created_venv:-0}" -eq 1 || "${do_update_venv:-0}" -eq 1 ]]; then if [[ "$OSTYPE" == "linux-gnu"* ]]; then pkgs+=(auditwheel) elif [[ "$OSTYPE" == "darwin"* ]]; then - pkgs+=(delocate) + pkgs+=("delocate==0.10.7") fi if [ "${cmake_from_venv:-0}" -eq 1 ]; then