learn-qc-with-python-and-qsharp icon indicating copy to clipboard operation
learn-qc-with-python-and-qsharp copied to clipboard

Module 'qutip.qip.circuit' has no attribute 'gate_expand_1toN' and 'gate_expand_2toN'

Open MrSago opened this issue 4 years ago • 3 comments

File "...\learn-qc-with-python-and-qsharp\ch05\simulator.py", line 88, in _apply
    matrix = qt.circuit.gate_expand_1toN(
AttributeError: module 'qutip.qip.circuit' has no attribute 'gate_expand_1toN'


File "...\learn-qc-with-python-and-qsharp\ch06\simulator.py", line 124, in _apply
  matrix = qt.circuit.gate_expand_2toN(unitary,
AttributeError: module 'qutip.qip.circuit' has no attribute 'gate_expand_2toN'

MrSago avatar Aug 31 '21 08:08 MrSago

Please use qt.gate_expand_1toN instead of qt.circuit.gate_expand_1toN because gate_expand_1toN, refer to https://qutip.org/docs/latest/modules/qutip/qip/operations/gates.html for more details

nadimragab avatar Feb 11 '22 18:02 nadimragab