4 votes
Accepted

Efficient expectation value of a local operator

I don't know if it's the fastest, but you can use the following subroutine for applying an operation to a subsystem of your state. This code will take an operation that's the correct shape for acting ...
forky40's user avatar
  • 6,358
2 votes

Is amplitude encoding a form of performing QRAM?

From my perspective, the key differences are: In emplitude encoding, each classical data point is represented by the amplitude of each quantum basis state. For example, a vector $(a_0,a_1,a_2,a_3)$ ...
Yilun Zhao's user avatar
2 votes
Accepted

I would like to understand the meaning of applying permutation to a unitary matrix

You have to review the definition of the matrix representation of an operator in a given basis: If the matrix $U$ is the representation of some operator $u$ in the basis $\{|00\rangle,|01\rangle,|10\...
Pierre-Paul T.'s user avatar
1 vote

cirq entanglement qubits

The problem is that you negate qubit q1 before the measurement. As both qubits are opposite each other under original settings (see the first circuit results), negation gate you added on q1 leads ...
Martin Vesely's user avatar
1 vote

Reusing Parameters for Multiple Runs with Qiskit's SPSA Optimization

SPSA has no early termination and will always do maxiter iterations, and it does 25 points (50 functional objective calls) up front for calibration. If you want to ...
Steve Wood's user avatar
  • 1,343
1 vote
Accepted

Microsoft Classic QDK simulator

There are no default simulators chosen either in .NET or in Python, you always specify them explicitly. In C#, you use different classes for different simulators: ...
Mariia Mykhailova's user avatar
1 vote
Accepted

How to compare the output of statevector_simulator and qasm_simulator in Qiskit

Your problem is the line output_real = np.array(np.real(output_complex)) You should not be looking at output_real. In order to ...
Nick Mertes's user avatar
1 vote

How to compare the output of statevector_simulator and qasm_simulator in Qiskit

In the first case, you are simulating classically the behavior of the quantum state entering the circuit at each step. The cost of such a process will become exponential as the size of the state ...
baptistechev's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible