# How can I create a Qiskit function producing a quantum circuit such that $\langle Z^{\otimes n}\rangle=J_{n-1}/2^{n-1}$?

Problem:

Create a function circ(n) that returns an $$n$$-qubits quantum circuit that, when measured in the $$Z^{\otimes n}$$ basis, should yield the following expectation value:

$$\langle Z^{\otimes n} \rangle = \frac{J_{n-1}}{2^{n-1}}$$

where $$J_{n}$$ is the $$n$$-th Jacobsthal number.

• What have you tried? Oct 7 at 14:36
• Could you please ask a question? You simply put before us some excercise, however, what is not clear to you about the excercise? Oct 7 at 18:14