PlanQK / planqk-platform

PlanQK Platform Issue Repository
3 stars 0 forks source link

Editing of algorithms sections causes the deletion of previously edited sections. #60

Closed DeanEmmettSmith closed 2 years ago

DeanEmmettSmith commented 3 years ago

I cannot complete editing the algorithm I am assigned to (QPE) as if there was a limit of characters used for all sections together. Currently, the Input section has been "deleted" recently when having updated another section.

VasStoneone commented 3 years ago

Hi @DeanEmmettSmith this is a very unusual behavior, can you provide us with a little more details, so we can reproduce the issue, were you editing two sections at the same time?

Feel free to use this template

Problem Description:

(Summarize the bug encountered concisely)

Steps to Reproduce:

(How one can reproduce the issue - this is very important)

Current bug behavior:

(What actually happens)

Expected Behaviour:

(What you should see instead)

Relevant logs and/or screenshots

(Paste any relevant logs - please use code blocks (```) to format console output, logs, and code as it's very hard to read otherwise.)

DeanEmmettSmith commented 3 years ago

Hello PlanQK platform team

This is the link to the QPE algorithm: https://platform.planqk.de/algorithms/ba4c50e3-7429-4471-a250-1762ed4c556a/

Current bug behavior: If I add text to a section such as Intent and save the updates, another section gets deleted such as Input Format, we suspect I may be exceeding some kind quota reserved for the text sections.

Screenshot 224 indicates the section, I updated.

Screenshot 255 indicates the section which was deleted.

If I update (actually add) the content section for Input Format, I assume the text will get deleted for a random other section.

I am avoiding to reproduce the bug because Jonas is reviewing the text. We can schedule an appointment to do this together.

Expected Behaviour:

If I update any text section, the other text sections should not change at all. Please check the text sections stored in the attachment (qpe_text.txt).

Relevant logs and/or screenshots

(Paste any relevant logs - please use code blocks (```) to format console output, logs, and code as it's very hard to read otherwise.) I have not had the time to troubleshoot the problem in this depth. We can schedule an appointment to inspect this. I hope the information clarified the situation a bit. Feel free to reach out to me for a call.

Best regards, Dean

From: VasStoneone @.> Sent: Donnerstag, 11. November 2021 13:13 To: PlanQK/platform @.> Cc: Smith, Dean Emmett @.>; Mention @.> Subject: [External] Re: [PlanQK/platform] Editing of algorithms sections causes the deletion of previously edited sections. (Issue #60)

This message is from an EXTERNAL SENDER - be CAUTIOUS, particularly with links and attachments.


@DeanEmmettSmithhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_DeanEmmettSmith&d=DwMCaQ&c=eIGjsITfXP_y-DLLX0uEHXJvU8nOHrUK8IrwNKOtkVU&r=FGnubJHiCPr_aFTE65ze_6F08DZuxd-p3HzAokSzFeA&m=Hu1iF8Z7YcbWVMe7rhFjn96L0yEOf6nivWv6-NyKpAM&s=EVnnoFV2J8B8Gdq3O1QAzoN37fRsMacaxPr63KFYr34&e= this is a very unusual behavior, can you provide us with a little more details, so we can reproduce the issue, were you editing two sections at the same time?

Feel free to use this template

Problem Description:

(Summarize the bug encountered concisely)

Steps to Reproduce:

(How one can reproduce the issue - this is very important)

Current bug behavior:

(What actually happens)

Expected Behaviour:

(What you should see instead)

Relevant logs and/or screenshots

(Paste any relevant logs - please use code blocks (```) to format console output, logs, and code as it's very hard to read otherwise.)

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_PlanQK_platform_issues_60-23issuecomment-2D966253317&d=DwMCaQ&c=eIGjsITfXP_y-DLLX0uEHXJvU8nOHrUK8IrwNKOtkVU&r=FGnubJHiCPr_aFTE65ze_6F08DZuxd-p3HzAokSzFeA&m=Hu1iF8Z7YcbWVMe7rhFjn96L0yEOf6nivWv6-NyKpAM&s=Mw2Y11LG2EZspzE-hQ8nbY7yrQYJZDEvN5JsqKHasJA&e=, or unsubscribehttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_AOMHVIICDTBCOUEIOVZGTDDULOXMHANCNFSM5HI5OYXQ&d=DwMCaQ&c=eIGjsITfXP_y-DLLX0uEHXJvU8nOHrUK8IrwNKOtkVU&r=FGnubJHiCPr_aFTE65ze_6F08DZuxd-p3HzAokSzFeA&m=Hu1iF8Z7YcbWVMe7rhFjn96L0yEOf6nivWv6-NyKpAM&s=y6q6Yx3bqhQ4mTXcQMInVqzV_6wAwHrlWi5l63pmZgo&e=. Triage notifications on the go with GitHub Mobile for iOShttps://urldefense.proofpoint.com/v2/url?u=https-3A__apps.apple.com_app_apple-2Dstore_id1477376905-3Fct-3Dnotification-2Demail-26mt-3D8-26pt-3D524675&d=DwMCaQ&c=eIGjsITfXP_y-DLLX0uEHXJvU8nOHrUK8IrwNKOtkVU&r=FGnubJHiCPr_aFTE65ze_6F08DZuxd-p3HzAokSzFeA&m=Hu1iF8Z7YcbWVMe7rhFjn96L0yEOf6nivWv6-NyKpAM&s=BFk0pDyUxd1VNt8epdcJxUVyfwSWE9L_Bf6a6tfTl5c&e= or Androidhttps://urldefense.proofpoint.com/v2/url?u=https-3A__play.google.com_store_apps_details-3Fid-3Dcom.github.android-26referrer-3Dutm-5Fcampaign-253Dnotification-2Demail-2526utm-5Fmedium-253Demail-2526utm-5Fsource-253Dgithub&d=DwMCaQ&c=eIGjsITfXP_y-DLLX0uEHXJvU8nOHrUK8IrwNKOtkVU&r=FGnubJHiCPr_aFTE65ze_6F08DZuxd-p3HzAokSzFeA&m=Hu1iF8Z7YcbWVMe7rhFjn96L0yEOf6nivWv6-NyKpAM&s=Xt-EsYxnP5vaBNA6W0c3RiggfHbRmPWyJ9GwIPYrLoE&e=.


This message is for the designated recipient only and may contain privileged, proprietary, or otherwise confidential information. If you have received it in error, please notify the sender immediately and delete the original. Any other use of the e-mail by you is prohibited. Where allowed by local law, electronic communications with Accenture and its affiliates, including e-mail and instant messaging (including content), may be scanned by our systems for the purposes of information security and assessment of internal compliance with Accenture policy. Your privacy is important to us. Accenture uses your personal data only in compliance with data protection laws. For further information on how Accenture processes your personal data, please see our privacy statement at https://www.accenture.com/us-en/privacy-policy.


www.accenture.com

Acronymns

QPE, PEA

Quantum Advantage

Exponential speedup of resource by determining the (lowest typically) eigenvalue of a $2^N \times 2^N$ unitary matrix with $O(N)$ qubits.

Intent

Arbitrary approximation of the phase of an eigenvalue of an unitary operator. I.e. for an eigenvalue $\lambda=\mathrm{e}^{2\pi i \phi}$ one computes $\phi$.

Problem

Determine phase $\phi$ of an eigenvalue $\lambda=\mathrm{e}^{2\pi i \phi}$ associated to unitary operator $U$.

Solution

 

The circuit consists of two parts. The first one, known as Kitaev's Algorithm [K95], extracts the eigenvalue into an additional register (here $\vert \Psi \rangle$) as a coefficient, whereas the extension of Abrams and Cleves [CEM+98] transforms it further to an $m$-bit representation.

At the beginning, output/ancilla register $\vert \Psi \rangle$ is set to ${\vert 0 \rangle}^{\otimes m}$, whereas the eigenstate is present as register $\vert \Phi \rangle$. At first, one extracts the corresponding eigenvalue $\lambda$ as coefficient into register $\vert \Psi \rangle$; namely in such as way that, after expressing $\lambda=\mathrm{e}^{2\pi i \phi}$ through its phase $\phi$, the result of this step resembles that of the QFT. Therefore, one case use the inverse Quantum Fourier Transform (IQFT) to restore at least an approximation of $\phi$ in bit representation.

Superposition Targeting a QFT-similar state an equally weighted superposition of $\vert \Psi \rangle$ is produced by applying the Hadamard-Gate to each qubit:

$$ {\vert 0 \rangle}^{\otimes m} \mapsto \bigotimes_{i = 1}^{m} \frac{1}{\sqrt{2}} \left( {{\vert 0 \rangle}+ {\vert 1 \rangle}}\right) $$

 

Phase-Kickback Exploiting the bilinearity of the tensor products and eigenstate property of ${\vert \Phi \rangle}$, one moves eigenvalue $\lambda$ to $\vert \Psi \rangle$ through applying operator $U$ to $\vert \Phi \rangle$ controlled by the last qubit register of $\vert \Psi \rangle$:

$$ \begin{aligned} \frac{1}{\sqrt{2}} \left( {{\vert 0 \rangle}+ {\vert 1 \rangle}}\right) \otimes \vert { \Phi} \rangle = &\frac{1}{\sqrt{2}} \left( {{\vert 0 \rangle}\otimes \vert { \Phi} \rangle+ {\vert 1 \rangle} \otimes \vert { \Phi} \rangle}\right) \ \mapsto &\frac{1}{\sqrt{2}} \left( {{\vert 0 \rangle}\otimes \vert { \Phi} \rangle + {\vert 1 \rangle} \otimes U \vert { \Phi} \rangle} \right) \ = &\frac{1}{\sqrt{2}} \left( {{\vert 0 \rangle}\otimes \vert { \Phi} \rangle+ {\vert 1 \rangle} \otimes \lambda \vert { \Phi} \rangle}\right) \ = &\frac{1}{\sqrt{2}} \left( {{\vert 0 \rangle}\otimes \vert { \Phi} \rangle+ \lambda {\vert 1 \rangle} \otimes \vert { \Phi} \rangle}\right) \ = &\frac{1}{\sqrt{2}} \left( {{\vert 0 \rangle} + \lambda {\vert 1 \rangle} }\right) \otimes \vert { \Phi} \rangle \end{aligned} $$

Notice that $\vert \Psi \rangle$ has not changed, so one can reuse it.

 

Obtaining QFT Shape In this step a QFT-like state is prepared to extract $\phi$ easily in an m-bit representation. However, this is not possible without further ado because one usually interprets a bit register as a natural number, whereas $\phi \in \left[0,1\right[$. Hence, measuring $\vert { \Phi^{'}} \rangle$ does not return $\phi$ itself but $2^{m}\Phi$. So the QFT-like state to be created looks the following way:

$$ \bigotimes{k = 1}^{m} \frac{1}{\sqrt{2}} \left( {{\vert 0 \rangle} + \mathrm{e}^{2 \pi i \frac{ 2^m \phi}{2^k}} {\vert 1 \rangle} }\right) = \bigotimes{k = 1}^{m} \frac{1}{\sqrt{2}} \left( {{\vert 0 \rangle} + \left({\mathrm{e}^{2 \pi i \phi}}\right)^{2^{m-k}} {\vert 1 \rangle} }\right) $$

Notice that for the k-th qubit one can rewrite $\left( \mathrm{e}^{2 \pi i \phi} \right)^{2^{m-k}}=\lambda^{2^{m-k}}$. Thus one can achieve the target state by applying phase-kickback for each k-th qubit with controlled $U^{2m-k}$. Combining this and the last step, the following mappings are performed:

$$ \begin{aligned} \bigotimes{k = 1}^{m} \frac{1}{\sqrt{2}} \left( {{\vert 0 \rangle} + {\vert 1 \rangle} }\right) \;\; &{{\text{C-}{U}}{\mapsto}} \bigotimes{k = 1}^{m-1} \frac{1}{\sqrt{2}} \left( {{\vert 0 \rangle} + {\vert 1 \rangle} }\right) \otimes \left( {{\vert 0 \rangle} + \lambda {\vert 1 \rangle} }\right) \ \;\; &{{\text{C-}{U}^{2}}{\mapsto}} \bigotimes{k = 1}^{m-2} \frac{1}{\sqrt{2}} \left( {{\vert 0 \rangle} + {\vert 1 \rangle} }\right) \otimes \left( {{\vert 0 \rangle} + \lambda {\vert 1 \rangle} }\right) \otimes \left( {{\vert 0 \rangle} + \lambda^2 {\vert 1 \rangle} }\right) \ &\vdots \ \;\; &{{\text{C-}{U}^{2^{m-1}}}{\mapsto}} \frac{1}{\sqrt{2}} \left( {{\vert 0 \rangle} + \lambda^{m}{\vert 1 \rangle} }\right) \otimes \bigotimes{k = 2}^{m} \frac{1}{\sqrt{2}} \left( {{\vert 0 \rangle} + \lambda^{m-k} {\vert 1 \rangle} }\right) \ &= \bigotimes{k = 1}^{m} \frac{1}{\sqrt{2}} \left( {{\vert 0 \rangle} + \lambda^{2^{m-k}} {\vert 1 \rangle} }\right) = \bigotimes_{k = 1}^{m} \frac{1}{\sqrt{2}} \left( {{\vert 0 \rangle} + \mathrm{e}^{2 \pi i \phi \frac{2^m \phi}{2^k}} {\vert 1 \rangle} }\right) \end{aligned} $$

The last term is exactly the result of QFT for the basis state.

Apply IQFT If $2^{m} \phi$ is a natural number, i.e. $\phi$ is a reciprocal of a natural number $<2^m$, then measuring $\vert {\Phi}^{'} \rangle$ after applying IQFT results with probability $1$ in $2^m\phi$ which is the desired outcome. Otherwise one receives the closest integer to $2^m\phi$ with probability $>\frac{4}{\pi^{2}} \approx 0.41$.

References

Input format

Input built in circuit: unitary operator (⇔ quantum gate). Input via register: associated eigenstate.

Algorithm Parameter

Hyperparameter: Accuracy of solution, i.e. amount of bits to store the phase.

VasStoneone commented 2 years ago

Hi @DeanEmmettSmith lets schedule an appointment, so you can show me the issue. We are not able to reproduce it and I don't even have access to the algorithm in question.

Regards

VAS valentin.aponte.sarmientos@stoneone.de

DeanEmmettSmith commented 2 years ago

Hello PlanQK support team,

Please schedule a teams appointment for us. My agenda should be relatively flexible.

Best regards, Dean

From: VasStoneone @.> Sent: Freitag, 3. Dezember 2021 13:45 To: PlanQK/platform @.> Cc: Smith, Dean Emmett @.>; Mention @.> Subject: [External] Re: [PlanQK/platform] Editing of algorithms sections causes the deletion of previously edited sections. (Issue #60)

This message is from an EXTERNAL SENDER - be CAUTIOUS, particularly with links and attachments.


Hi @DeanEmmettSmithhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_DeanEmmettSmith&d=DwMCaQ&c=eIGjsITfXP_y-DLLX0uEHXJvU8nOHrUK8IrwNKOtkVU&r=FGnubJHiCPr_aFTE65ze_6F08DZuxd-p3HzAokSzFeA&m=IhC82mpsk1epaYp8dOyGJlBKT4avSuV7fohWmlRonUY&s=FN-nvMeLRpzuYYJkpIQKAq5ZTbIISjQPlR8yg70dcTA&e= lets schedule an @.***>, so you can show me the issue. We are not able to reproduce it and I don't even have access to the algorithm in question.

Regards

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_PlanQK_platform_issues_60-23issuecomment-2D985490083&d=DwMCaQ&c=eIGjsITfXP_y-DLLX0uEHXJvU8nOHrUK8IrwNKOtkVU&r=FGnubJHiCPr_aFTE65ze_6F08DZuxd-p3HzAokSzFeA&m=IhC82mpsk1epaYp8dOyGJlBKT4avSuV7fohWmlRonUY&s=ZluxyWBWFX_k8bmtKRsN_meeCYk7Kk1QrwSBfjO89Vw&e=, or unsubscribehttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_AOMHVIKWTAW4AJNLDE6G5RLUPC3WHANCNFSM5HI5OYXQ&d=DwMCaQ&c=eIGjsITfXP_y-DLLX0uEHXJvU8nOHrUK8IrwNKOtkVU&r=FGnubJHiCPr_aFTE65ze_6F08DZuxd-p3HzAokSzFeA&m=IhC82mpsk1epaYp8dOyGJlBKT4avSuV7fohWmlRonUY&s=7ogLGqRXpFj9KAsOfqL4zEQlkl2Z6YAjKVVF4CefI5E&e=. Triage notifications on the go with GitHub Mobile for iOShttps://urldefense.proofpoint.com/v2/url?u=https-3A__apps.apple.com_app_apple-2Dstore_id1477376905-3Fct-3Dnotification-2Demail-26mt-3D8-26pt-3D524675&d=DwMCaQ&c=eIGjsITfXP_y-DLLX0uEHXJvU8nOHrUK8IrwNKOtkVU&r=FGnubJHiCPr_aFTE65ze_6F08DZuxd-p3HzAokSzFeA&m=IhC82mpsk1epaYp8dOyGJlBKT4avSuV7fohWmlRonUY&s=enF08trap9MgORycE0pZqOUrMF9uzxaMBzECbCF-juU&e= or Androidhttps://urldefense.proofpoint.com/v2/url?u=https-3A__play.google.com_store_apps_details-3Fid-3Dcom.github.android-26referrer-3Dutm-5Fcampaign-253Dnotification-2Demail-2526utm-5Fmedium-253Demail-2526utm-5Fsource-253Dgithub&d=DwMCaQ&c=eIGjsITfXP_y-DLLX0uEHXJvU8nOHrUK8IrwNKOtkVU&r=FGnubJHiCPr_aFTE65ze_6F08DZuxd-p3HzAokSzFeA&m=IhC82mpsk1epaYp8dOyGJlBKT4avSuV7fohWmlRonUY&s=qb158ViOTB4WU2O4xll99QHgXAE0Mp1FOm2Y5lO9HOQ&e=.


This message is for the designated recipient only and may contain privileged, proprietary, or otherwise confidential information. If you have received it in error, please notify the sender immediately and delete the original. Any other use of the e-mail by you is prohibited. Where allowed by local law, electronic communications with Accenture and its affiliates, including e-mail and instant messaging (including content), may be scanned by our systems for the purposes of information security and assessment of internal compliance with Accenture policy. Your privacy is important to us. Accenture uses your personal data only in compliance with data protection laws. For further information on how Accenture processes your personal data, please see our privacy statement at https://www.accenture.com/us-en/privacy-policy.


www.accenture.com

VasStoneone commented 2 years ago

Hi @DeanEmmettSmith can you write me to valentin.aponte.sarmientos@stoneone.de I don't have your contact details

DeanEmmettSmith commented 2 years ago

Thanks for the information. I will do so!

From: VasStoneone @.> Sent: Dienstag, 7. Dezember 2021 15:14 To: PlanQK/platform @.> Cc: Smith, Dean Emmett @.>; Mention @.> Subject: [External] Re: [PlanQK/platform] Editing of algorithms sections causes the deletion of previously edited sections. (Issue #60)

This message is from an EXTERNAL SENDER - be CAUTIOUS, particularly with links and attachments.


Hi @DeanEmmettSmithhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_DeanEmmettSmith&d=DwMCaQ&c=eIGjsITfXP_y-DLLX0uEHXJvU8nOHrUK8IrwNKOtkVU&r=FGnubJHiCPr_aFTE65ze_6F08DZuxd-p3HzAokSzFeA&m=pwAwceeVq8slgVba77mK_ZfVUzEWzIr58rxMBZuEL0g&s=eeSHNf9p2FuI10t65yyJyMTKdzYmzPrNHKzYNgtMH4o&e= can you write me to @.**@.> I don't have your contact details

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_PlanQK_platform_issues_60-23issuecomment-2D987963358&d=DwMCaQ&c=eIGjsITfXP_y-DLLX0uEHXJvU8nOHrUK8IrwNKOtkVU&r=FGnubJHiCPr_aFTE65ze_6F08DZuxd-p3HzAokSzFeA&m=pwAwceeVq8slgVba77mK_ZfVUzEWzIr58rxMBZuEL0g&s=bFCDuLSWPFMUjakj18vNSv6yUEm82lpevSgM4q254nI&e=, or unsubscribehttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_AOMHVILZFRZXAS2V44OYAALUPYJAXANCNFSM5HI5OYXQ&d=DwMCaQ&c=eIGjsITfXP_y-DLLX0uEHXJvU8nOHrUK8IrwNKOtkVU&r=FGnubJHiCPr_aFTE65ze_6F08DZuxd-p3HzAokSzFeA&m=pwAwceeVq8slgVba77mK_ZfVUzEWzIr58rxMBZuEL0g&s=Z2NfDFwboW5lTgDIwwKu6R7mQatrhaWtBhHsJW5GS-w&e=. Triage notifications on the go with GitHub Mobile for iOShttps://urldefense.proofpoint.com/v2/url?u=https-3A__apps.apple.com_app_apple-2Dstore_id1477376905-3Fct-3Dnotification-2Demail-26mt-3D8-26pt-3D524675&d=DwMCaQ&c=eIGjsITfXP_y-DLLX0uEHXJvU8nOHrUK8IrwNKOtkVU&r=FGnubJHiCPr_aFTE65ze_6F08DZuxd-p3HzAokSzFeA&m=pwAwceeVq8slgVba77mK_ZfVUzEWzIr58rxMBZuEL0g&s=SkbP2lrbYp6g1JYTL2-Z2-vF-CYicXygm75I2vc_C6M&e= or Androidhttps://urldefense.proofpoint.com/v2/url?u=https-3A__play.google.com_store_apps_details-3Fid-3Dcom.github.android-26referrer-3Dutm-5Fcampaign-253Dnotification-2Demail-2526utm-5Fmedium-253Demail-2526utm-5Fsource-253Dgithub&d=DwMCaQ&c=eIGjsITfXP_y-DLLX0uEHXJvU8nOHrUK8IrwNKOtkVU&r=FGnubJHiCPr_aFTE65ze_6F08DZuxd-p3HzAokSzFeA&m=pwAwceeVq8slgVba77mK_ZfVUzEWzIr58rxMBZuEL0g&s=AB4EwVJL0GqPp9F2spXkbRnX3vdy5MYMWFcrpXOojjU&e=.


This message is for the designated recipient only and may contain privileged, proprietary, or otherwise confidential information. If you have received it in error, please notify the sender immediately and delete the original. Any other use of the e-mail by you is prohibited. Where allowed by local law, electronic communications with Accenture and its affiliates, including e-mail and instant messaging (including content), may be scanned by our systems for the purposes of information security and assessment of internal compliance with Accenture policy. Your privacy is important to us. Accenture uses your personal data only in compliance with data protection laws. For further information on how Accenture processes your personal data, please see our privacy statement at https://www.accenture.com/us-en/privacy-policy.


www.accenture.com

VasStoneone commented 2 years ago

Hi we couldn't reproduce this issue and we will close, please open a new issue if you still encounter this problem