-1
$\begingroup$

I have a 30 qubit system and I need to do quantum tomography on a subsystem of 2 of its qubit. How can I do this in Cirq?

$\endgroup$

2 Answers 2

1
$\begingroup$

State tomography is implemented in Cirq as

cirq.experiments.state_tomography(
    sampler: 'cirq.Sampler',
    qubits: Sequence['cirq.Qid'],
    circuit: 'cirq.Circuit',
    repetitions: int = 1000,
    prerotations: Optional[Sequence[Tuple[float, float]]] = None,
)

https://github.com/quantumlib/Cirq/blob/3b975b093afa80969731af85002634a6f2ce8270/cirq-core/cirq/experiments/n_qubit_tomography.py#L132-L160

e.g.

cirq.experiments.state_tomography(cirq.DensityMatrixSimulator(noise=noise_model), qubits=..., circuit=...)
New contributor
Noureldin Yosri is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
$\endgroup$
3
  • $\begingroup$ Thanks for this. But does this specifically select n out of the whole qubits from the output and do the QST? Suppose I have 30 qubits and I just need to do QST on 3 of it. $\endgroup$
    – Ceasar
    May 24 at 15:51
  • $\begingroup$ Hi, I have tried this code and it's not running, basically, cirq.experiments.state_tomography(cirq.DensityMatrixSimulator(noise=cirq.ConstantQubitNoiseModel(cirq.depolarize(0.01))), qubits, circuit) $\endgroup$
    – Ceasar
    May 25 at 0:18
  • $\begingroup$ cirq.experiments.state_tomography(cirq.DensityMatrixSimulator(noise=cirq.ConstantQubitNoiseModel(cirq.depolarize(0.01))), q, circuit) This is not running in Google Colab $\endgroup$
    – Ceasar
    May 25 at 0:19
0
$\begingroup$

You only need to do State Tomography on the 2 qubits. But take in mind that, when you perform that, you trace out the other qubits, and are taken as ancilla.

$\endgroup$
1
  • $\begingroup$ Could you help me with the cirq code? $\endgroup$
    – Ceasar
    May 18 at 3:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.