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

[Bug] MultivariateStrategy.SERIES has different behaviors when passed to circuit or directly to QNN #609

Open
n-toscano opened this issue Nov 11, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@n-toscano
Copy link
Contributor

Short description

When creating a FM that takes more than one variable as input, we need the two encodings not to commute with each other. If the config is passed directly to QNN.from_configs() then an entangling layer is placed in between, and all works. It's not the case if one passes it to the QuantumCircuit.

What is the expected result?

No response

What is the actual result?

No response

Steps/Code to reproduce

from qadence import *

n_qubits = 4
fm_config = FeatureMapConfig(
    num_features=2,
    inputs = ["x", "y"],
    multivariate_strategy= MultivariateStrategy.SERIES,
)
observable_config = ObservableConfig(detuning=Z)
qnn = QNN.from_configs(
    register=n_qubits,
    fm_config=fm_config,
    obs_config=observable_config
)

vs

fm = create_fm_blocks(register=n_qubits, config=fm_config)
circuit = QuantumCircuit(support=n_qubits, fm)

Tracebacks (optional)

No response

Environment details (optional)

No response

Would you like to work on this issue?

Yes

@n-toscano n-toscano added the bug Something isn't working label Nov 11, 2024
@n-toscano n-toscano changed the title MultivariateStrategy.SERIES has different behaviors when passed to circuit or directly to QNN [Bug] MultivariateStrategy.SERIES has different behaviors when passed to circuit or directly to QNN Nov 11, 2024
@mlahariya mlahariya assigned mlahariya and unassigned mlahariya Nov 26, 2024
@mlahariya
Copy link
Collaborator

To review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants