I have this state: $$p |\text{GHZ}\rangle \langle \text{GHZ}| + (1-p)\rho$$ And after creating this state I have this code lines:
state = p * GHZ+(1-p)* rho
state = p * GHZ + (1 - p) * rho
print(f"final state: \n {state}")
print(cirq.sample_density_matrix(state, indices=[0, 1, 2], repetitions=10))
Now I want to measure this state. I know we have cirq.measure
in Cirq But I don't know which kind of measurement is used by this function (and the last line is also doing measurement if I am not wrong??)
cirq.measure(a, b, c)
I have 3 questions
I want to use rotation matrix and measure my state. Do we have rotation matrix in Cirq. Can you please show me how can I measure my state with rotation matrix in Cirq?
I want to choose x and Y randomly and I want to do measurement
Which kind of measurement is used by Cirq.measure() and (cirq.sample_density_matrix(state, indices=[0, 1, 2], repetitions=10))
cirq.measure(a, b, c) (cirq.sample_density_matrix(state, indices=[0, 1, 2], repetitions=10))
Best and thanks