未验证 提交 809df36c 编写于 作者: Y yangguohao 提交者: GitHub

Update utils.py

上级 96095814
...@@ -1319,8 +1319,8 @@ def plot_n_qubit_state_in_bloch_sphere( ...@@ -1319,8 +1319,8 @@ def plot_n_qubit_state_in_bloch_sphere(
if which_qubits is None: if which_qubits is None:
which_qubits = list(range(n_qubits)) which_qubits = list(range(n_qubits))
else: else:
assert type(show_qubits)==list,'the type of which_qubits should be None or list' assert type(which_qubits)==list,'the type of which_qubits should be None or list'
assert len(show_qubits)==state_len,'展示的量子数量需要小于n_qubits' assert len(which_qubits)==state_len,'展示的量子数量需要小于n_qubits'
for i in range(len(which_qubits)): for i in range(len(which_qubits)):
assert 0<which_qubits[i]<n_qubits, '0<which_qubits[i]<n_qubits' assert 0<which_qubits[i]<n_qubits, '0<which_qubits[i]<n_qubits'
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册