Skip to content

How we use Reset Qubits without using measurement in Project Q? #477

@saifawan2703

Description

@saifawan2703

Hi everyone,

I would like to know if there is a way to reset a qubit to the |0⟩ state in ProjectQ without performing a measurement. The reason is that after measuring, I am unable to use the compute-uncompute pattern.
like that

with Compute(eng):
    All(H) | k0
    All(H) | k1
    All(X) | k0
    All(X) | k1

with Control(eng, k0[0:4]):
        with Control(eng, k1[0:-1]):
            Z | k1[-1]  
Uncompute(eng)  #

Any guidance on this would be appreciated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions