3
$\begingroup$

I am searching for a quantum package in Python that can enable me to calculate, for example, a density matrix symbolically and display the results in variable form rather than numerically. I am aware of QuTiP, but it is primarily designed for numerical applications.

$\endgroup$
1
  • $\begingroup$ Can you give a more specific example of a density matrix you want to calculate symbolically? I have had some luck combining sympy with Qiskit. $\endgroup$ Mar 29 at 20:40

2 Answers 2

4
$\begingroup$

Take a look at qiskit-symb, which is a Python package.

You may also take a look this, which is not a Python package, but you might find it helpful: Wolfram Quantum Framework provide-

$\endgroup$
3
$\begingroup$

The pytket package has utility functions for doing symbolic manipulations with quantum circuits. See the docs for pytket.utils.symbolic.

Here's how you'd get the symbolic unitary of a small circuit.

from pytket import Circuit
from pytket.circuit.display import render_circuit_jupyter as draw
from pytket.utils.symbolic import circuit_to_symbolic_unitary
from sympy import symbols

a, b = symbols("a b")
circ = Circuit(2)
circ.X(0).CRy(a, 0, 1).Rz(b, 0) 

draw(circ) # Draw circuit diagram
circuit_to_symbolic_unitary(circ) # Get the symbolic unitary matrix

enter image description here enter image description here

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.