1

I have created a sequence of bitstring. Now I want to calculate the identical bit positions all sequences one by one. I don't understand how to find it.

S1: 00010101110011100010000110000111010100101010101110101011001111100010110101110001001010010111010110000111110110100100100111000100
    for round in range(0, 5):
    rawvalues_sim_str = "".join(rawvalues_sim)
    startindex=0
    endindex=128
    for i in range(0, len(rawvalues_sim_str),128):
        b=rawvalues_sim_str[startindex:endindex]
        startindex = endindex
        endindex += 128
        #Find sequence in bitstring 
        if b[round] == round:
            d = b[round]
            print(d)
    print(b)
3
  • Why did you tag this with quantum-computing, qiskit, ibm-mq? I don't see the connection. Commented Aug 12, 2022 at 9:37
  • 1
    Something to do with Bitwise AND. But I am not entirely sure what you have as input, and expect as output {in: [01110, 10111, 11110], out: 00110} or out: indices [2, 3] Commented Aug 12, 2022 at 9:42
  • NO actually, The string S1 is what I got as output. Now its save in the memory. Now I want to calculate the position of 0 and 1 in string S1 Commented Aug 12, 2022 at 9:57

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.