Although quantum computers promise to solve some of the most intractable problems our society faces, such as climate change and food security, commercially viable solutions will require large-scale, fault-tolerant quantum computers. Solving these problems will also require algorithms and quantum applications capable of executing solutions at a scale, and in a timeframe, that is practical. But how do you know how long a given quantum application will take to run, or how many physical qubits it will require? In quantum computing, Resource Estimation is the process used to answer these questions. Resource Estimation can help you determine the number of qubits, quantum gates, processing time, and other resources needed to run a quantum program assuming specific hardware characteristics.
Azure Quantum Resource Estimation
In November 2022, Azure Quantum announced the release of the Azure Quantum Resource Estimator, a tool to help quantum innovators prepare their solutions for future, scaled quantum systems. The Resource Estimator does this by helping to ascertain how many resources it will take to run a quantum application on a fault tolerant quantum machine. Using the Resource Estimator, quantum developers can understand the number of logical and physical qubits and runtime required to execute a given quantum program. The developer or researcher can then iterate, progressively bringing down the cost required to run the solution. Knowing how long it will take to run a specific algorithm, and which qubit technologies are better suited to solving a specific problem, can guide the developer towards beneficial implementation changes that will improve resource consumption.
The Azure Quantum Resource Estimator is designed specifically for future, fault-tolerant quantum systems. Starting from well-known pre-defined qubit parameter settings and Quantum Error Correction (QEC) schemes, a developer can estimate resources for an application or algorithm using the Resource Estimator to understand how choices such as qubit technology, or assumed error correction scheme, will impact overall runtime. More advanced users can review the formulas and values used to derive each estimate and can configure settings across a wide range of machine characteristics such as operation error rates, operation speeds, and error correction schemes. Running comparisons across configurations can help quantum developers refine their solutions to run efficiently on future, scaled quantum machines.
To learn more about Resource Estimation, including how to get started with the Azure Quantum Resource Estimator, check out the Azure Quantum release announcement.
Resource Estimator Capabilities
The Azure Quantum Resource Estimator has been designed with capabilities to help you analyze and optimize your quantum applications.
Capabilities to facilitate application analysis:
- Quantum Chemistry: Using Resource Estimator, you can explore the requirements needed to perform accurate chemistry simulations on fault-tolerant quantum computers. Resource Estimator offers a built-in double-factorized qubitization algorithm and default Hamiltonians to enable easy experimentation, or you can supply your own Hamiltonians using FCIDUMP files. You can learn more about Resource Estimation and quantum chemistry by trying the following tutorial Estimate the resources of a quantum chemistry problem and GitHub sample.
- Space and time visualizations: A quantum program relies heavily on two primary resources: space (quantified by the number of qubits) and time (measured by the execution time of the algorithm). These resources are influenced qubits and the operations, T-factories, and T-states used to execute the program. The Resource Estimator includes visualizations to help you quickly understand how resources are allocated among these components, helping you to design trade-offs between space and time. The use of Space-time diagrams is explained further in the Azure Quantum documentation.
Resource Estimator space diagram
Capabilities to help you quickly run and retrieve Resource Estimation jobs:
- Caching operations: The Resource Estimator offers a variety of caching operations to speed analysis. For example, the Q# operation FactoringFromLogicalCounts allows you to import logical resource estimates and the EstimateCaching function allows you to identify and cache estimates for frequently repeated code blocks. Resource Estimator caching is further documented in the following Azure Quantum article and notebook: Get the most out of the Azure Quantum Resource Estimator, Resource Estimation for Integer Factoring.
- Batching: : Performing resources estimation for multiple configurations can be performed locally with Q# and Python by passing multiple input parameters to the `qsharp.estimate` function, or for Qiskit and QIR by submitting those multiple configurations as input to the Azure Quantum Service. You can explore batching in the Azure Quantum documentation.
Capabilities to improve your estimate:
- Component-level space/time optimization: The resource estimator can build the whole frontier of tradeoff between the run time and number of qubits utilized by the algorithm. The new Resource Estimator allows users to make decisions on balancing between hardware and time resources across entire algorithms or sub routines. The Azure Quantum documentation article Customize resource estimates to machine characteristics has further information on how to use this capability. Or you can try it for yourself using the Quantum dynamics resource estimation sample notebook in GitHub.
- Modelling custom distillation units: T-factories play a crucial role in producing T-states that are utilized in executing the algorithm, and they can significantly impact overall resource estimates. During execution, a T-factory undergoes several rounds of distillation, with each round involving a distillation circuit. These are highly optimized quantum circuits that generate higher quality T-states from input T-states. The Resource Estimator provides default distillation units, or you can provide custom distillation units for T-factory optimization. More information on custimizing distillation units is available in the following article: Resource Estimator input and output parameters.
Note: All GitHub samples referenced above are available as hosted notebooks from your Azure Quantum Workspace. Login to the Azure Portal to try them today. For more information on getting started with Azure Quantum, check out the following article on Microsoft Learn: Create an Azure Quantum workspace.