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

Drawing conditional measurement operations #2157

Open
4 tasks done
zohimchandani opened this issue Aug 27, 2024 · 0 comments
Open
4 tasks done

Drawing conditional measurement operations #2157

zohimchandani opened this issue Aug 27, 2024 · 0 comments
Labels
bug Something isn't working enhancement New feature or request

Comments

@zohimchandani
Copy link
Collaborator

Required prerequisites

  • Consult the security policy. If reporting a security vulnerability, do not report the bug using this form. Use the process described in the policy to report the issue.
  • Make sure you've read the documentation. Your issue may be addressed there.
  • Search the issue tracker to verify that this hasn't already been reported. +1 or comment there if it has.
  • If possible, make a PR with a failing test to give us a starting point to work on!

Describe the bug

Drawing functionality does not plot out mid circuit measurements:

@cudaq.kernel 
def kernel(): 
    
    qubits = cudaq.qvector(3)
    
    h(qubits[0])
    
    m1 = mz(qubits[0])
        
    if m1 == 1: 
        z(qubits[2])
    

Image

In this circuit, the z gate is only applied if the measurement result is 1.

This is how conditional gates are represented in literature:

Image

Steps to reproduce the bug

NA

Expected behavior

NA

Is this a regression? If it is, put the last known working version (or commit) here.

Not a regression

Environment

  • CUDA Quantum version:
  • Python version:
  • C++ compiler:
  • Operating system:

Suggestions

No response

@schweitzpgi schweitzpgi added bug Something isn't working enhancement New feature or request labels Sep 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants