import numpy as np
import cmath
# Importing standard Qiskit libraries
from qiskit.quantum_info import Statevector, random_statevector
from qiskit import QuantumCircuit, transpile, Aer, IBMQ, assemble, execute
from qiskit.tools.jupyter import *
from qiskit.visualization import *
from ibm_quantum_widgets import *

from qiskit.extensions import Initialize
# Loading your IBM Quantum account(s)
provider = IBMQ.load_account()


qc = QuantumCircuit(1)
#
#
#
# FILL YOUR CODE IN HERE
#
#
#
#
state = Statevector.from_instruction(qc)
plot_bloch_multivector(state)



qc = QuantumCircuit(1)
#
#
#
# FILL YOUR CODE IN HERE
#
#
state = Statevector.from_instruction(qc)
plot_bloch_multivector(state)


qc = QuantumCircuit(1)
#
#
# FILL YOUR CODE IN HERE
#
#

state = Statevector.from_instruction(qc)
plot_bloch_multivector(state)

qc=QuantumCircuit(1,1)
qc.u3(np.pi/4,np.pi/4,np.pi/4,0)


#
# FILL YOUR CODE IN HERE
#
#
#



backend = Aer.get_backend('qasm_simulator') # we choose the simulator as our backend
Counts = execute(qc, backend, shots = 1024,  seed_simulator=312).result().get_counts() # we run the simulation and get the counts
plot_histogram(Counts) # let us plot a histogram to see the possible outcomes and corresponding probabilities


psi = random_statevector(2, seed=11)
init_gate = Initialize(psi)
init_gate.label = "Random State"



## Measure the state in the x,y,z basis and make a guess for the state_vector psi

#Measure in all three different bases




#Put your answer here
#Try to remove any global phase in your answer
phi=
theta=




angles : [phi,theta]
