Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Circuit to einsum conversion #1790

Open
1 task done
zohimchandani opened this issue Jun 10, 2024 · 2 comments
Open
1 task done

Circuit to einsum conversion #1790

zohimchandani opened this issue Jun 10, 2024 · 2 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@zohimchandani
Copy link
Collaborator

Required prerequisites

  • Search the issue tracker to check if your feature has already been mentioned or rejected in other issues.

Describe the feature

For an upcoming demo, we need cuQuantum to accept CUDA-Q circuits into the CircuitToEinsum function here.

@zohimchandani zohimchandani added the enhancement New feature or request label Jun 10, 2024
@schweitzpgi schweitzpgi added the RFC Request for Comments label Jun 10, 2024
@zohimchandani
Copy link
Collaborator Author


from cuquantum import cutensornet as cutn
from cuquantum import contract, CircuitToEinsum
import torch 
from qiskit.circuit import QuantumCircuit, Parameter

num_qubits = 1
measurement_ops = 'Z'
light_cone  = True 

# Define the quantum circuit with one qubit and two parameters
theta = Parameter('θ')
phi = Parameter('φ')

circuit = QuantumCircuit(num_qubits)
circuit.rx(theta, 0)
circuit.ry(phi, 0)

    
circuit = circuit.bind_parameters({theta: parameters[0], phi: parameters[1]})

converter = CircuitToEinsum(circuit, backend='torch')  

einsum_expression, tensor_operands = converter.expectation(measurement_ops, light_cone)

Here we can see that it can accept a Qiskit circuit, we would like it to accept CUDA-Q too.

Thanks

@zohimchandani
Copy link
Collaborator Author

Request to cuQuantum here

@bettinaheim bettinaheim added this to the release 0.8.0 milestone Jul 1, 2024
@bettinaheim bettinaheim removed the RFC Request for Comments label Aug 7, 2024
@1tnguyen 1tnguyen modified the milestones: release 0.9.0, release 0.9.1 Nov 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants