Row 3895

Row ID: 3895 | Dataset Entry | Axioma AXP Content Repository

Content Data

This page contains data entry 3895 from the Axioma AXP content repository. The structured data below represents the complete record for this entry.

Hi there,

As part of a process im running, I am trying to model the density matrix representation of states in the deustch algorithm. My implementation is in python and includes the input qubit and ancilla bit in matrix for as the initial state.

The problem I'm having is that everything appears to be fine apart from upon implementing the final Hadamard gate to only the input qubit, the output falls short of the expected deterministic result.

Because im working with density matrices the final hadamard is applied as F\_H @ rho @ F\_H.T, where F\_H = np.kron(H,I). This choice results in a matrix that looks like this (for balanced case):

\[\[ 0.5 0.5 -0. -0. \]

\[ 0.5 0.5 -0. -0. \]

\[-0. -0. -0. -0. \]

\[-0. -0. -0. -0. \]\].

I found that this correlates with the expected output of a mixed state of both + and - (1/root2(|0> +|1>)) simultaneously.

My curiousity is that in the case that I apply H\_total @ rho @ H\_total.T, where H\_total = np.kron(H, H) instead, the result is as expected.

I guess that in terms of the mixed state nature of the output, applying the hadamard tensor product makes sense but doesnt follow the process of the deustch algorithm.

Any insight into an explanation of why this works/if its innherently wrong and possibly some justification for the design choice would be great.

Thanks

FieldValue
text Hi there, As part of a process im running, I am trying to model the density matrix representation of states in the deustch algorithm. My implementation is in python and includes the input qubit and ancilla bit in matrix for as the initial state. The problem I'm having is that everything appears to be fine apart from upon implementing the final Hadamard gate to only the input qubit, the output falls short of the expected deterministic result. Because im working with density matrices the final…
label r/quantumcomputing
dataType post
communityName r/QuantumComputing
datetime 2024-03-28
username_encoded Z0FBQUFBQm5LakwxNVFnV041RmU3cG9MbW5EblRranlhTHZmTDF2ZTRHZFJSQ2pYN2hPN0JkcUNBejN3LUxid1hDTVpwLURybHhFTHBxSXQySVJvRU1POGhRTHhPUXJYbVE9PQ==
url_encoded Z0FBQUFBQm5Lak9FLUxkMWF0NlotZEYxLXRzVWtEbmN5cWY2S1dPbURTZ2ltbldFeDVuYWZWd0pBdl9XOVh6S0JYYWJGRzluelA0NTdCNk5iSUg4d2REZ0FMaHZQd2NUVFBKRXFZMDBTNDVnMDZtcjVmU3JJeDExLUZlcm8tYVpzRkJQWkM3dnpLTWhqLUtZWmJxcFd0LWRzZVVFRFF3T1pscDlfMWVfZUFTcFQzQVppYmF0SGpJeC1iY09xVnZ0UTNZMXBOZHRiQUtiaUVXMkJ4MFhUUHdLWWNiNGZsZVZiUT09

Raw Record

{
  "text": "Hi there,\n\nAs part of a process im running, I am trying to model the density matrix representation of states in the deustch algorithm. My implementation is in python and includes the input qubit and ancilla bit in matrix for as the initial state.\n\nThe problem I'm having is that everything appears to be fine apart from upon implementing the final Hadamard gate to only the input qubit, the output falls short of the expected deterministic result. \n\nBecause im working with density matrices the final hadamard is applied as F\\_H @ rho @ F\\_H.T, where F\\_H = np.kron(H,I). This choice results in a matrix that looks like this (for balanced case):\n\n \\[\\[ 0.5  0.5 -0.  -0. \\]\n\n \\[ 0.5  0.5 -0.  -0. \\]\n\n \\[-0.  -0.  -0.  -0. \\]\n\n \\[-0.  -0.  -0.  -0. \\]\\].\n\n I found that this correlates with the expected output of a mixed state of both + and - (1/root2(|0> +|1>))  simultaneously. \n\nMy curiousity is that in the case that I apply H\\_total @ rho @ H\\_total.T, where H\\_total = np.kron(H, H) instead, the result is as expected. \n\nI guess that in terms of the mixed state nature of the output, applying the hadamard tensor product makes sense but doesnt follow the process of the deustch algorithm.\n\nAny insight into an explanation of why this works/if its innherently wrong and possibly some justification for the design choice would be great.\n\nThanks",
  "label": "r/quantumcomputing",
  "dataType": "post",
  "communityName": "r/QuantumComputing",
  "datetime": "2024-03-28",
  "username_encoded": "Z0FBQUFBQm5LakwxNVFnV041RmU3cG9MbW5EblRranlhTHZmTDF2ZTRHZFJSQ2pYN2hPN0JkcUNBejN3LUxid1hDTVpwLURybHhFTHBxSXQySVJvRU1POGhRTHhPUXJYbVE9PQ==",
  "url_encoded": "Z0FBQUFBQm5Lak9FLUxkMWF0NlotZEYxLXRzVWtEbmN5cWY2S1dPbURTZ2ltbldFeDVuYWZWd0pBdl9XOVh6S0JYYWJGRzluelA0NTdCNk5iSUg4d2REZ0FMaHZQd2NUVFBKRXFZMDBTNDVnMDZtcjVmU3JJeDExLUZlcm8tYVpzRkJQWkM3dnpLTWhqLUtZWmJxcFd0LWRzZVVFRFF3T1pscDlfMWVfZUFTcFQzQVppYmF0SGpJeC1iY09xVnZ0UTNZMXBOZHRiQUtiaUVXMkJ4MFhUUHdLWWNiNGZsZVZiUT09"
}

Entry Information