Sasan Moradi

Results 8 comments of Sasan Moradi

i could fix this error. but i have another error. CircuitConversionError: Circuit could not be converted from an internal Mitiq type to a circuit of type qiskit.

```py def statepreparation(X, circuit): circuit.ry(X[0], 0) circuit.cnot(0, 1) circuit.ry(X[1], 1) circuit.ry(X[2], 2) circuit.cnot(1, 2) circuit.ry(-X[1], 1) circuit.cnot(0, 2) return circuit def qiskit_circuit(X, shots=8192): circuit1 = QuantumCircuit(3) circuit1 = statepreparation(X, circuit1)...

Many thanks. I will try it.

No. It doesn't work with measurement.

I will work on it again and share the error with you.

```py def statepreparation(X, circuit): circuit.ry(X[0], 0) circuit.ry(X[1], 1) circuit.ry(X[2], 2) circuit.cnot(0, 1) circuit.ry(-X[1], 1) circuit.cnot(0, 2) circuit.ry(X[3], 2) circuit.cnot(1, 2) circuit.ry(X[4], 0) circuit.ry(X[5], 1) circuit.ry(X[6], 2) return circuit simulator_backend1 =...

i decompose the controlled rotation and Toffoli gates, but i still get this error: Circuit could not be converted to an internal Mitiq circuit.

Thanks a lot. It worked.