How do you calculate the number of physical qubits needed for a single T factory?

EA 25 Reputation points
2025-06-12T13:57:32.0666667+00:00

Hello,

I have been using the Resource Estimator that estimates the number of physical qubits required to run algorithms with different error correction codes. I am curious about exactly how you calculate the T factory qubits.

In the documentation and the output notes from when I run the code, I have gathered that the number of T factory qubits required to run the input algorithm is given by the product of the number of T factories capable of producing the required number of T states during the algorithm's runtime with the number of physical qubits needed for a single T factory.

I think I understand how you calculate the first number in this product, but I haven't been able to figure out how you calculate the number of physical qubits required for a single T factory. Can you please clarify this for me?

I also wanted to confirm with you if the only types of physical qubits you consider in the resource estimation are the qubits required to run the algorithm (the lattice encoding, extra qubits required to perform operations) and the T factory qubits? Do you also include the qubits that are needed for the magic state injection of the T states once they are produced by the factories?

Thanks so much!

Azure Quantum
Azure Quantum

An Azure service that provides quantum computing and optimization solutions.


1 answer

Sort by: Most helpful
  1. kobulloc-MSFT 26,861 Reputation points Microsoft Employee Moderator
    2025-06-13T16:41:40+00:00

    Hello, @EA !

    I have an answer from the Azure Quantum team that expands on the documentation regarding the calculation of the number of physical qubits required for a single T factory:

    Edit:

    There appears to be a formatting bug in Q&A preventing the second part of this answer from appearing once published:

    Answering the first question:

     

    A factory is constructed using multiple rounds of distillation, where each round of distillation can have multiple distillation units. Each distillation unit needs several logical qubits (depends on the type of unit). Depending on the output error rates, all units in a round require some specific code distance (typically increasing over the rounds). The code distance can be used to derive the number of physical qubits per logical qubit and therefore we can compute the total number of physical qubits per unit. Then we can compute the total number of physical qubits for that round by multiplying the counts by the number of units in that round.

     

    Now we know the number of physical qubits per round. We assume that we perform the rounds in order and can reuse the qubits. Therefore, the total number of qubits for the complete factory is the maximum number of qubits over all rounds.

     

    Finally, to produce all required T states for the algorithm execution in time, we may need multiple copies of factories. Therefore, the total amount of factory qubits is the number of qubits for one factory multiplied by the number of copies.

     

    Answering the second question:

     

    We do not consider the routing qubits to transfer distilled magic states into the algorithm qubits using multi-qubit Pauli measurements. However, we do account for layout overhead in lattice surgery to perform the multi-qubit Pauli measurements.

    I hope this helps!

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.