Skip to content

TypeError: unsupported operand type(s) for +: 'QuantumCircuit' and 'QuantumCircuit' #5

@nineil91

Description

@nineil91

Hello. Thank you for the interesting project.

In classQuanvCircuit, '+=' in the init function definition was replaced with two lines because QuantumCircuit said it could not be used. Does this mean the same thing? I also wonder if there is a better solution.

# self._circuit += random_circuit(self.n_qubits, 2) self._circuit = random_circuit(self.n_qubits, 1) #replaced self._circuit = random_circuit(self.n_qubits, 1) #replaced

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions