elenafervic / Quantum-Computing

A repository to store the code I used and developed about Quantum Computing during my summer internship (2024).
0 stars 0 forks source link

No Attribut final_State #2

Closed elenafervic closed 3 months ago

elenafervic commented 3 months ago

I am getting the following error: state = cirq.bloch_vector_from_state_vector(result.final_state,0) ^^^^^^^^^^^^^^^^^^ AttributeError: 'StateVectorTrialResult' object has no attribute 'final_state'.

Not sure why

elenafervic commented 3 months ago

I ended up changing final_state to final_state_vector as suggested by https://colab.research.google.com/github/quantumlib/Cirq/blob/main/docs/simulate/simulation.ipynb#scrollTo=bd9529db1c0which is a cirq tutorial. It contradicts what the tutorial I was originally following said, but it was created in 2020 so maybe the syntax has changed a bit since then.