Giter Club home page Giter Club logo

sliqec's Introduction

SliQEC - A BDD-based Quantum Circuit Equivalence Checker

Introduction

SliQEC is a BDD-based quantum circuit equivalence checker implemented in C/C++ on top of CUDD package. The concerned equivalence checking problem includes the full equivalence checking and partial equivalence checking. For more details about problem formulations and theories, please refer to the Citation.

Build

First configure CUDD:

cd cudd
./configure --enable-dddmp --enable-obj --enable-shared --enable-static
cd ..

Then build the checker, type the command at the root directory.

$ make

Execution

The circuit format being checked is OpenQASM used by IBM's Qiskit, and our supported gate set now contains Pauli-X, Pauli-Y, Pauli-Z, Hadamard, Phase and its inverse, π/8 and its inverse, Rotation-X with phase π/2, Rotation-Y with phase π/2, Controlled-NOT, Controlled-Z, Toffoli, SWAP, and Fredkin. One can find some example benchmarks in examples folder.

The help message concludes the details for execution:

$ ./SliQEC --help
Options:
  --help                produce help message.
  --reorder arg (=1)    allow variable reordering or not.
                        0: disable 1: enable
  --circuit1 arg        1st circuit for equivalence checking.
  --circuit2 arg        2nd circuit for equivalence checking.
  --p arg (=0)          conduct full or partial equivalence checking.
                        0: full 1: partial
  --nQd arg (=0)        (only for --p 1) the number of data qubits.
  --nQm arg (=0)        (only for --p 1) the number of measured qubits.

Example

Full Equivalence Checking

For conducting full equivalence checking on examples/FEC/bv_1.qasm and examples/FEC/bv_2.qasm, execute:

$ ./SliQEC --circuit1 examples/FEC/bv_1.qasm --circuit2 examples/FEC/bv_2.qasm

Then the results will be shown:

{
	#Qubits (n): 10
	Gatecount of circuit1: 29
	Gatecount of circuit2: 62
	Is equivalent? Yes
}

Runtime: 0.019328 seconds
Peak memory usage: 12881920 bytes

Partial Equivalence Checking

For conducting partial equivalence checking on examples/PEC/period_finding_1.qasm and examples/PEC/period_finding_2.qasm with 3 data qubits and 3 measured qubits, execute:

$ ./SliQEC --p 1 --circuit1 examples/PEC/period_finding_1.qasm --circuit2 examples/PEC/period_finding_2.qasm --nQd 3 --nQm 3

Then the results will be shown:

{
        #Qubits (n): 8
        #Data qubits (d): 3
        #Measured qubits (m): 3
        Gatecount of circuit1: 395
        Gatecount of circuit2: 437
        Is partially equivalent? Yes
}

Runtime: 1.86163 seconds
Peak memory usage: 14553088 bytes

Citation

C.-Y. Wei, Y.-H. Tsai, C. -S. Jhang, and J.-H. R. Jiang, “Accurate BDD-based Unitary Operator Manipulation for Scalable and Robust Quantum Circuit Verification,” in Proceedings of the Design Automation Conference (DAC), 2022, pp. 523-528. T.-F. Chen, J.-H. R. Jiang, and M.-H. Hsieh, “Partial Equivalence Checking of Quantum Circuits,” in Proceedings of the International Conference on Quantum Computing and Engineering (QCE), 2022, pp. 594-604.

Contact

If you have any questions or suggestions, feel free to create an issue, or contact us. For full equivalence checking, please contact [email protected]. For partial equivalence checking, please contact [email protected].

sliqec's People

Contributors

joeyweii avatar tfchen01 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.