New answers tagged

0 votes

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
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
0 votes

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
2 votes

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
0 votes

Qiskit: Get approximate execution time

For those looking to get up to date on this, as the approved answer will change over time, be sure to check the documentation that states this clearly: Monitor a Job:
Nina Computer's user avatar
4 votes

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,348
0 votes

Transpiled circuit with optimization level 3 error in method. (Key Error 16, 22)

In case someone has the same problem, it seems to be a problem with the mapping between virtual qubits and physical qubits in the quantum computer. I have fixed the issue by specifying the initial ...
QuantumS's user avatar
2 votes

Implementing error correction (from physical qubit point of view)

As mentioned in the other comment, Fowler et al. 2012 ( is a great reference. For more of an introductory read, I find these lecture notes from Dan Browne to be helpful ...
QuantumEngineer's user avatar
3 votes

Implementing error correction (from physical qubit point of view)

You’re right that you need logical qubits, and they’re structured according to a topological object known as a surface code. There are many papers by Dr. Austin Fowler covering this topic, and here’s ...
Sam Burdick's user avatar
0 votes

Implementing a Quantum Recurrent Neural Network

Your implementation of a Quantum Recurrent Neural Network (QRNN) using PyTorch and PennyLane is a good start but needs some adjustments and completion. Let's go through the code to identify areas for ...
Sadegh Bendokht's user avatar
0 votes

Python C++ Debugging Setup for Stim

You'll probably get better help with a software tooling issue like this in a programming forum rather than a quantum computing forum. Personally, I would recommend not involving python at all if you ...
Craig Gidney's user avatar
  • 34.8k
1 vote

Expectation values using qiskit

Note that $A$ isn't actually a quantum gate because it isn't necessarily unitary, so $V^\dagger AV| \mathbf{0} \rangle$ is not even a valid quantum circuit. Suppose that $A$ is unitary (for example a ...
Cody Wang's user avatar
  • 1,138

Top 50 recent answers are included