-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=...)
$\endgroup$
5
  • $\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
    Commented 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
    Commented 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
    Commented May 25 at 0:19
  • $\begingroup$ I'm guessing that q above stands for one qubit, right? ... the method expects a list of qubits so [q] should fix your issue ``` >> cirq.experiments.state_tomography(cirq.DensityMatrixSimulator(noise=cirq.ConstantQubitNoiseModel(cirq.depolarize(0.01))), [q], circuit) <cirq.experiments.qubit_characterizations.TomographyResult at 0x7e331c4329e0> ``` $\endgroup$ Commented May 31 at 16:52
  • $\begingroup$ Hi, this one is actually giving me negative eigenvalues for the density matrix which shoud'nt happen as as the desnity matrix is positive semi-definite $\endgroup$
    – Ceasar
    Commented Jun 27 at 1:17
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
    Commented 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.