DASQA (pronounced "dah-skuh") is a framework to encapsulate application-driven quantum hardware architecture developed as part of the Munich Quantum Toolkit (MQT) by the Chair for Design Automation at the Technical University of Munich. In this repository, a reference implementation of the framework is provided. This implementation was done with modularality and easy extensibility in mind to allow for future extensions and improvement.
- Steps in framework
- Repository structure
- Extending reference implementation
- Trying reference implementation
- Acknowledgements
In this section, we will describe the steps in the framework as follows:
Architecture generator- generates an optimized high-level architecture based on a quantum application(i.e, quantum circuit). The input of the architecture generator is a quantum application and it outputs a high-level architecture containing the layout of the qubits and qubit frequenciesPhysical layout mapper- maps the high-level architecture to physical layout using tools such as Qiskit MetalOptimizer- optimizes the geometries of the components to hit target parameters
In this section, we will describe the structure of the repository as follows to help you navigate through the repository:
src- contains the reference implementation of the frameworkarchitecture_generator1is based on G. Li, Y. Ding and Y. Xiebusgenerates connection between qubitschipcreates temporary chip for simulation. The temporary chip is a subgraph of the layout graph and it is used in the frequency generation modulefrequencygenerates frequency of qubits using Monte Carlo simulation. It chooses frequency configuration based on maximum yield rate as computed by theyieldsimulatormodulelayoutgenerates matrix of qubit layoutprofilegenerates profiles of quantum application. The profile of are as follows:- Two qubit gate map which contains control and target gates of the two qubit gate
- Connectivity degree of qubits
- Adjacency matrix of qubit
yieldsimulatorcalculates the yield rate that is used by thefrequencymodule. Yield rate is the number of sub-graphs with no frequency collision divided by the number of trials
mappermaps architecture generator layout to Qiskit Metal physical layoutcanvasis a module that creates the design space for the physical layoutcapacitorcreates the capacitorscapacitor_launchpad_connectorgenerates capacitor to launchpad connectorslaunchpadcreates launchpads(i.e, readout/control)qubitcreates qubitsqubit_capacitor_connectorcreates qubit to capacitor connectionsqubit_connectorcreates qubit-to-qubit connections
optimal_geometry_findercontains the algorithm to find the optimal geometry of a component given a target parameteroptimizeroptimizes the geometries of layout to hit target parameters__main__.pyis the entry point for the Command-Line Interface (CLI) application
notebookstrains statistical model to stand-in for simulation software such as Ansys HFSS and used by the optimizer
A reference implementation of the framework is provided in the src directory. The reference implementation is modular and extensible.
To this end, a concrete implementation which is a subclass of DesignFlowBase class is available at src/concrete_design_flow1.py. In the concrete implementation, an example of how the generate_architecture and optimize_layout abstract methods are overriden is given.
Then, the run method defined in the DesignFlowBase class invokes the generate_architecture and optimize_layout methods to execute the design flow.
Each module in src has abstract classes which allows for easy extensibility.
As an example, the qubit layout subclass TransmonPocket6Qubit in the physical layout mapper inherits from the QubitBase abstract class defined in QubitBase as:
class QubitBase(ABC):
@abstractmethod
def generate_qubit_layout(self):
passThe TransmonPocket6Qubit subclass then defines how the qubits are positioned on the physical layout. For a complete list of possible abstract classes that can be overriden in each module, please refer to the individual modules in src directory.
-
Clone the repository -
git clone {URL} -
Change to cloned directory -
cd dasqa -
The easiest way to install the toolkit without affecting other packages is to create a virtual environment, i.e: using conda, as following. Else, you can just run
python -m pip install -e .. Do note that DASQA is tested on Python 3.10.
conda env create -n mqt-dasqa -f environment.yml
conda activate mqt-dasqa
python -m pip install -e .
- Install Qiskit Metal following installation instructions at Qiskit Metal. Refer to the Pre-existing environment section. Note that to run the pip install command without the
--no-depsflag so that all dependencies are installed for Qiskit Metal.
Usage:
dasqa --file-path [PATH_TO_QASM_2.0_FILE] --config-file-path [PATH_TO_CONFIG_FILE]
The CLI will generate the high-level architecture of the placement of qubits in a 2D square-lattice and the corresponding qubit frequencies. The Metal GUI is invoked at the end as following where there is an option to save the design as a Python script.
- There is a test circuit that could be used to test the package. Navigate to
dasqadirectory and executedasqa --file-path ./src/tests/test_circuit/circuit1.qasm --config-file-path ./src/tests/test_config/config.yml
- On top of normal installation, install development dependencies using
pip install -r requirements-dev.txt
- QT Warnings
From Qiskit Metal FAQ:
Q: Why am I seeing a critical error from qt about not controlling layer-backing?
A: If you are seeing: CRITICAL [_qt_message_handler]: …. WARNING: Layer-backing can not be explicitly controlled on 10.14 when built against the 10.14 SDK … you are likely running a MAC OS version that has trouble with the libraries. Based on information that is available online, this problem does not appear to have a solution. However, it does not seem like this error affects Qiskit Metal’s functionality. If you find problem with this, you might want to try using an older version of the dependency packages, beginning with lowering your python version to 3.7.x.
The Munich Quantum Toolkit has been supported by the European Research Council (ERC) under the European Union's Horizon 2020 research and innovation program (grant agreement No. 101001318), the Bavarian State Ministry for Science and Arts through the Distinguished Professorship Program, as well as the Munich Quantum Valley, which is supported by the Bavarian state government with funds from the Hightech Agenda Bayern Plus.
