Got it

RuntimeError: mindspore\ccsrc\backend\kernel_compiler\cpu\cpu_kernel_factory.cc:169 GetSupportedKernelAttrList] Not registered CPU kernel: op[Evolutio

Created: Jan 7, 2022 19:47:37Latest reply: Jan 12, 2022 11:10:35 440 6 0 0 0
  HiCoins as reward: 0 (problem unresolved)

I am trying to execute the next simple code:


from mindquantum.gate import X 

from mindquantum.circuit import Circuit

from mindquantum.circuit import StateEvolution

circuit = Circuit()

circuit += X.on(0) 

StateEvolution(circuit).sampling(100)


I am using Windows 10 , mindspore 1.5.0, mindquantum 0.3.1 .


Does anyone know how to fix the following error:


RuntimeError                              Traceback (most recent call last)

<ipython-input-1-455fb543f4cf> in <module>

      4 circuit = Circuit()

      5 circuit += X.on(0)

----> 6 StateEvolution(circuit).sampling(100)


~\Anaconda3\lib\site-packages\mindquantum\circuit\state_evolution.py in sampling(self, shots, param, show)

    118             {'00': 29, '01': 24, '10': 23, '11': 24}

    119         """

--> 120         final_state = self.final_state(param)

    121         amps = normalize(np.abs(final_state)**2)**2

    122         sampling = Counter(np.random.choice(self.index, p=amps, size=shots))


~\Anaconda3\lib\site-packages\mindquantum\circuit\state_evolution.py in final_state(self, param, ket)

     78                     "Require a non parameterized quantum circuit, since not parameters specified."

     79                 )

---> 80             return self.evol() if not ket else '\n'.join(

     81                 ket_string(self.evol()))

     82         if isinstance(param, np.ndarray):


~\Anaconda3\lib\site-packages\mindquantum\nn\evolution.py in __call__(self, tmp)

     83                     "Parameterized circuit shuold have parameter input.")

     84             tmp = Tensor(np.array([0]).astype(np.float32))

---> 85         state = super().__call__(tmp)

     86         state = state.asnumpy()

     87         state = state[:, 0] + state[:, 1] * 1j


~\Anaconda3\lib\site-packages\mindspore\ops\primitive.py in __call__(self, *args)

    245         if should_elim:

    246             return output

--> 247         return _run_op(self, self.name, args)

    248 

    249     def __getstate__(self):


~\Anaconda3\lib\site-packages\mindspore\common\api.py in wrapper(*arg, **kwargs)

     76     @wraps(fn)

     77     def wrapper(*arg, **kwargs):

---> 78         results = fn(*arg, **kwargs)

     79 

     80         def _convert_data(data):


~\Anaconda3\lib\site-packages\mindspore\ops\primitive.py in _run_op(obj, op_name, args)

    680 def _run_op(obj, op_name, args):

    681     """Single op execution function supported by ge in PyNative mode."""

--> 682     output = real_run_op(obj, op_name, args)

    683     return output


RuntimeError: mindspore\ccsrc\backend\kernel_compiler\cpu\cpu_kernel_factory.cc:169 GetSupportedKernelAttrList] Not registered CPU kernel: op[Evolution]


  • x
  • convention:

Featured Answers
Thomas_Tan
Admin Created Jan 8, 2022 09:07:37

Dear user,

Thanks for reaching out to us. We are sorry for the inconvenience caused. Since you are visiting our Enterprise product page, we would suggest a visit to our page dedicated to personal devices to better solve this question.

We have the Huawei Community support (https://consumer.huawei.com/en/community/list/?forumId=10014), where you can get the answer online and also service hotlines for each country or region. You can get the regional hotline number via https://consumer.huawei.com/en/support/hotline.

View more
  • x
  • convention:

All Answers
Gustavo.HdezF
Gustavo.HdezF Admin Created Jan 7, 2022 19:51:21

Hello User. we are reviewing your question and we will answer you shortly. Thanks.
View more
  • x
  • convention:

Thomas_Tan
Thomas_Tan Admin Created Jan 8, 2022 09:07:37

Dear user,

Thanks for reaching out to us. We are sorry for the inconvenience caused. Since you are visiting our Enterprise product page, we would suggest a visit to our page dedicated to personal devices to better solve this question.

We have the Huawei Community support (https://consumer.huawei.com/en/community/list/?forumId=10014), where you can get the answer online and also service hotlines for each country or region. You can get the regional hotline number via https://consumer.huawei.com/en/support/hotline.

View more
  • x
  • convention:

MarijaS
MarijaS Created Jan 8, 2022 14:04:23

Thank you for your reply. I can't access the link https://consumer.huawei.com/en/community/list/?forumId=10014 , I get a error "Forum invalid".
View more
  • x
  • convention:

Thomas_Tan
Thomas_Tan Created Jan 8, 2022 14:14:25 (0) (0)
Hello friend, please click and then you can access normally.  
Unicef
Unicef MVE Created Jan 8, 2022 14:47:16

COOL
View more
  • x
  • convention:

Saqibaz
Saqibaz Created Jan 12, 2022 11:10:35

Cool
View more
  • x
  • convention:

Comment

You need to log in to comment to the post Login | Register
Comment

Notice: To protect the legitimate rights and interests of you, the community, and third parties, do not release content that may bring legal risks to all parties, including but are not limited to the following:
  • Politically sensitive content
  • Content concerning pornography, gambling, and drug abuse
  • Content that may disclose or infringe upon others ' commercial secrets, intellectual properties, including trade marks, copyrights, and patents, and personal privacy
Do not share your account and password with others. All operations performed using your account will be regarded as your own actions and all consequences arising therefrom will be borne by you. For details, see " User Agreement."

My Followers

Login and enjoy all the member benefits

Login

Block
Are you sure to block this user?
Users on your blacklist cannot comment on your post,cannot mention you, cannot send you private messages.
Reminder
Please bind your phone number to obtain invitation bonus.
Information Protection Guide
Thanks for using Huawei Enterprise Support Community! We will help you learn how we collect, use, store and share your personal information and the rights you have in accordance with Privacy Policy and User Agreement.