TransWikia.com

Get a sparse matrix of quantum circuit

Quantum Computing Asked by Jin on December 8, 2020

Is there a way that can obtain sparse matrix of quantum circuit? I used to check my quantum circuit with quantum_info.Operator, but for large number of qubits, it is difficult because of the memory allocation limit. Is it available in qiskit? or should I build elementary gates in sparse matrix format? Thank you!

One Answer

There are classes for Operators, States, Channels, Measures, Randomness, Analysis and Synthesis in Quantum Information ( qiskit.quantum_info ).

There is a specific class called SparsePauliOp. It is constructed as a Sparse N-qubit operator in a Pauli basis representation. It seems to be using SciPy internally for creating the sparse matrix. It can be used for performing operator arithmetic for hundred of qubits if the number of non-zero Pauli basis terms is sufficiently small. Please find further details here in the Qiskit Terra API specifications. Qiskit Aqua as has a class called Matrix Operator where we can pass a Sparse Matrix. Please find further details here in the Qiskit Aqua API specifications.

Answered by Gokul Alex on December 8, 2020

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP