Skip to content

Commit

Permalink
!2301 merge from r0.10
Browse files Browse the repository at this point in the history
Merge pull request !2301 from donghufeng/r0.10
  • Loading branch information
donghufeng authored and gitee-org committed Mar 28, 2024
2 parents 4f54620 + ea5da2b commit a3f82ba
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions mindquantum/io/qasm/hiqasm.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 3 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
Expand Down
2 changes: 1 addition & 1 deletion scripts/build/python_virtualenv_update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a3f82ba

Please sign in to comment.