I am trying to write $n$ party GHZ state but at the end of the day, it seems like bi partite state. I am missing a detail. Here is my code
number =6 qubits = cirq.LineQubit.range(number) def n_party_GHZ_circuit(qubits) GHZ_circuit = cirq.Circuit(cirq.H(qubits[i]), cirq.CNOT(qubits[i], qubits[j])) GHZ = cirq.final_density_matrix(n_party_GHZ_circuit)
I can write it by hand with indexes but suppose that we have 10 qubits and in that case I do not want to write it by hand for all combinations. So I am trying to write a function but I couldn't.