Skip to content
This repository has been archived by the owner on Jan 12, 2024. It is now read-only.

The DumpRegister function document is inconsistent with the output of the terminal when quantum entanglement occurs #671

Open
AidPaike opened this issue Apr 25, 2023 · 0 comments

Comments

@AidPaike
Copy link

AidPaike commented Apr 25, 2023

When I create a bell state using two qubits and use DumpRegister to dump one of the qubit states, there is nothing in the console. However, the documentation mentioned that If the given qubits are entangled with some other qubit and their state cannot be separated, it just reports that the qubits are entangled.

namespace TEST {
    open Microsoft.Quantum.Diagnostics;
    open Microsoft.Quantum.Intrinsic;
    open Microsoft.Quantum.Canon;


    @EntryPoint()
    operation main() : Unit {
        use control = Qubit();
        use target = Qubit();
        H(control);
        CNOT(control, target);
        DumpRegister((), [target]);//nothing
        // DumpRegister((), [control, target]); will print correctly.
        //DompMachine(); will print correctly.
        Reset(target);
        Reset(control);
    }
}

The program returns as:

Null value


Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant